Package 'easyestat'

Title: What the Package Does (One Line, Title Case)
Description: What the package does (one paragraph).
Authors: Shinya Uryu [aut, cre]
Maintainer: Shinya Uryu <[email protected]>
License: MIT + file LICENSE
Version: 0.0.0.9000
Built: 2024-12-14 03:20:55 UTC
Source: https://github.com/uribo/easyestat

Help Index


Download Japan prefecture map from e-Stat

Description

Download Japan prefecture map from e-Stat

Usage

download_stat_map(
  prefcode,
  exdir = ".",
  dest = TRUE,
  .survey_id = c("A002005212015")
)

Arguments

prefcode

The JIS-code for prefecture and city identical number. If prefecture, must be from 1 to 47.

exdir

The directory to extract files to (the equivalent of unzip -d). It will be created if necessary.

dest

If TRUE, to unzip downloaded files.

.survey_id

survey id (A00200521YYYY is small area, D00200521YYYY is did area)

See Also

https://www.e-stat.go.jp/gis


Read e-Stat aggregation unit boundary data

Description

The GIS data downloaded from e-Stat is read and converted into an easy to process sf::sf format. You can use download_stat_map() to download the data.

Usage

read_estat_map(file, type = "aggregate_unit", remove_cols = TRUE)

Arguments

file

Path to downloaded e-Stat shape file

type

Currently, only "aggregate_unit" is used.

remove_cols

Whether or not to remove redundant columns. When TRUE (the default), the following columns are removed (See details). These columns can be substituted or sought with values from other columns.

  • S_AREA

  • KAxx_, KAxx_id

  • KEN, KEN_NAME

  • DUMMY1

  • X_CODE, Y_CODE


Read e-Stat mesh population census data

Description

Read e-Stat mesh population census data

Usage

read_estat_meshpop(file, is_long = FALSE, mesh_size = 0.5)

Arguments

file

Path to downloaded e-Stat text file, such as ⁠tblT000847H{meshcode}.txt⁠

is_long

If TRUE, make the population category a single variable and make the values of the counterpart population independent.

mesh_size

Currently, only 0.5 (500m mesh)