Visualization of the location of the bombs that were dropped on London in the night of September, 7th, 1940 based on data provided by the Guardian Data Store & London Fire Brigade Records referenced by the website of the British National Archives http://bombsight.org.
library(googlesheets)
data_url <- "https://docs.google.com/spreadsheets/d/1rL68hnF9bHHg3p72ti_reSvwK12VEdABN5Q7YADXm3I"
data <- gs_read(gs_url(data_url))
In order to query openrouteservice you need to set up the API key first, see ?ors_api_key. The geocoding takes About 20 minutes because of the API rate limit of 40 requests per minute.
library(openrouteservice)
## Takes about 20 min to complete, needs API key set
coordinates <- sapply(data$Location, function(loc) {
x <- ors_geocode(loc, size = 1)
x$features[[1L]]$geometry$coordinates
}, USE.NAMES = FALSE)
df <- as.data.frame(t(coordinates))
colnames(df) <- c("lng", "lat")
save(df, file = "df.rda")
library(leaflet)
leaflet(df) %>%
addProviderTiles(providers$CartoDB.Positron) %>%
addCircleMarkers(color = "red",
radius = 5,
stroke = FALSE,
fillOpacity = 0.3) %>%
setView(-0.1278, 51.5074, 12)