extent_from_ons_code {osdatahub}R Documentation

Retrieve an extent for ONS geographies

Description

Retrieve an extent for ONS geographies

Usage

extent_from_ons_code(ons_code, returnType = c("qExtent", "geos", "wkt"))

Arguments

ons_code

(character) A single ONS code representing a statistical area.

returnType

(character) Define the object returned. The default is 'qExtent' to define a "query extent" object expected internally by osdatahub. Other options are 'wkt' to return the geometry in Well-Known Text format or 'geos' to return an object of class geos.

Details

The Office for National Statistics (ONS) maintains a source of official geographies for the UK, such as county boundaries, electoral wards, parishes, and census output areas. These boundaries are commonly used for data analysis, particularly of socio-economic factors. A full list of available ONS geographies can be found here: https://statistics.data.gov.uk:443/atlas/resource?uri=http://statistics.data.gov.uk/id/statistical-geography/K02000001.

When returning a geos object, the coordinate reference system attribute will be set to CRS:84 by default and not to a full CRS definition.

The qExtent return option identifies a simple class of objects containing a polygon of the extent in WKT format, the bounding box coordinates, and a CRS string. It is intended to be used internally by functions in osdatahub.

Value

The coordinates of the polygon boundary.

See Also

extent

Examples


ext <- extent_from_ons_code("E05002470", returnType = 'wkt')



[Package osdatahub version 0.2.0 Index]