In accordance with government guidelines the ODI Leeds workspace will re-open 17th May 2021 for events and space hire.
ODI Leeds

Cycle traffic growth

I commute to ODI Leeds by bicycle and that means I'm a regular user of cycle lanes around Leeds. In recent years projects such as City Connect have attempted to encourage more people to get on their bikes building new cycle routes that join Bradford and Leeds.

This week I noticed that Leeds City Council publish Leeds annual cycle growth on Data Mill North. This dataset provides the (often hourly) counts from 35 recorders on cycle lanes in Leeds, Bradford, Calderdale and even York. For some counters the data go back to 2010. Twelve counters were only installed in 2019 so only have around six months of data. Even so, this is a fantastic dataset and deserved looking at in more detail.

I set about trying to visualise the data on the web. The first issue is that there is a lot of data. The 2019 dataset is 34.53 MB alone and that is impractical for use on a web page. I felt people were more likely to want to view the data from specific locations so I split the data into one file per sensor/lane. Each file then has one row per day and the hourly counts are included as columns. That means that lane 1 of recorder Cycle J0122 (Meanwood Road Cycle Path), covering 2012-2019, takes up 106 kB which is much more manageable.

With the data sliced-and-diced, it was time to make a visualisation. To start we needed a way to select cycle counters. This naturally led to using a Leaflet web map with Open Street Map tiles. I had to work out how to update the popups with buttons for each lane but once I'd done that I had a way to select multiple sensor/lanes (and made sure to update the URL so that people could share links to specific sensor/lanes). When a sensor/lane is selected, the data file for that sensor/lane is loaded and added to bar charts below. There are four bar charts:

  1. counts by hour-of-day (total over the entire dataset)
  2. counts by day-of-week (total over the entire dataset)
  3. counts by month (total over the entire dataset)
  4. counts by year

The hour-of-day display lets you quickly work out the peak times that people use the sensor. For instance, you can see that the Meanwood Road cycle path has peaks around the morning and evening rush hours (as expected) but also has an interesting peak in use between 10-11pm. Is that due to students returning from the library (or The Library)? You'd have to look into the data more to work that out. The day-of-week view shows that weekdays are the most popular (particularly Thursday) although there is a drop on Fridays.

Cycle J0122 Meanwood Road Cycle Path counts
Credit: ODI Leeds / Data: Leeds City Council

Looking at the four sensors on the canal tow-path at Armley Mills (part of the City Connect route) shows a promising annual growth in use from 45,000 counts in 2010 to over 236,000 counts in 2019.

Cycle counts on the Canal Tow Path at Armley Mills
Credit: ODI Leeds / Data: Leeds City Council

This is a start at a visualisation and hopefully it lets people explore the data more than they currently do. It also helps answer the question "does anyone use the City Connect route?" with a resounding "YES!".