A quick cleaning of a shapefile that should be able to be used very quickly with any dataset at Local authority level.
A walkthrough of the code can be viewed here
The saved sf
object scotland_la.rds
is in my GitHub repo here. Feel free to clone the repo and use the dataframe for mapping Scottish Local Authorities.
Check out my homepage for more projects, publications, and talks.