Wednesday 11 September 2013

Using the Nomis API with R for regional labour market data

Nomis, a site run by the University of Durham on behalf of the Office for National Statistics, is a fantastic source for labour market statistics, including local data.

The site's features include regional profiles and web-based tools for querying the Nomis database. In this post, I'll briefly discuss the Nomis API, which is useful for downloading the latest data to stats software, web apps etc. Spencer Hedger, who works on the Nomis team, has written several helpful blog posts on using the API. Also see the API reference pages which are linked to from your Nomis account page.
Chart created using R and Nomis API

This is a quick example of downloading data to R using an API link. The API link was generated using the process described in Spencer Hedger's blog post; see the link above. The resulting chart is shown to the right.

The API has several format options in addition to CSV, such as Google Visualisation JSON and KML.

2 comments:

  1. Here's another demo of accessing nomis from R, in this case for unemployment data: https://github.com/psychemedia/eduDemos1/blob/master/caseStudies/iwUnemployment/examples.R

    I wonder if it would make sense trying to pull a proper package together?

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete