getHDRData

You can import data directly from HDR (Human Development Report) using getHDRData.m function I created. Some examples on how to use getHDRData can be found in the same place.

  • Download getHDRData.m (you can either put it in your active folder, or better yet add it to the Matlab path). [Github]
  • Now just import the series you want, here the Human Development Index (code: 137506) for period 1990 to 2019 for Australia:
  • HDI = getHDRData(‘137506’, ‘AUS’,’1990′, ‘2019’)
  • This will give you a structure HDI, the data series itself is in HDI.Data(:,2).
  • The HDI structure also contains other info, eg. HDR.description, or the dates in HDR.Data(:,1).
  • Dates are in Matlab’s datenum format, counts days starting from 0000-01-01. You can convert them using Matlab functions datestr and datevec, graph them with dateticks. Sometimes you will want them in a format telling you the quarter; use datevec, get months, and then turn months to quarters using ceil(‘month’/3).
  • To figure out all the codes you can just run getHDRData(‘Dictionary’) which will tell you all the data series (name and numeric code) and also all the country three-letter codes. (These were chosen by the HDR, I have no idea why they use such obscure and cryptic number codes as variable names.)
  • Note: the formatting of the output is designed to look like that of getFREDData (you can inputs dates as ‘1990-01-01’ if you like and getHDRData will still work).