| Title: | Download and Read MOJ XML |
|---|---|
| Description: | You can download MOJ XML via 'kuwanauchi' and read them as a 'sf' object. |
| Authors: | Mizuki Uchida [aut, cre] |
| Maintainer: | Mizuki Uchida <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-07-14 04:41:54 UTC |
| Source: | https://github.com/UchidaMizuki/mojxmlr |
Download MOJ XML
mojxml_download(x, exdir, progress = TRUE, ...)mojxml_download(x, exdir, progress = TRUE, ...)
x |
File names of MOJ XML or a data frame created with |
exdir |
A directory name to download data. If it does not exist, it will be created. |
progress |
Whether to show a progress bar. Passed to |
... |
Unused, for extensibility. |
The names of downloaded files invisibly.
Find MOJ XML via 'kuwanauchi'
mojxml_find(city_code, lang_col_names = c("en", "ja"))mojxml_find(city_code, lang_col_names = c("en", "ja"))
city_code |
A city code in Japan. |
lang_col_names |
Language of column names, English ( |
A mojxml_find object, which is a data frame.
Read MOJ XML
read_mojxml( file, type = c("fude_polygon", "fude_point", "fude_line", "admin_line", "map_info"), lang_col_names = c("en", "ja"), add_columns = TRUE )read_mojxml( file, type = c("fude_polygon", "fude_point", "fude_line", "admin_line", "map_info"), lang_col_names = c("en", "ja"), add_columns = TRUE )
file |
A file name of MOJ XML. |
type |
The data type to be read, |
lang_col_names |
Language of column names, English ( |
add_columns |
Whether to add MOJ XML attributes to columns? By default,
|
A sf object, except when type == "map_info". If
type == "map_info", a tibble object.