MyNixOS website logo
Description

Aid Querying 'nomis' and 'Office for National Statistics Open Geography' APIs.

Facilitates extraction of geospatial data from the 'Office for National Statistics Open Geography' and 'nomis' Application Programming Interfaces (APIs). Simplifies process of querying 'nomis' datasets <https://www.nomisweb.co.uk/> and extracting desired datasets in dataframe format. Extracts area shapefiles at chosen resolution from 'Office for National Statistics Open Geography' <https://geoportal.statistics.gov.uk/>.

Defra logo

Overview

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:

ONS Open Geography Portal

nomis

Users must abide by the licensing agreements when publishing information extracted from these ONS sources, for more copyright information, see the copyright section.

Installation

 install.packages("sgapi")
 

Install Development Version

install.packages("remotes")
remotes::install_github("https://github.com/Defra-Data-Science-Centre-of-Excellence/sgapi")

Key Functions

  1. get_boundaries.R - returns shapefile of areas in contact with a user selected rectangular area, at your chosen ONS resolution
  2. get_boundaries_areanames.R - returns the shapefiles for all areas input into the function.
  3. get_table_dimensions.R - for a chosen nomis table this function returns all of the parameters which can be filtered
  4. get_table.R - extracts a dataframe from the chosen nomis table for your selected area and selected filters
  5. get_table_link_lookup.R - retrieves a dataframe with the lookup table between two resolutions, taken from ONS Open Geography lookup tables
  6. get_table_info_brief.R - returns summary information for the selected nomis table, including contact details, data description and table status

Exploratory Functions

  1. list_boundaries.R - lists all boundary masks available on the ONS Open Geography
  2. list_tables.R - lists all tables, including their name and reference code, from nomis
  3. get_available_scales.R - provides list of available geographical resolutions for your chosen nomis table
  4. list_data_sources.R - lists all available data sources on nomis

Additional API Information

ONS Open Geography Portal

nomis

Copyright and Permissions

ONS Open Geography Portal

Terms and conditions of supply Digital 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]

nomis

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 the open government license.

Metadata

Version

1.0.2

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows