Package: ggsurveillance 0.5.1

Alexander Bartel

ggsurveillance: Tools for Outbreak Investigation/Infectious Disease Surveillance

Create epicurves, epigantt charts, and diverging bar charts using 'ggplot2'. Prepare data for visualisation or other reporting for infectious disease surveillance and outbreak investigation (time series data). Includes tidy functions to solve date based transformations for common reporting tasks, like (A) seasonal date alignment for respiratory disease surveillance, (B) date-based case binning based on specified time intervals like isoweek, epiweek, month and more, (C) automated detection and marking of the new year based on the date/datetime axis of the 'ggplot2', (D) labelling of the last value of a time-series. An introduction on how to use epicurves can be found on the US CDC website (2012, <https://www.cdc.gov/training/quicklearns/epimode/index.html>).

Authors:Alexander Bartel [aut, cre]

ggsurveillance_0.5.1.tar.gz
ggsurveillance_0.5.1.zip(r-4.6)ggsurveillance_0.5.1.zip(r-4.5)ggsurveillance_0.5.1.zip(r-4.4)
ggsurveillance_0.5.1.tgz(r-4.5-any)ggsurveillance_0.5.1.tgz(r-4.4-any)
ggsurveillance_0.5.1.tar.gz(r-4.6-any)ggsurveillance_0.5.1.tar.gz(r-4.5-any)
ggsurveillance_0.5.1.tgz(r-4.5-emscripten)
ggsurveillance.pdf |ggsurveillance.html
ggsurveillance/json (API)
NEWS

# Install 'ggsurveillance' in R:
install.packages('ggsurveillance', repos = c('https://community.r-multiverse.org', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/biostats-dev/ggsurveillance/issues

Pkgdown site:https://ggsurveillance.biostats.dev

Datasets:

On CRAN:

Conda:

epidemiologyinfectious-disease-surveillanceinfectious-diseasesoutbreaks

6.39 score 9 stars 6 scripts 161 downloads 57 exports 34 dependencies

Last updated from:c3bd91cca8 (on 0.5.1). Checks:7 OK, 2 NOTE. Indexed: no.

TargetResultTotal timeArtifact
linux-devel-x86_64OK192
source / vignettesOK252
linux-release-x86_64OK186
macos-release-arm64OK134
macos-oldrel-arm64NOTE147
windows-develOK148
windows-releaseOK140
windows-oldrelNOTE209
wasm-releaseOK131

Exports:align_and_bin_dates_seasonalalign_dates_seasonalbin_by_datecreate_agegroupsexpand_countsgeom_area_diverginggeom_bar_diverginggeom_col_rangegeom_epicurvegeom_epicurve_pointgeom_epicurve_textgeom_epiganttgeom_hline_yeargeom_label_last_valuegeom_label_last_value_repelgeom_text_last_valuegeom_text_last_value_repelgeom_vline_yeargeometric_meanguide_axis_nested_datelabel_datelabel_date_shortlabel_power10label_skipscale_x_cases_5erscale_x_continuous_divergingscale_x_discrete_reversescale_y_cases_5erscale_y_continuous_divergingscale_y_discrete_reversestat_bin_datestat_date_countstat_divergingstat_last_valueStatBinDateStatDateCountStatEpicurveStatLastValueStatLastValueRepeltheme_mod_disable_legendtheme_mod_legend_bottomtheme_mod_legend_lefttheme_mod_legend_positiontheme_mod_legend_righttheme_mod_legend_toptheme_mod_remove_legend_titletheme_mod_remove_minor_gridtheme_mod_remove_minor_grid_xtheme_mod_remove_minor_grid_ytheme_mod_remove_panel_gridtheme_mod_rotate_x_axis_labelstheme_mod_rotate_x_axis_labels_30theme_mod_rotate_x_axis_labels_45theme_mod_rotate_x_axis_labels_60theme_mod_rotate_x_axis_labels_90theme_mod_rotate_y_axis_labelsuncount

Dependencies:clicpp11dplyrfarverforcatsgenericsggplot2gluegtableisobandISOweeklabelinglegendrylifecyclelubridatemagrittrpillarpkgconfigpurrrR6RColorBrewerrlangS7scalesstringistringrtibbletidyrtidyselecttimechangeutf8vctrsviridisLitewithr

EpiCurves: epicurves in ggplot with ggsurveillance

Rendered fromEpicurves_with_ggsurveillance.Rmdusingknitr::rmarkdownon Sep 24 2025.

Last update: 2025-02-02
Started: 2025-01-25

EpiGantt: epigantt charts in ggplot with ggsurveillance

Rendered fromEpigantt_with_ggsurveillance.Rmdusingknitr::rmarkdownon Sep 24 2025.

Last update: 2025-04-11
Started: 2025-01-25

Seasonal Plots: Align case data for seasonal analysis

Rendered fromalign_dates_seasonal.Rmdusingknitr::rmarkdownon Sep 24 2025.

Last update: 2025-04-11
Started: 2025-01-25

Readme and manuals

Help Manual

Help pageTopics
Align dates for seasonal comparisonalign_and_bin_dates_seasonal align_dates_seasonal
Aggregate data by time periodsbin_by_date
Create Age Groups from Numeric Valuescreate_agegroups
Create diverging bar charts, diverging area charts or other plots for opposing categorical data.geom_area_diverging geom_bar_diverging stat_diverging
Create a ranged bar chartgeom_col_range
Create an epidemic curve plot or bin/count observations by date periodsgeom_epicurve geom_epicurve_point geom_epicurve_text StatBinDate StatDateCount StatEpicurve stat_bin_date stat_date_count
Epi Gantt Chart: Visualize Epidemiological Time Intervalsgeom_epigantt
Add labels or points to the last value of a line chartgeom_label_last_value geom_label_last_value, stat_last_value geom_label_last_value_repel geom_text_last_value geom_text_last_value_repel StatLastValue StatLastValueRepel stat_last_value
Automatically create lines at the turn of every yeargeom_hline_year geom_vline_year
Compute a Geometric Meangeometric_mean
Nested axis guide for date scalesguide_axis_nested_date
German Influenza (FLU) Surveillance datainfluenza_germany
Date labellerlabel_date label_date_short
Format numbers as power-of-10 R expressionslabel_power10
Skip labels on an axislabel_skip
Line list of a fictional hospital outbreak (Data)linelist_hospital_outbreak
Population of the German states (2023)population_german_states
Diverging continuous scales for diverging bar charts with symmetrical limitsscale_continuous_diverging scale_x_continuous_diverging scale_y_continuous_diverging
Continuous x-axis and y-axis scale for (case) countsscale_x_cases_5er scale_y_cases_5er
Reversed discrete scale for 'ggplot2'scale_x_discrete_reverse scale_y_discrete_reverse
Quickly adjust the legend positiontheme_mod_disable_legend theme_mod_disable_legend, theme_mod_legend_position theme_mod_legend_bottom theme_mod_legend_left theme_mod_legend_position theme_mod_legend_right theme_mod_legend_top theme_mod_remove_legend_title
Quickly remove the minor lines of the panel gridtheme_mod_remove_minor_grid theme_mod_remove_minor_grid_x theme_mod_remove_minor_grid_y theme_mod_remove_panel_grid
Rotate axis labelstheme_mod_rotate_axis_labels theme_mod_rotate_x_axis_labels theme_mod_rotate_x_axis_labels_30 theme_mod_rotate_x_axis_labels_45 theme_mod_rotate_x_axis_labels_60 theme_mod_rotate_x_axis_labels_90 theme_mod_rotate_y_axis_labels
Duplicate rows according to a weighting variableexpand_counts uncount uncount, expand_counts