Skip to content

Latest commit

 

History

History
17 lines (13 loc) · 966 Bytes

README.md

File metadata and controls

17 lines (13 loc) · 966 Bytes

CSV to Sankey

This Python CLI application converts a CSV into a file for SankeyMATIC to create Sankey diagrams.

⚠️ Still a work in progress

Sankey diagram

How to use

  1. Create a spreadsheet with Excel, Libre Calc, Numbers, Google Sheet, or other.
  2. 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.
  3. Export as CSV
  4. Run python ctskey.py -f <path-to-csv-file>
  5. Open the out directory and view the contents of sankey.skmt.
  6. Paste contents into SankeyMATIC

Next step

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.