Package 'kuniumi'

Title: Load and Handles Geo-Spatial Data on Japan's National Land
Description: Reads datasets provided by National Land Numerical Information download service <https://nlftp.mlit.go.jp/ksj/index.html> and treats them as 'sf' of a R spatial objects.
Authors: Shinya Uryu [aut, cre]
Maintainer: Shinya Uryu <[email protected]>
License: MIT + file LICENSE
Version: 0.0.0.9000
Built: 2024-09-02 06:11:24 UTC
Source: https://github.com/uribo/kuniumi

Help Index


Bind KSJ files in directory

Description

Bind KSJ files in directory

Usage

ksj_bind(dir, identifier, regexp = NULL, translate = NULL)

Arguments

dir

path

identifier

Data identifier. (e.g. "N02")

regexp

A regular expression passed on target directory.

translate

Path to parser function. "raw", "jp" or "en".


Read ISJ format data

Description

Read ISJ format data

Usage

read_isj(
  path = NULL,
  .area_code = NULL,
  .fiscal_year = NULL,
  .pos_level = NULL,
  .download = FALSE,
  return_class = NULL
)

Arguments

path

Input file path ('csv')

.area_code

Area code. 5 digits numeric character. E.g. Chiba prefecture ("12000"), Ichikawa city in Chiba ("12033")

.fiscal_year

Japanese imperial fiscal year as Kanji.

.pos_level

E.g. 0 is to street level 3. 1 is to street level 1.

.download

If 'TRUE', download file to working directory.

return_class

Select "tbl_df" (data.frame) or "data.table"

See Also

https://nlftp.mlit.go.jp/isj/about_api.html


Kokudosuuchi A10 parser

Description

If there is no local file, specify the year and pref_code to download.

Usage

read_ksj_a10(path = NULL, .pref_code = NULL, .year = NULL, .download = FALSE)

Arguments

path

Input file path ('.shp' or '.geojson')

.pref_code

Specific prefecture code

.year

Specific year

.download

If 'true', the specified file is downloaded to the current working directory.


Kokudosuuchi A10 parser

Description

If there is no local file, specify the year and pref_code to download.

Usage

read_ksj_a16(
  path = NULL,
  translate = "jp",
  .pref_code = NULL,
  .year = NULL,
  .download = TRUE
)

Arguments

path

Input file path ('.shp' or '.geojson')

translate

Translate the variable name into the specified language. You can choose either Original ('raw') and Japanese ('jp') or English ('en').

.pref_code

Specific prefecture code

.year

Specific year

.download

If 'true', the specified file is downloaded to the current working directory.


Kokudosuuchi A30a5 parser

Description

If there is no local file, specify the meshcode to download.

Usage

read_ksj_a30a5(path = NULL, .meshcode = NULL, .download = FALSE)

Arguments

path

Input file path ('.shp' or '.geojson')

.meshcode

Specific 80km meshcode

.download

If 'true', the specified file is downloaded to the current working directory.


Kokudosuuchi C02 parser

Description

If there is no local file, specify the year to download.

Usage

read_ksj_c02(path = NULL, translate = "jp", .year = NULL, .download = FALSE)

Arguments

path

Input file path ('.shp' or '.geojson')

translate

Translate the variable name into the specified language. You can choose either Original ('raw') and Japanese ('jp') or English ('en').

.year

Specific year

.download

If 'true', the specified file is downloaded to the current working directory.


Kokudosuuchi C23 parser

Description

If there is no local file, specify prefecture code to download.

Usage

read_ksj_c23(path = NULL, .pref_code = NULL, .download = FALSE)

Arguments

path

Input file path ('.shp' or '.geojson')

.pref_code

Specific prefecture code

.download

If 'true', the specified file is downloaded to the current working directory.


Kokudosuuchi L01 parser (v2.5 and v2.4)

Description

If there is no local file, specify the year and pref_code to download.

Usage

read_ksj_l01(path = NULL, .year = NULL, .pref_code = NULL, .download = FALSE)

Arguments

path

Input file path ('.shp' or '.geojson')

.year

Specific year

.pref_code

Specific prefecture code

.download

If 'true', the specified file is downloaded to the current working directory.


Kokudosuuchi L02 parser (v2.7)

Description

If there is no local file, specify the year and pref_code to download.

Usage

read_ksj_l02(path = NULL, .year = NULL, .pref_code = NULL, .download = FALSE)

Arguments

path

Input file path ('.shp' or '.geojson')

.year

Specific year

.pref_code

Specific prefecture code

.download

If 'true', the specified file is downloaded to the current working directory.


Kokudosuuchi L03a parser

Description

If there is no local file, specify year and meshcode to download.

Usage

read_ksj_l03a(path = NULL, .year = NULL, .meshcode = NULL, .download = FALSE)

Arguments

path

Input file path ('.shp' or '.geojson')

.year

Specific year

.meshcode

Specific 80km meshcode

.download

If 'true', the specified file is downloaded to the current working directory.


Kokudosuuchi L03-b parser

Description

If there is no local file, specify the meshcode to download.

Usage

read_ksj_l03b(
  path = NULL,
  translate = "jp",
  .year,
  .meshcode,
  .datum,
  .download = FALSE
)

Arguments

path

Input file path ('.shp' or '.geojson')

translate

Translate the variable name into the specified language. You can choose either Original ('raw') and Japanese ('jp') or English ('en').

.year

Specific year

.meshcode

Specific 80km meshcode

.datum

"jgd" or "tky"

