Streamlit component that allows you to view a SandDance visualization of a dataframe.
Project description
streamlit-sanddance
Streamlit component that allows you to view a SandDance visualization of a dataframe.
Installation instructions
pip install streamlit-sanddance
Usage instructions
import streamlit as st
from streamlit_sanddance import sanddance
#sample random DataFrame
df = pd.DataFrame(
np.random.randn(20, 3),
columns=['a', 'b', 'c'])
sdEvent = sanddance(df=df)
st.write(sdEvent)
The return value is a dictionary of visual interaction events such as selections.
Dev Setup
- Ensure you have Python 3.6+.
- Create a new Python virtual environment for the Streamlit component:
$ cd streamlit
$ python3 -m venv venv # create venv
$ . venv/bin/activate # activate venv
$ pip install streamlit # install streamlit
- Initialize and run the component frontend:
$ cd streamlit/sanddance/frontend
$ npm install # Install npm dependencies
$ npm run start # Start the Webpack dev server
- From a separate terminal, run the Streamlit app:
$ cd streamlit
$ . venv/bin/activate # activate the venv you created earlier
$ pip install -e . # install streamlit-sanddance as editable package
$ streamlit run sanddance/example.py # run the example
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
Built Distribution
File details
Details for the file streamlit-sanddance-0.0.2.tar.gz
.
File metadata
- Download URL: streamlit-sanddance-0.0.2.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 640071f1c6a7fd8c0f7733c18ea65535401407980fc2cba9c1a75460823b5c66 |
|
MD5 | 2a9cb3d6300c201df4731dabd29e03e3 |
|
BLAKE2b-256 | f52a8b67a45fa8241a12223ac77eb3bce44ca459ccb67d1eb2e446d0881331d9 |
File details
Details for the file streamlit_sanddance-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: streamlit_sanddance-0.0.2-py3-none-any.whl
- Upload date:
- Size: 2.7 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7464aa0fe72dc904dcb2ab2c1bf6e15d6600c62d1e68f501d752d03a1ec98e13 |
|
MD5 | 19833a0a5abdcac27fe51f96c7bce954 |
|
BLAKE2b-256 | a94365cf5bfd1d7502279dbc9f03fb0d7c20afb87cc8978e4e833cec5076d22c |