Description Usage Arguments Value Examples
Generate daily precipitation on wet days based on gamma distribution described by mean and SD in the params dataframe
1 | generate_events(df, params)
|
df |
dataframe, output from markov_chain() function |
params |
dataframe of parameters from monthly_ppt_params() function or from adjust_params() function |
dataframe with PPT_cm (daily precip) column added
1 2 3 4 5 6 7 | params <- monthly_ppt_params(wx_data)
df <- markov_chain(params)
df2 <- generate_events(df, params)
# calculate yearly ppt (original data is 31.6 cm)
df2 %>% dplyr::group_by(year) %>%
dplyr::summarize(PPT_cm = sum(PPT_cm)) %>%
dplyr::summarize(PPT_cm = mean(PPT_cm))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.