0

I have recently used the package spData for plotting the London boroughs but I haven't found anything for plotting the counties in the UK.

Is it possible the the package spData contains only a few countries in it?

Thank you for your help, Andrea

Dave2e
  • 22,192
  • 18
  • 42
  • 50
Andre
  • 3
  • 4

2 Answers2

0

Could this be what you are looking for? A shp of the counties?

FrsLry
  • 348
  • 4
  • 19
0

spData isn't a complete set of world spatial data.

You can find a complete set (with good county shapes) in the Natural Earth 10m (high resolution) cultural vectors. Here's how I was able to make a quick map of UK counties, coloured by the length of the county name:

library("tmap")
library("tmaptools")
library("rnaturalearth")
library("rnaturalearthhires")
library("sf")
data("states10")
uk_counties <- states10[which(states10$iso_a2 =="GB"),]
uk_counties = st_as_sf(uk_counties)
qtm(uk_counties, fill="name_len")

Once you have this dataframe called uk_counties, you can join it to your data & quickly make some nice maps.

choropleth of uk counties by length of county name