Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ccamara committed Jul 2, 2024
1 parent bae4c97 commit 5fd74b4
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 6 deletions.
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ Suggests:
rlang,
rvest,
stringr,
testthat (>= 3.0.0)
testthat (>= 3.0.0),
tidyr
VignetteBuilder: knitr
Imports:
sf
Expand Down
23 changes: 21 additions & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
34 changes: 31 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -91,6 +89,36 @@ plot(countries_2023["CTRY23NM"])

<img src="man/figures/README-example-1.png" width="100%" />

## 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.

0 comments on commit 5fd74b4

Please sign in to comment.