View source: R/create_custom_lookup.R
create_custom_lookup | R Documentation |
Roughly equivalent to geo_get(boundaries = FALSE)
create_custom_lookup( bounds_level, within, within_level, bounds_cd = FALSE, within_cd = FALSE, include_msoa = NULL, return_style = "tidy", include_welsh_names = NULL )
bounds_level |
The lowest level at which to return codes and names, eg "LSOA". Has to be one of "lsoa", "msoa", "wd/ward", "lad", "cty/county". Case-insensitive. |
within |
The name of a geographic area to filter by eg "Swindon", "Gloucestershire", "Wales", or a set of area codes (with bounds_cd or within_cd). |
within_level |
Upper geographic level to filter at. eg if filtering to
find all LSOAs in a local authority, |
bounds_cd |
When you just supply a list of area codes for places you want boundaries for. NB this relates to lower areas, "bounds" level. |
within_cd |
Usually you'll build the query with a place name to search within. But sometimes you may wish to pass in a vector of area codes instead (if that's all you have, or more likely if you are querying within wards, which don't have unique names (there's a lot of Abbey wards in England!)). If you're passing in area codes not names, set this to TRUE. NB this only applies to the higher, "within", level. |
include_msoa |
If |
return_style |
"tidy" (the default) means all available columns between
|
include_welsh_names |
Only makes a difference when |
a data frame (tibble)
## Not run: create_custom_lookup( bounds_level = "msoa", within = "Swindon", within_level = "lad", return_style = "simple" ) ## End(Not run) ## Not run: create_custom_lookup( bounds_level = "msoa", within = "Swansea", within_level = "lad", return_style = "tidy" ) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.