Tuesday, 7 January 2014

Putting time on the map

Stephen Bell
Senior Consultant (GIS)
With the increasing amount of data available, it can be hard to make sense of it. GIS helps to make sense of data through mapping and spatial analysis and, to a lesser degree, visualisation of time based data.  This article shows that you can increase your temporal data capabilities by utilising Python.
For those engaged in the Geospatial world, mentioning the fact that the temporal dimension is less catered for in GIS compared to its spatial cousin isn’t overly insightful.  Over recent years steps have been made to include more in the way of time data management and visualisation, but with time a fundamental element of geographic processes, temporal tools are still too sparse.

If access to relevant tools or functionality is not possible then sometimes you have to get creative in order to handle and visualise data in a manner suited to your needs.
The Python scripting language is a powerful yet light-weight and user-friendly toolkit that can be used to help you understand your data more.  For example, the ClockCluster function in the Clock module has been developed in Python to visualise the temporal distribution of event data.  It reads time-based information from .csv files (a standard format for exchanging data) and, using the TKinter drawing module in Python, displays the information in a 'clock format', grouping the event data into 24 1 hour boxes displayed as a clock.  This allows the change of the data over a 24 hour period to be visualised (light to dark displaying low to high event volumes) in order to see where high and low clustering exist.

The example below displays the temporal patterning of emergency calls to the London Fire Brigade (LFB) in 2009; the dataset (freely available from the London Datastore: data.london.gov.uk) contains over 135,000 records encompassing the entire year.  Dealing with large datasets such as this can be daunting and time-consuming.  The ClockCluster function takes just a couple of seconds to read all the temporal data and visualise it appropriately.
The only input required from the user is to specify the .csv file and the field within it that has the time information.
With the am hours on the outside and the pm hours on the inside we can clearly see that fewest calls received by LFB occur between 4 and 6pm, whilst most of the morning sees high volume of calls with the peak between 6 and 7am.

Python can be very powerful for the manipulation, analysis, and visualisation of data, without the need for expensive software, and here at Temple we're big supporters of it.



No comments:

Post a Comment