Since there is a postcode information, this function is stricter than geo_code_cities() mispleeing or wrong postcode are not taken in account but an informative warning is created.

geocode_cities_cp(.data, city_col, cp_col, country_col)

Arguments

.data

a dataframe that needs to be updated

city_col

column name containing the city name in .data This value will also be used to name the new columns.

cp_col

postcode columns

country_col

contry_col (used to define the type of geocoding)

Value

the input data.frame with 3 new columns with a name based on city_col (_lat, _long, _cog) If the function propose a new city / postcode then 2 other columns are added based on city_col and cp_col (proposition_)

Details

If country_col is provided, the