Skip to main content

Section 6.6 Summary and further reading

In this chapter we had a very brief introduction to temporal data, and we considered how we can manipulate and wrangle this new type of data using packages such as lubridate. We then introduced some approaches to visualising temporal data, and finally, ways to visualise spatio-temporal variation as well. To read up on the importance of time, and specifically spatio-temporal crime analysis, we recommend [Ratcliffe (2010)], [Wheeler (2016)], and [Roth et al. (2013)].
While we did not get to go into any spatio-temporal analysis at this stage, visualisation is a good starting point to begin to engage with this important element of crime data. For additional details about how to visualise space-time data with R, we suggest [Perpiñan Lamigueiro (2014)] and chapter 2 of [Wikle et al. (2019)].
To move into spatio-temporal analysis would require a more thorough training in temporal data analysis first, and so we do not cover it here. But we provide some resources for those interested. Notably, [Hyndman and Athanasopoulos (2021)] is an excellent resource for this, and we can also recommend [Chatfield and Xing (2019)]. For those already comfortable with this, [Pebesma (2012)] also offers a very thoughtful introduction to how spatio-temporal data layouts appear and useful graphs for spatio-temporal data. [Pebesma (2012)] also introduces the R package spacetime, for handling such analyses. At the time of writing, functions in spacetime take as inputs older sp objects, but the work on the emerging package sftime, to work with sf objects is ongoing.
Specific to crime mapping, we see frequent use of the Mantel test ([Mantel, 1967]), which provides a single index that indicates whether space-time clustering is apparent, and the Knox test ([Knox, 1964]), which examines this pattern in more detail by determining whether there are more instances of events within a defined spatio-temporal area than would be expected on the basis of chance alone ([Johnson et al., 2007]; [Marchione and Johnson, 2013]; [Adepeju and Evans, 2017]). To implement these in R, we recommend exploring the surveillance package, which offers statistical methods for the modelling and monitoring of time series of counts, proportions and categorical data, including the knox() function to implement Knox test ([Salmon et al., 2016]; [Meyer et al., 2017]), and [Thioulouse et al. (2018)] ’Multivariate Analysis of Ecological Data with ade4’ — a package for analysis of ecological data, which includes the functions which implement Mantel’s (1967) space-time interaction test. We will encounter these tests again in Chapter 11 of this book, implemented in the package NearRepeat when exploring near repeat victimisation.
As noted, there are packages that provide functionality for better handling of dates and time. It is worth to go over the details of lubridate in the official pages and the relevant chapter in [Wickham and Grolemund (2017)] is also very helpful. There is a brand new package clock that aims to improve on lubridate, and that is also worth exploring (for details see [Vaughan, 2021]).