Linking External Sources#
The following use cases illustrate two approaches to data contribution: linking parliamentary persons to smartvote profiles and using Wikidata as a shared identifier.
Together, they demonstrate how automated matching, human review and traceable decisions support data quality, while highlighting opportunities for a more collaborative contribution process.
Use Case 1: Linking Persons with smartvote#
smartvote publishes candidacies for each election, including a stable user identifier, name, year of birth, party, place of residence and election outcome. For this project, we established contact with smartvote, which granted OpenParlData.ch temporary access to its internal API to retrieve this data.
The candidacies are loaded into the OpenParlData.ch staging area, where each smartvote election is mapped to the corresponding parliamentary body. This currently covers federal elections, cantonal elections in Bern, Graubünden, Glarus, Nidwalden and Obwalden, and elections in fourteen municipalities.
Linking then runs in three steps:
1. Detection. The Admin Panel compares every candidacy with the persons of the corresponding body and proposes candidate pairs with a score:
Method |
Rule |
Score |
|---|---|---|
Name and birth year |
identical first and last name, same year of birth |
95 |
Fuzzy name and birth year |
same year of birth, full-name similarity of at least 0.85 |
up to 90 |
Name only |
identical first and last name, no year of birth available |
70 |
Names are normalised before the comparison (case, accents, whitespace). By default a pair is only proposed if the person belongs to the body that the election is for, so that a candidate for a cantonal parliament is not linked to the same person’s record in a city council. A pair that has already been confirmed or rejected is never proposed again.
2. Review. The proposed pairs are shown side by side in the Admin Panel, with name, photo, party, year of birth and place of residence from both sources. A user with the permission to edit persons confirms or rejects each pair, individually or in bulk. Because the link is strictly one-to-one, confirming a pair automatically rejects the competing proposals for the same smartvote candidate and the same person. Every confirmation and rejection is written to the activity log with user and timestamp, and every decision can be undone. At the time of writing, 2,673 links have been confirmed and 33 proposals rejected.
Admin Panel, Smartvote Reconciliation, confirmed links: the smartvote candidate on the left and the OpenParlData.ch person on the right, each with jurisdiction, party, year of birth and place of residence, the smartvote flags for incumbent and elected candidates, the match score, and who confirmed the link and when. The arrow on the right undoes the decision.#
The rejected proposals show why the review step cannot be skipped. Many of them are pairs with the same year of birth and very similar names, such as Anna Jäger and Anna Jegher or Dorothea Frey and Dorothea Frei, that the fuzzy matching rightly proposes and that are nevertheless different people. The deciding information, a different party or place of residence, is visible to a reviewer at a glance but is not a reliable rule for a machine, since people change parties and move.
Admin Panel, Smartvote Reconciliation, rejected proposals: candidate pairs with similar names and the same year of birth, scored between 86 and 90, that a reviewer has identified as different persons. Rejected pairs are kept so that they are never proposed again.#
3. Publication. Confirmed links are stored in a dedicated control table, which is the
durable source of truth and is independent of the nightly data loads. A nightly pipeline
materialises them as external links of type smartvote_profile, which are published
through the public /external_links endpoint of the API and are attached to the person.
On the public site, the link appears in the External links section of the person, next to the data harvested from the parliament itself, such as the declared interests from the municipality’s register.
Person page on openparldata.ch (openparldata.ch/item/persons/27516), French interface: the declared interests come from the register of interests of the municipal council of Yverdon-les-Bains, the smartvote profile below them from the confirmed link.#
In the API, the same link is part of the person record. An abridged response of api.openparldata.ch/v1/persons/27516?expand=*:
{
"id": 27516,
"body_key": "5938",
"fullname": "Hofer Aurélie-Maude",
"external_links": {
"data": [
{
"id": 347678,
"body_key": "5938",
"external_id": "1367737",
"person_id": 27516,
"created_at": "2026-06-18T14:39:11",
"updated_at": "2026-10-15T02:50:03",
"url": {
"de": "https://smartvote.ch/de/elections/26_st_yverdon_leg/candidacies/72296",
"fr": "https://smartvote.ch/fr/elections/26_st_yverdon_leg/candidacies/72296",
"it": "https://smartvote.ch/it/elections/26_st_yverdon_leg/candidacies/72296"
},
"name": {
"de": "Aurélie-Maude Hofer",
"fr": "Aurélie-Maude Hofer",
"it": "Aurélie-Maude Hofer"
},
"type_external": {
"de": "Smartvote - Profil",
"fr": "Smartvote - Profil",
"it": "Smartvote - Profilo"
},
"type_harmonized": { "en": "smartvote_profile" }
}
]
}
}
The external_id is the stable smartvote user identifier, which identifies the person
across elections, while the url points to the candidacy in the election that was used
for the match. type_harmonized allows a client to select all
smartvote links across bodies with a single filter.
flowchart LR
SV[smartvote<br/>candidacies] --> STG[Staging]
PARL[Parliament<br/>member lists] --> STG
STG --> DET[Detection<br/>scored proposals]
DET --> REV[Review in<br/>Admin Panel]
REV -->|confirmed| CTL[(Control table<br/>with audit trail)]
REV -->|rejected| CTL
CTL --> LINK[Nightly link<br/>pipeline]
LINK --> API[Public API<br/>/external_links]
Open points and scope boundaries in this use case:
One-directional linking: smartvote does not yet consume the confirmed links to connect its candidate profiles with parliamentary activity.
Coverage: only elected candidates can currently be linked, as only they appear in parliamentary member lists. Each new election also requires a manual mapping to the corresponding body in the staging pipeline.
Scope of smartvote data: OpenParlData.ch deliberately does not ingest detailed smartvote data, such as questionnaire answers or Smartspider profiles. The goal is to link existing datasets and make their relationship discoverable, not to reproduce smartvote’s data or functionality. Linking to a person’s smartvote profile is sufficient to make users aware that additional information is available.
Access to detailed data: smartvote does not provide a public API. Access to additional data would need to be arranged and paid for separately with Politools, the organisation operating smartvote.
What the Use Cases Show about Contributing#
The pattern generalises beyond these two sources:
- Link, do not copy
Each source remains responsible for its own data. OpenParlData.ch stores only the relation between identifiers, which keeps the provenance of every field clear and avoids a second, diverging copy of smartvote or Wikidata content.
- The machine proposes, a person decides
Matching is automated where it is cheap and reliable, but no link is published without a human decision. The scores order the work; they do not replace the judgement.
- Decisions are durable and attributable
Confirmations and rejections are kept apart from the nightly loads, so they survive every reload, and each of them names the person who made it.
- The result is open again
Confirmed links flow back into the public API. A third party, smartvote included, can use them without access to the Admin Panel.