Creating open data counts of pedestrians and vehicles using CCTV cameras
Providing an update on our work using spare CCTV capacity to monitor activity levels during the COVID-19 Pandemic
In a previous blog we described our project, with Glasgow City Council and the Glasgow Centre for Population Health, using spare CCTV capacity to generate pedestrian and vehicle counts from frequently and regularly captured images. The blog reported on early results from the pilot study, which used four cameras, reporting on the accuracy of the automated counts and illustrating the changes from February 2020 through the early stages of lockdown. This blog updates this work describing: the addition of new cameras across the city; the trends and notable events observed; and how you can access the counts data via a new openly accessible API.
Since April the project has added 34 cameras (37 including the original 3 cameras) and new cameras are being added all the time. We are continuing to expand the coverage of the system. It is important to note that a few cameras have either been made unavailable because of the frequency that they are required for community safety monitoring (the cameras’ primary function) or due to brief technical failures. While many of the cameras are in the city centre, the focus has widened to include cameras across the city on local high streets and in major parks.
Update on original cameras
The pilot of the CCTV project had four cameras. Two of these monitored the same location: one was a regular CCTV camera, while the other was a static camera. The CCTV camera was returned to regular use and we no longer receive data from it. We have therefore excluded it from the plots. This leaves the three original cameras. Two cover the west of Argyle Street and one covers part of Sauchiehall Street.
Pedestrians
Below we see the plot of pedestrian traffic. The metric used measures the average number of pedestrians detected per image for each day. Although hard to interpret in an absolute sense, it gives a good measure of the volume of pedestrian traffic over time. There is a clear drop in traffic at all three locations. This is most evident for 'Argyle Street at Oswald Street' and on 'Sauchiehall Street'. The other feature to note is the strong temporal patterns, which were visible before lockdown, have dissipated during lockdown. These patterns seem to be associated with commuting. With so many businesses closed, there has been a substantial reduction in this kind of travel.
Cars
The number of cars in the three locations dropped after lockdown, but since then volumes have recovered. On 'Sauchiehall Street', there are now more cars being detected than before the implementation of the lockdown.
All Cameras
Pedestrians
In most locations we have monitored, the volume of pedestrians has remained low and stable. The exception is the cameras on popular green spaces such as Glasgow Green and Kelvingrove Park. Counts observed at these locations vary substantially depending on the day of the week, the weather and on whether there is an event taking place.
View full-size image in a new window
Cars
Counts of cars have been relatively stable at the locations monitored. In some places, e.g. Byres Road, there is an upward trend.
View full-size image in a new window
Highlighting Glasgow Green
Below we take a closer look at pedestrian activity around the monument in Glasgow Green. Parks have been a focus for activity since the first relaxation of lockdown rules. There is quite a bit of variation in the data from Glasgow Green. Weekends tend to be popular, as do warm days. Note that activities taking place also result in a spike in activity.
Open Access to Count Data
As well as sharing these recent results, we are delighted to announce that Glasgow City Council has agreed to release the count information from the CCTV camera network as open data, under the Open Government Licence. To facilitate access to the data, and to encourage its use in widespread analyses, apps and dashboards, UBDC colleagues have created a RESTful API that is now available from our API landing page.
The API provides quarterly or half an hour counts of pedestrians and vehicles in JSON format, updated once daily since the project started with four cameras on 30th November 2019. It comprises four endpoints, providing respectively;
- All counts for all dates and all cameras;
- All counts for a specific location/camera;
- All counts for a specific time period;
- All counts for a location and time period (inclusive);
Furthermore, it is now possible to download all data in CSV format. Full documentation on the use of these endpoints is available from the API landing page.
Under the Open Government License, you may copy and publish the data and/or adapted or derived products and are free to use them for commercial or non-commercial purposes. The only requirement is that you acknowledge their source by including or linking to the following attribution statement:
Glasgow CCTV Automated Object Detection Counts, Glasgow City Council / Urban Big Data Centre at the University of Glasgow, 2020, copyright © Glasgow City Council 2020
Beyond that, please feel free to download the data, have a play around with it and see what interesting stories there are within. We would be very interested to hear about your experiences – if you would like to discuss your own applications or are interested in learning more about the data or the API please don’t hesitate to contact us at dataservice@ubdc.ac.uk.
Future work
The project has begun work on producing social distancing metrics which we hope to make available with the other data through the API.
Project Team
UBDC (and the authors of this blog): Luis Serra; Dr David McArthur; Dr Mark Livingston; Dr Andrew McHugh
Glasgow City Council: Kimberley Hose; Keith Scott; Kalim Uddin
Glasgow Centre for Population Health: Bruce Whyte