Skip to content

Latest commit

 

History

History
118 lines (81 loc) · 7.38 KB

File metadata and controls

118 lines (81 loc) · 7.38 KB

dataroads-FR84 — Inforoute 084 Demo

🇫🇷 Français · 🇬🇧 English

Project designer: Jean-Louis Zimmermann @JLZIMMERMANN, digital road tools officer at CD84 in 2026.

Web map prototype for exploring the departmental road network of Vaucluse (France). This demonstrator, incubated within the Road Information Bureau (Vaucluse Departmental Council), brings several features together in a lightweight, intuitive tool: quick reading of the network, cross-referencing with accident data, locating traffic counting stations, and a first check of OpenStreetMap data quality.

What the map shows

  • The Vaucluse departmental road network, with a simple hierarchy: regional, territorial and local networks.
  • The department boundary and the municipalities, to put roads in their territorial context.
  • CD84 traffic counting stations, classified by traffic level.
  • Multi-year accident data (BAAC, 2019-2024) rendered as a cloud: colour by recency, severity shown by a black ring (hospitalised and fatal), with a per-year histogram and a year slider to explore the trend.
  • Roads under construction or planned, from the OSM cache.
  • Roadside stopping areas along departmental roads (issue #7): car-pooling areas, rest areas and park-and-ride from OpenStreetMap, with an OSM completeness indicator and nearby street-level photos (Mapillary / Panoramax).
  • Current weather over Avignon, useful as a quick operational signal.
  • Community Waze traffic (jams and incidents): a native layer (coloured jam lines + incident markers) when the Waze for Cities partner feed is configured, otherwise the embedded Waze Live Map as a fallback.
  • An "Events (OEDB)" incubator layer: Bison Futé accidents, roadworks and jams, plus curated cultural events (e.g. the Jeudis d'Orange night markets), served by our static OpenEventDatabase instance oedb-rs (Rust + GitHub Pages, rebuilt every 3 hours).
  • An OSM quality panel to spot road sections that do or do not have a usable OSM relation.

Value for CD84

The prototype's main purpose is to make road data readable in a single interface. For a field agent or a business manager, it helps answer simple questions quickly:

  • Where are the most structuring departmental roads?
  • Which roads carry the heaviest traffic according to available counts?
  • Where and when do accidents concentrate, and how have they evolved since 2019?
  • Which municipalities are affected by a road or an axis?
  • Which OSM road sections are well documented, and which deserve a correction?
  • Can a file published on data.gouv.fr or an OSM extract be used without calling APIs on every visit?

Data freshness

The page indicates external data refreshed every 3 hours. The browser reads local GeoJSON files, and the update scripts regenerate those files.

  • Static data: roads, department boundary, municipalities, accident data, and demo fallback.
  • Data refreshed every 3 hours: CD84 traffic counts from data.gouv.fr and Info Routière events.
  • Direct dynamic data: Open-Meteo weather, requested by the browser at load time and then every 10 minutes.
  • Overpass API: never called by the browser. It is only used by the OSM refresh script.

Vintage consistency

State of the dataset versioned in this repository:

Data Source Vintage or freshness Comment
Departmental roads OpenStreetMap cache from 2026-05-17 22:52 UTC Network data, not a CD84 administrative vintage.
Roads under construction OpenStreetMap cache from 2026-05-17 22:53 UTC Some openings indicated between 2025 and 2027 according to OSM tags.
Municipalities OpenStreetMap cache from 2026-05-17 22:53 UTC 151 municipalities; population tags point to 2021.
Roadside areas & car-pooling OpenStreetMap twice-weekly cache (Mon & Thu) 213 areas: car-pooling, rest areas, park-and-ride and laybys along departmental roads (issue #7), nodes / ways / relations, generated by scripts/update_osm_geojson.py.
Vaucluse boundary OpenStreetMap local GeoJSON Department 84 boundary, frozen in data/static/.
Accident data BAAC / ONISR (data.gouv.fr) 2019-2024 1,923 geolocated injury crashes (dept. 84), generated by scripts/build_accidents_vaucluse.py.
CD84 traffic counts data.gouv.fr 1996-2025 3,098 observations; the map displays the latest available year per station.
Road events Info Routière 3-hour cache
Events (OEDB) Bison Futé + curation, via oedb-rs every 3 hours Static OpenEventDatabase instance (Rust, GitHub Pages), read directly by the browser.
Weather Open-Meteo current conditions Direct call, not versioned.

Running the demo locally

python3 -m http.server 8080

Then open:

http://localhost:8080/

User guide

The FR guide (guide.html) is generated from docs/guide.wiki (Wiki syntax, MediaWiki style):

python3 scripts/build_guide.py

After editing the Wiki, regenerate the page and commit docs/guide.wiki and guide.html together. The EN guide (guide.en.html) is maintained by hand: mirror the equivalent changes there.

Technical overview

The data architecture is separated by usage:

  • data/osm/: GeoJSON derived from OpenStreetMap, generated via Overpass by a script.
  • data/static/: frozen GeoJSON, such as the Vaucluse boundary and the 2019-2024 accident data.
  • data/external/: GeoJSON automatically refreshed from external sources.
  • data/demo/: fallback data to keep the map usable if a source is missing.

js/config.js centralises file paths and dynamic sources. js/api.js provides a JSON/GeoJSON loader with browser cache. js/app.js reads the files declared in the configuration.

Two Python scripts maintain the data:

python3 scripts/update_osm_geojson.py
python3 scripts/update_external_data.py

scripts/update_osm_geojson.py queries Overpass with an explicit User-Agent:

dataroads-FR84/<version> (https://github.com/thepriben/dataroads-FR84)

scripts/update_external_data.py materialises data.gouv.fr and Info Routière data into data/external/. If Info Routière is unavailable, the script keeps an empty GeoJSON with the error recorded in _cache.

Enabling the native Waze layer

Waze exposes no open per-area API (the live-map endpoint returns HTTP 403 to datacenter IPs, so it cannot be used in CI). The native layer therefore relies on the official Waze for Cities partner feed (free, on registration). Once you have the feed URL, add it as the WAZE_FEED_URL repository secret: the Update External Data workflow then generates data/external/waze.geojson (alerts + jams) every 3 h, and the front-end automatically switches to the native layer. Without the secret, the W button opens the Waze Live Map embed as a fallback.

Articles & presentations

Inspirations