Description Usage Arguments Examples
This function, eq_map() , takes an argument data containing the filtered data frame with earthquakes to visualize. The function maps the epicenters (LATITUDE/LONGITUDE) and annotates each point with in pop up window containing annotation data stored in a column of the data frame. The user is be able to choose which column is used for the annotation in the pop-up with a function argument named annot_col. Each earthquake is shown with a circle, and the radius of the circle is proportional to the earthquake's magnitude (EQ_PRIMARY).
| 1 | eq_map(eq, annot_col)
 | 
| eq | - A dataframe of the data to map. | 
| annot_col | - The name of the field to use for the annotation | 
| 1 2 3 4 5 | library(magrittr)
df<-readr::read_delim(system.file("extdata", "signif.txt", package="Earthquake"), delim = "\t")
df<- df %>% eq_clean_data() %>%
 dplyr::filter(COUNTRY == "MEXICO" & lubridate::year(DATE) >= 2000)
 eq_map(df,annot_col = "DATE")
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.