enw_metadata | R Documentation |
Extract metadata from raw data, either
by reference or by report date. For the target date chosen
(reference or report), confirm
, max_confirm``, and
cum_prop_reported'
are dropped and the first observation for each group and date is retained.
enw_metadata(obs, target_date = c("reference_date", "report_date"))
obs |
A |
target_date |
A character string, either "reference_date" or "report_date". The column corresponding to this string will be used as the target date for metadata extraction. |
A data.table with columns:
date
, a Date column
.group
, a grouping column
and the first observation for each group and date.
The data.table is sorted by .group
and 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_reference_dates()
,
enw_filter_report_dates()
,
enw_flag_observed_observations()
,
enw_impute_na_observations()
,
enw_latest_data()
,
enw_metadata_delay()
,
enw_missing_reference()
,
enw_preprocess_data()
,
enw_reporting_triangle()
,
enw_reporting_triangle_to_long()
obs <- data.frame(
reference_date = as.Date("2021-01-01"),
report_date = as.Date("2022-01-01"), x = 1:10
)
enw_metadata(obs, target_date = "reference_date")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.