- Notifications
You must be signed in to change notification settings - Fork1
License
Unknown, MIT licenses found
Licenses found
Defra-Data-Science-Centre-of-Excellence/sgapi
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
The sgapi package provides a simple wrapper around the nomis and Open Geography Portal APIs, aiding geospatial analysis of the population, labour market, and social measures. Simplifies process of querying nomis datasets and extracting area shapefiles at chosen resolution from ONS Open Geography.
The authors thank ONS for their work in maintaining both NOMIS and Open Geography Portal, without them this work would not be possible.
More information on theses sources can be found here:
Users must abide by the licensing agreements when publishing information extracted from these ONS sources, for more copyright information, see thecopyright section.
install.packages("sgapi")install.packages("remotes")remotes::install_github("https://github.com/Defra-Data-Science-Centre-of-Excellence/sgapi")# List available nomis tableslist_tables()# Pull all data from the "Jobseeker's Allowance" datasetget_ons_table("nm_1_1")# Filter "Jobseeker's Allowance" dataset and 'select' columns to outputget_ons_table("nm_1_1",geography="TYPE480",time="latest",measures=20100,item=1,select= c("geography_name","sex_name","obs_value"))# Aggregate statistics using 'rows' and 'cols'get_ons_table("nm_1_1",geography="TYPE480",time="latest",measures=20100,item=1,select= c("geography_name","sex_name","obs_value"),rows= c("geography_name"),cols= c("sex_name"))
- get_boundaries.R - returns shapefile of areas in contact with a user selected rectangular area, at your chosen ONS resolution
- get_boundaries_areanames.R - returns the shapefiles for all areas input into the function.
- get_table_dimensions.R - for a chosen nomis table this function returns all of the parameters which can be filtered
- get_ons_table.R - extracts a dataframe from the chosen nomis table for your selected area and selected filters
- get_table_link_lookup.R - retrieves a dataframe with the lookup table between two resolutions, taken from ONS Open Geography lookup tables
- get_table_info_brief.R - returns summary information for the selected nomis table, including contact details, data description and table status
- list_boundaries.R - lists all boundary masks available on the ONS Open Geography
- list_tables.R - lists all tables, including their name and reference code, from nomis
- get_available_scales.R - provides list of available geographical resolutions for your chosen nomis table
- list_data_sources.R - lists all available data sources on nomis
Terms and conditions of supplyDigital boundary products and reference maps are supplied under the Open Government Licence. You must use the following copyright statements when you reproduce or use this material:
Source: Office for National Statistics licensed under the Open Government Licence v.3.0Contains OS data © Crown copyright and database right [year]
All material on the Office for National Statistics (ONS) and Nomis websites is subject to Crown Copyright protection unless otherwise indicated.
Source: Office for National Statistics
For more information on the Open Government Licence, see theopen government license
About
Resources
License
Unknown, MIT licenses found
Licenses found
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors5
Uh oh!
There was an error while loading.Please reload this page.
