Having had a chance to inspect the data set you’ve downloaded, let’s consider what sort of spatial information we might be able to use. If you have a look at the column names, what are some of the variables which you think might have some spatial component? Have a think about each column; and how it may help to put these crimes on the map. There are a few answers here. In fact there are one each to map onto point, line, and polygon.
First, and possibly most obvious, are the coordinates provided with each crime incident recorded. You can find this in the two columns - Longitude and Latitude. These two columns help put each crime incident on a specific point on a map. For example, let’s take the very first crime incident. Here we use the head() function and specify that we want the first 1 rows only with n=1 parameter.
You can see that the values are -2.2360724 for Longitude and 53.466853 for Latitude (If you see fewer digits, you might have global options set to fewer significant digits than the default 7. To address this set options(digits = 7).). These two numbers allow us to put this point on a map.
Another column which contains information about where the crime happened is the aptly named location variable. This shows you a list of locations related to where the crimes happened. You may see a few values such as on or near XYZ street. Let’s look again at the first entry.
You can see that the value is "(first crime location)"; this isn’t great, as we might struggle to identify which parking area. Some other ones are more useful; let’s look at the last entry for example with the tail() function.
You can see that the value is "(last crime location)." This makes our crime much easier to find; we just need to locate "(last crime street name)." We might have a file of lines of all the roads of Manchester, and if we did, we can link the crime to that particular road, in order to map it.
What more? You may also have seen the column "lsoa_name" and it seems to contain what looks like names for some sort of area or place. Let’s have a look at the first crime again. You see the value for LSOA name is "(first LSOA name)". Bolton we know is a Borough of Greater Manchester, but what does the 001 mean?
Well, it denotes a particular geographical sub-unit within the municipality of Bolton called a Lower Layer Super Output Area. This is a unit of UK Census Geography. The basic unit for Census Geography in the UK is an ’Output area’. This is the resolution at which we can access data from the UK Census. The Output Area (OA) is therefore the smallest unit we could use. The censuses in other countries use different names for the units for which they publish information, but the logic is similar.
There are 181,408 OAs, 34,753 LSOA and 7,201 MSOA in England and Wales. The neat thing about these census geographies is the idea that they don’t change much from census to census (unlike other administrative boundaries) and in the UK case were created with statistical analysis in mind (they were designed to be as homogeneous as possible). The less neat thing is that although we use them to operationalise the concept of neighbourhood a lot, they may not bear much resemblance to what residents might think of as their neighbourhood. This is a common problem in the UK and elsewhere (that has been widely discussed in the literature, see [239] for example) when relying on census units as our proxy for community or neighbourhood; but, one that is hard to escape from, for these units are those at which key demographic variables are typically sourced and published.
Looking back to our crime data, we find two columns that reference LSOAs, lsoa_name and lsoa_code. We can use these to link our crime data to a file containing the geometries needed to put the crime data on the map. In the next section we will illustrate how.
Subsection1.6.4Choosing the ideal unit of analysis
We see that in the situation of our crime data, we can choose between different units of analysis, whether we want our data at individual crime level (points), or aggregated to streets (line) or aggreagated to areas such as census neighbourhoods (polygons). Which should you choose? The unit of analysis at which to consider approaching our research and analytical questions will depend most largely on what is the appropriate level at which addressing the question makes sense, and at what level we can get reliable data for the variables we wish to analyse. There is no simple answer to this. Questions around levels of measurement have formed a central part of discourse in the area of crime mapping [239]. It is important that careful thought and consideration is given to this decision.