2015年5月14日木曜日

R function to get a catalog XML/JSON file from e-stat.go.jp


Here is the link for a .R file to get a catalog file from Japanese government's statistics portal site, e-Stat.


setwd("downloaded folder")
source("R_estat_functions.R", encoding = "UTF-8")
xml.out <- GetDataCatalog(appId = "your appId: you have to register",
                          type = "xml",
                          ver = "2.0",
                          lang = "J",
                          statsCode = "00450011",  # vital statistics
                          startPosition = "1",
                          verbose = FALSE)
# you will get catalog no.1-100 on Vital Statistics.
# there are only 70 tables if you change 'lang' option to "E".

0 件のコメント:

コメントを投稿

コメントありがとうございます。お返事にはお時間いただくかもしれません。気長にお待ちいただけると幸いです。