NATION

PASSWORD

How to simulate FPTP elections [Tutorial]

A place to put national factbooks, embassy exchanges, and other information regarding the nations of the world. [In character]
User avatar
Unibot III
Negotiator
 
Posts: 7113
Founded: Mar 11, 2011
Democratic Socialists

How to simulate FPTP elections [Tutorial]

Postby Unibot III » Mon Feb 20, 2023 8:15 pm

How to simulate FPTP elections [Tutorial]

By Unibot


Introduction

Since May of last year I have been promising to release a 'calculator' that would demonstrate how to simulate the results of First-Past-The-Post (FPTP) elections. Regrettably, real life and work commitments delayed this release. I - AM - SO - SORRY.

Simulating FPTP results can be a useful exercise for roleplayers in generating new, creative storylines that are consistent with an established political geography in cases where your nation elects legislators by single-member plurality.

The Simulator

What I have designed is not a ready-made model, but a proof of concept that users can download here and adapt to your own ends. Any simulator that you plan to use for your nation-state will need to be heavily customized (e.g., # of districts, district names, parties).

Image

Guests should be able to copy / download the sheet, but let me know if there are issues with the sharing privileges.

Image


The example model encompasses only eleven districts, but you could adapt the same spreadsheet to accommodate hundreds of districts. My own simulator for Unibot calculates results for more than three hundred districts, for instance.

The spreadsheet breaks the simulation step-by-step in each tab and provides examples of how popular vote shares can be randomized and translated over a set of electoral districts.

Image

Introducing ... a Proportional Swing Model

The process that I use for simulating FPTP results will be familiar to any poll aggregator as it is a basic proportional swing model used every day to predict seat counts based on national polls except in this case the electoral districts, the popular vote, and the regional variation are all fictitious.

Image

In general, to simulate a result you must:
    1. Create a randomized set of national popular vote shares for each party.
    2. Modify these vote shares for each electoral district based on a fixed modifier. A negative modifier signifies that a party underperforms in a given district and a high modifier signifies that a party overperforms in a given district.
    3. Ensure the vote shares after modification equal no more than one by redistributing the surplus proportionally.

You can also further simulate the result by considering turnout and the number of electors.

Image

The Ghost in the Machine: Modifiers

I wanted to take a moment to discuss world-building for first-past-the-post, because in my mind, the local dynamics are what provide character to these results. When designing a set of political parties, you should consider (1) what political cleavages exist within the nation, and (2) how geography influences these political cleavages.

A country may be divided by the competing interests of different industries or rural/urban economies, ethnic or religious groups, education levels, or age. Urban electoral districts may demarcate multiple districts within one urban centre, whereas rural electoral districts may encompass many communities. Communities may be purposefully located by rivers, railways, or other geographical features.

For instance, when I designed Unibot's political parties, which exist within a corporatocracy, I regarded the country's major fault-lines as a voter's relation to industry and its association/identification with rival families that played a founding role within the corporation.

The financial district backed the Conservative Party of Unibot (CPU) which was tied closely to surrogates of vengeful former presidents, Ulas Dorenbos and John Wolverton Sr. . Those involved in research and technology, including testing and exports, were inclined to support a centrist party, Unibot Advance (UA) which was led by the Freeman-Wager family and cynically latched itself on to the legacy of the company's late founder, Eduard Heir. The Labour Party of Unibot (LPU) competed with the National Party of Unibot (NPU) for blue-collar votes in the factory towns dotting the shoreline. Nationalists from the Stash Kroh diaspora backed the Krohian Independence Party (KIP).

Once you have a strong sense of the reception that each party would receive in each electoral district, you're ready to build a simulator. This "reception" constitutes a modifier for the purposes of the simulator, and it is its core element.

Image

For example, in the example model, the Blue Party and the Yellow Party overperform in the first electoral district, Western Shore—Skytown.

Perhaps that is because Western Shore—Skytown is relatively wealthy and the Blue and Yellow parties are advocating for lower income and sales taxes that don't appeal the Red/Purple base who would favor more investment in social security and healthcare? Whatever the case, it's this kind of logic, based within your own world-building, that should help to inform the modifiers that your simulator uses.

Wow! What else can I do to simulate elections?

You could take this concept and go further to create tracking polling data to base newspaper stories on, perhaps? Or maybe you would like to incorporate a set of socioeconomic variables, like unemployment, that could influence the national popular vote, so that your roleplaying influences the actual results?

I've also built simulators for ranked ballot leadership races (messy) and leadership referendums (easy). The sky is the limit in terms of what you can do. I'm personally excited about leveraging AI art to mass produce headshots for bit characters, like backbench politicians or athletes in NS Sports, to help bring some personality to the name and description.

Currently, I'm working on using QGIS to create a map of Unibot with electoral districts, so I can easily map election or statistical survey results. But alas, I lack the time & motivation these days to finish the job, but it's a relatively easy task once you learn the basics of mapping in QGIS.

Image
Image

Leave your questions and feedback below - happy to discuss anything, even if its just to geek out about swing models or maps or something.
Last edited by Unibot III on Mon Feb 20, 2023 8:47 pm, edited 2 times in total.
[violet] wrote:I mean this in the best possible way,
but Unibot is not a typical NS player.
Milograd wrote:You're a caring, resolute lunatic
with the best of intentions.
Org. Join Date: 25-05-2008 | Former Delegate of TRR

Factbook // Collected works // Gameplay Alignment Test //
9 GA Res., 14 SC Res. // Headlines from Unibot // WASC HQ: A Guide

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
✯ Duty is Eternal, Justice is Imminent: UDL

User avatar
-Northumbria
Chargé d'Affaires
 
Posts: 407
Founded: Oct 28, 2022
Ex-Nation

Postby -Northumbria » Tue Feb 21, 2023 2:29 am

Well, this is a bit disappointing given the wait.

User avatar
New Treyland
Envoy
 
Posts: 255
Founded: Apr 06, 2022
Civil Rights Lovefest

Postby New Treyland » Tue Feb 21, 2023 6:42 am

Hopefully soon I can use it for parliament elections! Looking forward to it.

User avatar
Unibot III
Negotiator
 
Posts: 7113
Founded: Mar 11, 2011
Democratic Socialists

Postby Unibot III » Tue Feb 21, 2023 9:48 am

-Northumbria wrote:Well, this is a bit disappointing given the wait.


Sorry to disappoint but it’s not possible really for a “universal” FPTP calculator to be created. For a model to be FPTP, it needs to be customized to include the local context: regional variations versus the national popular vote.

This spreadsheet demonstrates a model that can be scaled up to include as many ridings as you need to accommodate, and you can alter the modifiers as need be. FPTP is all about the local ground — what cleavages within a society drives support riding-by-riding, poll-by-poll.

If you decide to take up the challenge of adapting this model to your nation-state, let me know if you encounter any difficulties — I’d be happy to answer any questions, no matter how technical, in this thread.
Last edited by Unibot III on Tue Feb 21, 2023 9:57 am, edited 2 times in total.
[violet] wrote:I mean this in the best possible way,
but Unibot is not a typical NS player.
Milograd wrote:You're a caring, resolute lunatic
with the best of intentions.
Org. Join Date: 25-05-2008 | Former Delegate of TRR

Factbook // Collected works // Gameplay Alignment Test //
9 GA Res., 14 SC Res. // Headlines from Unibot // WASC HQ: A Guide

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
✯ Duty is Eternal, Justice is Imminent: UDL

User avatar
Merulla
Spokesperson
 
Posts: 127
Founded: Jul 24, 2020
Left-Leaning College State

Postby Merulla » Tue Feb 21, 2023 9:58 am

Can I leave a stake here so I can read this later?
Merulla is the land of the brave, the fair and of the heroes.

A great kingdom consisting of fifteen federative like states, with a decentralized power, where the real king is the Merullean people.

Come and discover Merulla, where the waves are born.

The Great Kingdom of Merulla
the land of greatness from small beginnings

User avatar
Unibot III
Negotiator
 
Posts: 7113
Founded: Mar 11, 2011
Democratic Socialists

Postby Unibot III » Tue Feb 21, 2023 10:42 am

Merulla wrote:Can I leave a stake here so I can read this later?


Please do! I think the thread itself will make more sense after copying/downloading the spreadsheet model to review the steps and the process involved.
[violet] wrote:I mean this in the best possible way,
but Unibot is not a typical NS player.
Milograd wrote:You're a caring, resolute lunatic
with the best of intentions.
Org. Join Date: 25-05-2008 | Former Delegate of TRR

Factbook // Collected works // Gameplay Alignment Test //
9 GA Res., 14 SC Res. // Headlines from Unibot // WASC HQ: A Guide

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
✯ Duty is Eternal, Justice is Imminent: UDL

User avatar
Juansonia
Minister
 
Posts: 2280
Founded: Apr 01, 2022
Left-wing Utopia

Postby Juansonia » Tue Feb 21, 2023 4:22 pm

Would this be a good way to simulate referendums if the parties are reduced to two(yes party and no party)?
Last edited by Juansonia on Tue Feb 21, 2023 4:22 pm, edited 1 time in total.
Hatsune Miku > British Imperialism
IC: MT if you ignore some stuff(mostly flavor), stats are not canon. Embassy link.
OOC: Owns and (sometimes) wears a maid outfit, wants to pair it with a FN SCAR-L. He/Him/His
Kernen did nothing wrong.
Space Squid wrote:Each sin should get it's own month.

Right now, Pride gets June, and Greed, Envy, and Gluttony have to share Thanksgiving/Black Friday through Christmas, Sloth gets one day in September, and Lust gets one day in February.

It's not equitable at all
Gandoor wrote:Cliché: A mod making a reply that's full of swearing after someone asks if you're allowed to swear on this site.

It makes me chuckle every time it happens.
Brits mistake Miku for their Anthem

User avatar
Unibot III
Negotiator
 
Posts: 7113
Founded: Mar 11, 2011
Democratic Socialists

Postby Unibot III » Tue Feb 21, 2023 7:09 pm

Juansonia wrote:Would this be a good way to simulate referendums if the parties are reduced to two(yes party and no party)?


A-hah, you mean generating a referendum with results from every district/region? That’s very clever. You could adapt the model to do that, yes.

I had not thought to use the model for that. Good one!
Last edited by Unibot III on Tue Feb 21, 2023 7:10 pm, edited 1 time in total.
[violet] wrote:I mean this in the best possible way,
but Unibot is not a typical NS player.
Milograd wrote:You're a caring, resolute lunatic
with the best of intentions.
Org. Join Date: 25-05-2008 | Former Delegate of TRR

Factbook // Collected works // Gameplay Alignment Test //
9 GA Res., 14 SC Res. // Headlines from Unibot // WASC HQ: A Guide

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
✯ Duty is Eternal, Justice is Imminent: UDL

User avatar
-Astoria-
Negotiator
 
Posts: 5537
Founded: Oct 27, 2019
Left-wing Utopia

Postby -Astoria- » Thu Feb 23, 2023 11:49 am

Would it be possible to be able to use a "other choices" party (ie remaining votes not directed to the main parties) that doesn't receive seats?
4,554th post
Last edited by -Astoria- on Thu Feb 23, 2023 11:50 am, edited 1 time in total.
                                                      Republic of Astoria | Pobolieth Asdair                                                      
Bedhent cewsel ein gweisiau | Our deeds shall speak
IC: FactbooksLocationEmbassiesFAQIntegrity | OOC: CCL's VP • 9th in NSFB#110/10: DGES
 ⌜✉⌟ TV1 News | 2023-04-11  ▶ ⬤──────── (LIVE) |  Headlines  Winter out; spring in for public parks • Environment ministry announces A₤300m in renewables subsidies • "Not enough," say unions on A₤24m planned Govt cost-of-living salary supplement |  Weather  Liskerry ⛅ 13° • Altas ⛅ 10° • Esterpine ☀ 11° • Naltgybal ☁ 14° • Ceirtryn ⛅ 19° • Bynscel ☀ 11° • Lyteel ☔ 9° |  Traffic  ROADWORKS: WRE expwy towards Port Trelyn closed; use Routes P294 northbound; P83 southbound 

User avatar
Sauros
Envoy
 
Posts: 240
Founded: Apr 24, 2020
Left-wing Utopia

Postby Sauros » Fri Mar 03, 2023 5:57 pm

Thank you so much! I'll look into this soon.

Apologize for the nagging also.
DEMOCRATIC SOCIALIST UNION OF SAUROS
_______________________________________________
Capital: Walkeri
Executive Leader / H.O.S: Allan R. Challenger
Population (Canon): ~103 Million
A scientifically-advanced, left-wing and continent-spanning nation; with a pristine environment that just so happens to have dinosaurs (along with other associated prehistoric creatures). Also situated where the continent of Australia is in real life.
_______________________________________________
Factbooks


Advertisement

Remove ads

Return to Factbooks and National Information

Who is online

Users browsing this forum: No registered users

Advertisement

Remove ads