Streamlit Component for rendering kepler.gl maps
Project description
streamlit-keplergl
🗾 Streamlit Component for rendering kepler.gl maps in a streamlit app.
🎈 Live Demo 🎈
Installation
pip install streamlit-keplergl
How to use it
import streamlit as st
from streamlit_keplergl import keplergl_static
from keplergl import KeplerGl
st.write("This is a kepler.gl map in streamlit")
map_1 = KeplerGl()
keplergl_static(map_1)
By default, the width of the map is determined by the streamlit layout (automatically
adjusted when used inside a streamlit column or container). The height is determined by the KeplerGL setting.
This can be fixed to a specific pixel size via the width
and height
parameters of keplergl_static
,
however the size might then not be optimal when viewed on a different device or mobile.
keplergl_static(map_1, height=400, width=500)
To use it within a streamlit column or other object:
col1 = st.column(1)
with col1:
keplergl_static(map_1)
Adjust initial map location
To adjust the default initial map location (San Franciso), use the KeplerGL object configuration, see here.
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
Hashes for streamlit_keplergl-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03fa8bb0c1bd9793ac31d3317279154c58ee9ec35d6f5698885165d254fcc019 |
|
MD5 | 7dc62b8f1c1ef8fa99bceecf5a7e8337 |
|
BLAKE2b-256 | d4c36bd3a49e0ed788f2dc1980907418843fd6da3144a5bec233030f43d01d82 |