🗾 Streamlit Component for rendering kepler.gl maps in a streamlit app.
🎈 Live Demo 🎈
pip install streamlit-keplergl
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)
To adjust the default initial map location (San Franciso), use the KeplerGL object configuration, see here.