diff --git a/DESCRIPTION b/DESCRIPTION index ef868fa..69fdcb8 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -18,7 +18,8 @@ Suggests: rlang, rvest, stringr, - testthat (>= 3.0.0) + testthat (>= 3.0.0), + tidyr VignetteBuilder: knitr Imports: sf diff --git a/README.Rmd b/README.Rmd index 20d15d3..2e6417b 100644 --- a/README.Rmd +++ b/README.Rmd @@ -22,8 +22,7 @@ knitr::opts_chunk$set( > features, frequent breaks, lack of documentation and changes in the API. -> ### Because UK Geographies are complex enough[^complex], working with them -> ### should be easy enough. +> ### Because UK Geographies are complex enough[^complex], working with them should be easy enough. The goal of `{UKgeogRaphies}` is to provide an interface to easily retrieve geospatial data from ONS' Geoportal and make it usable within R. @@ -63,4 +62,24 @@ countries_2023 plot(countries_2023["CTRY23NM"]) ``` + +## Boundaries + +```{r echo=FALSE} +library(dplyr) +library(knitr) + +ons_boundaries |> + select(boundary_type, boundary, detail_level, year) |> + group_by(boundary_type, boundary, detail_level) |> + arrange(year) |> + unique() |> + summarize(year = stringr::str_c(year, collapse = "; "), .groups = "drop") |> + arrange(boundary_type, boundary) |> + tidyr::pivot_wider(values_from = year, names_from = detail_level) |> + kable() + +``` + + [^complex]: To get you started, ONS has edited a [A Beginner’s Guide to UK Geography](https://geoportal.statistics.gov.uk/datasets/c0db0e8c67d04935bcf1749ca6027fef/about) which _only_ has 137 pages. diff --git a/README.md b/README.md index f69677f..36a77d5 100644 --- a/README.md +++ b/README.md @@ -17,9 +17,7 @@ public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostat > uncomplete features, frequent breaks, lack of documentation and > changes in the API. -> ### Because UK Geographies are complex enough[^1], working with them -> -> ### should be easy enough. +> ### Because UK Geographies are complex enough[^1], working with them should be easy enough. The goal of `{UKgeogRaphies}` is to provide an interface to easily retrieve geospatial data from ONS’ Geoportal and make it usable within @@ -91,6 +89,36 @@ plot(countries_2023["CTRY23NM"]) +## Boundaries + + #> + #> Attaching package: 'dplyr' + #> The following objects are masked from 'package:stats': + #> + #> filter, lag + #> The following objects are masked from 'package:base': + #> + #> intersect, setdiff, setequal, union + +| boundary_type | boundary | BFC | BFE | BGC | BUC | NA | +|:------------------|:---------|:-----------------------------------------------|:-----------------------------------------------------------|:-----------------------------------------|:-----------------------------------------|:-----------------------------------------------------------------------------| +| Administrative | CAUTH | 2020; 2021; 2022; 2023 | 2020; 2021; 2022; 2023 | 2021; 2022; 2023 | 2020; 2021; 2022; 2023 | 2016; 2017; 2018; 2019; 2020; 2023 | +| Administrative | CED | 2023 | 2023 | 2023 | 2023 | 2017; 2018; 2019; 2020 | +| Administrative | CTRY | 1961; 2016; 2020; 2021; 2022; 2023 | 2016; 2020; 2021; 2022; 2023 | 2016; 2020; 2021; 2022; 2023 | 2016; 2020; 2021; 2022; 2023 | 2011; 2016; 2017; 2018; 2019; 2020; 2023 | +| Administrative | CTY | 1961; 2020; 2021; 2022; 2023 | 2019; 2020; 2021; 2022; 2023 | 2020; 2021; 2022; 2023 | 2020; 2021; 2022; 2023 | 1991; 2015; 2016; 2017; 2018; 2019; 2020; 2021; 2023 | +| Administrative | CTYUA | 2017; 2019; 2020; 2021; 2022; 2023 | 2017; 2021; 2022; 2023 | 2020; 2021; 2022; 2023 | 2017; 2021; 2022; 2023 | 2011; 2017; 2018; 2019; 2023 | +| Administrative | LAD | 2008; 2011; 2016; 2017; 2019; 2021; 2022; 2023 | 2008; 2011; 2012; 2013; 2014; 2016; 2019; 2021; 2022; 2023 | 2008; 2011; 2017; 2019; 2021; 2022; 2023 | 2016; 2017; 2019; 2020; 2021; 2022; 2023 | 2011; 2016; 2017; 2018; 2019; 2022; 2023 | +| Administrative | LPA | 2019; 2020; 2021; 2022; 2023 | 2019; 2020; 2021; 2022; 2023 | 2019; 2020; 2021; 2022; 2023 | 2019; 2020; 2021; 2022; 2023 | 2019; 2020; 2021 | +| Administrative | MCTY | NA | NA | NA | NA | 2016; 2017; 2018; 2019; 2020 | +| Administrative | PAR | 2020; 2021; 2022; 2023 | 2019; 2020; 2021; 2022; 2023 | 2020; 2021; 2022; 2023 | 2020 | 2011; 2015; 2016; 2017; 2018; 2019; 2020; 2021; 2022; 2023 | +| Administrative | PARNCP | 2020; 2021; 2022; 2023 | 2020; 2022; 2023 | 2020; 2021; 2022; 2023 | NA | 2018; 2019; 2020; 2021; 2022; 2023 | +| Administrative | RGN | 2020; 2021; 2022; 2023 | 2020; 2021; 2022; 2023 | 2020; 2021; 2022; 2023 | 2019; 2020; 2021; 2022; 2023 | 2015; 2016; 2017; 2018; 2019; 2020; 2023 | +| Administrative | UTLA | 2022 | 2022 | 2022 | 2022 | 2022 | +| Administrative | WD | 2019; 2020; 2021; 2022; 2023 | 1998; 2016; 2019; 2020; 2021; 2022; 2023; 2024 | 2019; 2020; 2021; 2022; 2023 | NA | 1991; 1998; 2011; 2015; 2016; 2017; 2018; 2019; 2020; 2021; 2022; 2023; 2024 | +| Census Boundaries | LSOA | NA | 2011 | 2001 | NA | NA | +| Census Boundaries | MSOA | NA | 2001; 2011 | 2001 | NA | NA | +| Census Boundaries | OA | 2001; 2011; 2021 | 2001; 2021 | 2001; 2011; 2021 | NA | 2001; 2011; 2021 | + [^1]: To get you started, ONS has edited a [A Beginner’s Guide to UK Geography](https://geoportal.statistics.gov.uk/datasets/c0db0e8c67d04935bcf1749ca6027fef/about) which *only* has 137 pages.