An operator opens the raw output from a week of automated counting and the numbers do not make sense. Boardings and alightings for a trip do not match. One vehicle’s load goes negative halfway through a run, as if more riders got off than ever got on. A handful of trips are missing entirely. The sensors are working. The data still cannot go in a report, and the reason is that raw sensor output was never meant to. APC data cleaning is the pipeline between the count a door sensor produces and the defensible figure an NTD filing requires, and most buyers never see it in a demo.
That gap is where a lot of disappointment lives. A vendor shows clean dashboards; the raw feed underneath them is messier. Understanding what cleaning does, and asking how a vendor does it, is the difference between trusting a number and hoping it is right.
What Is APC Data Cleaning?
APC data cleaning is the processing that turns raw automated passenger counter output into validated, usable ridership data. It corrects the predictable ways sensor counts break: totals that do not balance, loads that go negative, and trips missing from hardware faults. The result is a dataset an agency can defend for service planning and, once certified, for NTD reporting.
The Three Ways Raw Counts Break
Raw counts fail in three recognizable patterns, and each has a different cause and fix.
Unbalanced totals. Over a complete trip, total boardings should equal total alightings, because every rider who got on also got off. When they do not match, a sensor missed a boarding or an alighting somewhere along the run. Small discrepancies are normal and expected; large ones flag a problem. This is the most common break, and balancing is what addresses it.
Negative loads. The load on board is a running total: boardings minus alightings, stop by stop. It can never be less than zero, because a bus cannot carry a negative number of riders. When a computed load goes negative, the sensor recorded more alightings than boardings up to that point, which is physically impossible and points to a miscount earlier in the trip. A negative load is a signal, not a data point to report.
Missing trips. A hardware fault, a power interruption, or a communication gap can drop a whole trip from the record. The bus ran; the count did not arrive. Unlike the first two, this is not a miscount to correct but a hole to fill, which is where imputation and expansion come in.
What Balancing Actually Does
Balancing reconciles boardings and alightings for a trip so the totals agree, distributing the correction across stops rather than dumping it at one. The principle is a physical constraint. Cumulative boardings must always be greater than or equal to cumulative alightings at every point in a trip, and the two must be equal by the end. A balancing algorithm adjusts the raw counts to satisfy those constraints while staying as close to the observed data as possible.
Loop routes complicate this. On a route that returns to the same terminal, the “everyone got off by the end” assumption still holds for the trip as a whole. Defining where one trip ends and the next begins takes care. Balancing has to respect the trip structure, not just the raw stop sequence. Done well, it corrects the small, inevitable miscounts without inventing riders. Done poorly, it hides real accuracy problems behind numbers that look tidy. The difference between automated counting and manual ride checks is partly this: a manual counter self-corrects in the moment, while an automated count has to be corrected afterward by rule.
How Missing-Trip Imputation and Expansion Work
When a trip is missing, cleaning does not leave a hole in the ridership total. Imputation estimates the missing trip’s counts from comparable trips: the same trip on other days, the same route at the same time, or a modeled average for that service pattern. The estimate is clearly flagged as imputed, not observed, so the distinction survives into the report.
Expansion is the related step that scales a sample up to a full population when an agency counts a portion of its service rather than all of it. If certified counting covers most but not all trips, expansion factors extend the observed counts to the trips not directly measured, following a defined sampling design. Both imputation and expansion are legitimate and expected; both have to be documented, because an auditor needs to see which numbers were measured and which were estimated. The NTD Sampling Manual governs the sampling and expansion approach an agency’s plan has to follow.
Why Cleaning Must Be Documented for Certification
Cleaning is not just an internal convenience; for NTD it is part of what makes the data acceptable. Automated counts have to be benchmarked against manual counts within tolerance before they can be reported, and the cleaning method is part of that story. An auditor reviewing a filing needs to see how raw counts were validated, how discrepancies were resolved, and how missing trips were handled, not just the final total.
A cleaning process that cannot be described is a cleaning process that cannot be defended. This is why the method matters as much as the result. The full benchmarking and recertification requirement is covered in APC accuracy and FTA certification. Cleaning is the day-to-day work that happens continuously. Certification is the periodic proof that the cleaned data matches reality within tolerance. Cleaning also has to stay separate from a different check entirely: the revenue-side comparison covered in reconciling farebox and door counts, which checks counts against fares.
Questions to Ask a Vendor About Cleaning
Five questions separate a vendor with a real cleaning pipeline from one shipping raw sensor output behind a clean-looking dashboard:
- Does the platform balance boardings and alightings per trip, and can it show the raw and adjusted counts side by side?
- How does it detect and correct negative loads, and are corrected trips flagged?
- How are missing trips imputed, and is imputed data clearly distinguished from observed data in exports?
- What sampling and expansion method does it follow, and does it align with the NTD Sampling Manual?
- Is the cleaning method documented well enough to hand to an auditor during a certification review?
A vendor that cannot answer these is likely shipping raw counts and leaving the cleaning to the agency. That is a substantial hidden workload for a small team with no analyst on staff.
FAQ
Is Raw APC Data Ever Usable As-Is?
For rough, day-to-day operational awareness, raw counts give a directional sense of which trips are busy. For anything reported, planned around, or certified, raw data is not usable until it is balanced, load-checked, and gap-filled. The gap between a raw count and a defensible figure is exactly what cleaning closes.
Does Cleaning Invent Riders That Were Not Counted?
Balancing corrects small miscounts within a trip rather than adding riders, and imputation estimates missing trips from comparable observed trips, clearly flagged as estimates. Done properly, cleaning stays as close to the observed data as the physical constraints allow. Done improperly, it can mask accuracy problems, which is why the method has to be transparent.
Why Do APC Loads Go Negative?
A negative load means the running total of alightings exceeded boardings at some point, which is physically impossible. It signals a miscount earlier in the trip, usually a missed boarding. Cleaning enforces the constraint that load can never fall below zero and corrects the underlying count.
Does a Zero-Fare Agency Still Need APC Data Cleaning?
Yes. Ridership still has to be counted and reported even where no fare is collected, so the same balancing, load checks, and gap-filling apply. The counting is the reporting requirement, independent of whether a fare changes hands.
Where TransitFare Fits
TransitFare is a transit technology company founded in 2012 that builds Automated Passenger Counting for small and mid-sized transit agencies running 10 to 50 vehicles. Counts from the door sensors land in TransitFare Cloud by trip and stop. The platform balances each trip’s boardings and alightings and corrects negative loads; ask about the rest of the list above in a demo. Across deployments the platform has counted 18 million passenger boardings via APC and processed 60 million+ fare validations over more than 13 years. Explore Automated Passenger Counting, or see how TransitFare Cloud handles reporting for where the counts land.