readKSJData: Read JPGIS2.1 Data

Description Usage Arguments Examples

View source: R/readKSJData.R

Description

readKSJData() is an utility to read data downloaded from 'Kokudo Suuchi' service.

Usage

1
readKSJData(x, encoding = "CP932")

Arguments

x

A path to a ZIP file or to a directory that contains the extracted files.

encoding

Encoding of the data.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
# Download a ZIP file from kokudosuuchi website
zip_file <- tempfile(fileext = ".zip")
url <- "https://nlftp.mlit.go.jp/ksj/gml/data/W07/W07-09/W07-09_3641-jgd_GML.zip"
download.file(url, zip_file)

# Load all data as sf objects
d <- readKSJData(zip_file)

# Translate colnames and 'codelist' type columns
translateKSJData(d)

## End(Not run)

yutannihilation/kokudosuuchi documentation built on March 13, 2021, 7:41 a.m.