๐พ 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)
Use within a streamlit column etc:
col1 = st.column(1)
with col1:
keplergl_static(map_1)
- fig:
keplergl.KeplerGl
map figure. - height: Fixed pixel height of the map. Optional, might result in non-optimal layout on some devices. By default the map height is determined by the keplergl figure height.
- width: Fixed pixel width of the map. Optional, by default the map width adjusts to the streamlit layout.
- center_map: Centers the map on the current map data, default False.
- read_only: Disables the side panel for map customization, default False.
Set map location:
The initial map location is not configured via keplergl_static
but via the KeplerGL configuration, see
example.
But if your map contains data, you can use the center_map
parameter, see
example.
Static component:
This is a static Streamlit component, thus information from browser interaction can not be passed back from
KeplerGL to Python.
Also see the kepler.gl documentation for general info on usage of kepler.gl in Python.