Skip to main content

A streamlit component to visualize network graph data using Sigma.js

Project description

Streamlit Sigma.js Component

A streamlit component to visualize network graph data.

Combines Python, Streamlit, Vue3 and Sigma.js.

Key Features

  • Visualize network data
  • Interact with the graph
  • Display additional nodes & edges attributes

(screenshot)

Installation

Manual pip installation

Create and activate a python virtual environment (venv, conda, ...)

Clone this repository

git clone https://github.com/camaris2/streamlit_sigmajs_component.git

Navigate to root directory

cd streamlit_sigmajs_component

Install the package in editable mode:

pip install -e .

pip installation

Coming soon.

Using the component

In your streamlit app:

  • import the module:

from vsigma_component import vsigma_component

  • call the component

graph_state = vsigma_component(my_nodes, my_edges, my_settings, key="vsigma")

Example

run the streamlit example app:

cd streamlit_sigmajs_component
streamlit run example.py

Development

  • Ensure you have Python 3.7+, Node.js, and npm installed.
  • Clone this repository
  • Navigate to root directory

Python Setup

Create and activate a virtual environment, then install the package in editable mode:

python3 -m venv .venv
source ./venv/bin/activate # On Windows use `.\venv\Scripts\activate`
pip install -e .

Node Setup

Navigate to the frontend directory and install the necessary npm packages:

cd vsigma_component/vue_sigma
npm install

Running the App

Change PRODUCTION flag in vsigma_component/init.py to False

  • In one terminal start the frontend dev server
cd vsigma_component/vue_sigma
npm run start
  • In another terminal run the streamlit server
source ./venv/bin/activate # On Windows use `.\venv\Scripts\activate`
cd vsigma_component
streamlit run example.py

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgments

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

streamlit_sigmajs_component-0.0.2.tar.gz (121.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

streamlit_sigmajs_component-0.0.2-py3-none-any.whl (122.5 kB view details)

Uploaded Python 3

File details

Details for the file streamlit_sigmajs_component-0.0.2.tar.gz.

File metadata

File hashes

Hashes for streamlit_sigmajs_component-0.0.2.tar.gz
Algorithm Hash digest
SHA256 7ba0eedacf6cbf9ea27b785ea46941911b1e468a2fe3d88d99f0786e9226ef66
MD5 68cc65081e9d4c711142ee97ebd59ad3
BLAKE2b-256 7c8f17ab2ba35fa747f7194190f6a3406182d28a300cf73e5889967b14c0de69

See more details on using hashes here.

File details

Details for the file streamlit_sigmajs_component-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for streamlit_sigmajs_component-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ca5a34abd7bc4c0d50899f646f523e10035ac9c38467261e4f8bea7dea43dcea
MD5 a532732a2c2fd3f89edfc12fadd9e365
BLAKE2b-256 79879413c3f4569ef73e0bf241779e3414b078064e26fc4fb82802a8be2b7b61

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page