geocode_df_foreign_cities: geocode df for foreign cities

View source: R/geocode_cities_cp.R

geocode_df_foreign_citiesR Documentation

geocode df for foreign cities

Description

A variation of geocode_df_cities for foreign cities. Instead of using banR, we use a local list of cities in the world. For the remaining result to be found, we use tidygeocoder with Open Street Map (nomatim) API

Usage

geocode_df_foreign_cities(.data, city_col, country_col)

Arguments

.data

a data.frame

city_col

name of the column that contains the city names

country_col

name of the column that contains the country names

Details

Messages are not displayed when there is no error. input.data is not altered even if contains special characters. Column order is also preserved. Countries that not "France" or NA will not be altered by this function

Due to the limitation of Nomatim, if you request several time the same query it will likely be blacklisted temporarly by Nomatim API.

Value

.data with additional (or updated) columns named after city_col with the extension: _lat _lon and _cog


JMPivette/evavelo documentation built on April 8, 2023, 4:20 p.m.