Skip to main content

React Globe.gl in Dash

Project description

Dash Globe

Dash Globe is a Dash component library that wraps react-globe.gl with a more Pythonic, figure-like API.

Highlights

  • Chainable Python helpers on dash_globe.DashGlobe
  • Snake_case aliases for raw layer props such as arc_dash_animate_time and points_merge
  • First-class day/night globe shader via update_day_night_cycle(...)
  • First-class rotating cloud shell via update_clouds(...)
  • Serializable ripple-ring fades via ring_color_interpolator(...)
  • Data-driven globe layers for points, arcs, polygons, paths, heatmaps, hex bins, tiles, particles, rings, and labels
  • Dash callback props for clickData, rightClickData, hoverData, and currentView
  • Example gallery in usage.py, including upstream ports for clouds, submarine cables, ripple rings, and airline-routes hover highlighting

Quick Start

pip install dash_globe

Then:

python usage.py

Or embed it in your own Dash app:

from dash import Dash, html
import dash_globe

app = Dash(__name__)
app.layout = html.Div(
    dash_globe.DashGlobe(id="globe").update_layout(height=500)
)

Example

import dash_globe

globe = (
    dash_globe.DashGlobe(id="cities")
    .update_layout(height=420, background_color="#020817")
    .update_globe(show_graticules=True, atmosphere_color="#5bc0eb")
    .add_points([
        {"name": "Tokyo", "lat": 35.6764, "lng": 139.6500, "color": "#4cc9f0"},
        {"name": "Sydney", "lat": -33.8688, "lng": 151.2093, "color": "#f72585"},
    ])
    .update_points(
        pointLat="lat",
        pointLng="lng",
        pointColor="color",
        pointLabel="name",
        pointAltitude=0.12,
        pointRadius=0.3,
    )
)

Development

npm install
npm run build:js
venv\Scripts\dash-generate-components.exe .\src\lib\components dash_globe -p package-info.json -i \.test\.
python usage.py

The live gallery referenced above is available in the repository at https://github.com/jeffgallini/dash-globe/blob/main/dash_globe/usage.py.

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

dash_globe-0.0.1.tar.gz (2.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dash_globe-0.0.1-py3-none-any.whl (2.5 MB view details)

Uploaded Python 3

File details

Details for the file dash_globe-0.0.1.tar.gz.

File metadata

  • Download URL: dash_globe-0.0.1.tar.gz
  • Upload date:
  • Size: 2.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dash_globe-0.0.1.tar.gz
Algorithm Hash digest
SHA256 4ee3cd02ab351bcb41072a742a4eae1d8b909f2780fe09ed7f9b00e9abde26cc
MD5 f33465f0fab92082c8fcfb2489cd44b0
BLAKE2b-256 af9eb31a2cd81ef064cf37dce056c0d84523d0e751475584f518ec8cbc528ea1

See more details on using hashes here.

File details

Details for the file dash_globe-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: dash_globe-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dash_globe-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4e595b4b14c3cd9053467aac2d7535df1c7d516d1c79806193482a5860d95df3
MD5 5149c2f6bcac0c72e6e56a5f1bc66dad
BLAKE2b-256 4f0a22e88fa5112e1f450fff62524ea368c9d560c7be8b3d15702bfeb4108c39

See more details on using hashes here.

Supported by

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