This function geocodes unique locations, either by reading from an existing file or by performing geocoding and saving the results to a file.
Examples
geocoded_file_path <- "path/to/geocoded_cities.csv"
unique_locations <- data.frame(
location = c("New York, USA", "London, UK", "Paris, France")
)
geocoded_cities <- geocode_cities(geocoded_file_path, unique_locations)
#> Passing 3 addresses to the Nominatim single address geocoder
#> Query completed in: 1.8 seconds
#> Error: Cannot open file for writing:
#> * 'path/to/geocoded_cities.csv'