cassionData Analysis

Lab · Beginner

The month nobody reported

A district's penta3 coverage appears to collapse in August. Build the script that decides whether that is a programme failure or a reporting failure, and make it survive next quarter's export without editing.

PythonYour own machine90 min

In August, penta3 coverage in this district falls to under a third. Someone will ask you, in a meeting, whether the campaign collapsed. The honest answer takes about forty lines of Python, and every one of them is a decision you can get wrong quietly.

This lab runs on your own machine, not in Colab. That is the point: the course spent lesson 1 on an environment that reinstalls without internet and lesson 8 on a script that runs on someone else’s laptop, and a lab that hands you a hosted runtime would let you skip both.

The file

vaccination-coverage-2024.v1.csv — 2,736 rows, 38 health facilities, six antigens, twelve months of DHIS2-shaped aggregate reporting. Synthetic. Download it from the dataset page and put it beside your script.

Set up first

Before you write any analysis:

  1. A project directory laid out the way lesson 2 describes, with the data in its own folder and no absolute path anywhere in the code
  2. A virtual environment, and a requirements.txt produced from it
  3. A script that takes the CSV path as an argument, not as a constant

If you skip this and open a notebook instead, the rest of the lab still works and you will have learned less than half of what it is for.

The task

Produce one table: penta3 coverage for the district, by month, corrected for reporting completeness. Alongside it, the uncorrected figure, so the difference is visible rather than asserted.

Four decisions stand between you and that table.

The denominator is annual. target_population is the yearly catchment figure. A monthly coverage rate divides by a twelfth of it. Dividing by the full figure understates coverage twelvefold, produces numbers around 6% that look like a catastrophe, and is the commonest error made against data shaped like this.

A facility that did not report is not a facility that vaccinated nobody. A non-reporting facility appears as a row with report_submitted false and doses_administered zero. Those zeros are not measurements. Summing the column without filtering treats silence as failure — which is exactly what produces the August cliff.

Completeness is the correction. For each month, compute the share of facilities that reported. Then adjust the denominator to the population those reporting facilities actually cover, rather than the whole district’s. State in a comment which of the two you chose and why.

Dropout is an annual check, not a monthly one. Penta3 above penta1 is impossible over a cohort and means a data error. Month-to-month noise puts penta3 above penta1 at least once in 37 of the 38 facilities, so a monthly check flags almost everybody and tells you nothing. Apply it to annual totals.

What to hand in

A single script, run as python coverage.py data/vaccination-coverage-2024.v1.csv, that prints:

  • reporting completeness by month, as a percentage
  • penta3 coverage by month, uncorrected and corrected, side by side
  • the penta1-to-penta3 dropout rate for each facility, on annual totals
  • the facilities whose annual dropout is negative, named

Check your numbers

The dataset notes state what a correct analysis finds. Your script should agree with all four:

Expected
Reporting completeness, whole year about 77%
Reporting completeness, August 29%
Corrected penta3 coverage low-to-mid 70s, all year
Facilities with negative annual dropout six

If your August coverage is still a cliff after correction, the correction is not being applied to the denominator. If you find thirty-seven flagged facilities, you are checking monthly.

The questions to answer in prose

Three sentences each. The script is how you get to these; these are the lab.

1. After correction, August coverage is close to the rest of the year. What does that let you say in the meeting, and — this is the harder half — what does it not let you say about the children in the nine facilities that did not report?

2. You chose one of two denominators for the completeness correction. Name the other one, and say what it would have overstated.

3. Six facilities report more penta3 than penta1 over the year. Is that a cleaning decision, a data-entry question, or a supervision issue? Say who you would send it to and what you would ask them.

How to know you are done

Someone else clones your project, creates the environment from your requirements.txt, runs your script against the same CSV, and gets the same four outputs. If your script contains a path beginning /Users or C:, or a hardcoded 2024, it is not finished — the export next quarter will be 2025 and it should still run.

What this lab is not

It is not asking you to decide whether the completeness correction should be reported to the ministry. That is an indicator-definition argument, and Data Analysis Foundations is where it belongs. Here you are only making sure the two numbers are computed correctly enough to have the argument about.