Skip to content

roadstyle

roadstyle draws a road network as an interactive web map, from one Python call.

  • One file. The map is one HTML file with all its data in it. It opens from disk, offline, or from your website.
  • Roads that read like a real map. Each road class has its own colour and width, with outlines, street names and one-way arrows. Bridges, tunnels and junctions are drawn in the correct order.
  • More than a map. Add Street View, a dashboard with your own parts, SQL on your data, and questions to an AI in words.

A roadstyle map of Monaco in 3D: bridges, tunnels and roundabouts drawn in order, Rue de la Colle selected, and the floating Street View window showing it

Open the live map

pip install roadstyle
import geopandas as gpd
import roadstyle as rs

edges = gpd.read_file("edges.gpkg")        # road edges with a `highway` column
rs.render_edges(edges).save("roads.html")  # one file with all its data: it opens offline

What you can do

  • Maps


    Style the roads, colour them by your data, put bridges and tunnels in the correct order, add your own layers.

    Style the roads

  • Street View and 3D


    Click a road to see it in Google Street View, Panoramax or Mapillary, or in the 3D view of Google.

    Street View

  • Dashboards


    A map with a toolbox and a panel, from one Python call. Add parts to the panel, and control it from JavaScript.

    Dashboards

  • Use it elsewhere


    Put the map on a website, or open its roads in another map app.

    On a website or in a map app

  • Design


    Change the look of a map in the page: a ready theme, the colours and widths of the road classes, the names and the base map. You see each change on the map at once.

    Edit the design of a map

  • AI


    Ask questions about your data in words, in a dashboard, with a free key of your own. Or let an AI agent make maps for you, with no code.

    Ask · With AI agents

  • Gallery


    Pictures of each look, and a live map to try.

    Gallery

  • Rust engine


    The engine of the Python library: in the browser, as tiles and PMTiles, and on the command line.

    Rust engine

What changed in each version: What is new.

When to use roadstyle

In place of Use roadstyle when
geopandas .explore() you want a road map: outlines, a width for each class, one-way arrows, bridges over tunnels. .explore() draws one flat line.
prettymaps you want a web map that you can click, or colours from your data. prettymaps makes pictures.
kepler.gl you want a road map with names and arrows. kepler.gl draws roads as flat lines.

For a quick look at other shapes, those tools are good. roadstyle is for roads.

Built on

  • MapLibre GL JS (BSD-3-Clause) draws each web map. roadstyle writes the style and the data, and each saved page has its own copy of MapLibre, so it opens offline.
  • OpenStreetMap data (© OpenStreetMap contributors, ODbL) and the openstreetmap-carto style, whose road classes, colours and widths roadstyle follows.
  • HiGHS, through SciPy, is the optional Python solver of which road is on top. The default solver is in Rust.
  • GeoPandas and Shapely read and change the geometry.

Gallery · Reference · Studio · GitHub · PyPI · Changelog