Coder Social home page Coder Social logo

gtanev / mcsc-sankey Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 145 KB

Sankey Visualization of Material & Energy Flows (MIT Climate & Sustainability Consortium)

Home Page: https://mcsc-sankey.vercel.app

License: MIT License

HTML 1.26% JavaScript 98.40% CSS 0.34%
d3 data react sankey visualization visx

mcsc-sankey's Introduction

Sankey Visualization of Material & Energy Flows

This is an interactive data visualization of global material and energy flows, based on data collected and prepared by Dr. Katrin Ellen Daehn. This visualization was built for the MIT Climate & Sustainability Consortium, and its source code has been made available under the MIT license.

Features

The visualization shows the global flows of materials and energy for 2019, combined into a single Sankey diagram. The flows are color-coded by the category of material or energy they represent, and the width of each flow is proportional to the amount of material or energy it carries. A legend is provided to help interpret the colors.

Users can hover over a flow to see the name and amount of material or energy it carries from its source to its target node. Clicking a node shows a pop-up window with a complete list of flows that originate from, and terminate at, that node, i.e., that node's inflows and outflows. Multiple pop-up windows can be opened at the same time and moved around on the screen.

An interactive pan and zoom feature is also provided, allowing users to zoom in on a particular region of the diagram, pan around the diagram, and reset the view to its original state. These actions can be performed either by using a pointing device over the diagram, or by using the controls in the bottom right corner of the user interface.

A couple of toggle buttons are also included, with the following functionality:

  • Highlight flow types — activating this toggle colors the flows in the visualization based on their type (i.e., material or energy).
  • Animate flows — activating this toggle animates the flows in the visualization, depicting the direction of their movement and the amount of material or energy they carry (i.e., their throughput relative to each other).
  • Enable node dragging — activating this toggle allows users to drag and reposition the nodes in the visualization along the vertical axis, while temporarily disabling the click event on the nodes. Inversely, deactivating this toggle disables the dragging functionality and restores the node click event.

Frameworks and libraries

This project was built with a collection of frameworks and libraries within the JavaScript ecosystem, including React, Vite, D3, and VisX, which were used to generate the visualization and all of its interactive elements.

mcsc-sankey's People

Stargazers

 avatar

Watchers

 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.