osaka_city.code: Convert ward codes from/to ward names

Description Usage Examples

Description

Convert ward codes from/to ward names

Usage

1
2
3
to_osaka_ward_name(ward_code, to = c("kanji", "alphabet"))

to_osaka_ward_code(ward_name, from = c("kanji", "alphabet"))

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# no problem whether the type of the given argument is integer or character
to_osaka_ward_name(c(27127, 27104, 27118))
to_osaka_ward_name(c("27127", "27104", "27118"))

# get alphabet name
to_osaka_ward_name(c(27127, 27104, 27118), to = "alphabet")

# get code from ward name (case-insensitive)
# '-ku'/'<e5><8c><ba>' suffix is automatically appended
to_osaka_ward_code(c("<e5><8c><97><e5><8c><ba>", "<e6><ad><a4><e8><8a><b1>", "<e5><9f><8e><e6><9d><b1>"))
to_osaka_ward_code(c("Kita", "konohana-ku", "JOTO"), from = "alphabet")

yutannihilation/choroplethrOsakaCity documentation built on May 4, 2019, 7:45 p.m.