Skip to main content

Dash Sylvereye

WebGL-accelerated visualization of large primal road networks for Plotly Dash dashboards.

Tens of thousands of interactive nodes, edges, and markers, smoothly, in the browser. Tied into Dash callbacks: every visual property is reactive, every element is clickable. Loads networks straight from OpenStreetMap through OSMnx.

Documentation PyPI Downloads Python 3.11+ Plotly Dash 4.x License: MIT DOI


Dash Sylvereye is a Plotly Dash component library, developed at the Observatorio Metropolitano CentroGeo at CentroGeo, that renders interactive web-based visualizations of large primal road networks in Python. The geometry is drawn with WebGL on top of a tiled Leaflet map; every node, edge, and marker is independently styleable and clickable, and every visual property is wired through Dash's callback architecture so the visualization reacts to anything else in the dashboard at runtime.

It's aimed at:

  • Mobility, transportation, and urban-data researchers who need to display real-world street networks (tens of thousands of segments) and overlay analytics on top.
  • Dashboard developers who already build Plotly Dash apps and want a first-class road-network component, not a generic Plotly trace.
  • Anyone working with OSMnx output who wants to render the resulting MultiDiGraph directly, without falling back to Matplotlib or a generic map widget.

Status

Current release: 0.4.1. Runs on Python 3.11+ and Dash 4.x. Distributed under the MIT license.

Surface State
Source layout dash_sylvereye/ (PEP 621, hatchling, uv.lock committed)
JS source src/lib/ (React 18 + react-leaflet 4 + PIXI.js 7 + leaflet-pixi-overlay)
Tests Selenium integration suite under tests/ (drives headless Chrome)
Docs Live at dashsylvereye.observatoriogeo.mx (Docusaurus 3.10, source under website/)
Examples 5 runnable end-to-end scripts under examples/
Distribution PyPI (also publishes R and Julia wrappers via dash-generate-components)

Release history: GitHub Releases.

What it does

A SylvereyeRoadNetwork component takes three flat lists, nodes_data, edges_data, markers_data, and renders them on top of a Leaflet tile layer through a WebGL overlay. Each element is independently controlled:

Element Customizable visual properties Click event
Node color, size, alpha, visibility clicked_node
Edge color, width, alpha, visibility clicked_edge
Marker color, size, alpha, visibility, icon, tooltip clicked_marker
Direction arrows follow edge geometry, can be toggled globally (not interactive)
Tile layer URL, opacity, attribution, subdomains (n/a)

Three methods per visual property:

  • DEFAULT: one value applies to every element.
  • SCALE: interpolate from a numeric data field on each element (color scales are computed client-side with chroma.js).
  • CUSTOM: read the rendered value from each element's own dict.

Networks load from a NetworkX graph or a GraphML file produced by OSMnx in one line, or you can build the data lists by hand. SUMO .net.xml traffic-simulation networks are supported as an optional extra.

See the Overview page for the full feature tour.

Quickstart

A minimal Dash app rendering the road network of Kamppi (Helsinki) from OpenStreetMap:

import osmnx as ox
from dash import Dash, html
from dash_sylvereye import SylvereyeRoadNetwork
from dash_sylvereye.utils import load_from_osmnx_graph

road_network = ox.graph_from_place('Kamppi, Helsinki, Finland', network_type='drive')
nodes_data, edges_data = load_from_osmnx_graph(road_network)

app = Dash()
app.layout = html.Div([
    SylvereyeRoadNetwork(
        id='sylvereye-roadnet',
        nodes_data=nodes_data,
        edges_data=edges_data,
        tile_layer_url='https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png',
        tile_layer_subdomains='abcde',
        tile_layer_opacity=0.9,
        map_center=[60.1663, 24.9313],
        map_zoom=15,
        map_style={'width': '100%', 'height': '98vh'},
    ),
])

if __name__ == '__main__':
    app.run()

Walk-throughs of the click callbacks, scaled visuals, markers, and per-element customization live under Examples.

Install

pip install dash-sylvereye

If you use uv: uv add dash-sylvereye.

Optional extras:

Extra What it pulls When to use it
examples osmnx>=2.0, numpy To run the scripts under examples/.
sumolib sumolib>=1.0 To use load_from_sumo_network for SUMO .net.xml networks.
dev dash[dev]>=4.0.0 To regenerate the Python/R/Julia wrappers (dash-generate-components).
test pytest, selenium, pillow, plus examples To run the integration suite.

Install one with pip install dash-sylvereye[examples] or several with pip install dash-sylvereye[examples,sumolib].

