Wednesday, 18 September 2013

World Development Indicators

World Development Indicators is a database compiled by the World Bank, containing 1289 indicators (by my count) in the categories of world view, people, environment, economy, states and markets, and global links. The database covers the world, regions, and countries, contains annual data, and is updated in April, July, September and December each year. Edit: There are also some updates between these dates; see here for details.

Data visualisation tools are available for a selection of the indicators, including Google Public Data Explorer. There are also nice mobile apps for viewing the indicators.

There are a few options for downloading data:
  • The Databank is an online tool for selecting, viewing and downloading data.
  • The WDI package for R can be used to search for and download data directly to R. See the README page for a quick tutorial.
  • There is also a zip file containing all of the data and metadata in csv format (39 MB download). This could be useful if you plan to use the WDI often.

In the third of these options, the csv files appear to use the CP1252 character encoding. Something like this should work for loading the data in R:
wdi_country <- read.csv('WDI_Country.csv', fileEncoding='CP1252')

The files are large, so it takes a little while to load them into R for the first time. You can use the save and load commands to store the data in .RData format; this makes loading faster in subsequent R sessions.

No comments:

Post a comment