Retrieves geographic coordinates (longitude and latitude) of any location in the World using the OpenStreetMap Data Search Engine Nominatim http://nominatim.openstreetmap.org.

address_to_coords(address)

Arguments

address

a character of length 1. The location for which coordinates will be found.

Value

A data.frame with two columns: lon, the longitude and lat, the latitude of the location.

Examples

address_to_coords("Houston, TX, USA")
#>        lon      lat                                         name
#> 1 -95.3677 29.75894 Houston, Harris County, Texas, United States
address_to_coords("5 rue de l'école de Médecine, Montpellier, France")
#>        lon      lat
#> 1 3.873486 43.61277
#>                                                                                                                              name
#> 1 5, Rue de l'École de Médecine, Centre Historique, Centre, Montpellier, Hérault, Occitanie, France métropolitaine, 34062, France