after parsing it using d3.csv().parse(stringData)
it will output an array of Object each object like
{
“Date”: “2020-08-17T00:00-0500”,
“key1”: “11.34833333333333”,
“key2”: “-1.1275”,
“key3”: “-0.73833333333333”
}
I want to change the structure of of output object to be like all of these info to be in one object to be like
so basically each parsed object is really contains info of 3 obj
I know I can achieve it using map functions in javascript but it became ugly and lots of loops- made it hard for performance. any idea how can I use d3 methods to get what I want ?
@hellonearthis Thanks for the example - one thing to point out is that the key names I hardcoded them for example as key1,key2,key3 but in the application they are dynamic. and the data is like 3000 so looks like by doing that I will have to go over all over them. I was thinking if there is a method or some sort that can clean this up
@severo I will look at this library and see if it suits me
Is there a way to tell which keys are to be extracted, have they a unique quality that they all share, like all starting with key? That would make it easy to generate the hardcode array of key names.
Working out the group name is hard as there is not obvious way to computer it from the csv data set.