Measuring Data Quality#
Contributions, whether they are made in the Admin Panel or as links to external sources, are only as useful as the data they build on. This page describes how OpenParlData.ch measures the quality of its data per body: timeliness, completeness against official seat counts and structural consistency, together with the ambition to publish these indicators as openly as the data itself.
Ambition#
Besides the configuration views described in Contributing through the Admin Panel, the Admin Panel carries a younger set of views under admin.openparldata.ch/#/quality, which measure the published data. They are a first step, and more work is needed before they reliably show the quality we aim for. The thresholds below are a first proposal, the indicators have not been validated case by case, and the figures currently still have to be checked by hand before anything can be concluded from them. What the views already fix is the direction: which properties of the data we consider worth measuring, and that we intend to measure them per body and over time rather than to assert quality in prose.
Timeliness#
Every body is classified per data type (affairs, news, votes, meetings, speeches) by the age of its most recent event, in five bands: fresh up to three days, good up to seven, late up to ten, stale up to thirty, and dead beyond that. In addition an entry is flagged as overdue when its age exceeds three times the publication cadence expected for that body, so that a monthly-publishing parliament is not judged by the same yardstick as a weekly one.
The intent is that a body which stops publishing becomes visible within days instead of quietly going missing. The bands themselves are not yet calibrated against the actual publication rhythms of the 97 bodies currently covered, and a parliament in recess is indistinguishable from one whose interface has broken. Until that is resolved, a red marker means “look here”, not “this body has a problem”.
Admin Panel, Data Quality, Freshness (admin.openparldata.ch/#/quality), filtered to the cantons: the age of the most recent record per data type, with its band. Negative values are records dated in the future, such as scheduled meetings. An exclamation mark flags an entry as overdue against the expected publication cadence of the body.#
Completeness against Official Seat Counts#
This is the one check that already compares our data against a reference from outside our own pipeline. For each body the official number of seats in the legislative and the executive is set against the members our data actually holds as active, and the difference is shown per chamber.
The comparison is harder than the two numbers suggest, and this is where the manual work sits. The groups we harvest do not contain only the members a seat count refers to: chancellors, secretariat staff and other functions appear as memberships and have to be excluded before the counts are comparable at all. A difference is therefore not automatically an error but a case that needs a judgement, which is why every body can carry a comment per chamber, recorded with its author and full change history. Of the 97 bodies, 75 are currently flagged as needing review, which is a fair description of how much of this work is still open.
Where a person is missing and has to be added by hand, the addition requires a source URL as evidence. The correction and the reason for it stay together.
Admin Panel, Data Quality, People / Seat counts (admin.openparldata.ch/#/quality?tab=persons), filtered to the cantons: official seats against active members for the legislative and the executive, with the difference. Show members opens the member list of the body for the review.#
Structural Consistency#
Eight named checks look for internal contradictions rather than for gaps: duplicate affairs, votes and speeches whose referenced meeting or person does not exist, meetings without agenda items, affairs without a state, votes without a result, and overlapping memberships. Each is recorded per body as an absolute count, as a share of the relevant total, and as a change against the previous daily snapshot, with a drilldown to the individual cases and a thirty-day series.
The point of the daily snapshot is that a regression should be visible as a movement, not only as an absolute number. As with timeliness, the indicators are not yet a verdict: several of them still surface cases that turn out to be legitimate on inspection, and separating those from real defects is precisely the manual work that has to happen before the numbers can carry weight.
Admin Panel, Data Quality, Consistency (admin.openparldata.ch/#/quality?tab=consistency), filtered to the cities: per check the number of affected records, their share, and the change against the previous daily snapshot.#
Drilldown of a single check, here Affairs without state for Horw: the thirty-day series of the daily snapshots and the affected records with their identifiers and titles, so that each case can be checked against the source.#
Open by Default#
The endpoints behind these views are public and require no authentication, among them
/public/quality/freshness,
/public/quality/persons-seats,
/public/quality/consistency
and /public/quality/timeseries. The ambition is that the
quality of the data should be as open as the data itself, so that our assessment of it can
be checked rather than believed.
While the indicators remain unvalidated, publishing them is a statement of intent more than a service. It is also the more useful way round: an indicator that is visible can be contested, and a contested indicator is the shortest path to one that can be trusted.