streamlit-eidos
Streamlit component for EIDOS visualisation with bi-directional transport for events.
Installation instructions
pip install streamlit-eidos
Usage
There is one component function st_eidos with function signature:
component_value=st_eidos(eidos, height=500)
Parameters
eidos : pydeck.Deck instance
The pydeck map to render.
key : str, default "deck_gl"
The key for the component. This must be unique for each map in the app.
height : int, default 500
The height of the map in pixels.
events : list, default None
A dict of events to listen for. Can be one or more of:
- 'click'
- 'hover'
- 'drag'
description : dict, default None
A dictionary with additional description components to overlay on the map
The keys are the position which can be one of 'top-right','top-left','bottom-right','bottom-left'
The values are the html elements to place in each position
Example {'top-right':<div>This is a nice map</div>}
configuration : dict, default None
A dictionary of configuration options for the map.
Returns
component_value : dict
A dictionary containing the info dictionary of the event.
Example
import streamlit as st
import pydeck as pdk
import pandas as pd
from streamlit_eidos import st_eidos
st.write("## Example")
chart_data = pd.DataFrame(
np.random.randn(1000, 2) / [50, 50] + [37.76, -122.4], columns=["lat", "lon"]
)
r = pdk.Deck(
initial_view_state=pdk.ViewState(
latitude=37.76, longitude=-122.4, zoom=11, pitch=50, height=600
),
layers=[
pdk.Layer(
"HexagonLayer",
data=chart_data,
get_position="[lon, lat]",
radius=200,
elevation_scale=4,
elevation_range=[0, 1000],
pickable=True,
extruded=True,
),
pdk.Layer(
"ScatterplotLayer",
data=chart_data,
get_position="[lon, lat]",
get_color="[200, 30, 0, 160]",
get_radius=200,
),
],
tooltip={
"html": "<b>Temperature:</b> {value} °C",
"style": {"backgroundColor": "steelblue", "color": "white"},
},
)
value = st_eidos(r,)
st.write(value)
Metadata
Release files for streamlit-eidos 0.2.0
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-eidos-0.2.0.tar.gz | 137.7 kB | Without provenance | Details for streamlit-eidos-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| streamlit_eidos-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for streamlit_eidos-0.2.0-py3-none-any.whl |
Total release size: 274.1 kB
Release files / streamlit-eidos-0.2.0.tar.gz
| Download URL | streamlit-eidos-0.2.0.tar.gz |
|---|---|
| Size | 137.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b967c57ee7978d1c201ea074f13d67ae9ef9886af1516a2479306d263bbeaf7a
|
|
BLAKE2b-256 checksum How to use checksums |
8800db5dad1656cace34251e2684d693b58724a5fc8bce7021f4e0a0e1f3d6c8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.12
|
Release files / streamlit_eidos-0.2.0-py3-none-any.whl
| Download URL | streamlit_eidos-0.2.0-py3-none-any.whl |
|---|---|
| Size | 136.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3035eefafc81b551a1b42b08a4eeb83a394e9973394e75e224065b4a3ad6a248
|
|
BLAKE2b-256 checksum How to use checksums |
8ab26a8582c699ba5a13df6d4ed695d94a253b2b51f5fa12e6f599ba1937c673
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.12
|
Security for streamlit-eidos 0.2.0
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.