Skip to content

A Streamlit component that integrates Nivo's Sankey diagram for interactive data visualization in Streamlit apps.

License

Notifications You must be signed in to change notification settings

Navxihziq/streamlit-nivo-sankey

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

streamlit-nivo-sankey

Build and Publish

This is a Streamlit component that lets you create Nivo Sankey diagrams. Please check out Nivo's amazing page on Sankey for more information.

This project is still in early development. More granular control, testing, and documentation, and development guide will come soon. Stay tuned!

Installation instructions

pip install streamlit-nivo-sankey

Basic Usage Example

import streamlit as st

from streamlit_nivo_sankey import st_nivo_sankey

data = {
    "nodes": [
        {"id": "a", "nodeColor": "hsl(160, 70%, 50%)"},
        {"id": "b", "nodeColor": "hsl(160, 70%, 50%)"},
        {"id": "c", "nodeColor": "hsl(160, 70%, 50%)"},
    ],
    "links": [
        {"source": "a", "target": "b", "value": 1},
        {"source": "a", "target": "c", "value": 5},
    ]
}
value = st_nivo_sankey(data)    # returns clicked node/link and value

image

About

A Streamlit component that integrates Nivo's Sankey diagram for interactive data visualization in Streamlit apps.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published