getStatsData: Get statistical data from http://statdb.nstac.go.jp/

Description Usage Arguments Details Value Author(s) References Examples

Description

Get statistical data that you specify the data ID from “Gateway to Advanced and User-friendly Statistics Service” (http://statdb.nstac.go.jp/) organized by Japanese government.

Usage

1
2
3
getStatsData(statsDataId = NULL, dataSetId = NULL, limit = NULL,
             lvTab = "", cdTab = NULL, lvTime = "", cdTime = NULL,
             lvArea = "", cdArea = NULL)

Arguments

statsDataId

statistical data ID (character)

dataSetId

dataset ID you made (character)

limit

Maximum number of data to download

lvTab

Level of tables to download

cdTab

Code of tables to download (comma separated characters)

lvTime

Level of survey date to download

cdTime

Code of survey date to download (comma separated characters)

lvArea

Level of area to download

cdArea

Code of area to download (comma separated characters)

Details

Data includes some levels of tables, survey dates and areas. For example, data ID 0003009759 includes 1 table (the number of buildings), 1 survey date (year 2008) and 112 areas (prefectures and cities). Level 2 of area shows prefectures, level 3 shows the city parts of each prefecture, and level 4 shows the major cities (e.g. Sapporo, Yokohama, Nagoya, etc.). You can specify the level of table, time and area to download data. If you don't specify the level, all levels are included to data.

Value

It returns the “jpstat” object, which includes

ID

data ID

Stat name

statistics name of government

Government

goverment (ministry) that has the authority of data

Statistics name

provided statistics name

Title

title of data

Survey date

survey date

Tables

data body

Tables is a list that contains tables, and each table is data frame.

Author(s)

Kiwamu Ishikura <ishikura.kiwamu@gmail.com>

References

http://statdb.nstac.go.jp/system-info/api/api-spec/

Examples

1
2
3
getStatsList("Hokkaido AND population", surveyYears = 2008)
hpop20 <- getStatsData("0003009759")
head(hpop20@data[[1L]])

i-kiwamu/Rjpstatdb documentation built on May 17, 2019, 10:08 p.m.