0

I'd like to create some dynamic graphs charting UK GDP movements over the last couple of years with a library such as D3.

Is it possible to get GDP related info via the ONS API ?

1 Answers1

0

Some GDP-related datasets are available in JSON-Stat via the OpenAPI e.g. http://web.ons.gov.uk/ons/api/data/dataset/RegGVA02.json?context=Economic&jsontype=json-stat&apikey=12345&geog=2015EUROSTATH&diff=&totals=false

However if you just want a simple timeseries, the main ONS web site is a good shout. If you go to https://www.ons.gov.uk/economy/grossdomesticproductgdp

you'll get a list of GDP-related time series. When you find the one you want, append /data to the URL to get the underlying numbers in JSON.

E.g. https://www.ons.gov.uk/economy/grossdomesticproductgdp/timeseries/ybha/edp2/data