Entradas

Mostrando las entradas etiquetadas como OCDE

Collect GDP forecast using OCDE API with python 3.4

Collect GDP forecast using OCDE API with python 2.7 Rafael Valero Fernandez 14/10/2016 Gather data using OCDE API (After writing this entrances I realice a possible easier way, by using padas data reader: https://pandas-datareader.readthedocs.io/en/latest/remote_data.html#oecd) Summary Step 1) obtain the resquest URL in  http://stats.oecd.org/sdmx-json/ . In my case  http://stats.oecd.org/sdmx-json/data/EO/GBR.ET_ANNPCT.A+Q/all?detail=Full&dimensionAtObservation=AllDimensions&startPeriod=2016 Step 2) Read the previous link with python Step 3) get the json Step 4) Parse json into dataframe pandas In [60]: request_URL = "http://stats.oecd.org/sdmx-json/data/EO/GBR.ET_ANNPCT.A+Q/all?detail=Full&dimensionAtObservation=AllDimensions&startPeriod=2016" # libraries to obtain the data from web import urllib import json html_text = urllib . urlopen ( request_URL ) html_text Out[60]: <addinfourl at 14611213...