Architecture

   Python (Dash callback graph)
              │
              ▼
   SylvereyeRoadNetwork component  (Dash → React → react-leaflet)
              │
              ▼
   Leaflet map (tile layer + zoom/pan)
              │
              ▼
   leaflet-pixi-overlay
              │
              ▼
   PIXI.js WebGL scene  (nodes, edges, markers, arrows)

A SylvereyeRoadNetwork JSX component wraps a <MapContainer> from react-leaflet with a leaflet-pixi-overlay instance underneath; nodes, edges, markers, and arrows are drawn into a PIXI.js container by hand-written sprite code. Spatial hit-testing for edge clicks uses RBush + JSTS; color scales use chroma.js. The whole React surface is transpiled by dash-generate-components into a Dash component, so the Python side ships only PropTypes and defaultProps definitions, no live React.

Full walk-through at Software stack.

Documentation

All documentation lives at dashsylvereye.observatoriogeo.mx. Highlights:

Section Pointer
What is Dash Sylvereye? /docs/overview
Installation /docs/installation
Examples (5 walk-throughs) /docs/example1
Component keyword arguments /docs/component_parameters
Click events (clicked_* payloads) /docs/click_events
Data format (nodes, edges, markers) /docs/data_format
Loading networks (OSMnx / GraphML / SUMO) /docs/data_loading
Per-element customization /docs/nodes_customization · /docs/edges_customization · /docs/markers_customization
Citation /docs/citation

Running the examples

git clone https://github.com/observatoriogeo/dash-sylvereye.git
cd dash-sylvereye
uv sync --extra examples
uv run python examples/01_BasicVisualization.py

Then open http://127.0.0.1:8050/ in your browser. The first run downloads the Kamppi road network from OpenStreetMap and caches it to examples/cache/kamppi.graphml; subsequent runs are offline.

The other scripts demonstrate further features:

Development

uv is the project's package and environment manager. The full build needs both Node (≥18.18) and the dev Python extras (which provide dash-generate-components):

git clone https://github.com/observatoriogeo/dash-sylvereye.git
cd dash-sylvereye
uv sync --all-extras
npm install
uv run -- npm run build      # webpack bundle + Python/R/Julia wrapper regen

Run the integration tests (headless Chrome must be installed and on PATH; Selenium Manager auto-fetches a matching ChromeDriver):

uv run pytest tests/

Full development workflow, including the JS → Python regeneration loop and the validation gate, lives in CLAUDE.md.

Citation

If you use Dash Sylvereye in your research, please cite:

A. Garcia-Robledo and M. Zangiabady, "Dash Sylvereye: A Python Library for Dashboard-Driven Visualization of Large Street Networks," in IEEE Access, vol. 11, pp. 121142–121161, 2023. https://doi.org/10.1109/ACCESS.2023.3327008

BibTeX:

@article{garciarobledo2023sylvereye,
  author  = {Garcia-Robledo, Alberto and Zangiabady, Mahsa},
  title   = {Dash {S}ylvereye: A {P}ython Library for Dashboard-Driven Visualization of Large Street Networks},
  journal = {IEEE Access},
  volume  = {11},
  pages   = {121142--121161},
  year    = {2023},
  doi     = {10.1109/ACCESS.2023.3327008},
}

License

Dash Sylvereye is distributed under the MIT License. See LICENSE for the full text. Copyright © Centro de Investigación en Ciencias de Información Geoespacial, A.C.

Contact

Metadata

Release files for dash-sylvereye 0.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dash-sylvereye 0.4.1
File Size Uploaded Provenance Actions
dash_sylvereye-0.4.1.tar.gz 1.7 MB Without provenance Details for dash_sylvereye-0.4.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dash-sylvereye 0.4.1
File Interpreter ABI Platform Actions
dash_sylvereye-0.4.1-py3-none-any.whl Python 3 none any Details for dash_sylvereye-0.4.1-py3-none-any.whl

Total release size: 3.5 MB

Release files / dash_sylvereye-0.4.1.tar.gz

Download URL dash_sylvereye-0.4.1.tar.gz
Size 1.7 MB
Tags Source
SHA-256 checksum
How to use checksums
ce28e846be3efaf0316d66ce39ea7800ac6dc74bc07dc240f17581315dec5f5d
BLAKE2b-256 checksum
How to use checksums
82b168de5297dc7b5676c84cdd63318dacf28d893021fefc874f40f90500f9b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / dash_sylvereye-0.4.1-py3-none-any.whl

Download URL dash_sylvereye-0.4.1-py3-none-any.whl
Size 1.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
db6e7628971c174659691d0233743f4b698ac7ceb5aaca7460cfcdb95fdbdfc5
BLAKE2b-256 checksum
How to use checksums
e7845ba439f0cac12ffde6994d9941090830c92fba8f24c543194f559f5ef385
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Security for dash-sylvereye 0.4.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page