.download

If 'true', the specified file is downloaded to the current working directory.


Kokudosuuchi L03-b-u parser

Description

If there is no local file, specify the meshcode to download.

Usage

read_ksj_l03bu(
  path = NULL,
  translate = "jp",
  .year = NULL,
  .meshcode = NULL,
  .datum = NULL,
  .download = FALSE
)

Arguments

path

Input file path ('.shp' or '.geojson')

translate

Translate the variable name into the specified language. You can choose either Original ('raw') and Japanese ('jp') or English ('en').

.year

Specific year

.meshcode

Specific 80km meshcode

.datum

"jgd" or "tky"

.download

If 'true', the specified file is downloaded to the current working directory.


Kokudosuuchi N02 parser

Description

If there is no local file, specify the year to download.

Usage

read_ksj_n02(
  path = NULL,
  .year = NULL,
  .download = FALSE,
  .type = c("railroadsection", "station")
)

Arguments

path

Input file path ('.shp' or '.geojson')

.year

Specific year

.download

If 'true', the specified file is downloaded to the current working directory.

.type

The type of file. "Railway section (railroadsection)" (default) or "station"


Kokudosuuchi N03 parser

Description

If there is no local file, specify the year and pref_code to download.

Usage

read_ksj_n03(path = NULL, .year = NULL, .pref_code = NULL, .download = FALSE)

Arguments

path

Input file path ('.shp' or '.geojson')

.year

Specific year

.pref_code

Specific prefecture code

.download

If 'true', the specified file is downloaded to the current working directory.


Kokudosuuchi N05 parser

Description

If there is no local file, specify the year and pref_code to download.

Usage

read_ksj_n05(
  path = NULL,
  .year = NULL,
  .download = FALSE,
  .type = c("railroadSection", "station")
)

Arguments

path

Input file path ('.shp' or '.geojson')

.year

Specific year

.download

If 'true', the specified file is downloaded to the current working directory.

.type

File type. Select either "railroadSection" or "station"


Kokudosuuchi P07 parser

Description

If there is no local file, specify the year and pref_code to download.

Usage

read_ksj_p07(path = NULL, .year = NULL, .pref_code = NULL, .download = FALSE)

Arguments

path

Input file path ('.shp' or '.geojson')

.year

Specific year

.pref_code

Specific prefecture code

.download

If 'true', the specified file is downloaded to the current working directory.


Kokudosuuchi P09 parser

Description

Kokudosuuchi P09 parser

Usage

read_ksj_p09(path, translate = "jp", .meshcode = NULL, .download = FALSE)

Arguments

path

Input file path ('.shp' or '.geojson')

translate

Translate the variable name into the specified language. You can choose either Original ('raw') and Japanese ('jp') or English ('en').

.meshcode

Specific 80km meshcode

.download

If 'true', the specified file is downloaded to the current working directory.


Kokudosuuchi P12 parser

Description

If there is no local file, specify prefecture code to download.

Usage

read_ksj_p12(
  path = NULL,
  translate = "jp",
  .pref_code = NULL,
  .download = FALSE,
  .type
)

Arguments

path

Input file path ('.shp' or '.geojson')

translate

Translate the variable name into the specified language. You can choose either Original ('raw') and Japanese ('jp') or English ('en').

.pref_code

Specific prefecture code

.download

If 'true', the specified file is downloaded to the current working directory.

.type

File type. When downloading a file, select the type of data to use, either "point", "line" or "polygon".


Kokudosuuchi P13 parser

Description

If there is no local file, specify the year and pref_code to download.

Usage

read_ksj_p13(path = NULL, .pref_code = NULL, .download = FALSE)

Arguments

path

Input file path ('.shp' or '.geojson')

.pref_code

Specific prefecture code

.download

If 'true', the specified file is downloaded to the current working directory.


Kokudosuuchi P19 parser

Description

If there is no local file, specify prefecture code to download.

Usage

read_ksj_p19(path = NULL, .pref_code = NULL, .download = FALSE)

Arguments

path

Input file path ('.shp' or '.geojson')

.pref_code

Specific prefecture code

.download

If 'true', the specified file is downloaded to the current working directory.


Kokudosuuchi P23 parser

Description

If there is no local file, specify prefecture code to download.

Usage

read_ksj_p23(
  path = NULL,
  translate = "jp",
  .pref_code = NULL,
  .download = FALSE,
  .type
)

Arguments

path

Input file path ('.shp' or '.geojson')

translate

Translate the variable name into the specified language. You can choose either Original ('raw') and Japanese ('jp') or English ('en').

.pref_code

Specific prefecture code

.download

If 'true', the specified file is downloaded to the current working directory.

.type

File type. When downloading a file, select the type of data to use, either "point" or "line".


Kokudosuuchi P34 parser

Description

If there is no local file, specify the year and pref_code to download.

Usage

read_ksj_p34(path = NULL, .pref_code = NULL, .download = FALSE)

Arguments

path

Input file path ('.shp' or '.geojson')

.pref_code

Specific prefecture code

.download

If 'true', the specified file is downloaded to the current working directory.


Kokudosuuchi W05 parser

Description

If there is no local file, specify the prefecture to download.

Usage

read_ksj_w05(
  path = NULL,
  .pref_code = NULL,
  .download = FALSE,
  .type = c("stream", "node")
)

Arguments

path

Input file path ('.shp' or '.geojson')

.pref_code

Specific prefecture code

.download

If 'true', the specified file is downloaded to the current working directory.

.type

File type.