This is a simple example.
CSV data file :
name, source, target
John , A , None
Emma , B , A
Mike , C , A
Theoretical JSON representation :
{
"comment": "example code",
"nodes": [
{
"name": John,
"source" : A
},
{
"name": Emma ,
"source" : B
},
{
"name": Mike ,
"source" : C
}
],
"links": [
{
"source": B,
"target": A
},
{
"source": C,
"target": A
}
]
}
Visualized graph concept:
B -> A <- C
The JSON format shown above is just one possibility. There are many other ways to structure the data in a JSON file.
I am looking for a tool or library that can easily convert CSV arrays into JSON files for creating JavaScript graphs.
I have multiple CSV files that I want to convert into interactive graphs using JavaScript, but first I need well-structured JSON input data. I am interested in automating the process of constructing JSON files.