Title: | functions to get public survey data in Japan |
---|---|
Description: | This package purposes to deal with public survey data of Japanese government via their Application Programming Interface (http://statdb.nstac.go.jp/) |
Authors: | Yuichiro Otani |
Maintainer: | Yuichiro Otani <[email protected]> |
License: | GPL |
Version: | 0.1 |
Built: | 2025-02-14 03:40:00 UTC |
Source: | https://github.com/cran/govStatJPN |
This package purposes to use the public data in simple way.
This product uses the Gateway to Advanced and User-friendly Statistics Service API but is not endorsed or certified by the Statistics Bureau or the National Statistics Center.
Package: | govStatJPN |
Type: | Package |
Version: | 0.1a |
Date: | 2013-06-11 |
License: | Yuichiro Otani <[email protected]> |
LazyLoad: | yes |
Yuichio Otani <[email protected]>
http://statdb.nstac.go.jp/
http://statdb.nstac.go.jp/wp/wp-content/uploads/2013/06/API-spec.pdf
get.stat.list
,
get.meta.info
,
get.stat.data
# library(govStatJPN)
# library(govStatJPN)
This function purposes to get a meta data API offers.
get.meta.info(app.id, stat.id)
get.meta.info(app.id, stat.id)
app.id |
Your application ID. Using all functions contained govStatJPN package, this ID is required. |
stat.id |
Required. This is an id in retuned values of |
This function is based on section 3.3 at the published pdf file (http://statdb.nstac.go.jp/wp/wp-content/uploads/2013/06/API-spec.pdf).
A data frame object is returned.
This product uses the Gateway to Advanced and User-friendly Statistics Service API but is not endorsed or certified by the Statistics Bureau or the National Statistics Center.
Yuichio Otani <[email protected]>
http://statdb.nstac.go.jp/
http://statdb.nstac.go.jp/wp/wp-content/uploads/2013/06/API-spec.pdf
# app.id <- 'your application ID' # stat.list <- get.stat.list(app.id, list(surveyYears=2007, lang='J')) # meta.info <- get.meta.info(app.id, stat.list$id[1]) # meta.info
# app.id <- 'your application ID' # stat.list <- get.stat.list(app.id, list(surveyYears=2007, lang='J')) # meta.info <- get.meta.info(app.id, stat.list$id[1]) # meta.info
This function purposes to get a data of a survey the defined with stat id.
get.stat.data(app.id, param, stat.id)
get.stat.data(app.id, param, stat.id)
app.id |
Your application ID. Using all functions contained govStatJPN package, this ID is required. |
param |
You can set the list of survey years and language as a list object like |
stat.id |
Required. This is an id in retuned values of |
This function is based on section 3.4 at the published pdf file (http://statdb.nstac.go.jp/wp/wp-content/uploads/2013/06/API-spec.pdf).
value |
This is the data of the specified survey. |
note |
This is the note of the specified survey. |
This product uses the Gateway to Advanced and User-friendly Statistics Service API but is not endorsed or certified by the Statistics Bureau or the National Statistics Center.
Yuichio Otani <[email protected]>
http://statdb.nstac.go.jp/
http://statdb.nstac.go.jp/wp/wp-content/uploads/2013/06/API-spec.pdf
# stat.list <- get.stat.list(app.id, list(surveyYears=2007, lang='J')) # stat.data <- get.stat.data(app.id, list(limit=100),stat.list$id[1]) # show data of the survey # stat.data$value # summation of data # sum(stat.data$value$value) # mean of data # mean(stat.data$value$value) # standard deviation of data # sd(stat.data$value$value) # get histogram # hist(stat.data$value$value, breaks=25)
# stat.list <- get.stat.list(app.id, list(surveyYears=2007, lang='J')) # stat.data <- get.stat.data(app.id, list(limit=100),stat.list$id[1]) # show data of the survey # stat.data$value # summation of data # sum(stat.data$value$value) # mean of data # mean(stat.data$value$value) # standard deviation of data # sd(stat.data$value$value) # get histogram # hist(stat.data$value$value, breaks=25)
This object works to get a list of surveys.
get.stat.list(app.id, param)
get.stat.list(app.id, param)
app.id |
Your application ID. Using all functions contained govStatJPN package, this ID is required. |
param |
You can set the list of survey years and language as a list object like |
This function is based on section 3.2 at the published pdf file (http://statdb.nstac.go.jp/wp/wp-content/uploads/2013/06/API-spec.pdf).
id |
This is a stat id of the survey. This object will be used in other functions in this package. The meanings of other values are provided in the reference(Japanese). |
This product uses the Gateway to Advanced and User-friendly Statistics Service API but is not endorsed or certified by the Statistics Bureau or the National Statistics Center.
Yuichio Otani <[email protected]>
http://statdb.nstac.go.jp/
http://statdb.nstac.go.jp/wp/wp-content/uploads/2013/06/API-spec.pdf
# app.id <- 'your application ID' # stat.list <- get.stat.list(app.id, list(surveyYears=2007, lang='J')) # stat.list
# app.id <- 'your application ID' # stat.list <- get.stat.list(app.id, list(surveyYears=2007, lang='J')) # stat.list