To do

For this follow-up exercise, create an R markdown file that, when knitted, includes the code and output for the following, ideally as a pdf document:

Code
cities <- st_as_sf(cities, coords = c("lng", "lat"), crs = 4326)
  • To run the following code, which will ‘clip out’ the cities that are not in England:
Code
cities <- st_filter(cities, imd)
  • To draw a map of the variable RAvgScor, which is the rank of the average 2019 multiple deprivation score for the authorities. Aim for the map to be of a publishable quality – suitable for a journal publication. Include cities above a chosen population threshold on your map to provide some geographical context for the reader.

Then add a very brief textual comment beneath your code and map(s) to provide a brief description of the geography of deprivation shown – do you see any geographical pattern(s)?

To help

All that you need is in the session ‘Thematic maps in R’. However, you do need to decide whether to produce your map in ggplot2 or tmap. You could always impress me and use both!