Package: ggsurveillance 0.5.1
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:
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
- influenza_germany - German Influenza (FLU) Surveillance data
- linelist_hospital_outbreak - Line list of a fictional hospital outbreak
- population_german_states - Population of the German states
epidemiologyinfectious-disease-surveillanceinfectious-diseasesoutbreaks
Last updated from:c3bd91cca8 (on 0.5.1). Checks:7 OK, 2 NOTE. Indexed: no.
Target | Result | Total time | Artifact |
---|---|---|---|
linux-devel-x86_64 | OK | 192 | |
source / vignettes | OK | 252 | |
linux-release-x86_64 | OK | 186 | |
macos-release-arm64 | OK | 134 | |
macos-oldrel-arm64 | NOTE | 147 | |
windows-devel | OK | 148 | |
windows-release | OK | 140 | |
windows-oldrel | NOTE | 209 | |
wasm-release | OK | 131 |
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.Rmd
usingknitr::rmarkdown
on Sep 24 2025.Last update: 2025-02-02
Started: 2025-01-25
EpiGantt: epigantt charts in ggplot with ggsurveillance
Rendered fromEpigantt_with_ggsurveillance.Rmd
usingknitr::rmarkdown
on Sep 24 2025.Last update: 2025-04-11
Started: 2025-01-25
Seasonal Plots: Align case data for seasonal analysis
Rendered fromalign_dates_seasonal.Rmd
usingknitr::rmarkdown
on Sep 24 2025.Last update: 2025-04-11
Started: 2025-01-25
Readme and manuals
Help Manual
Help page | Topics |
---|---|
Align dates for seasonal comparison | align_and_bin_dates_seasonal align_dates_seasonal |
Aggregate data by time periods | bin_by_date |
Create Age Groups from Numeric Values | create_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 chart | geom_col_range |
Create an epidemic curve plot or bin/count observations by date periods | geom_epicurve geom_epicurve_point geom_epicurve_text StatBinDate StatDateCount StatEpicurve stat_bin_date stat_date_count |
Epi Gantt Chart: Visualize Epidemiological Time Intervals | geom_epigantt |
Add labels or points to the last value of a line chart | geom_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 year | geom_hline_year geom_vline_year |
Compute a Geometric Mean | geometric_mean |
Nested axis guide for date scales | guide_axis_nested_date |
German Influenza (FLU) Surveillance data | influenza_germany |
Date labeller | label_date label_date_short |
Format numbers as power-of-10 R expressions | label_power10 |
Skip labels on an axis | label_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 limits | scale_continuous_diverging scale_x_continuous_diverging scale_y_continuous_diverging |
Continuous x-axis and y-axis scale for (case) counts | scale_x_cases_5er scale_y_cases_5er |
Reversed discrete scale for 'ggplot2' | scale_x_discrete_reverse scale_y_discrete_reverse |
Quickly adjust the legend position | theme_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 grid | theme_mod_remove_minor_grid theme_mod_remove_minor_grid_x theme_mod_remove_minor_grid_y theme_mod_remove_panel_grid |
Rotate axis labels | theme_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 variable | expand_counts uncount uncount, expand_counts |