Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ropensci/nomisr
Access UK official statistics from the Nomis database through R.
https://github.com/ropensci/nomisr
api-client census-data demography geographic-data national-statistics official-statistics officialstatistics peer-reviewed r r-package rstats uk
Last synced: about 1 month ago
JSON representation
Access UK official statistics from the Nomis database through R.
- Host: GitHub
- URL: https://github.com/ropensci/nomisr
- Owner: ropensci
- License: other
- Created: 2018-01-19T15:49:29.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-08-12T14:07:59.000Z (5 months ago)
- Last Synced: 2024-08-13T07:14:19.535Z (5 months ago)
- Topics: api-client, census-data, demography, geographic-data, national-statistics, official-statistics, officialstatistics, peer-reviewed, r, r-package, rstats, uk
- Language: R
- Homepage: https://docs.ropensci.org/nomisr
- Size: 3.38 MB
- Stars: 44
- Watchers: 6
- Forks: 12
- Open Issues: 6
-
Metadata Files:
- Readme: README.Rmd
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- jimsghstars - ropensci/nomisr - Access UK official statistics from the Nomis database through R. (R)
README
---
output: github_document
---```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```# nomisr
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/nomisr)](https://cran.r-project.org/package=nomisr)
[![GitHub tag](https://img.shields.io/github/tag/ropensci/nomisr.svg)](https://github.com/ropensci/nomisr)
[![](https://cranlogs.r-pkg.org/badges/grand-total/nomisr)](https://cran.r-project.org/package=nomisr)
[![R build status](https://github.com/ropensci/nomisr/workflows/R-CMD-check/badge.svg)](https://github.com/ropensci/nomisr/actions)
[![Coverage Status](https://img.shields.io/codecov/c/github/ropensci/nomisr/master.svg)](https://codecov.io/github/ropensci/nomisr?branch=master)
[![ropensci](https://badges.ropensci.org/190_status.svg)](https://github.com/ropensci/software-review/issues/190)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1157908.svg)](https://doi.org/10.5281/zenodo.1157908)
[![DOI](https://joss.theoj.org/papers/10.21105/joss.00859/status.svg)](https://doi.org/10.21105/joss.00859)`nomisr` is for accessing UK official statistics from the [Nomis](https://www.nomisweb.co.uk/) database through R. Nomis contains data from the Census, the Labour Force Survey, DWP benefit statistics and other economic and demographic data, and is maintained on behalf of the Office for National Statistics by the University of Durham.
The `nomisr` package provides functions to find what data is available, the variables and query options for different datasets and a function for downloading data. `nomisr` returns data in [`tibble`](https://cran.r-project.org/package=tibble) format. Most of the data available through `nomisr` is based around statistical geographies, with a handful of exceptions.
The package is for demographers, economists, geographers, public health researchers and any other researchers who are interested in geographic factors. The package aims to aid reproducibility, reduce the need to manually download area profiles, and allow easy linking of different datasets covering the same geographic area.
## Installation
`nomisr` is available on CRAN:
```{r cran-installation, eval = FALSE}
install.packages("nomisr")
```You can install the development version `nomisr` from github with:
```{r gh-installation, eval = FALSE}
# install.packages("devtools")
devtools::install_github("ropensci/nomisr")
```## Using `nomisr`
`nomisr` contains functions to search for datasets, identify the query options for different datasets and retrieve data from queries, all done with [`tibbles`](https://tibble.tidyverse.org/), to take advantage of how `tibble` manages list-columns. The use of metadata queries, rather than simply downloading all available data, is useful to avoid overwhelming the rate limits of the API.
There are `nomisr` vignette [introduction](https://docs.evanodell.com/nomisr/articles/introduction.html) has details on all available functions and basic demonstrations of their use.
The example below demonstrates a workflow to retrieve the latest data on Jobseeker's Allowance with rates and proportions, on a national level, with all male claimants and workforce.
```{r example}
library(nomisr)
jobseekers_search <- nomis_search(name = "*Jobseeker*")
tibble::glimpse(jobseekers_search)jobseekers_measures <- nomis_get_metadata("NM_1_1", "measures")
tibble::glimpse(jobseekers_measures)
jobseekers_geography <- nomis_get_metadata("NM_1_1", "geography", "TYPE")
tail(jobseekers_geography)
jobseekers_sex <- nomis_get_metadata("NM_1_1", "sex", "TYPE")
tibble::glimpse(jobseekers_sex)
z <- nomis_get_data(id = "NM_1_1", time = "latest", geography = "TYPE499",
measures=c(20100, 20201), sex=5)
tibble::glimpse(z)
```There is a lot of data available through Nomis, and there are some limits to the amount of data that can be retrieved within a certain period of time, although those are not published. For more details, see the [full API documentation](https://www.nomisweb.co.uk/api/v01/help) from Nomis. Full package documentation is available at [docs.evanodell.com/nomisr](https://docs.evanodell.com/nomisr).
## Meta
Bug reports, suggestions, and code contributions are all welcome. Please see [CONTRIBUTING.md](https://github.com/ropensci/nomisr/blob/master/CONTRIBUTING.md) for details.
Please note that this project is released with a [Contributor Code of Conduct](https://github.com/ropensci/nomisr/blob/master/CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
Please note that this project is not affiliated with the Office for National Statistics or the University of Durham (who run Nomis on behalf of the Office for National Statistics).
Please use the reference below when citing `nomisr`, or use `citation(package = 'nomisr')`.
Odell, (2018). nomisr: Access 'Nomis' UK Labour Market Data. _Journal of Open Source Software_, 3(27), 859, doi: [10.21105/joss.00859](https://doi.org/10.21105/joss.00859).
A BibTeX entry for LaTeX users is
```
@Article{odell2018,
title = {{nomisr}: Access Nomis UK Labour Market Data With R},
volume = {3},
doi = {10.21105/joss.00859},
number = {27},
journal = {The Journal of Open Source Software},
year = {2018},
month = {July},
pages = {859},
author = {Evan Odell},
}
```
License: [MIT](https://github.com/ropensci/nomisr/blob/master/LICENSE.md)[![ropensci_footer](https://ropensci.org/public_images/ropensci_footer.png)](https://ropensci.org)