Which Australian councils are building the most cycleways?

Australian Cycleway Stats is a dashboard that provides an in-depth look at the kilometres of cycleways and safe streets in every Australian council, encompassing current, under-construction, and proposed projects, as well as international benchmarks. It utilises OpenStreetMap data which has an extremely detailed specification for cycleway types to differentiate between separated cycleways, shared paths and on street “door zone” lanes.

I built it to quickly compare and contrast Australian cities with their international counterparts. Clicking on any statistic opens an Overpass Turbo query displaying the relevant data.

Map displayed after clicking on the length of separated cycleways in the City of Sydney council

I previously wrote a blog post on turn-by-turn bicycle navigation apps that use this data at The Best Apps for Bicycle Directions (2020).

Architecture

The website is a simple frontend React Typescript app, however the data is statically compiled into a large JSON blob.

Generating the JSON blob requires thousands of Overpass Turbo requests. These requests are cached at build time on the filesystem using a hash of the query string as a key. This currently requires clearing the cache to completely regenerate data to fetch new updates from OpenStreetMap. When generating data for Australian councils I use a self-hosted Overpass server (also improving speed dramatically), while using overpass-api.de for the few international examples.

I could achieve a faster first paint by async loading this JSON blob at runtime but I haven’t yet implemented this.

Population counts are sourced from Wikidata (and pregenerated in the JSON blob) based on the wikidata tag on OpenStreetMap relations.

When area names have a non-english name (identified by a name:en tag present), both English and local names are displayed.

Overpass queries

Overpass queries are written in https://github.com/jakecoppinger/australian-cycleway-stats/blob/main/static-backend/src/utils/overpass-queries.ts and are somewhat complex. They contain some “opinionated” tradeoffs (informed by policy) in what roads are considered safe (<= 30kmh) and what is considered a dedicated and shared cycle path. Improvements or questions are welcome!

Leave a Reply

Your email address will not be published. Required fields are marked *