trademapper / trademapper-js

JS libraries for mapping trade using d3.js
Other
26 stars 18 forks source link

Preselect CSV #84

Closed ghost closed 5 years ago

ghost commented 5 years ago

Hi, how can I make TradeMapper start with a preselected CSV file? Thanks 👍

hallworth commented 5 years ago

There's an example in the wiki here https://github.com/trademapper/trademapper-js/wiki/How-to-use-trademapper#url-parameters

ghost commented 5 years ago

Great, thank you.

ghost commented 5 years ago

Works so far but if I prompt customised input data, the user still ahs to assign the columns. Is there a workaround for this? Thanks and best regards.

townxelliot commented 5 years ago

https://github.com/trademapper/trademapper-js/wiki/How-to-use-trademapper explains that you can pass a csvtype parameter. If set, the fields are mapped automatically, depending on the format you specify. Only thing is, your data has to match the format exactly.