
Package index
Download POLIS data
The download entry point and the table catalogue it fetches: a one-call pull that works around POLIS’s pagination and date-filter quirks, with on-disk caching, resume, and post-download completeness verification.
-
get_polis_data() - Download POLIS tables
-
polis_tables_mapping - POLIS table catalogue
Configuration & pipeline
The shared settings object every cleaner takes, and the orchestrators that run the whole cleaning set in one call (in memory, or from a directory of raw files).
-
polis_config() - Build a POLIS pipeline configuration
-
polis_active_config() - The session-active POLIS configuration
-
print(<polis_config>) - Print method for POLIS configuration
-
run_pipeline() - Run the POLIS cleaning pipeline in memory
-
run_pipeline_dir() - Run the cleaning pipeline from a directory of raw files
Clean the surveillance streams
One cleaner per POLIS stream. Each standardises names, sanitises dates, derives the analytic variables, cleans geography and dedups to one row per POLIS id. clean_virus() is the exception: it builds the positives dataset from the already-cleaned AFP and ES outputs.
-
clean_afp() - Clean POLIS AFP case data
-
clean_human_spec() - Clean POLIS human specimen (laboratory) data
-
clean_es() - Clean POLIS environmental surveillance data
-
clean_sia() - Clean POLIS SIA (campaign) data
-
clean_virus() - Build the POLIS virus (positives) dataset from cleaned cases and ES
Population denominators
Clean the raw POLIS population reference into adm0/adm1/adm2 under-5 / under-15 / all-ages denominators, optionally reconciled against WorldPop and rolled up via boundary-validity windows. These feed the rate indicators when no population is supplied to the pipeline directly.
-
clean_pop() - Clean POLIS population and (optionally) reconcile against WorldPop
Virus classification
The shared decoder that turns the raw POLIS virus fields into the standard WPV / cVDPV / aVDPV / iVDPV vocabulary used across every stream.
-
clean_afp_classification() - Derive the fused AFP virus type and analytic classification
-
clean_es_classification() - Derive the AFP-style virus classification and detection flags for ES
Clinical diagnosis
Harmonise the four POLIS fields that carry the clinical cause of an AFP case into one canonical diagnosis, then derive the coarse class, the reported non-AFP flag and the follow-up outcome.
-
clean_afp_diagnosis() - Harmonise the AFP clinical diagnosis
Reference tables
The packaged lookups the cleaners are driven by: the raw-to-canonical column crosswalk, the data dictionary (raw or cleaned schema) it backs, the country grouping/risk reference, and the AFP diagnosis dictionaries.
-
polis_crosswalk() - POLIS column crosswalk
-
polis_dictionary() - POLIS data dictionary (raw or cleaned schema)
-
polis_country_lookup() - Country reference lookup shipped with the package
-
polis_afp_diagnosis_lookup() - AFP free-text diagnosis lookup shipped with the package
-
polis_afp_icd10() - AFP ICD-10 reference list shipped with the package
-
polis_afp_diagnosis_class() - AFP diagnosis-to-class map shipped with the package
Recover & reconcile geography
Fill missing admin names and GUIDs without overwriting present values or fabricating on ambiguity (from EPIDs, from a district shape, or from coordinates), plus the admin-name fixers.
-
impute_geo_from_epid() - Recover administrative geography from the EPID
-
reconcile_admin_guids() - Reconcile case admin names and GUIDs against the long district shape
-
impute_geo_from_coords() - Recover missing admin from coordinates, in place
-
impute_missing_coords() - Place a random point inside the district polygon for cases missing coordinates
-
fix_geo_names() - Normalise admin names on a cleaned data frame
-
polis_fix_geo_names() - Apply geographic name fixes to a character vector
-
polis_geo_name_fixes() - Geographic name-fix lookup table
Clean administrative spatial data
Read WHO ADM0/ADM1/ADM2 boundary layers from any format, standardise the names and repair the geometry, then write cleaned shapes plus a year-expanded long shape, with point-to-admin recovery.
-
process_spatial() - Clean WHO administrative spatial data
-
create_long_shape() - Expand admin shapes to one row per active year
-
get_admin_info_from_coords() - Recover administrative info for point data via a spatial join
EPID building blocks
The exported pieces the EPID-geography cascade is assembled from: parsers, the sibling-record lookups, and the country resolver. You rarely call these directly.
-
epid_split() - Split an EPID into its component segments
-
epid_country_code() - Extract the country code from an EPID
-
epid_prefix() - Geographic prefix used for prefix-matching
-
epid_strip_contact() - Separate a contact EPID from its base case EPID
-
build_admin_ref() - Build an EPID -> admin-value reference (most-recent-per-EPID)
-
build_prefix_ref() - Build a (prefix, year) -> unique admin-value reference
-
resolve_epid_country() - Resolve an EPID country code to a country name
Records, dedup & types
The shared primitives the cleaners compose from: column standardisation and ordering, keep-latest dedup, the business-key tripwire, synonym remapping, full-pull reconcile, and column type inference.
-
standardise_names() - Standardise POLIS column names
-
order_columns() - Order columns: identifiers, then location, then time, then everything else
-
polis_upsert() - Upsert by Id, keeping the latest record
-
collapse_business_key() - Collapse business-key duplicates, keeping the latest record
-
flag_ambiguous() - Flag (do not drop) rows whose business key spans multiple Ids
-
remap_synonyms() - Remap merged EPIDs to their canonical value
-
reconcile() - Prune records absent from a full pull (reconcile)
-
auto_parse_types() - Infer column types after cleaning, then optionally layer factor detection
-
detect_factors() - Detect factor-like character columns (low-cardinality only)
Indicators
Compute the WHO POLIS surveillance indicator catalogue (NPAFP rate, stool adequacy, timeliness, dose history, environmental, virus, SIA and composite families) from cleaned case / ES / virus / SIA / lab tables. Call available_indicators() to browse the catalogue, optionally by family.
-
calc_polio_indicators() - Calculate polio surveillance indicators (the POLIS indicator catalogue)
-
available_indicators() - Dictionary of available polio surveillance indicators
Data-quality checks
Per-dataset checks that flag duplicates, blank keys, unreconciled GUIDs, out-of-range values and date-ordering problems straight from the cleaned tables, exported as a styled Excel workbook (one tab per check), plus the ES-specific quality helpers. checks_pop() documents the POLIS-vs-WorldPop population reconciliation instead.
-
checks_afp() - Run AFP data-quality checks
-
checks_es() - Run environmental-surveillance data-quality checks
-
checks_hum_spec() - Run human-specimen data-quality checks
-
checks_sia() - Run SIA data-quality checks
-
checks_virus() - Run virus/positives data-quality checks
-
checks_pop() - Run POLIS population data-quality checks
-
write_checks_excel() - Write a checks result to an Excel workbook
-
es_missingness() - Summarise missingness in key ES surveillance variables
-
validate_es_sites() - Flag ES site names absent from a reference site list
Other surveillance processing
Independent-monitoring (IM), LQAS campaign-monitoring, and SIA round-quality processors.
-
process_im() - Process raw Independent Monitoring (IM) data into missed-children rates
-
process_lqas() - Process raw LQAS lots into classifications and district pass rates
-
process_sia_quality() - Process the POLIS SIA campaign-quality tables (LQAS + IM)
Project workspace
Scaffold a project on disk — either the full domain-numbered pipeline (init_polis_pipeline(), with a wired .Rprofile and download/process scripts) or the lighter generic zones (init_polis_project()) — stream the cleaning pipeline into it, and read partitioned slices back out.
-
init_polis_pipeline() - Scaffold a full polished pipeline project
-
init_polis_project() - Create (or re-open) a data project
-
load_polished() - Read a country / period slice of the polished outputs
-
project_path() - Build a path inside a project zone
-
clear_cache() - Clear a project's regenerable cache
-
print(<polis_project>) - Print a polis_project