cso_get_geo: Return geographic data as a sf data frame

View source: R/cso_get_geo.R

cso_get_geoR Documentation

Return geographic data as a sf data frame

Description

Retrieves an ESRI shapefile of vector data for Ireland from the cso website cso.ie and returns it as an sf data frame. The data is returned as a zip file, which is downloaded to and unzipped in a temporary directory.

Usage

cso_get_geo(map_data, cache = TRUE, flush_cache = TRUE)

Arguments

map_data

string. Indicates which shapefile to download. Options are:

  • "Local Authorities", "County Councils", "la" OR "cc"

  • "Local Authorities 2016", "County Councils 2016", "la2016" OR "cc2016"

  • "Constituencies" OR "Constituencies (2017)" OR "con"

  • "Constituencies_2013" OR "Constituencies (2013)"

  • "Electoral Divisions" OR "elec_div" OR "ed"

  • "Gaeltacht" OR "g"

  • "Language Planning Areas" OR "lpa"

  • "Local Electoral Areas (2019)" , "lea_2019" , "lea (2019)" , "Local Electoral Areas" OR "lea"

  • "Local Electoral Areas (2014)" OR "lea_2014" OR "lea (2014)"

  • "NUTS3" OR "nuts3"

  • "Provinces" OR "p"

  • "Settlements" OR "s"

  • "Small Areas" OR "sa"

Until v0.1.5 "NUTS2" and "NUTS3" gave access to the 2011 dataset.

cache

logical. Indicates whether to cache the result using R.cache. TRUE by default.

flush_cache

logical. If TRUE (default) the cache will be checked for old, unused files. Any files which have not been accessed in the last month will be deleted

Details

The map data is from the 2011 census, and is 20m generalised, which offers a good balance of fidelity and low file size. More datasets, as well as 50m generalised, 100m generalised and ungeneralised versions of the map files can also be found on the OSi (Ordnance Survey Ireland) website at https://data-osi.opendata.arcgis.com/search?tags=boundaries.

The NUTS2 and NUTS3 map files are the updated versions for 2016, including three NUTS2 regions and the movement of Louth and South Tipperary into new NUTS3 regions. These files are downloaded directly from the OSi website, as they are not available on the CSO website, and do not contain the population and housing data contained in the map files from the CSO website.

Value

data frame of the requested CSO table.

Examples

## Not run: 
shp <- cso_get_geo("NUTS2")

## End(Not run)

csodata documentation built on Aug. 11, 2023, 5:08 p.m.