Description Usage Arguments Details Value Examples
Correct the cases with LATITUDE is NA and LONGITUDE is NA.
1 | fix_na_lon_na_lat(dff)
|
dff |
A dataframe containing NOAA Earthquake data |
Information about the location of those earthquakes was found using the geocode function from ggmap package. The dataframe generated by the geocode function was saved in the file "nulllatlong.rds". For the cases where the geocode function could not find the location of the earthquakes, the following documents were used (sites):
ftp://ftp.ngdc.noaa.gov/hazards/publications/Wdcse-49.pdf (pg. 248)
https://arxiv.org/ftp/arxiv/papers/1708/1708.07262.pdf (pg. 4)
A date frame (with those cases corrected)
1 2 3 4 5 6 | dfnew <- load_data()
dfnew <- dplyr::mutate(dfnew, LATITUDE=as.numeric(LATITUDE))
dfnew <- dplyr::mutate(dfnew, LONGITUDE=as.numeric(LONGITUDE))
dfnew <- dplyr::mutate(dfnew, EQ_PRIMARY=as.numeric(EQ_PRIMARY))
dfnew <- dplyr::mutate(dfnew, DEATHS=as.numeric(DEATHS))
dfnew <- fix_na_lon_na_lat(dfnew)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.