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 Google Maps you need to set up the API key first, see ?googleway::set_key.
library("googleway")
coordinates <- lapply(data$Location, function(loc) {
x <- google_geocode(loc)
x$results$geometry$location
})
df <- do.call(rbind, coordinates)
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)