README.md

ukgeog

Codecov test
coverage R build
status Lifecycle:
experimental

Overview

ukgeog is a simple package to facilitate the easy download of official spatial data sets of the UK. It includes a wide range of geospatial data, provided as simple feature sf objects (like shapefiles but better). Making it easy to make Choropleth Maps with base R, as well as with popular packages such as ggplot2 and leaflet.

Other functions are provided to create UK Local Authority (LA) lookups, across time and between lower and upper tiers.

Installation

# install.packages("remotes")
remotes::install_github("l-hodge/ukgeog")

Downloading UK boundaries from the ONS

| ‘geog’ | Geography | Year | |:-------|:----------------------------------------------|:-----------------------| | UTLA | Counties and Unitary Authorities | 2018; 2019; 2020; 2021 | | NAT | Countries | 2018; 2019; 2020; 2021 | | EU | European Electoral Regions | 2018 | | LAD | Local Authority Districts | 2018; 2019; 2020; 2021 | | LSOA | Lower Super Output Areas | 2001; 2011 | | MSOA | Middle Super Output Areas | 2001; 2011 | | WAC | National Assembly for Wales Constituencies | 2018 | | WAR | National Assembly for Wales Electoral Regions | 2018 | | NUTS1 | NUTS Level 1 | 2015; 2018 | | NUTS2 | NUTS Level 2 | 2015; 2018 | | NUTS3 | NUTS Level 3 | 2015; 2018 | | OA | Output Area | 2001; 2011 | | GOR | Regions | 2018; 2019; 2020; 2021 | | WM | Westminster Parliamentary Constituencies | 2018; 2019; 2020; 2021 |

Basic Usage

library(ukgeog)

# Read in simple feature of the countries that make up the UK 
sf <- read_sf("NAT", year = 2021)

Creating UK Local Authority lookups (2011-2021)

Other functions

Vignettes

Credits

Original shapefiles are created by the Office for National Statistics (ONS) and are available from the Open Geography Portal.



l-hodge/uk-geog documentation built on Sept. 5, 2022, 5:28 p.m.