Rehearsal Tool

The Elector Rehearsal Tool is a way to simulate election results using an Excel spreadsheet. The spreadsheet requires a sheet for each riding and each sheet organizes the results in steps that allow defining polling and votes by party.

Each riding sheet requires:

  • a header row with the party abbreviations as the header of each party column

  • Columns in this order:

    • Step

    • Total Polls

    • Polls Reported

    • Party columns (as many as you need)

There’s no limit to the number of parties for each riding and of course they should correspond to the parties in the specific riding. There’s even support for having more than one candidate in a riding which can happen when there are more than one independent candidates in a riding. To distinguish in that case, we use nomination order which is ordered on name in ascending order.

The parties use party abbreviations as defined in Flow:

It’s ok to skip parties if you don’t need results for all candidates. It’s also ok to have parties for candidates that might not exist for a riding. In that case, the column of data is ignored.

 

If you have more than one candidate in a riding for the same party, use <party>, <party>1, <party>2,… For example, if you have 3 IND parties, you would use the following in your sheet: IND, IND0, IND1,…

The data can be organized in unlimited steps and not all ridings need to have all the steps in each sheet. This allows some ridings to show results earlier or later than others.

The Elector database is updated using the Elector Rehearsal Tool

It is an application which reads the excel spreadsheet file and updates the database based on the data. It controls the time between steps, the excel file and database credentials:

Sample Data Generating Excel File

The attached file can be used to generate data that can be used by the Election Rehearsal Tool.

The weighted version includes additional logic to limit how often selected parties are favoured to win to produce more predictable final totals and more realistic progressions.

To use the files:

  • Open it in Excel (Example: Random Rehearsal Data.xlsm)

  • Enable macros if prompted

  • Run the GenerateWorksheets macro (Shortcut key: CTRL+Shift+C )

  • Save As - the results to a new file

  • Use the new file in the Elector Rehearsal Tool

A more in depth look at the generator file is documented.

Original Draft (15 steps)

Weighted (15 steps)

Weighted Long (75 steps)
This file for BC has 87 Ridings. It favours the LIB and NDP parties to win with a few GRN and maybe an IND.

This file for SK has 61 ridings. It favours the SP and NDP parties to win with with a few GRN and maybe an IND.

This file for ON has 124 ridings. It favours the PC party to win followed by the NDP with some LIB maybe a few GRN and possibly an IND.

Sample Random Data Test Files

The following sample files are randomly generated. They are ready to be run in the simulator.

This file for BC has 87 Ridings. It ends with 43 NDP, 34 LIB, 9 GRN and 1 IND.

This file for SK has 61 ridings. It ends with 44 SP, 14 NDP, 3 GRN.

This file for ON has 124 ridings. It ends with 69 PC, 36 NDP, 15 LIB, 3 GRN, and 1 IND.