enw_filter_reference_dates | R Documentation |
This is a helper function which allows users to filter datasets
by reference date. This is useful, for example, when evaluating nowcast
performance against fully observed data. Users may wish to combine this
function with enw_filter_report_dates()
. Note that by definition it is
assumed that report dates must be equal or greater than the corresponding
reference date (i.e a report cannot happen before the event being reported
occurs). This means that this function will also filter out any report dates
that are earlier than their corresponding reference date.
enw_filter_reference_dates(
obs,
earliest_date,
include_days,
latest_date,
remove_days
)
obs |
A |
earliest_date |
earliest reference date to include in the data set |
include_days |
if |
latest_date |
Date, the latest reference date to include in the returned dataset. |
remove_days |
Integer, if |
A data.table
filtered by report date
Preprocessing functions
enw_add_delay()
,
enw_add_max_reported()
,
enw_add_metaobs_features()
,
enw_assign_group()
,
enw_complete_dates()
,
enw_construct_data()
,
enw_extend_date()
,
enw_filter_delay()
,
enw_filter_report_dates()
,
enw_flag_observed_observations()
,
enw_impute_na_observations()
,
enw_latest_data()
,
enw_metadata()
,
enw_metadata_delay()
,
enw_missing_reference()
,
enw_preprocess_data()
,
enw_reporting_triangle()
,
enw_reporting_triangle_to_long()
# Filter by date
enw_filter_reference_dates(
germany_covid19_hosp,
earliest_date = "2021-09-01",
latest_date = "2021-10-01"
)
#
# Filter by days
enw_filter_reference_dates(
germany_covid19_hosp,
include_days = 10, remove_days = 10
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.