oas_cents: Output area centroids

Description Examples

Description

See https://www.ons.gov.uk/peoplepopulationandcommunity/populationandmigration/populationestimates/datalist?sortBy=release_date&query=output+area&filter=datasets&fromDateDay=&fromDateMonth=&fromDateYear=&toDateDay=&toDateMonth=&toDateYear=

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## Not run: 
u_oas_cents = "https://opendata.arcgis.com/datasets/ba64f679c85f4563bfff7fad79ae57b1_0.zip?outSR=%7B%22wkid%22%3A27700%2C%22latestWkid%22%3A27700%7D"
u_oas_cents = duraz(u_oas_cents)
plot(u_oas_cents$geometry) # not all of england is covered
object.size(u_oas_cents)
u_pop = "https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/populationandmigration/populationestimates/datasets/censusoutputareaestimatesinthesouthwestregionofengland/mid2016sape19dt10g/sape19dt10gmid2016coaunformattedsyoaestimatessouthwest.zip"
download.file(u_pop, "sape19dt10gmid2016coaunformattedsyoaestimatessouthwest.zip")
unzip("sape19dt10gmid2016coaunformattedsyoaestimatessouthwest.zip")
d = readxl::read_excel("SAPE19DT10g-mid-2016-coa-unformatted-syoa-estimates-south-west.xls", sheet = 4, skip = 3)
library(dplyr)
d = select(d, oa11cd = OA11CD, `All Ages`)
oas_sw = u_oas_cents[u_oas_cents$oa11cd %in% d$oa11cd, ]
plot(oas_sw)
oas_sw = left_join(oas_sw, d)
oas_sw = st_transform(oas_sw, 4326)
bristol = osmdata::getbb(place_name = "Bristol", format_out = "sf_polygon")
oas_sw = oas_sw[bristol, ]
plot(oas_sw)
devtools::use_data(oas_sw, overwrite = TRUE)
delete_shapefiles()

## End(Not run)

Robinlovelace/ukboundaries documentation built on May 28, 2019, 2:28 p.m.