Created
March 10, 2016 16:11
-
-
Save NTerpo/8d81bb33e5a062253400 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git clone https://github.com/opensdmx/rsdmx.git | |
$ R | |
> install.packages("path/to/rsdmx", repos=NULL, type="source") | |
> packageVersion("rsdmx") | |
[1] ‘0.5.2’ | |
> library(rsdmx) | |
> ulc.data <- readSDMX(file = "http://stats.oecd.org/restsdmx/sdmx.ashx/GetData/PDBI_I4/AUS+AUT+BEL+CAN+CHL+CZE+DNK+EST+FIN+FRA+DEU+GRC+HUN+IRL+ISR+ITA+JPN+KOR+LUX+MEX+NLD+NZL+NOR+POL+PRT+SVK+SVN+ESP+SWE+CHE+GBR+USA+EA19+EU28+NMEC+LVA+LTU+ZAF.I4_ANA_GVAHRS+I4_ANA_ULCH+I4_ANA_LCHRS.GRW+AVGRW.A_U+BNEXCL+B_E+BDE+C+F+GNEXCL+G_I+J+K+MN/all?startTime=2001&endTime=2015") | |
> ulc.dsd <- readSDMX(file = "http://stats.oecd.org/restsdmx/sdmx.ashx/GetDataStructure/PDBI_I4") | |
> ulc.data <- setDSD(ulc.data, ulc.dsd) | |
> ulc <- as.data.frame(ulc.data, labels=TRUE) | |
> write.csv(ulc, file="ulc.csv") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Too easy to be honest
NoPainNoGain #SDMXforNewbees