Aside from minor formatting fixes, I moved the example to the top. The flow felt a little unnatural to walk through (especially if you're new to / haven't yet installed jupyter).
Some additional feedback:
The order of arguments to %loadVisualization is kind of cryptic. Playing around with it, it seems like the first argument MUST be a file, and once a JS / HTML file is loaded, all subsequent ones are ignored (?). I also tried loading CSV files, and it looks like the filename was just passed as a string (but maybe I'm not doing it correctly)?
I'm a little fuzzy on what require.config is for? Why this layer of indirection just to import D3? Either this should be abstracted away in the code so the user doesn't see it, or if it's to enable loading other libraries (e.g. jquery, react, etc), should we add documentation for how to use it?
The require.config is indeed for external dependencies (with simple examples we've mostly just used D3 but I can imagine more complex projects needing to specify heftier javascript dependencies). I'll update the readme to be more specific about require.config
I've played around with allowing users to load multiple javascript files versus one javascript file and I'm unsure which is better. Currently I have it so that all javascript files get sourced(i.e. if there are values you want to store in a separate file), but only the first argument is used in the actual Display call. I'll update the readme with this info and we can decide which is the best option.
Aside from minor formatting fixes, I moved the example to the top. The flow felt a little unnatural to walk through (especially if you're new to / haven't yet installed jupyter).
Some additional feedback:
%loadVisualization
is kind of cryptic. Playing around with it, it seems like the first argument MUST be a file, and once a JS / HTML file is loaded, all subsequent ones are ignored (?). I also tried loading CSV files, and it looks like the filename was just passed as a string (but maybe I'm not doing it correctly)?require.config
is for? Why this layer of indirection just to import D3? Either this should be abstracted away in the code so the user doesn't see it, or if it's to enable loading other libraries (e.g. jquery, react, etc), should we add documentation for how to use it?