Description Usage Arguments Details Value Examples
This function takes a country name in all capitals, a start date as a string in 'YYYY-MM-DD' format, and optionally an end date in the same format, read in the earthquake data, cleans it, and turns a filtered cleaned dataframe.
1 2 | eq_get_data(filename = system.file("extdata", "earthquakes.tsv.gz",
package = "NOAA"), country, start_date, end_date = lubridate::today())
|
filename |
Name of file to read in. Defaults to 'earthquakes.tsv.gz' data contained internally in package. |
country |
A country name in all capital letters as a sting, eg. 'MEXICO', or a vector of country names, eg. c('MEXICO','USA') |
start_date |
A date as a string in 'YYYY-MM-DD' format to filter observations for |
end_date |
An optional paramater, a date as a string in 'YYYY-MM-DD' format to filter observations for. Defaults to todays date if not overridden. |
This function reads in an earthquake dataset provided with the package, cleans and formats the data, then filters for a country or countries, then returns a tbl_df data.frame
tbl_df data.frame
1 2 | ## Not run: eq_get_data(country = c('MEXICO','USA'), start_date = '2001-01-01', end_date = '2003-01-01')
## Not run: eq_get_data(country = 'MEXICO', start_date = '2001-01-01')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.