This Python CLI application converts a CSV into a file for SankeyMATIC to create Sankey diagrams.
- Create a spreadsheet with Excel, Libre Calc, Numbers, Google Sheet, or other.
- Ensure your CSV has the following columns: Source, Target, and Volume. Source and Target corresponds to labels and where the Sankey flows from and to. Volume is the amount flowing from the source to the target.
- Export as CSV
- Run
python ctskey.py -f <path-to-csv-file>
- Open the
out
directory and view the contents ofsankey.skmt
. - Paste contents into SankeyMATIC
Currently this program will only create a file which you then must copy and paste into SankeyMATIC. My plan is to write a web scraper which will interact with the form on the site and return the user a Sankey diagram.