Description Usage Arguments Value Examples
This functions cleans up data from the NOAA significant earthquake database. The cleanup includes building a single date field and removing BCE dates since POSIXlt dates do not work well with pre 1 CE dates.
1 2 3 | eq_clean_data(raw_data, YEAR = "YEAR", MONTH = "MONTH", DAY = "DAY",
LONGITUDE = "LONGITUDE", LATITUDE = "LATITUDE",
MAGNITUDE = "EQ_PRIMARY", DEATH = "DEATHS")
|
raw_data |
The earthquake dataframe that needs to be cleaned. |
YEAR |
The name of the column that holds the year of the earthquake as a numeric/integer. |
MONTH |
The name of the column that holds the month of the earthquake as a numeric/integer. |
DAY |
The name of the column that holds the day of the month of earthquake as a numeric/integer. |
LONGITUDE |
The longitude of the earthquake - numeric. |
LATITUDE |
The latitude of the earthquake - numeric. |
MAGNITUDE |
The latitude of the earthquake - numeric or character. |
DEATH |
The latitude of the earthquake - numeric or character. |
A cleaned up dataframe with the new date column.
1 2 | data(earthquake_raw)
earthquake_raw %>% earthquake::eq_clean_data()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.