At the moment running the supply command converts spreadsheets in the form of dsv files to json files. The spreadsheet data becomes and array of object, one pre row with the object keys being the cells in first line of the spreadsheet.
Another common representation we might want is that of an object where each row is a value keyed by a given column name, (a dictionary in python terms)
eg
name,lat,lon
Los Angeles,34°03′N,118°15′W
New York City,40°42′46″N,74°00′21″W
Paris,48°51′24″N,2°21′03″E
could become
{
"Los Angeles":{
"name":"Los Angeles", "lat":"34°03′N", "lon":"118°15′W"
}
"New York City":{ }
"Paris":{ }
}
Something like lodash's keyBy function
I envisage this would be secondary process after the initial parsing so once you have your standard json representation that's then converted to a keyed json representation (the means to do so possibly encoded in the metadata file?)
At the moment running the
supply
command converts spreadsheets in the form of dsv files to json files. The spreadsheet data becomes and array of object, one pre row with the object keys being the cells in first line of the spreadsheet.Another common representation we might want is that of an object where each row is a value keyed by a given column name, (a dictionary in python terms)
eg
could become
Something like lodash's keyBy function I envisage this would be secondary process after the initial parsing so once you have your standard json representation that's then converted to a keyed json representation (the means to do so possibly encoded in the metadata file?)