Code Monkey home page Code Monkey logo

sankey's Introduction

Image

(Chart generated from the sample file.)

This app is automagically deployed at http://anarseyf.github.io/sankey/.

To check out the code, do this in the terminal on Mac or Linux (not sure how to do this on Windows):

# mkdir ~/git && cd ~/git
# git clone https://github.com/anarseyf/sankey.git
# cd sankey
# open index.html

A few notes:

  • Empty lines (like the 2nd line in your sample file) is interpreted as "no action was taken on those 13 messages", so they go directly from Start to End.
  • Each entry in the CSV file results in its own line. Depending on the data, there can be multiple lines going from ActionA to ActionB in parallel. As a concrete example: in the sample file, there are multiple entries starting with ActionA, with the implied link Start -> ActionA. It's possible to consolidate those into one line -- let me know if that would be valuable.
  • Cycles are handled too (for example, if both ActionC,ActionD and ActionD,ActionC entries are present), but rendering of lines isn't perfect.
  • Actual values for each line can be seen on mouse-over.

Browser support and Limitations:

  • Works on Firefox, Safari, and Chrome. Not tested in Edge or Internet Explorer.
  • It's best to use Firefox. The file uploader accepts files from anywhere, not just from subfolders of the repository. The file uploader on Safari only accepts files located in the same directory as the index.html file (no subfolders).
  • On Chrome, simply opening the index.html file does not work (due to cross-origin complaints), but there's an easy workaround:
    • In the terminal:
    # cd ~/git/sankey
    # python -m SimpleHTTPServer
    

(Adapted from http://bost.ocks.org/mike/sankey/ and http://bl.ocks.org/cfergus/3921009)

sankey's People

Watchers

Anar S. avatar Fedor Zhdanov avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.