# Specifica Formato Voti

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

"Comune" si riferisce ad un distretto, una circoscrizione elettorale, etc.

## Contenuto

[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.

### Colonne

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:

Nome|Descrizione
---|---
`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).

### Risultati temporanei

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

### Modello

[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.

### Colonne

Saranno prese in considerazione le seguenti colonne e devono essere presenti:

Nome|Descrizione
---|---
`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).

### Risultati temporanei

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

### Modello

[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).

### Colonne

Saranno prese in considerazione le seguenti colonne e devono essere presenti:

Nome|Descrizione
---|---
`type`|`proposal` (progetto), `counter-proposal` (controprogetto) or `tie-breaker` (domanda eventuale).
`group`|Da dove viene il risultato. Si può trattare del distretto e del comune, separati da una barra, del nome della città e del nome del circolo, anch'essi separati da una barra, o del semplice nome di un comune. Tutto ciò dipende dal rispettivo Cantone.
`entity_id`|ID del comune/dell'ubicazione. A value `0` represents the expats.
`counted`|Vero, se lo spoglio è stato completato. Falso, se il risultato non è ancora noto (i valori non sono ancora corretti).
`yeas`|Numero di voti favorevoli
`nays`|Numero di voti contrari
`invalid`|Numero di voti nulli
`empty`|Numero di voti in bianco
`elegible_voters`|Numero di aventi diritto di voto


### Risultati temporanei

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

### Modello

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