Package: csalert 2026.10.19

Richard Aubrey White

csalert: Alerts from Public Health Surveillance Data

Helps create alerts and determine trends by using various methods to analyze public health surveillance data. The primary analysis method is based upon a published analytics strategy by Benedetti (2019) <doi:10.5588/pha.19.0002>.

Authors:Beatriz Valcarcel Salamanca [aut], Chi Zhang [aut], Richard Aubrey White [aut, cre], Folkehelseinstituttet [cph]

csalert_2026.10.19.tar.gz
csalert_2026.10.19.zip(r-4.7-any)csalert_2026.10.19.zip(r-4.6-any)csalert_2026.10.19.zip(r-4.5-any)
csalert_2026.10.19.tgz(r-4.6-any)csalert_2026.10.19.tgz(r-4.5-any)
csalert_2026.10.19.tar.gz(r-4.7-any)csalert_2026.10.19.tar.gz(r-4.6-any)
csalert_2026.10.19.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
csalert/json (API)

# Install 'csalert' in R:
install.packages('csalert', repos = c('https://niphr.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/niphr/csalert/issues

Pkgdown/docs site:https://niphr.github.io

On CRAN:

Conda:

csverse

4.43 score 1 stars 5 scripts 544 downloads 43 exports 44 dependencies

Last updated from:e279e4c51d. Checks:9 OK. Indexed: no.

TargetResultTimeFilesSyslog
linux-develOK217
source / vignettesOK246
linux-releaseOK189
macos-releaseOK161
macos-oldrelOK164
windows-develOK221
windows-releaseOK212
windows-oldrelOK188
wasm-releaseOK110

Exports:add_holiday_effectas_ensemble_v4compare_resultscsfmt_ensemble_v3csfmt_ensemble_v4csfmt_interpretcsfmt_parsecsfmt_reporting_triangle_v3csfmt_reporting_triangle_v4csfmt_varens_add_rateens_add_rate_v4ens_collapseens_compress_v4isoyearweek_week_startmem_thresholds_v1mem_thresholds_v4nowcast_backtestnowcast_censornowcast_delay_ecdf_v1nowcast_ecdf_v4nowcast_passthrough_to_ensemble_v1nowcast_passthrough_v4nowcast_score_v1nowcast_truthq_labelq_valueqc_surveillance_data_v1qc_week_over_week_v1reporting_completion_trend_v1reporting_completion_v1reporting_triangle_matrixrolling_slope_matrixset_time_series_idshort_term_trendshort_term_trend_sts_v1short_term_trend_v4signal_detection_hlmsignal_detection_hlm_v4simulate_baseline_datasimulate_seasonal_outbreak_datasimulate_spike_outbreak_datavalidate_ensemble

Dependencies:clicpp11crayoncsdatacstidycstimedata.tabledeldirdigestfarvergenericsggplot2glm2gluegtableisobandlabelinglatticelifecyclelubridatemagrittrMASSMatrixmatrixStatsnlmepolyclippolyCubR6RColorBrewerrlangS7scalesspspatstat.dataspatstat.geomspatstat.univarspatstat.utilsstringistringrsurveillancetimechangevctrsviridisLitewithr

v4: one ensemble, full or compressed
Build a full ensemble | Add a rate, then run the trend and HLM | Compress to a table | Read the table back and run a step again

Last update: 2026-10-17
Started: 2026-10-17

Start here: what csalert does and which parts to use
What csalert is for | Use the ensemble methods | The current methods work on an ensemble | The table methods work on counts without delayed reporting | Where the data formats live | What cannot be done yet | Test data with a known truth

Last update: 2026-10-15
Started: 2026-08-06

The pipeline: from incomplete counts to published numbers
One rule: every stage takes the ensemble and returns it | A synthetic reporting triangle | 1. Nowcast | 2. Validation: replay the method on the past | The engine completes too much at horizon 0 | 3. Reporting completion: how fast does the data arrive? | What pct_delayD counts | A worked reference week | The weekday of the extract | "As of today", for the weeks on screen | A change in reporting speed: period = "year" | Every number here depends on max_delay_days | 4. Rate: a nowcast numerator over a nowcast denominator | 5. Short-term trend on the rate | Every week gets an interval, the settled weeks too | What that interval is, and what it is not | 6. MEM intensity thresholds | 7. Signal detection: historical limits | 8. Collapse: the end of the chain | 9. Quality control | The naming grammar | Where next

Last update: 2026-10-15
Started: 2026-08-06

Readme and manuals

Help Manual

Help pageTopics
Multiply simulated counts on public holidaysadd_holiday_effect
Rebuild a csfmt_ensemble_v4 from a stored tableas_ensemble_v4
Compare two collapsed result sets, column by columncompare_results
Build a csfmt_ensemble_v3csfmt_ensemble_v3
Build a csfmt_ensemble_v4csfmt_ensemble_v4
Split every value column name of a table into its partscsfmt_interpret
Split a measure column name into its partscsfmt_parse
Build a csfmt_reporting_triangle_v3csfmt_reporting_triangle_v3
Build a csfmt_reporting_triangle_v4csfmt_reporting_triangle_v4
Build a measure column name from its partscsfmt_var
Add a rate to an ensembleens_add_rate ens_add_rate.csfmt_ensemble_v3
Add a rate to a csfmt_ensemble_v4ens_add_rate_v4
Collapse the draws of an ensemble to quantilesens_collapse ens_collapse.csfmt_ensemble_v3
Compress a csfmt_ensemble_v4 into a table to storeens_compress_v4
The Monday that starts an ISO weekisoyearweek_week_start
Classify every draw into MEM intensity levelsmem_thresholds_v1 mem_thresholds_v1.csfmt_ensemble_v3
Classify the draws of a csfmt_ensemble_v4 into MEM intensity levelsmem_thresholds_v4
Replay a nowcast method on past as-of datesnowcast_backtest
Cut a reporting triangle back to what was known on a past datenowcast_censor
Nowcast a reporting triangle from the delay pattern of settled weeksnowcast_delay_ecdf_v1 nowcast_delay_ecdf_v1.csfmt_reporting_triangle_v3
Nowcast a reporting triangle from the delay pattern of settled weeksnowcast_ecdf_v4
Build an ensemble from a reporting triangle with no nowcastnowcast_passthrough_to_ensemble_v1
Build an ensemble from a reporting triangle with no nowcastnowcast_passthrough_v4
Score replayed nowcast quantiles against the settled truthnowcast_score_v1
The settled total of each reference weeknowcast_truth
Print a 'csfmt_ensemble_v3'print.csfmt_ensemble_v3
Print a csfmt_ensemble_v4print.csfmt_ensemble_v4
Write a probability as a quantile labelq_label
Read the probability in a quantile labelq_value
Check that a surveillance feed has data and is up to dateqc_surveillance_data_v1
Compare this week's run with last week's runqc_week_over_week_v1
Reporting speed by year and by recent month, in one tablereporting_completion_trend_v1
Measure how fast the counts of a reporting triangle arrivereporting_completion_v1
Turn a reporting triangle into one count matrix per seriesreporting_triangle_matrix
Rolling regression slope down every column of a matrixrolling_slope_matrix
Add a content-hash series id to a data.tableset_time_series_id
Estimate the short-term trend of a seriesshort_term_trend short_term_trend.csfmt_ensemble_v3 short_term_trend.csfmt_rts_data_v1 short_term_trend.csfmt_rts_data_v3
Short-term trend alarms on a surveillance sts objectshort_term_trend_sts_v1
Fit the short-term trend of every draw of a csfmt_ensemble_v4short_term_trend_v4
Flag weeks above a historical limitsignal_detection_hlm signal_detection_hlm.csfmt_ensemble_v3 signal_detection_hlm.csfmt_rts_data_v1 signal_detection_hlm.csfmt_rts_data_v3
Flag the draws of a csfmt_ensemble_v4 above a historical limitsignal_detection_hlm_v4
Simulate daily counts with no outbreaksimulate_baseline_data
Add seasonal outbreaks to simulated daily countssimulate_seasonal_outbreak_data
Add short outbreaks to the end of simulated daily countssimulate_spike_outbreak_data
Check the shape of a csfmt_ensemble_v3validate_ensemble