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)

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

streamlit-keplergl-0.2.0.tar.gz (3.5 kB view hashes)

Uploaded Source

Built Distribution

streamlit_keplergl-0.2.0-py3-none-any.whl (3.6 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