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-11-01 05:10:36 UTC |
Source: | https://github.com/uribo/kuniumi |
Bind KSJ files in directory
ksj_bind(dir, identifier, regexp = NULL, translate = NULL)
ksj_bind(dir, identifier, regexp = NULL, translate = NULL)
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
read_isj( path = NULL, .area_code = NULL, .fiscal_year = NULL, .pos_level = NULL, .download = FALSE, return_class = NULL )
read_isj( path = NULL, .area_code = NULL, .fiscal_year = NULL, .pos_level = NULL, .download = FALSE, return_class = NULL )
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" |
https://nlftp.mlit.go.jp/isj/about_api.html
If there is no local file, specify the year and pref_code to download.
read_ksj_a10(path = NULL, .pref_code = NULL, .year = NULL, .download = FALSE)
read_ksj_a10(path = NULL, .pref_code = NULL, .year = NULL, .download = FALSE)
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. |
If there is no local file, specify the year and pref_code to download.
read_ksj_a16( path = NULL, translate = "jp", .pref_code = NULL, .year = NULL, .download = TRUE )
read_ksj_a16( path = NULL, translate = "jp", .pref_code = NULL, .year = NULL, .download = TRUE )
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. |
If there is no local file, specify the meshcode to download.
read_ksj_a30a5(path = NULL, .meshcode = NULL, .download = FALSE)
read_ksj_a30a5(path = NULL, .meshcode = NULL, .download = FALSE)
path |
Input file path ('.shp' or '.geojson') |
.meshcode |
Specific 80km meshcode |
.download |
If 'true', the specified file is downloaded to the current working directory. |
If there is no local file, specify the year to download.
read_ksj_c02(path = NULL, translate = "jp", .year = NULL, .download = FALSE)
read_ksj_c02(path = NULL, translate = "jp", .year = NULL, .download = FALSE)
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. |
If there is no local file, specify prefecture code to download.
read_ksj_c23(path = NULL, .pref_code = NULL, .download = FALSE)
read_ksj_c23(path = NULL, .pref_code = NULL, .download = FALSE)
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. |
If there is no local file, specify the year and pref_code to download.
read_ksj_l01(path = NULL, .year = NULL, .pref_code = NULL, .download = FALSE)
read_ksj_l01(path = NULL, .year = NULL, .pref_code = NULL, .download = FALSE)
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. |
If there is no local file, specify the year and pref_code to download.
read_ksj_l02(path = NULL, .year = NULL, .pref_code = NULL, .download = FALSE)
read_ksj_l02(path = NULL, .year = NULL, .pref_code = NULL, .download = FALSE)
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. |
If there is no local file, specify year and meshcode to download.
read_ksj_l03a(path = NULL, .year = NULL, .meshcode = NULL, .download = FALSE)
read_ksj_l03a(path = NULL, .year = NULL, .meshcode = NULL, .download = FALSE)
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. |
If there is no local file, specify the meshcode to download.
read_ksj_l03b( path = NULL, translate = "jp", .year, .meshcode, .datum, .download = FALSE )
read_ksj_l03b( path = NULL, translate = "jp", .year, .meshcode, .datum, .download = FALSE )
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. |
If there is no local file, specify the meshcode to download.
read_ksj_l03bu( path = NULL, translate = "jp", .year = NULL, .meshcode = NULL, .datum = NULL, .download = FALSE )
read_ksj_l03bu( path = NULL, translate = "jp", .year = NULL, .meshcode = NULL, .datum = NULL, .download = FALSE )
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. |
If there is no local file, specify the year to download.
read_ksj_n02( path = NULL, .year = NULL, .download = FALSE, .type = c("railroadsection", "station") )
read_ksj_n02( path = NULL, .year = NULL, .download = FALSE, .type = c("railroadsection", "station") )
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" |
If there is no local file, specify the year and pref_code to download.
read_ksj_n03(path = NULL, .year = NULL, .pref_code = NULL, .download = FALSE)
read_ksj_n03(path = NULL, .year = NULL, .pref_code = NULL, .download = FALSE)
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. |
If there is no local file, specify the year and pref_code to download.
read_ksj_n05( path = NULL, .year = NULL, .download = FALSE, .type = c("railroadSection", "station") )
read_ksj_n05( path = NULL, .year = NULL, .download = FALSE, .type = c("railroadSection", "station") )
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" |
If there is no local file, specify the year and pref_code to download.
read_ksj_p07(path = NULL, .year = NULL, .pref_code = NULL, .download = FALSE)
read_ksj_p07(path = NULL, .year = NULL, .pref_code = NULL, .download = FALSE)
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
read_ksj_p09(path, translate = "jp", .meshcode = NULL, .download = FALSE)
read_ksj_p09(path, translate = "jp", .meshcode = NULL, .download = FALSE)
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. |
If there is no local file, specify prefecture code to download.
read_ksj_p12( path = NULL, translate = "jp", .pref_code = NULL, .download = FALSE, .type )
read_ksj_p12( path = NULL, translate = "jp", .pref_code = NULL, .download = FALSE, .type )
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". |
If there is no local file, specify the year and pref_code to download.
read_ksj_p13(path = NULL, .pref_code = NULL, .download = FALSE)
read_ksj_p13(path = NULL, .pref_code = NULL, .download = FALSE)
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. |
If there is no local file, specify prefecture code to download.
read_ksj_p19(path = NULL, .pref_code = NULL, .download = FALSE)
read_ksj_p19(path = NULL, .pref_code = NULL, .download = FALSE)
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. |
If there is no local file, specify prefecture code to download.
read_ksj_p23( path = NULL, translate = "jp", .pref_code = NULL, .download = FALSE, .type )
read_ksj_p23( path = NULL, translate = "jp", .pref_code = NULL, .download = FALSE, .type )
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". |
If there is no local file, specify the year and pref_code to download.
read_ksj_p34(path = NULL, .pref_code = NULL, .download = FALSE)
read_ksj_p34(path = NULL, .pref_code = NULL, .download = FALSE)
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. |
If there is no local file, specify the prefecture to download.
read_ksj_w05( path = NULL, .pref_code = NULL, .download = FALSE, .type = c("stream", "node") )
read_ksj_w05( path = NULL, .pref_code = NULL, .download = FALSE, .type = c("stream", "node") )
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. |