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")

Arguments

name

a single string to be used as the city name.

country

a single string to be used as the country.

lat

a single numeric value to be used as the latitude.

long

a single numeric value to be used as the longitude.

method

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.

Value

a data frame containing the new city alongside its respective country and coordinates.

Author

Koen Derks, koen-derks@hotmail.com

Examples

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)
} # }