Whilst browsing some datasets in the new year we spotted that something interesting was going on with London’s Cycle Hire scheme, Santander Cycles, during the festive period. It seems that Christmas Day sees a real spike in cycle hire journeys, but the nature of these journeys is very different to an ‘average’ day of journeys in December. This seemed like a great excuse to try out some symbology techniques and open the lid on Carto capabilities.
Transport for London have a great repository of cycling related open data. This includes full journey histories for cycle hir broken down into weekly(ish) chunks. The data includes information on the start dock, end dock, start date and time and journey duration. All of this allows you to get a really in depth look at the patterns of cycle hires across the capital. The data goes back to the schemes inception in 2010.
We have created a story map to explore some of the patterns in a more interactive way than just simply screenshotting a bunch of maps. Check it out and then see below for how and why we did what we did.
Santander Cycles at Christmas
The Story Map
For those of you that don’t know about story maps they are part of ESRIs ArcGIS online capabilities. They allow you to create a variety of story maps based on different templates (we’ve used the classic ‘Story Map Journal’). Story maps provide a much more dynamic, interactive and interesting way of visualising spatial data and allow you to provide a commentary at the side. Pictures, videos and web links can all be embedded. The maps can be explored as though you were viewing the data in any GIS system. You can zoom in, pan to different locations, search for specific places, turn layers on and off and click on features to see attribute details. This all allows the reader to become more immersed in the data and explore it for themselves whilst being guided to the key points by the accompanying text.
As the data sets are pretty large we loaded it all into a PostgresSQL database to make it more manageable. Here, we did all the interrogation, aggregation etc and got it to spit out the key data sets. We then loaded these into ArcGIS to be visualised and loaded into the story map.
Visualisation can sometimes be quite challenging in ArcGIS. However, with a bit of manipulation you can still get some decent results. When we plotted the Origin/Destination lines it initially looked like a messy tangled web with so much overlap that you couldn’t see anything. By changing the transparency of the feature (NOT the layer) you can begin to see some patterns based on where there are the most over lapping lines. In this case we set the transparency to 98% which allowed us to see the most common routes. So, here with just a simple change in transparency we have managed transform over 37,000 journeys into something more meaningful.
Christmas Day 2016 - No transparency adjustment (you can’t really see anything and it hurts my eyes!)
Christmas Day 2016 - 98% transparency, you can start to see some patterns
Even with applying 98% transparency it was hard to see the fine detail with the raw December dataset so we aggregated the data into counts per origin-destination and extracted the top 1000 journeys to quickly highlight the most popular origin/destination flows. The comparison between the journeys on Christmas Day and December as a whole is pretty apparent.
Top 1000 journeys during Christmas Day 2016 with 98% Transparency
Top 1000 journeys during December 2016 with 98% Transparency
In order to display multiple heat maps at the same time we have embedded some comparison story maps. This allows you to see Christmas Day, weekdays in December and weekends in December at the same time which makes it easier to spot differences and similarities. When you pan or zoom the left hand map the other maps will adjust accordingly. This is a really neat feature of story maps.
Embedded comparison Story Map showing the heat map of start stations for Christmas Day, December Weekday and December Weekends (early)
The thing that we couldn’t do in ArcGIS satisfactorily was an animation of all the start locations of the journeys on Christmas Day. We switched to Carto to do this and then embedded the Carto map into the story map. Carto is a software as a service (SaaS) cloud computing platform that allows you to display and manipulate spatial data in your browser. Carto is a great mapping visualisation platform and is in some ways better than the ESRI suite, however it doesn’t have the capabilities that ESRI does in terms of narrating and commenting on maps.
As the journey data has a start date/time field this can be used as the time field for animation. Torque symbology was used for the point data. Here the brightness of the symbols increases when there are lots that overlap and makes them stand out (for example at the popular docking stations in Hyde Park/The West End). Carto has a feature called CartoCSS which gives you full stylistic control over how the data looks. This means we could manipulate the torque symbology to behave exactly as we wanted (e.g. set the field for the aggregation function and control the frame count). We could have also used CartoCSS to force the symbols to accumulate over time but this would have made it harder to see the spatio-temporal patterns.
CartoCSS allows you to manipulate the symbology of the data as you like
Rather than telling you the key findings here I’ll point you to our story map again as it is much easier to understand what we are talking about when you can see the maps and the data. Hopefully this will also inspire you to make some of your own story maps. They are a really great way of displaying geographic data and are made even more powerful by the fact that you can embed a variety of other features into them.
Future Work
The actual journey taken by the cyclist cannot be determined as we only know the start and end locations. Routing based on the road network does not necessarily give a realistic view of how a cyclist would navigate London and is more likely to mimic car journeys. However, cycling GPS tracking apps such as Strava can be used to work out the most likely route based on behaviours of actual cyclists. Watch this space for more!
Alice Goudie is a GIS Technologist at Emu Analytics. She will be attending Mobile World Congress this year if you want to catch up with her on all things maps, GIS and data (oh and Karate).