Package 'jisx0402'

Title: Datasets Related to 'JIS X 0402:2020'
Description: Provides datasets for handling Japanese municipality code defined in 'JIS X 0402' and 'JIS X 0401'.
Authors: Akiru Kato [aut, cre]
Maintainer: Akiru Kato <[email protected]>
License: MIT + file LICENSE
Version: 0.1.1
Built: 2024-11-11 04:45:00 UTC
Source: https://github.com/paithiov909/jisx0402

Help Index


Calc check digits of municipality codes

Description

Calc check digits of municipality codes

Usage

check_digit(code)

Arguments

code

A character vector; municipality codes.

Value

A character vector.


Japanese addresses and their coordinates

Description

Modified from the 'latest.csv' file in japanese-addresses. The original dataset is licensed under CC BY 4.0.

Usage

jpaddresses

Format

An object of class tbl_df (inherits from tbl, data.frame) with 277656 rows and 6 columns.

Source

https://github.com/geolonia/japanese-addresses/raw/develop/data/latest.csv


Prefecture codes of Japan

Description

Prefecture codes of Japan

Usage

jpprefs

Format

An object of class tbl_df (inherits from tbl, data.frame) with 47 rows and 2 columns.


Topographic data of Japanese municipalities

Description

Reads 'FlatGeobuf' file and returns topographic data as an sf object.

Usage

jptopography(
  type = c("all", "designated", "prefecture"),
  resolution = c("low", "high")
)

Arguments

type

String; One of all, desiginated, or prefecture.

resolution

String; One of low or high. If high, returns the 1% dissolved data ('s0010'). Otherwise, returns the 0.1% dissolved data ('s0001').

Details

This package contains several 'FlatGeobuf' files converted from the 'GeoJSON' files of smartnews-smri/japan-topography. The original 'GeoJSON' files are sourced from MLIT of Japan site. Therefore, to use these dataset, you must agree to their term of use.

Value

An sf object from the 'sf' package.


Municipality codes of Japan

Description

A list of Japanese municipalities and their codes, as known as the 'Zenkoku Chiho-kokyo-dantai Code'. You can use a concatnated string like: paste0(pref_code, city_code) as an actual municipality code.

Usage

municipality

Format

An object of class tbl_df (inherits from tbl, data.frame) with 4542 rows and 6 columns.

Details

The 'Zenkoku Chiho-kokyo-dantai Code' is a combination of a prefecture code defined in 'JIS X 0401' and a municipality code (city, ward, town or village code) defined in 'JIS X 0402'.

These codes consists of 5 to 6 digits. The 6th digit is optional; that is a check digit. Of the remaining numbers, the first 2 digits are the prefecture code and the last 3 digits are the municipality code.

'000' as a municipality code means prefecture itself. For example, '010006' is a hybrid of '01' ('pref_code' of Hokkaido), '000', and its check digit '6'.

See Also

https://www.soumu.go.jp/denshijiti/code.html