Convert to cities at different points in time
Arguments
- city
A
jpcity_city
object.- from
A
character
(year, month, and day components) or date-time object of the starting date.- to
A
character
(year, month, and day components) or date-time object of the ending date.
Examples
city <- parse_city(c("01201", "01202"))
#> Guessing the interval to be 1970-04-01 JST--1972-03-31 JST.
#> ℹ You can override using `when` argument.
city_convert(city,
from = "1970-04-01",
to = "2020-01-01")
#> [[1]]
#> <city[1]> Interval: 1972-04-01--Inf
#> [1] 01100
#>
#> Cities:
#> city_code pref_name city_desig_name city_desig_name_kana city_name
#> 1 01100 北海道 札幌市 さっぽろし <NA>
#> city_name_kana
#> 1 <NA>
#>
#> [[2]]
#> <city[1]> Interval: 1970-04-01--Inf
#> [1] 01202
#>
#> Cities:
#> city_code pref_name city_desig_name city_desig_name_kana city_name
#> 1 01202 北海道 <NA> <NA> 函館市
#> city_name_kana
#> 1 はこだてし
#>