Package: cs9 26.10.23

Richard Aubrey White

cs9: A Framework for Real-Time Analysis and Disease Surveillance

A comprehensive framework for building real-time disease surveillance systems. Provides R6-based infrastructure for database-driven surveillance tasks, with support for parallel processing, data validation, and automated pipeline execution. Designed for epidemiological analysis and public health monitoring applications.

Authors:Richard Aubrey White [aut, cre], Folkehelseinstituttet [cph]

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

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

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

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

On CRAN:

Conda:

5.12 score 1 packages 6 scripts 18 exports 86 dependencies

Last updated from:3951f7fdd0. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK357
source / vignettesOK228
linux-releaseOK333
macos-releaseOK312
macos-oldrelOK298
windows-develOK316
windows-releaseOK261
windows-oldrelOK273
wasm-releaseOK135

Exports:check_environment_setupconfigcreate_folder_if_doesnt_existcreate_latest_folderget_config_data_hash_for_each_planget_config_logget_config_tables_last_updatedget_config_tasks_statsmandatory_db_filterpathreload_db_configrun_task_detachedrun_task_sequentially_as_callr_bg_using_load_allrun_task_sequentially_as_rstudio_job_using_load_allrun_todaySurveillanceSystem_v9TaskJobupdate_config_log

Dependencies:askpassbitbit64blobcachemcallrclicliprcodetoolscpp11crayoncredentialscsdbcstimecsutilcurldata.tableDBIdbplyrdescdigestdplyrfarverfastmapfilelockforeachfsgenericsgertggplot2gitcredsgluegtablehmshttr2iniisobanditeratorsjsonlitelabelinglaterlifecyclelubridatemagrittrmemoiseodbcopensslotelpakpbmcapplypillarpkgconfigplnrprettyunitsprocessxprogressprogressrpspurrrR6rappdirsRColorBrewerRcpprlangrprojrootRSQLiterstudioapiS7scalesstringistringrsystibbletidyrtidyselecttimechangeusethisutf8uuidvctrsviridisLitewhiskerwithryamlyyjsonrzip

Database backends
The two environments | Which variable each backend reads | What check_environment_setup() asks for | Setting the variables from another package | Which one to use

Last update: 2026-10-16
Started: 2026-08-05

Installation
Start here: SQLite, with no server | What SQLite does not need | cs9example needs no .Renviron at all | Which backend to use | Installation options | CRAN installation (limited functionality) | Full installation (database-driven surveillance) | Database setup | PostgreSQL installation | Option 1: Docker (recommended) | Option 2: System installation | Database schema setup | Environment variable configuration | Setting up .Renviron | Variable descriptions | Package behavior without database configuration | Docker | Apache Airflow Integration | Airflow scheduling pattern | Benefits of Airflow + CS9 | Docker Compose with Airflow | Moving from CRAN to full setup | Verification and troubleshooting | Verify your setup | Common issues | Next steps

Last update: 2026-10-16
Started: 2023-03-07

How a task runs
Setup | A run in one diagram | A plan is one data pull | Analyses iterate within a plan | Only the first and the last plan run in a fixed order | A forked worker MUST NOT inherit an open connection | A task reads cores when it runs | A task builds its plans once per run | A completeness check covers every declared partition | plnr::expand_list() makes one argset per element | Size a plan by its data pull

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

Rebuilding a table safely
The task | A run that succeeds | A run that fails, and its retry | What you need to know when you write a task

Last update: 2026-10-13
Started: 2026-10-12

Task shapes
Setup | Per-unit rebuild | Staged import | Per-plan staged swap | Staging as a checkpoint | Fit then fill | Export from a finished table | Notify after export | Three rules

Last update: 2026-10-07
Started: 2026-10-05

Creating a task
Overview | Prerequisites | Step 1: Initialize a surveillance system | Step 2: Define database tables | Step 3: Implement task functions | Data selector function | Action function | Step 4: Configure the task | Step 5: Execute the task | Step 6: Monitor and debug tasks | Advanced task features | Parallel processing | Dynamic plan generation | Best practices | Error handling | Data validation | Modular design | Summary | See also

Last update: 2026-10-06
Started: 2025-08-20

File Layout
Starting from the example package | 00_env_and_namespace.R | 01_definitions.R | 02_surveillance_systems.R | 03_tables.R | 04_tasks.R | 05_deliverables.R | 10_onLoad.R | 11_onAttach.R | Task files | weather_download_and_import_rawdata.R | weather_clean_data.R | weather_export_weather_plots.R | Notes | Next steps

Last update: 2026-08-21
Started: 2023-03-09

Introduction to CS9
The problem: scaling epidemiological analysis | NorSySS: a decade of operation | CS9 vs alternatives | What is CS9? | When to use CS9 | What CS9 does not decide for you | Key concepts and definitions | Surveillance system architecture | Example workflow | Plan-heavy or analysis-heavy tasks? | Other vignettes | Example | Surveillance system setup | Database table definition | Task configuration | for_each_plan | plnr::expand_list | for_each_analysis | universal_argset | upsert_at_end_of_each_plan | insert_at_end_of_each_plan | action_fn_name | data_selector_fn_name | schema | data_selector_fn | action_fn | Run the task | Common task patterns | Importing data | Analysis | Exporting multiple sets of results | Exporting combined results | Deployment | What the framework handles for you | Getting started | Next steps

Last update: 2026-08-06
Started: 2024-05-27