Package: tbl.now 1.2.0

tbl.now: Tidy Data and Workflow Layer for Epidemic Nowcasting
Defines tidy data structures and package-agnostic workflows for epidemiological nowcasting. The 'tbl_now' class records event, report, and revision dates alongside strata, covariates tagged by model component, censoring, and reporting-delay metadata while remaining compatible with 'dplyr'. Tools support validation, manipulation, diagnostics, visualization, format conversion, retrospective evaluation, and multiple modelling engines. The 'tbl_nowcast' class standardizes probabilistic predictions for plotting, scoring, comparison, and ensembling.
Authors:
tbl.now_1.2.0.tar.gz
tbl.now_1.2.0.zip(r-4.7-any)tbl.now_1.2.0.zip(r-4.6-any)
tbl.now_1.2.0.tar.gz(r-4.7-any)tbl.now_1.2.0.tar.gz(r-4.6-any)
tbl.now_1.2.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
tbl.now/json (API)
| # Install 'tbl.now' in R: |
| install.packages('tbl.now', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org')) |
Bug tracker:https://github.com/rodrigozepeda/tbl.now/issues
Pkgdown/docs site:https://rodrigozepeda.github.io
- covid_colombia - COVID-19 Notifications - Colombia 2020-2023
- covid_us - Covid_us: CDC COVID-19 Case Surveillance Public Use Data
- denguedat - Denguedat: Dengue fever individual-level reporting data from Puerto Rico
- flusight - Flusight: NHSN Weekly Hospital Respiratory Data from FluSight
- hai_bucaramanga - Healthcare-Associated Infections - Bucaramanga, Colombia 2020-2023
- mpoxdat - Mpoxdat: Mpox reporting data from the 2022 New York City outbreak
- sari_bh - Sari_bh: Severe Acute Respiratory Illness data from Belo Horizonte (Brazil), 2020-2022
Last updated from:698f6fe3f3. Checks:6 OK. Indexed: no.
| Target | Result | Time | Files | Syslog |
|---|---|---|---|---|
| linux-devel | OK | 366 | ||
| source / vignettes | OK | 265 | ||
| linux-release | OK | 324 | ||
| windows-devel | OK | 317 | ||
| windows-release | OK | 331 | ||
| wasm-release | OK | 200 |
Exports:add_covariatesadd_event_covariatesadd_is_censored_reportadd_is_censored_revisionadd_report_covariatesadd_revision_covariatesadd_revision_dateadd_strataadd_temporal_effectsaggregate_time_unitsalign_weeksas_tbl_nowas_tibbleautoplotbacktest_combinecases_per_datecensor_reporting_delayscensor_reporting_delays_abovecensor_reportscensor_revision_delayscensor_revision_delays_abovecensor_revisionschange_case_countchange_covariateschange_event_covariateschange_event_datechange_is_censored_reportchange_is_censored_revisionchange_nowchange_report_covariateschange_report_datechange_revision_covariateschange_revision_datechange_stratacomplete_zeroescompute_temporal_effectscumulative_growthdate_rangesdelay_summarydiagnosediagnose_batchesdiagnose_batches2diagnose_changepointdiagnose_declarationsdiagnose_driftdiagnose_duplicatesdiagnose_missingdiagnose_negativesdiagnose_nowdiagnose_orderingdiagnose_revision_delaydiagnose_stratadiagnose_truncationdiagnose_unitsdiagnostic_plotengineengine_baselinenowcastengine_diseasenowcastingengine_epinow2engine_epinowcastengine_nobbsengine_surveillanceexample_engineget_case_countget_covariatesget_data_typeget_event_covariatesget_event_dateget_event_unitsget_initial_reported_casesget_initial_revised_casesget_is_censored_reportget_is_censored_revisionget_latest_reported_casesget_latest_revised_casesget_nowget_nth_reported_casesget_nth_revised_casesget_num_covariatesget_num_strataget_report_covariatesget_report_dateget_report_unitsget_revision_covariatesget_revision_dateget_revision_levelsget_revision_typeget_revision_unitsget_strataget_surveillance_rangeget_surveillance_whenget_temporal_effect_colsget_temporal_effectshas_revisionis_nowcast_engineis_tbl_nowis_tbl_nowcastis_weekdaylist_nowcast_methodsnowcast_backtestnowcast_ensemblenowcast_fitnowcast_quantile_levelsnowcast_tidynowcast_weightsplot_cyclesplot_day_of_week_effectsplot_delay_distributionplot_delay_driftplot_delay_profilesplot_epidemic_processplot_holiday_effectsplot_holiday_lag_effectsplot_month_of_year_effectsplot_observed_casesplot_reporting_hexamapplot_reporting_processplot_reporting_triangleplot_revision_statusplot_transport_discriminantplot_week_of_year_effectsplot_weekend_effectsprop_censoredprop_covariate_levelsprop_revision_typeprop_strataremove_all_covariatesremove_all_event_covariatesremove_all_report_covariatesremove_all_revision_covariatesremove_all_strataremove_covariatesremove_event_covariatesremove_is_censored_reportremove_is_censored_revisionremove_report_covariatesremove_revision_covariatesremove_revision_dateremove_strataremove_temporal_effectsreplace_temporal_effectsrun_nowcastscore_nowcastsimulate_batchtbl_nowtbl_now_attributestbl_now_from_baselinenowcasttbl_now_from_data_tabletbl_now_from_epidisttbl_now_from_EpiNow2tbl_now_from_epinowcasttbl_now_from_tsibbletbl_now_palettetbl_now_to_baselinenowcasttbl_now_to_data_tabletbl_now_to_epidisttbl_now_to_EpiNow2tbl_now_to_epinowcasttbl_now_to_nobbstbl_now_to_surveillancetbl_now_to_tsibbletbl_nowcasttemporal_effectstidyto_counttransport_discriminanttriangle_occupancyupdate_nowvalidate_tbl_nowweek_2_datezero_run_summary
Dependencies:clicpp11dplyrfarvergenericsggplot2gluegtableisobandlabelinglifecyclelubridatemagrittrpillarpkgconfigpurrrR6RColorBrewerrlangS7scalesstringistringrtibbletidyrtidyselecttimechangeutf8vctrsviridisLitewithr
Readme and manuals
Help Manual
| Help page | Topics |
|---|---|
| Set, change and remove the attributes of a 'tbl_now' | add add_covariates add_event_covariates add_is_censored_report add_is_censored_revision add_report_covariates add_revision_covariates add_revision_date add_strata change change_case_count change_covariates change_event_covariates change_event_date change_is_censored_report change_is_censored_revision change_now change_report_covariates change_report_date change_revision_covariates change_revision_date change_strata remove remove_all_covariates remove_all_event_covariates remove_all_report_covariates remove_all_revision_covariates remove_all_strata remove_covariates remove_event_covariates remove_is_censored_report remove_is_censored_revision remove_report_covariates remove_revision_covariates remove_revision_date remove_strata remove_temporal_effects replace_temporal_effects update_now |
| Attach calendar effects to a 'tbl_now', and turn them into columns | add_temporal_effects add_temporal_effects.data.frame add_temporal_effects.tbl_now compute_temporal_effects |
| Coarsen a 'tbl_now' onto a bigger time unit | aggregate_time_units |
| Put weekly data on a common weekday | align_weeks align_weeks.data.frame align_weeks.tbl_now week_2_date |
| Transform an object into a 'tbl_now' | as_tbl_now as_tbl_now.data.frame as_tbl_now.data.table as_tbl_now.enw_preprocess_data as_tbl_now.epidist_aggregate_data as_tbl_now.epidist_linelist_data as_tbl_now.reporting_triangle as_tbl_now.tbl_now as_tbl_now.tbl_now_epinow2_snapshots as_tbl_now.tbl_now_surveillance_list as_tbl_now.tbl_now_triangle_list as_tbl_now.tbl_ts |
| Coerce a 'tbl_now' to a tibble or a data frame | as.data.frame.grouped_tbl_now as.data.frame.tbl_now as_tibble.grouped_tbl_now as_tibble.tbl_now |
| Coerce a 'tbl_nowcast' into a 'tibble' | as_tibble.tbl_nowcast |
| Base R operations on a 'tbl_now' | $<-.grouped_tbl_now $<-.tbl_now assign_tbl money_tbl_now names<-.grouped_tbl_now names<-.tbl_now names_tbl_now [.grouped_tbl_now [.tbl_now |
| Diagnostic 'autoplot' for a 'tbl_now' | autoplot.tbl_now |
| Plot a nowcast | autoplot.tbl_nowcast |
| Combine backtests | backtest_combine |
| Calendar effects on the case counts or on the reporting delay | calendar_effect_plots plot_day_of_week_effects plot_holiday_effects plot_holiday_lag_effects plot_month_of_year_effects plot_weekend_effects plot_week_of_year_effects |
| Record a report or a delay as a bound rather than a fact | censoring censor_reporting_delays censor_reporting_delays_above censor_reports censor_revisions censor_revision_delays censor_revision_delays_above |
| Fill in the days when nothing was reported | complete_zeroes |
| COVID-19 Notifications - Colombia 2020-2023 | covid_colombia |
| covid_us: CDC COVID-19 Case Surveillance Public Use Data (2020) | covid_us |
| denguedat: Dengue fever individual-level reporting data from Puerto Rico | denguedat |
| Diagnose a 'tbl_now' | diagnose diagnose.default diagnose.tbl_now |
| Screen the report axis for batched reporting | diagnose_batches |
| Test whether one report date drew from unusually old event dates | diagnose_batches2 |
| Detect an abrupt change point in the reporting-delay distribution | diagnose_changepoint |
| Test whether the reporting-delay distribution drifts over time | diagnose_drift |
| Diagnostic plots of the reporting process | diagnostic_plot |
| Specify a nowcasting model and its arguments | engine |
| A toy engine for examples | example_engine nowcast_fit.example nowcast_tidy.example |
| flusight: NHSN Weekly Hospital Respiratory Data from FluSight | flusight |
| Cases at a chosen point in the reporting process | get_initial_reported_cases get_latest_first get_latest_reported_cases get_nth_reported_cases |
| Healthcare-Associated Infections - Bucaramanga, Colombia 2020-2023 | hai_bucaramanga |
| Is this an engine? | is_nowcast_engine |
| Is this object a 'tbl_nowcast'? | is_tbl_nowcast |
| Is a date a weekday or a weekend? | is_weekday |
| List the available nowcasting methods | list_nowcast_methods |
| mpoxdat: Mpox reporting data from the 2022 New York City outbreak | mpoxdat |
| Refit several methods at past 'now' dates and score them | nowcast_backtest |
| Read what a 'tbl_now' was told about itself | get_case_count get_covariates get_data_type get_event_covariates get_event_date get_event_units get_is_censored_report get_is_censored_revision get_now get_num_covariates get_num_strata get_report_covariates get_report_date get_report_units get_revision_covariates get_revision_date get_revision_levels get_revision_type get_revision_units get_strata get_temporal_effects get_temporal_effect_cols has_revision nowcast_data_getters |
| Individual blocks of a 'tbl_now' diagnosis | diagnose_declarations diagnose_duplicates diagnose_missing diagnose_negatives diagnose_now diagnose_ordering diagnose_strata diagnose_truncation diagnose_units nowcast_diagnose_components |
| Engines for the built-in nowcasting packages | engine_baselinenowcast engine_diseasenowcasting engine_epinow2 engine_epinowcast engine_nobbs engine_surveillance nowcast_engines |
| Combine several nowcasts into an ensemble | nowcast_ensemble |
| Fit a nowcast with one modelling package | nowcast_fit nowcast_fit.baselinenowcast nowcast_fit.default nowcast_fit.diseasenowcasting nowcast_fit.EpiNow2 nowcast_fit.epinowcast nowcast_fit.NobBS nowcast_fit.surveillance |
| Default quantile levels for a nowcast | nowcast_quantile_levels |
| Individual blocks of a 'tbl_now' summary | cases_per_date cumulative_growth date_ranges delay_summary nowcast_summary_components prop_censored prop_covariate_levels prop_revision_type prop_strata triangle_occupancy zero_run_summary |
| Standardise a fitted nowcast | nowcast_tidy nowcast_tidy.baselinenowcast nowcast_tidy.default nowcast_tidy.diseasenowcasting nowcast_tidy.EpiNow2 nowcast_tidy.epinowcast nowcast_tidy.NobBS nowcast_tidy.surveillance |
| Ensemble weights from a backtest | nowcast_weights |
| Periodogram of the case counts or of the reporting delay | plot_cycles |
| Empirical distribution of the reporting or revision delay | plot_delay_distribution |
| Visualise whether the reporting-delay distribution drifts over time | plot_delay_drift |
| Plot the per-date delay profiles | plot_delay_profiles |
| The epidemic process and the reporting process | plot_epidemic_process plot_reporting_process |
| Observed epidemic process with the incompleteness line | plot_observed_cases |
| Plot the reporting triangle as an age-period-cohort hexamap | plot_reporting_hexamap |
| Plot the reporting triangle | plot_reporting_triangle |
| How much of each day has been resolved | plot_revision_status |
| Plot the transport-discriminant plane | plot_transport_discriminant |
| Print a 'tbl_now' diagnosis | print.tbl_now_diagnosis |
| Print a 'tbl_now' summary | print.tbl_now_summary_table |
| Cases at a chosen point in the revision process | get_initial_revised_cases get_latest_revised_cases get_nth_revised_cases revised_cases |
| Compare revision delays between confirmed and retracted cases | diagnose_revision_delay revision_delay |
| Nowcast a 'tbl_now' with any supported modelling package | run_nowcast |
| sari_bh: Severe Acute Respiratory Illness data from Belo Horizonte (Brazil), 2020-2022 | sari_bh |
| Score a nowcast against observed data | as_forecast_point.nowcast_backtest as_forecast_quantile.nowcast_backtest as_forecast_sample.nowcast_backtest score_nowcast |
| Inject a batch into a 'tbl_now' by withholding and then releasing reports | simulate_batch |
| The date grids 'surveillance::nowcast()' needs | get_surveillance_range get_surveillance_when surveillance_grids |
| Create a 'tbl_now' object | tbl_now |
| List what a 'tbl_now' was told about itself | tbl_now_attributes |
| Convert between 'tbl_now' and 'baselinenowcast' | tbl_now_baselinenowcast tbl_now_from_baselinenowcast tbl_now_to_baselinenowcast |
| Coerce a 'tbl_now' with another package's generic | as.data.table.tbl_now as_epidist_aggregate_data.tbl_now as_epidist_linelist_data.tbl_now as_reporting_triangle.tbl_now as_tsibble.tbl_now tbl_now_coercion_methods |
| Convert between 'tbl_now' and 'data.table' | tbl_now_data_table tbl_now_from_data_table tbl_now_to_data_table |
| Convert between 'tbl_now' and 'epidist' | tbl_now_epidist tbl_now_from_epidist tbl_now_to_epidist |
| Convert between 'tbl_now' and 'EpiNow2' | tbl_now_EpiNow2 tbl_now_from_EpiNow2 tbl_now_to_EpiNow2 |
| Snapshots of one series, as 'EpiNow2' estimates truncation from | print.tbl_now_epinow2_snapshots tbl_now_epinow2_snapshots |
| Convert between 'tbl_now' and 'epinowcast' | tbl_now_epinowcast tbl_now_from_epinowcast tbl_now_to_epinowcast |
| Convert a 'tbl_now' into the line list 'NobBS' nowcasts from | tbl_now_nobbs tbl_now_to_nobbs |
| The 'tbl.now' colour palette | tbl_now_palette |
| Summarise a 'tbl_now' | summary.tbl_now tbl_now_summary |
| Convert a 'tbl_now' into the line list 'surveillance' nowcasts from | tbl_now_surveillance tbl_now_to_surveillance |
| One 'surveillance' line list per stratum | print.tbl_now_surveillance_list tbl_now_surveillance_list |
| One reporting triangle per stratum | print.tbl_now_triangle_list tbl_now_triangle_list |
| Convert between 'tbl_now' and 'tsibble' | tbl_now_from_tsibble tbl_now_to_tsibble tbl_now_tsibble |
| A nowcast produced by 'run_nowcast()' | tbl_nowcast |
| Calendar effects to include in a nowcast | temporal_effects |
| Tidy a fitted delay distribution | tidy.delay_distribution tidy.epidist_fit tidy.estimate_dist |
| Tidy a fitted nowcast into one standard table | tidy tidy.baselinenowcast_df tidy.epinow tidy.epinowcast tidy.estimate_infections tidy.estimate_truncation tidy.list tidy.nowcast tidy.stsNC |
| Tidy the predictions and scores of a 'nowcast_backtest()' | tidy.nowcast_backtest |
| Tidy a nowcast produced by 'run_nowcast()' or 'nowcast_ensemble()' | tidy.tbl_nowcast |
| Convert between linelist and aggregated count data | to_count to_count.tbl_now |
| The transport discriminant of a reporting series | transport_discriminant |
| Append newly arrived data to a 'tbl_now' | update.tbl_now |
| Check that an object is a valid 'tbl_now' | is_tbl_now validate_tbl_now |
