storm | R Documentation |
Return storm depth, duration, average intensity, and peak intensity of an event processed using marsDetectEvents
.
marsStormDepth_in(rainfall_in)
marsStormDuration_hr(dtime_est)
marsStormPeakIntensity_inhr(dtime_est, rainfall_in)
marsStormAverageIntensity_inhr(dtime_est, rainfall_in)
rainfall_in |
vector, num, rainfall depth in inches representing a single rain event |
dtime_est |
vector, POSIXct date times representing a single rain event |
marsStormDepth_in
Output will be total rainfall depth for the event, in inches.
marsStormDuration_hr
Output will be a double with the duration of the event, in hours.
marsStormPeakIntensity_inhr
Output will be a number representing the event's peak intensity in inches/hour.
marsStormAverageIntensity_inhr
Output will be a number representing the event's average intensity in inches/hour.
group_by
, arrange
,
mutate
, filter
, summarise
,
select
rain_newevents <- marsSampleRain %>% #use dplyr pipe to update dataframe
dplyr::group_by(gage_uid) %>%
dplyr::arrange(dtime_est) %>%
dplyr::mutate(event_id = marsDetectEvents(dtime_est, rainfall_in)) %>%
dplyr::group_by(gage_uid, event_id) %>%
dplyr::summarize(eventdatastart_edt = dplyr::first(dtime_est),
eventdataend_edt = dplyr::last(dtime_est),
eventduration_hr = marsStormDuration_hr(dtime_est),
eventpeakintensity_inhr = marsStormPeakIntensity_inhr(dtime_est, rainfall_in),
eventavgintensity_inhr = marsStormAverageIntensity_inhr(dtime_est, rainfall_in),
eventdepth_in = marsStormDepth_in(rainfall_in))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.