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 tab: smartvote candidates and OpenParlData persons side by side

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 tab: pairs with similar names and the same birth year that are different persons

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 with declared interests and an external link to the smartvote profile

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.

Use Case 2: Wikidata as a Shared Identifier#

At present there is no identifier for persons or political groups that is shared across Swiss parliaments. Each parliament numbers its members, parties and parliamentary groups in its own system. A person who moves from a municipal council to a cantonal parliament and later to the Federal Assembly appears under a different key each time, and the same is true for a party that is represented at all three levels.

The proposed eCH standard for political actors, eCH-0294, therefore suggests the Wikidata identifier for this role: persons, groups, memberships and the other actors of the standard can carry a wikidata_uri, for example http://www.wikidata.org/entity/Q813067 for Beat Jans. Wikidata is open to every parliament regardless of its level or size, and it is maintained independently of any single publisher. For the federal parliament it already works in practice: 3,716 Wikidata items carry the Swiss parliament ID (P1307), which identifies members of the Federal Assembly since 1848 at parlament.ch.

OpenParlData.ch now has its own entity on Wikidata as well: the item OpenParlData (Q140026963) and the property OpenParlData ID (P14527), which points from a Wikidata item to the person page on openparldata.ch. A new property cannot simply be created by the party that wants to use it. It requires a property proposal that the Wikidata community discusses and supports before a property creator sets it up. With the property in place, the link is bidirectional. We can add our identifier to existing Wikidata items of persons, and we can create items from our data for persons that are not yet on Wikidata, within the notability rules of the Wikidata community. At the time of writing, 4,299 Wikidata items carry an OpenParlData ID.

Wikidata item of Corina Gredig with the Swiss parliament ID, the Zurich Kantonsrat member ID and the OpenParlData ID

Wikidata item of Corina Gredig (Q59140652), abridged to three of its identifier statements: the Swiss parliament ID 4267, the member ID of the cantonal parliament of Zurich, and the OpenParlData ID 21730. The item connects the identifiers of several parliaments with ours.#

Within OpenParlData.ch, a person record can carry a Wikidata identifier (Q-ID). These identifiers are set in the staging step of the individual parliaments, mostly from the manually maintained person tables per body, and are carried through to the data warehouse.

Once a Q-ID is present, it does three things:

Identity across bodies

In the person reconciler of the Admin Panel, a shared Q-ID is the strongest signal that two person records from different bodies are the same person, ahead of matches on name and birth date. Such pairs are proposed first, but they are still proposed, not merged automatically.

Outgoing links

A nightly pipeline turns every Q-ID into an external link of type wikidata_person. A second pipeline queries the Wikidata SPARQL endpoint for the Wikipedia articles about the same item in German, French, Italian, Romansh and English and stores them as wikipedia_person links. Wikidata is therefore not only an identifier but a hub from which further sources are reached without maintaining each of them ourselves.

Verifiable research

When a reviewer is unsure whether two records describe the same person, the Admin Panel offers an assisted check by a language model that can look up Wikidata items and open the official parliament pages. It is instructed to cite a Q-ID or URL for every external statement and to say so when it does not know. Its output is a recommendation; the decision stays with the reviewer.

Person page on openparldata.ch with three identities of Corina Gredig in different bodies

Person page on openparldata.ch (openparldata.ch/item/persons/21730), Identitäten: the same person as member of the Federal Assembly (active), of the municipal council of the city of Zurich and of the cantonal parliament of Zurich (both inactive). The federal and the municipal record share the Q-ID Q59140652; the cantonal record has no Q-ID and was linked in the person reconciler.#

External links of the person page on openparldata.ch, including Wikidata and Wikipedia

The Externe Links of the same person: the links of type wikidata_person and wikipedia_person are generated from the Q-ID, next to the confirmed smartvote link and the link to Année Politique Suisse.#

The same principle is applied beyond persons. Bodies (with separate identifiers for the legislative and the executive), harmonised affair types, affair states, group types and event texts can carry a Q-ID as well, so that third parties can align their vocabularies with ours without adopting our internal keys (see Contributing through the Admin Panel).

Open points in this use case: writing back to Wikidata has only started with the OpenParlData ID on person items. The identities that are verified in the person reconciler across bodies, and the confirmed smartvote links, are not yet exchanged with Wikidata, and there is no corresponding property for parties and parliamentary groups yet. For the eCH proposal to work across all levels, the parliaments themselves have to take part: the idea is that in future a parliament creates a new Wikidata item when a new member or group has none, and otherwise attaches its own identifier to the existing item.

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.