1

I'm successfully traversing the ONS API, and can retrieve values from the terminal leaves of the API such as

Religion By Sex By Age > 2011WARDH > Wales > Ceredigion > Aberystwyth Rheidol

If I try to pull a larger data set such as at Wales level I get a number of download links owing to the number of results the query has raised, as per the documentation.

In the data explorer I can traverse the API to the Wales level and view the summary values of the the data across this wider scope, which I don't see in the retrieved xml supplying the links, nor referenced in the API documentation.

Is there a way to pull these summary values with the API?

Many thanks

1 Answers1

1

It's not made clear in the howto documentation that once you have a context, hierarchy and your first GIS code i.e.: Census, 2011WARD, K04000001 (England and Wales) you can call the API to retrieve the dataset at the resolution the GIS Code provides.

This is the call to get the numbers for Fareham: http://data.ons.gov.uk/ons/api/data/dataset/QS208EW.xml?context=Census&geog=2011WARDH&dm/2011WARDH=E07000087&totals=false&apikey=YOUR_KEY

From earlier in the howto, the GIS code for England and Wales is K04000001

Dropping that into place gets us the summary values for England And Wales: http://data.ons.gov.uk/ons/api/data/dataset/QS208EW.xml?context=Census&geog=2011WARDH&dm/2011WARDH=K04000001&totals=false&apikey=YOUR_KEY