Description Usage Arguments Value Examples
View source: R/environmental_reference.R
This function takes in a daily environmental data set, formatted the same as env_data in the run_epidemia() function, and turns it into a climatology dataset of historical statistics per week over all years.
1 2 3 4 5 6 7 8 | env_daily_to_ref(
daily_env_data,
groupfield,
obsfield,
valuefield,
week_type = c("ISO", "CDC"),
env_info
)
|
daily_env_data |
Daily environmental data. Must be in long format - one row for each date, environmental variable, and geographic grouping. Same format as the input env_data in run_epidemia(). |
groupfield |
The column name of the field for district or geographic area unit division names of environmental data (unquoted field name). If there are no groupings (all one area), user should give a field that contains the same value throughout. |
obsfield |
Field name of the environmental data variables (unquoted field name). |
valuefield |
Field name of the value of the environmental data variable observations (unquoted field name). |
week_type |
String indicating the standard (WHO ISO-8601 or CDC epi weeks) that the weeks of the year in epidemiological and environmental reference data use ["ISO" or "CDC"]. (Required: epidemiological observation dates listed are LAST day of week).Must match with the epidemiological data when running run_epidemia(). |
env_info |
Lookup table for environmental data - reference creation method (e.g. sum or mean) for daily to weekly values. |
Returns a dataset with mean and other reference statistics of the environmental variable per geographic grouping per week of year, in the same format that would be acceptable as env_info in run_epidemia(). ref_value: mean of that week number over all years ref_sd: standard deviation of that week number over all years ref_yrcount: number of years to generate summary ref_max: maximum value in the week over all years ref_uq: 75 ref_median: median ref_lq: 25 ref_min: minimum
1 2 3 4 5 6 7 8 9 10 | ## Not run:
env_daily_to_ref(daily_env_data = am_env_data,
groupfield = woreda_name,
obsfield = environ_var_code,
valuefield = obs_value,
week_type = "ISO",
env_info = am_env_info)
See epidemiar-demo: https://github.com/EcoGRAPH/epidemiar-demo
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.