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'])
#make sure to use a key to prevent refreshing after an event
sdEvent = sanddance(df, key='sd1')
#if sdEvent is not None and contains a cubeClick >= 0, display the data row
if sdEvent is not None and 'cubeClick' in sdEvent and sdEvent['cubeClick'] is not None and sdEvent['cubeClick'] >= 0:
st.write(df.iloc[sdEvent['cubeClick']])
else:
st.write("No cubeClick event")
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
Metadata
Release files for streamlit-sanddance 0.0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| streamlit-sanddance-0.0.7.tar.gz | 2.6 MB | Without provenance | Details for streamlit-sanddance-0.0.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| streamlit_sanddance-0.0.7-py3-none-any.whl | Python 3 | none | any | Details for streamlit_sanddance-0.0.7-py3-none-any.whl |
Total release size: 13.2 MB
Release files / streamlit-sanddance-0.0.7.tar.gz
| Download URL | streamlit-sanddance-0.0.7.tar.gz |
|---|---|
| Size | 2.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e59ab2ada90700ca53b5cbefce3cb0f58a92f17f65a4fcb32366325a9483f83d
|
|
BLAKE2b-256 checksum How to use checksums |
5393ba62e67f37b05ccaedca53fe531f501d7e808d77f477c5a9a1ce951212d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.11
|
Release files / streamlit_sanddance-0.0.7-py3-none-any.whl
| Download URL | streamlit_sanddance-0.0.7-py3-none-any.whl |
|---|---|
| Size | 10.6 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f008c2b17468e68fecdd042488c44cd9902c7e2934cce804379e5df3bfcc978a
|
|
BLAKE2b-256 checksum How to use checksums |
2bd58376fa72d70450bc4f26652af7fec1207f8af96a43e660a9eb6e35661bba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.11
|
Security for streamlit-sanddance 0.0.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.