library(MeasuringLandscape) library(tidyverse) georef_all_dt <- readRDS(system.file("extdata", "georef_all_dt_recomendations.Rds", package = "MeasuringLandscape")) events_sf <- readRDS( glue::glue(getwd(), "/../inst/extdata/events_sf.Rdata")) events_sf_geocoded <- events_sf %>% left_join(georef_all_dt %>% arrange(rule_ensemble) %>% filter(!duplicated(event_hash) ), by="event_hash" )
How many coordinates are recovered?
table(is.na(events_sf_geocoded$rule_ensemble))
plot(events_sf_geocoded$X1, events_sf_geocoded$Y1) #plotting using the lat long columns
ggplot(events_sf_geocoded) + geom_sf() #plotting using the geom column
ggplot(events_sf_geocoded) + geom_sf(aes(colour=document_district)) #plotting using the geom column
saveRDS(events_sf_geocoded, glue::glue(getwd(), "/../inst/extdata/events_sf_geocoded.Rds"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.