Format Specification Elections

As file formats, CSV, XLS or XLSX files are accepted, which are generated by “Wabsti elections and votes (VRSG)” or by the web application itself. If a table is to be created by hand, then the format of the web application (OneGov) is the easiest.

Content

Preface

Entities

An entity is either a municipality (cantonal instances, communal instances without quarters) or a quarter (communal instances with quarters).

Tacit Elections

Tacit elections can be uploaded by using the OneGov format with every vote set to 0.

Regional Elections

When uploading results of a regional election, only entities of one district are excepted to be present, if the corresponding option is set on the election.

Formats

Onegov

The format, which will be used by the web application for the export, consists of a single file per election. There is a row for each municipality and candidate.

Columns

The following columns will be evaluated and should exist:

Name

Description

election_absolute_majority

Absolute majority of the election, only if Majorz election.

election_status

Status of the election. interim (intermediate results), final (final results) or unknown.

entity_id

BFS number of the municipality. A value of 0 can be used for expats.

entity_counted

True if the result was counted.

entity_eligible_voters

Number of persons entitled to vote in municipality.

entity_expats

Number of expats in the unit. Optional.

entity_received_ballots

Number of submitted ballots in municipality.

entity_blank_ballots

Number empty ballots in municipality.

entity_invalid_ballots

Number invalid ballots in municipality.

entity_blank_votes

Number empty votes in municipality.

entity_invalid_votes

Number invalid votes in municipality. Zero if Proporz election.

list_name

Name of list of candidate. Only with Proporz elections.

list_id

ID of the list of the candidate. Only with Proporz elections. Can be numeric or alphanumeric.

list_color

The color of the list as a hexadecimal value, e.g. #a6b784.

list_number_of_mandates

Total number of mandates of the list. Only with Proporz elections.

list_votes

Number of list votes per municipality. Only with Proporz elections.

list_connection

ID of the list connection or superordinate list connection (in case list_connection_parent is present). Only with Proporz elections.

list_connection_parent

ID of the superordinate list connection. Only with Proporz elections. Must be empty if not subordinates lists are present.

candidate_id

ID of the candidate.

candidate_family_name

Surname of the candidate.

candidate_first_name

First name of the candidate.

candidate_elected

True, if the candidate was elected.

candidate_party

The name of the party.

candidate_party_color

The color of the party as a hexadecimal value, e.g. #a6b784.

candidate_gender

The gender of the candidate: female, male or undetermined. Optional.

candidate_year_of_birth

The year of the candidate. Optional.

candidate_votes

Number of candidate votes in municipality.

List panachage results

The results may contain list panachage results by adding one column per list:

Name

Description

list_panachage_votes_from_list_{XX} / panachage_votes_from_list_{XX}

The number of votes the list got from the list with list_id = XX. A list_id with the value 999 marks the votes from the blank list. Votes from the own list are ignored.

Candidate panachage results

The results may contain candidate panachage results by adding one column per list:

Name

Description

candidate_panachage_votes_from_list_{XX}

The number of votes the candidate got from the list with list_id = XX. A list_id with the value 999 marks the votes from the blank list.

Temporary results

Municipalities are deemed not to have been counted yet if one of the following two conditions apply:

  • counted = false

  • the municipality is not included in the results

If the status is

  • interim, the whole election is considered not yet completed

  • final, the whole election is considered completed

  • unknown, the whole election is considered completed, if all (expected) municipalities are counted

Election compounds

The results of election compounds can be uploaded in a bundle by providing a single file with all the rows of the results of each election.

Template

WabstiCExport Majorz

Version >= 2.2 is supported, please refer to the documentation provided by the exporter program for more information about the columns of the different files.

WabstiCExport Proporz

Version >= 2.2 is supported, please refer to the documentation provided by the exporter program for more information about the columns of the different files.

Party results

Each (proporz) election and each election compound may contain party results. These results are independent of the other results and typically contain the already aggregated results of the different lists of a party.

The following columns will be evaluated and should exist:

Name

Description

domain

The domain of influence to which the line applies. Optional.

domain_segment

The unit of the domain of influence to which the line applies. Optional.

year

The year of the election.

total_votes

The total votes of the election.

name

The name of the party in the default language. Optional*.

name_{locale}

Translated name of the party, e.g. name_de_ch for the German name. Optional. Make sure to provide the name of the party in the default language either with the name or name_{default_locale} column.

id

ID of the party (any number).

color

The color of the party as a hexadecimal value, e.g. #a6b784.

mandates

The number of mandates.

votes

The number of votes.

voters_count

Voters count. The cumulative number of votes per total number of mandates per election. For election compounds only.

voters_count_percentage

Voters count (percentage). The cumulative number of votes per total number of mandates per election (percentage). For election compounds only.

Domain of influence

domain and domain_segment allow to provide party results for a different domain of influence other than that of the election or the compound. domain corresponds to a subdomain of influence of the election or compound, e.g. for cantonal parliamentary elections superregion, region, district or municipality depending on the canton. domain_segment corresponds to a unit in this subdomain of influence, e.g. Region 1, Bergün, Toggenburg or Zug. Normally, both domain and domain_segment can be empty or omitted. Normally both domain and segment_domain can be left blank or omitted; in this case domain is implicitly set to the domain of the election or compound. Currently, only the domain of the election or compound is supported, as well as domain='superregion for compounds.

Panachage results

The results may contain panachage results by adding one column per party:

Name

Description

panachage_votes_from_{XX}

The number of votes the party got from the party with id = XX. An id with the value 999 marks the votes from the blank list.

Panachage results are only added if:

  • year matches the year of the election

  • id (XX) does not match the id of the row

Template