Skip to contents

opts() is an alias for this function.

Usage

boundr_options(
  resolution = res_codes(),
  return_width = c("tidy", "full", "minimal"),
  crs = 4326,
  query_option = NULL
)

opts(
  resolution = res_codes(),
  return_width = c("tidy", "full", "minimal"),
  crs = 4326,
  query_option = NULL
)

Arguments

resolution

character. See res_codes() for the potential options. How generalised should the boundary be, and whether coastal boundaries should adhere to the coastline or to the full territorial extent. BGC by default (G = Generalised (20m), C = limited to the coastline.) F indicates Full resolution; S indicates Super-generalised (200m); U indicates Ultra- generalised (500m) boundary resolution. Use E instead of C for full extent boundaries (e.g. BFE). Not all combinations are available. Ignored if geometry is set to "centroids".

return_width

character. How many of the possible columns in the returned table to keep. Options are "tidy", "full" or "minimal". "Tidy" aims to return four data columns (usually) - two columns for the lookup level codes and names, and two for the within level codes and names. Plus a geometry column. "Full" aims to return all data columns from the lookup. "Minimal" aims to return just the two data columns relating to lookup_level. If within is not supplied then "tidy" will be equivalent to "minimal".

crs

The Coordinate Reference System (CRS) code to use

query_option

numeric. Defaults to 1, which means that the URL will just be the first one from the list of possible services resulting from the level and year filters above. If this does not give you what you want, you can run the script again with a different option from the list.

Examples

boundr_options(crs = 27700) # Set the CRS to British National Grid
#> $rs
#> (BGC|BSC|BUC|BFC|BGE|BFE|BUE|GCB|SGCB|UGB|UGCB|FCB|FEB|BGG)
#> 
#> $rw
#> [1] "tidy"
#> 
#> $crs
#> [1] 27700
#> 
#> $opt
#> NULL
#> 
boundr_options(return_width = "full") # Ask boundr to return all data columns
#> $rs
#> (BGC|BSC|BUC|BFC|BGE|BFE|BUE|GCB|SGCB|UGB|UGCB|FCB|FEB|BGG)
#> 
#> $rw
#> [1] "full"
#> 
#> $crs
#> [1] 4326
#> 
#> $opt
#> NULL
#>