Skip to content

Latest commit

 

History

History
86 lines (75 loc) · 4.63 KB

README.md

File metadata and controls

86 lines (75 loc) · 4.63 KB

nomisr

License: MIT CRAN_Status_Badge GitHub tag Travis-CI Build Status AppVeyor Build Status Coverage Status DOI

nomisr is for accessing Nomis data with R. Nomis contains labour market statistics, data on benefits, demographic data and census data.

Installation

You can install nomisr from github with:

# install.packages("devtools")
devtools::install_github("evanodell/nomisr")

Using nomisr

The example below gets the latest data on Jobseeker’s Allowance with rates and proportions, on a national level, with all male claimants and workforce.

 library(nomisr)
 z <- nomis_get_data(id="NM_1_1", time="latest", geography="TYPE499", measures=c(20100, 20201), sex=5)
 tibble::glimpse(z)
#> Observations: 70
#> Variables: 34
#> $ DATE                <chr> "2017-12", "2017-12", "2017-12", "2017-12"...
#> $ DATE_NAME           <chr> "December 2017", "December 2017", "Decembe...
#> $ DATE_CODE           <chr> "2017-12", "2017-12", "2017-12", "2017-12"...
#> $ DATE_TYPE           <chr> "date", "date", "date", "date", "date", "d...
#> $ DATE_TYPECODE       <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
#> $ DATE_SORTORDER      <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
#> $ GEOGRAPHY           <int> 2092957697, 2092957697, 2092957697, 209295...
#> $ GEOGRAPHY_NAME      <chr> "United Kingdom", "United Kingdom", "Unite...
#> $ GEOGRAPHY_CODE      <chr> "K02000001", "K02000001", "K02000001", "K0...
#> $ GEOGRAPHY_TYPE      <chr> "countries", "countries", "countries", "co...
#> $ GEOGRAPHY_TYPECODE  <int> 499, 499, 499, 499, 499, 499, 499, 499, 49...
#> $ GEOGRAPHY_SORTORDER <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, ...
#> $ SEX                 <int> 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, ...
#> $ SEX_NAME            <chr> "Male", "Male", "Male", "Male", "Male", "M...
#> $ SEX_CODE            <int> 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, ...
#> $ SEX_TYPE            <chr> "sex", "sex", "sex", "sex", "sex", "sex", ...
#> $ SEX_TYPECODE        <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
#> $ SEX_SORTORDER       <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
#> $ ITEM                <int> 1, 1, 2, 2, 3, 3, 4, 4, 9, 9, 1, 1, 2, 2, ...
#> $ ITEM_NAME           <chr> "Total claimants", "Total claimants", "Stu...
#> $ ITEM_CODE           <int> 1, 1, 2, 2, 3, 3, 4, 4, 9, 9, 1, 1, 2, 2, ...
#> $ ITEM_TYPE           <chr> "item", "item", "item", "item", "item", "i...
#> $ ITEM_TYPECODE       <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
#> $ ITEM_SORTORDER      <int> 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 0, 0, 1, 1, ...
#> $ MEASURES            <int> 20100, 20201, 20100, 20201, 20100, 20201, ...
#> $ MEASURES_NAME       <chr> "Persons claiming JSA", "Workplace-based e...
#> $ OBS_VALUE           <dbl> 263614.0, 1.4, NA, NA, NA, NA, NA, NA, NA,...
#> $ OBS_STATUS          <chr> "A", "A", "Q", "Q", "Q", "Q", "Q", "Q", "Q...
#> $ OBS_STATUS_NAME     <chr> "Normal Value", "Normal Value", "These fig...
#> $ OBS_CONF            <lgl> FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, ...
#> $ OBS_CONF_NAME       <chr> "Free (free for publication)", "Free (free...
#> $ URN                 <chr> "Nm-1d1d32284e0d2092957697d5d1d20100", "Nm...
#> $ RECORD_OFFSET       <int> 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, ...
#> $ RECORD_COUNT        <int> 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70...

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 from Nomis. Full package documentation is available at docs.evanodell.com/nomisr