Define a city using country, latitude and longitude coordinates.
The returned object can be used a input for name
argument the
cityview()
function.
new_city(name = NULL,
country = NULL,
lat = NULL,
long = NULL,
method = "osm")
a single string to be used as the city name.
a single string to be used as the country.
a single numeric value to be used as the latitude.
a single numeric value to be used as the longitude.
a character string specifying the geocoding method to use when
the user does not specify lat
or long
. Supported
methods include osm
, census
, arcgis
,
geocodio
, iq
, google
, opencage
,
mapbox
, here
, tomtom
, mapquest
,
bing
, and geoapify
.
a data frame containing the new city alongside its respective country and coordinates.
city <- new_city(
name = "Lagos", country = "Portugal",
lat = 37.10, long = -8.68
)
#> Discovered Lagos, Portugal at 37.1° / -8.68°!
if (FALSE) { # \dontrun{
cityview(name = city)
} # }