# Spécifications de format des votes

Acceptable file formats are files which are generated by hand, by the "Wabsti Elections and Referenda (VRSG)" election program or the web application itself.

«Municipalité» fait référence à un district, une circonscription électorale, etc.

## Contenu

[Standard format](#standard-format)

[Wabsti](#wabsti)

[OneGov](#onegov)


## Standard format

There is generally one CSV/Excel file per referendum proposal. However, should the referendum include a counter-proposal and a tie-breaker, then three files need to be delivered: One file with the results of the referendum, one file with the results of the counter-proposal and one file with the results of the tie-breaker.

### Colonnes

Each line contains the result of a single municipality, provided that this has been counted in full. The following columns are expected in the order listed here:

Nom|Description
---|---
`Bezirk`|The district in which the municipality is located. If the municipality is not located in a district, this field can be left empty.
`ID`|The municipality number (BFS number) at the time of the vote. A value of `0` can be used for expats.
`Name`|The name of the municipality.
`Ja Stimmen`|The number of “yes” votes. If the word `unbekannt` is entered, the line will be ignored (not yet counted).
`Nein Stimmen`|The number of “no” votes. If the word `unbekannt` is entered, the line will be ignored (not yet counted).
`Stimmberechtigte`|The number of persons eligible to vote. If the word `unbekannt` is entered, the line will be ignored (not yet counted).
`Leere Stimmzettel`|The number of blank ballot papers. If the word `unbekannt` is entered, the line will be ignored (not yet counted).
`Ungültige Stimmzettel`|The number of spoilt ballot papers. If the word `unbekannt` is entered, the line will be ignored (not yet counted).

### Résultats temporaires

Municipalities are deemed not to have been counted yet if the municipality is not included in the results.

### Modèle

[vote_standard.csv](https://raw.githubusercontent.com/OneGov/onegov.election_day/master/docs/templates/vote_standard.csv)


## Wabsti

The format of the "Wabsti Elections and Referenda (VRSG)" election program consists of a single file which contains all the data for many referenda. There is a line for every referendum and municipality.

### Colonnes

Les colonnes suivantes seront évaluées et devraient exister :

Nom|Description
---|---
`Vorlage-Nr.`|A sequential number for each proposal/referendum. Must be specified at the upload dialog.
`Name`|The name of the municipality
`BfS-Nr.`|The municipality number (BFS number). If `name = Auslandschweizer`, any value can be used for exapts.
`Stimmberechtigte`|The number of persons eligible to vote.
`leere SZ`|The number of blank ballot papers.
`ungültige SZ`|The number of spoilt ballot papers.
`Ja`|The number of “yes” votes.
`Nein`|The number of “no” votes.
`GegenvJa`|The number who voted “yes” to the counter-proposal.
`GegenvNein`|The number who voted “no” to the counter-proposal.
`StichfrJa`|The number who voted “yes” to the tie-breaker.
`StichfrNein`|The number who voted “no” to the tie-breaker.
`StimmBet`|The turnout as a percentage. Is used to decide whether the municipality has already been counted. If the turnout is `0`, the line is ignored (not yet counted).

### Résultats temporaires

Municipalities are deemed not to have been counted yet if one of the following two conditions apply:
- `StimmBet = 0`
- the municipality is not included in the results

### Modèle

[vote_wabsti.csv](https://raw.githubusercontent.com/OneGov/onegov.election_day/master/docs/templates/vote_wabsti.csv)


## OneGov

The format used by the web application for the export consists of one single file per vote. There is a line for every municipality and type of referendum (proposal, counter-proposal, tie-breaker).

### Colonnes

Les colonnes suivantes seront évaluées et devraient exister :

Nom|Description
---|---
`type`|`proposal` (proposition), `counter-proposal` (contre-proposition) ou `tie-breaker` (jeu décisif).
`group`|La désignation du résultat. Peut être le district, le nom de la ville divisé par un slash, le nom de la ville et le district de la ville divisés par un slash ou simplement le nom de la ville. Cela dépend entièrement du canton.
`entity_id`|La référence de la municipalité/localité. A value `0` represents the expats.
`counted`|Vrai si le résultat a été compté, faux si le résultat n'est pas encore connu (le compte des votes n'est pas encore fini).
`yeas`|Nombre de votes oui
`nays`|Nombre de votes non
`invalid`|Nombre de votes invalides.
`empty`|Nombre de votes blancs
`elegible_voters`|Nombre de personne aptes à voter.


### Résultats temporaires

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

### Modèle

[vote_onegov.csv](https://raw.githubusercontent.com/OneGov/onegov.election_day/master/docs/templates/vote_onegov.csv)
