geom_timeline_label: Function that add the Eartquakes's Location labels to an...

Description Usage Arguments Value Examples

View source: R/functions.R

Description

Function that add the Eartquakes's Location labels to an timeline earthquake

Usage

1
2
3
geom_timeline_label(mapping = NULL, data = NULL, na.rm = TRUE,
  show.legend = NA, stat = "identity", position = "identity",
  inherit.aes = TRUE, ...)

Arguments

mapping

aesthetic mappings

data

dataframe that contains the Earthquake's data

na.rm

removes the NA values from the data frame

show.legend

layer's legend

stat

The Layer's statistical transformation

position

position adjustment

inherit.aes

indicate the default aesthetics

...

other arguments

Value

Plot an Earthquakes timeline which contains the Earthquakes of a country o countries between two dates

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
file<-system.file("extdata","earthquakes_data.txt.zip",package="Capstone")
eq_location_clean(eq_clean_data(eq_read_data(file))) %>%
dplyr::filter(DATE >= "1986-02-01" & DATE <="2016-06-01" &
COUNTRY == c("ECUADOR","CHILE", "VENEZUELA"))%>%
ggplot() +
geom_timeline(aes(x = DATE, size = EQ_MAG_ML, colour = DEATHS, fill = DEATHS))+
geom_timeline_label(aes(x = DATE, y = COUNTRY, label = LOCATION_NAME,
number = 3, max_aes = EQ_MAG_ML))

## End(Not run)

Fr3ddy1/Capstone documentation built on May 26, 2019, 7:43 p.m.