polished 0.2.0
CRAN release: 2020-09-29
- Added
clean_afp_diagnosis(), aclean_afp()step that harmonises the AFP clinical diagnosis. POLIS scatters the clinical cause across four fields (diagnosis_final, the ICD-10diagnosis_other, and the bilingual free-textdiagnosis_other_specified/provisional_diagnosis); it coalesces them, in priority order with a confirmed-polio override, into a singlediagnosis_harmonised(plus adiagnosis_sourceprovenance), then derivesdiagnosis_classand theis_non_afpflag that separates reported non-AFP illness (malaria, sepsis, malnutrition, …) from the acute-flaccid-paralysis differentials, the 60-dayresidual_paralysisoutcome and thefebrile_asymmetric_onsetflag. The mapping ships as three reviewable reference tables exposed bypolis_afp_diagnosis_lookup()(free-text keywords, multilingual),polis_afp_icd10()(ICD-10 prefixes) andpolis_afp_diagnosis_class()(diagnosis -> class). - Added
clean_pop(), the POLIS population cleaner: it turns the raw population reference into adm0/adm1/adm2 under-5 / under-15 / all-ages denominators, optionally reconciled against a WorldPop input and rolled up by boundary validity. This is the base for the rate indicators.checks_pop()and achecks_popworkbook tab add its per-stream data-quality checks. -
polis_config()andclean_pop()gainpop_sourceto choose the<age>_popdenominator:"reconciled"(default — a trusted POLIS value, else WorldPop, else the district -> province -> country ladder),"polis", or"worldpop". The chosen value keeps<age>_pop_polisand<age>_pop_wpalongside it so every source stays inspectable. - Added
init_polis_pipeline(), a full pipeline-project scaffold: the domain-numbered layout (01_data,02_scripts,03_outputs), a wired.Rprofilecarrying thecfgmanifest, a.gitignore, and runnable download / process scripts, so the project runs end to end once the boundary layers are dropped in.renv = TRUEpins package versions for collaborators. It is distinct from the lighterinit_polis_project(). -
run_pipeline()now emits a leandetectionstable alongsidevirus— a per-detection projection of the positives table (epid, adm0-adm2 + adm2 GUID, latitude/longitude, the virus label, vtype, emergence group, surveillance type/source, and dates) that recomputes nothing. - Added
polis_dictionary(), a data dictionary for the raw and cleaned tables. - Added citation metadata: a
CITATION.cff(GitHub’s “Cite this repository”) andinst/CITATION, socitation("polished")returns a proper reference.
polished 0.1.0
CRAN release: 2020-07-01
- Initial development version.
- Unified
raw_*/polished_*naming end to end:get_polis_data()writes each table under itsraw_*stem (newfile_stemcolumn onpolis_tables_mapping) and migrates files written under the old bare table name in place on the next run (no re-download).run_pipeline_dir()readsraw_*inputs and writespolished_*outputs, with each output’s format following its source file. -
run_pipeline()now runs end to end: it cleans human specimens viaclean_human_spec(), passes a configuredshapeto every cleaner for admin reconciliation, and computes the surveillance indicators (calc_polio_indicators()) using a configuredpopulationdenominator.polis_config()gainspopulationandshapereference handles. - Added per-stream data-quality checks —
checks_afp(),checks_es(),checks_sia(),checks_virus(),checks_hum_spec()— andwrite_checks_excel(), a styled one-tab-per-check workbook.run_pipeline_dir()writes achecks_<dataset>.xlsxper output. -
get_polis_data()gainsprune_parts(delete the resume cache after a verified write, rebuilt from the canonical next run) and self-heals a corrupt canonical by rebuilding it from the intact parts. - Extended
calc_polio_indicators()from 4 to the full WHO POLIS indicator catalogue (~62 indicators across AFP, Stool, Dose, Timeliness, Lab, ES, Virus, SIA and Composite families), driven by DRY generators and a unified registry thatavailable_indicators()reads (queryable byfamily). New optional source inputs (virus,es,sia,lab,admin_units); missing sources/columns skip with a warning rather than erroring. -
get_polis_data()now supports thepopulationreference table. It carries no usable update date, so it is pulled whole in a single Id-paginated pass with no date/region filter (date_field = NAinpolis_tables_mapping). Note: the endpoint/field still need a live-API sanity check before relying on it. - Added the EPID-driven geography cleaner:
impute_geo_from_epid()plus theepid_split()/epid_country_code()/epid_prefix()/epid_strip_contact()parsers, thebuild_admin_ref()/build_prefix_ref()reference builders, andresolve_epid_country().
