Dear All, I often need to access some data files which are available (also) as files in the SDMX format. For instance, this is the case of the OECD (http://www.oecd.org/) data. In order to automate some processes, I need to retrieve the SDMX data from a url and read the content into an R data frame. I did some online research http://bit.ly/19HFVqe http://bit.ly/19HG0dA http://bit.ly/19HGNeq http://bit.ly/19HH6WJ but it seems to me there is not (yet) a mature R package to parse the content of an SDMX file. Correct? In any case, and to fix the ideas, does anybody know how to read into a data frame the content of this SDMX file http://stats.oecd.org/restsdmx/sdmx.ashx/GetData/MSTI_PUB/G_XGDP.AUS+AUT+BEL+CAN+CHL+CZE+DNK+EST+FIN+FRA+DEU+GRC+HUN+ISL+IRL+ISR+ITA+JPN+KOR+LUX+MEX+NLD+NZL+NOR+POL+PRT+SVK+SVN+ESP+SWE+CHE+TUR+GBR+USA+OECD+EU28+EU15+NMEC+ARG+CHN+ROU+RUS+SGP+ZAF+TWN/OECD?startTime=2000&endTime=2014 or, for short, http://bit.ly/1hFN0b0 ? Any suggestion is welcome. Cheers Lorenzo
Dear Lorenzo,
I've just seen one post from you asking for hints to read SDMX data in R.
I don't know if you still need to read SDMX datasets in R. In case, you
can use the rsdmx package hosted here https://github.com/opensdmx/rsdmx
With the OECD sample you mention, you can do as follows:
#install devtools (required to install rsdmx from github)|||
|require(devtools) |
#install & load rsdmx
install_github("rsdmx", "opensdmx")|
require(rsdmx)
#read data
sdmx <-
readSDMX("http://stats.oecd.org/restsdmx/sdmx.ashx/GetData/MSTI_PUB/G_XGDP.AUS+AUT+BEL+CAN+CHL+CZE+DNK+EST+FIN+FRA+DEU+GRC+HUN+ISL+IRL+ISR+ITA+JPN+KOR+LUX+MEX+NLD+NZL+NOR+POL+PRT+SVK+SVN+ESP+SWE+CHE+TUR+GBR+USA+OECD+EU28+EU15+NMEC+ARG+CHN+ROU+RUS+SGP+ZAF+TWN/OECD?startTime=2000&endTime=2014")
df <- as.data.frame(sdmx)
You can look at the wiki that gives some more information
https://github.com/opensdmx/rsdmx/wiki
Hope this helps,
Emmanuel**
<http://fr.linkedin.com/in/emmanuelblondel1>
[[alternative HTML version deleted]]