geolocate | R Documentation |
This function uses the API for the World Historical Gazeteer to geolocate place names. It takes the place name and region as inputs and returns a data frame with results, primarily the longitude and latitude.
geolocate(df, place = "place", iso = "iso")
df |
A data frame with two columns, places names and two-letter ISO codes for regions |
place |
A column with toponyms in the data frame |
iso |
A column of ISO codes for regions |
A data frame of the geospatial data
# Search for Paris and Edo (now Tokyo)
example.df <- data.frame("place" = c("Paris","Edo"), "iso" = c("FR","JP"))
geolocate(example.df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.