0

I have created two functions, one that builds the endpoint, and another that sends the request. Much of the docs speak of the Census, but I am looking for a different type of data.

To begin with I am looking to find unemployment figures from different parts of the UK. With that data I would like to filter based on unemployment status, Jobseekers, ESA, Disability etc.

Before I can even look at how the data is received I need to know how to send the request. Here is the builder function:

function buildUrl(c, r, q) {

var api_domain ="http://data.ons.gov.uk/";
var api_contextRoot = c ? c : "ons/api/data/";
var api_resource = r ?r : "collections.json";
var api_Key = "?apikey=**0**0**&";
var api_query = q ? q :"context=Census";

return api_domain+api_contextRoot+api_resource+api_Key+api_query;
}

Perhaps I have not looked enough at the docs, but I cannot find a context that would match what I need?

Can anyone help ?

Thanks

BadAddy
  • 346
  • 1
  • 4
  • 12

1 Answers1

0

http://data.ons.gov.uk/ons/api/data/contexts.json?apikey=yourkeyhere (or html or xml) gives the list of contexts, but it is pretty static. The three that have datasets are the three you see on the Data Explorer dataset list page http://web.ons.gov.uk/ons/data/dataset-finder - Census, Economic and Social.

There are a number of jobs-related datasets under Economic but not Jobseeker's allowance claimants. NOMIS https://www.nomisweb.co.uk/ is the best place for this dataset (and it has an API). Neighbourhood Statistics also has relevant data though this service is being phased out so it's not very up to date.

P.S. Sorry about the late response: ONS people have been replying to ONSAPI@ons.gsi.gov.uk emails but haven't checked Stackoverflow for a while.