Frontend Development 4 min read

Getting Started with Kepler.gl in Jupyter Notebook: Installation, Basic Usage, and Export

This guide introduces Uber's open‑source Kepler.gl library for geospatial visualization in Jupyter notebooks, covering installation via pip, a simple map example, adding CSV or DataFrame data, customizing through the UI, retrieving configurations, and exporting the map to an HTML file.

Laravel Tech Community
Laravel Tech Community
Laravel Tech Community
Getting Started with Kepler.gl in Jupyter Notebook: Installation, Basic Usage, and Export

Kepler.gl is an open‑source geospatial data visualization tool from Uber that can be used directly in Jupyter notebooks.

Installation – install via pip and, for notebook versions ≥5.3 on macOS, optionally run the nbextension commands.

pip install keplergl
jupyter nbextension install --py --sys-prefix keplergl
jupyter nbextension enable --py --sys-prefix keplergl

Simple example – creating a KeplerGl object and displaying an empty map.

from keplergl import KeplerGl
map_1 = KeplerGl(height=500)
map_1

Adding data – Kepler.gl accepts CSV, GeoJSON, or DataFrame. Example loads a CSV with pandas and adds it to the map.

import pandas as pd
df = pd.read_csv('rocket_launch_site_elevation_2019-10-27.csv')
map_2 = KeplerGl(height=600)
map_2.add_data(name='rocket', data=df)
map_2

Customizing charts – most visual settings are handled through the UI, unlike libraries such as pyecharts or matplotlib.

Getting configuration – the current map configuration can be retrieved with .config and reused.

config = map_2.config

Exporting the map – use .save_to_html() to export the map to an HTML file, optionally setting the file name and read‑only flag.

map_3.save_to_html(file_name='kepler_example.html')

Overall, Kepler.gl provides an easy‑to‑use, UI‑driven way to create attractive geospatial visualizations without writing extensive configuration code.

Pythondata visualizationJupytergeospatial visualizationkeplergl
Laravel Tech Community
Written by

Laravel Tech Community

Specializing in Laravel development, we continuously publish fresh content and grow alongside the elegant, stable Laravel framework.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.