Skip to main content

Streamlit Component for rendering kepler.gl maps

Project description

streamlit-keplergl

Open in Streamlit PyPi

🗾 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)

Parameters:

  • fig: keplergl.KeplerGl map figure.
  • height: Fixed pixel height of the map, optional. By default determined by the height setting of the KeplerGl. keplergl figure object. Setting width and height explcitly might result in non optimal layout on other devices.
  • width: Fixed pixel width of the map, optional. By default the adjusts to the streamlit layout option, e.g. automatically adjusted to streamlit column or container width.
  • center_map: The bound of the map will be centered on the current map data, default False.
  • read_only: Hide side panel to disable map customization, default False.

To use the map widget within a streamlit column or other object:

col1 = st.column(1)
with col1:
   keplergl_static(map_1)

Also see the kepler.gl documentation for general info on usage of kepler.gl in Python.

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

streamlit-keplergl-0.3.0.tar.gz (3.3 kB view hashes)

Uploaded Source

Built Distribution

streamlit_keplergl-0.3.0-py3-none-any.whl (3.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page