MSOA boundaries in Leeds
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Not run:
u = "https://borders.ukdataservice.ac.uk/ukborders/easy_download/prebuilt/shape/infuse_msoa_lyr_2011_clipped.zip"
msoa2011 = duraz(u)
msoa2011 = st_transform(msoa2011, 4326)
object.size(msoa2011) / 1e6 # 300+ mb
cents = st_centroid(msoa2011)
cents_lds = cents[leeds, ]
sel = msoa2011$geo_code %in% cents_lds$geo_code
msoa2011_lds = msoa2011[sel, ]
object.size(msoa2011_lds) / 1e6 # 4mb
mapview::mapview(msoa2011_lds)
plot(msoa2011_lds$geometry)
devtools::use_data(msoa2011_lds)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.