Skip to contents

Download POLIS data

Download POLIS tables to a local cache. Downloads use Id-range pagination, resume from saved checkpoints and check for missing records.

get_polis_data()
Download POLIS tables
polis_tables_mapping
POLIS table catalogue

Configuration & pipeline

Configure the cleaners and run them on tables in memory or raw files in a directory.

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

Standardise names, parse dates, derive variables, reconcile geography and remove duplicate records. clean_virus() combines positive records from the 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

Look up column mappings, raw and cleaned data definitions, country groupings and AFP diagnosis codes.

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 administrative names and GUIDs from EPIDs, district boundaries or coordinates. Reconcile existing values against boundary references and standardise geographic names.

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 in formats supported by sf, 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

Parse EPIDs, build reference tables from matching records and resolve country codes. These functions also support impute_geo_from_epid().

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, duplicates & types

Standardise and order columns, keep the latest record per identifier, flag ambiguous business keys, remap synonyms, reconcile downloads and infer column types.

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

AFP case quality

Timeliness of notification, investigation and stool collection, the stool specimen pathway and the reasons stools were inadequate, days from collection to laboratory receipt, and 60-day follow-up. afp_stool_adequacy() is the single stool adequacy classifier.

calc_afp_timeliness()
Calculate AFP timeliness by step
calc_afp_specimen_pathway()
Calculate the stool specimen pathway for AFP cases
calc_afp_specimen_reasons()
Calculate the reasons AFP cases had inadequate stools
calc_afp_specimen_receipt_monthly()
Calculate days from stool collection to laboratory receipt by month
calc_afp_specimen_receipt_by_area()
Calculate days from stool collection to laboratory receipt by area
calc_afp_followup()
Calculate 60-day follow-up of inadequate AFP cases by month of onset
afp_stool_adequacy()
Classify stool adequacy for AFP cases
afp_stool_components()
Flag the stool collection components of each AFP case
afp_specimen_receipt()
Link stool specimens to AFP cases with the days to laboratory receipt
afp_followup_status()
Flag where each AFP case stands on 60-day follow-up

Pending classification

Cases still awaiting classification by month of onset, placed on a ladder by the furthest laboratory stage their specimens reached.

calc_pending_stage()
Count AFP cases awaiting classification by stage and month of onset
afp_pending_open()
Flag AFP cases that are still awaiting classification
afp_pending_dates()
Add the dates an AFP case has reached
afp_specimen_rung()
Place each stool specimen on the laboratory ladder
afp_pending_stage()
Place each AFP case on the laboratory ladder

Environmental surveillance performance

Sample resolution by month, and enterovirus and poliovirus shares and site regularity by district and by site over a reporting window.

calc_es_resolution()
Monthly laboratory resolution of environmental samples
calc_es_district_performance()
Environmental surveillance performance by district
calc_es_site_performance()
Environmental surveillance performance by site
es_reporting_window()
Reporting window for environmental surveillance indicators
es_complete_end()
Last day of laboratory-complete environmental surveillance
es_sample_state()
Minimum-sample rule for environmental surveillance percentages

Detection windows

Virus detections counted in comparison windows before a reporting date, and the direction between pairs of windows.

calc_detection_windows()
Count virus detections in each comparison window
calc_detection_comparison()
Compare detection counts with the previous period
detection_direction()
Direction of change between two counts
detection_slice()
Select the virus detections that count
detection_default_windows()
Default comparison windows for virus detections
detection_default_pairs()
Default window pairs for the previous-period comparison

Environmental site scorecard

Each active environmental site judged on its Sabin virus response after campaigns and on recovery of target virus found at nearby sites, with the network rates and the Sabin profile by weeks since a campaign.

calc_es_scorecard()
Environmental site scorecard
calc_es_score_network()
Network rate of each scorecard measure
calc_es_score_profile()
Sabin detection by weeks since a campaign
es_score_settings()
Settings for the environmental site scorecard
es_score_cols()
Default columns read by the environmental site scorecard

Synthetic data

Invented geography, population, AFP cases, environmental samples, virus detections, stool specimens and campaign rounds, shaped like the cleaned tables, for testing and demonstrating indicator code without real records.

simulate_polio_data()
Simulate a Complete Set of Polio Surveillance Tables
simulate_admin_frame()
Simulate a Synthetic Geography
simulate_population()
Simulate District Population by Year
simulate_afp_cases()
Simulate AFP Case Records
simulate_es_samples()
Simulate Environmental Surveillance Samples
simulate_detections()
Simulate Virus Detections
simulate_human_specimens()
Simulate Human Stool Specimens
simulate_campaigns()
Simulate Vaccination Campaign Rounds

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

Create project directories with init_polis_project(), or add a .Rprofile configuration and starter scripts with init_polis_pipeline(). Read processed outputs by country and year, and manage the project cache.

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