Self-referencing table to Hierarchical JSON converter

A tool to convert your data from this...

...into this
>> so you can do things like this with it !

OR give a URL / relative path to your CSV File:
    Load CSV
sample | pune.2016-17.draft.budget

Main

startKey:
maxDepth:

Columns

keyField:
parentField:
amountField:
nameField:

Other

amountVar:



Warning: script may take time for large datasets. If browser shows a stop/continue prompt, please press Continue till the work is done.

Notes:

  • Verify and format your JSON code here: jsonformatter.org
  • You can save this page to your computer or download from the github link and run it locally. It works fine on Ubuntu/Firefox, but on windows you might need to run it under a portable server (like UWamp).
  • The best way to make this process your data is to export as CSV and copy-paste the contents to the top textbox. You're welcome to try loading the file by URL but no guarantees.
  • Warning: If you choose the "Print all columns" option, those columns that have the same title as 'name', or the amountVar(default: 'value'), ( or 'level' or 'subitems' if you have chosen to print metadata )...
    will be overwritten. So try to name your columns differently.. avoid using 'name', 'value', 'subitems', 'level'.
  • Avoid naming your columns as 'parent' or 'children' too as most data-viz scripts use those and your data might get overwritten.
  • Just for the record, all data conversion, processing on this page is happening at your end (client-side) only. We can't and don't want to do anything with your data. Save the page to ur comp and run it without internet.
Get the Code on Github
See some outputs of this wizard in action:
Pune 2016-17 Budget Visualized : interactive pie-chart, and interactive list.

Invitation : Help us

Creative Commons License

by Nikhil VJ, Pune, India.
Created during a project with Centre for Environment Education, Pune
Using Papa Parse, jQuery, Bootstrap and a ton of snippets from Stack Overflow network.
Send feedback on nikhil.js [at] gmail [dot] com.