We simulates the 2022 French legislative election by using the score of the previous Presidential election in each circumscription. Our goal is to objectively confirm or deny the assertion of the NUPES alliance that "there's a chance" for them to achieve their goal of obtaining a majority.
Our goal is not to accurately predict the result of the election, which mean that we will make many assumptions and use a simplified model of human behavior. Remember that models and analyses are not what decide an election, it's the voters that decide the results by casting their ballots.
We use this JSON file generated by Indivisibles.fr as input. It contains the results of the presidential election in 566 circumscriptions.
The input file contains only 566 circumscriptions, so less than the 577 seats in the Assemblée Nationale. Our analysis focus on those 566 elections.
We simulate the 566 first round by directly converting the presidential result into legislative results. This gives us a list of candidates for the second round according to the current election system.
We then simulate the 2nd round by applying the following steps:
- If a candidate is in the 2nd round, all their electors will vote for them again
- If a candidate is not in the 2nd round, their electors will all vote for another candidate, based on a preference list that we designed
- If a "far-right" candidate is the best placed at the 1st round, a "Republican Front" will activate, where all non-far right voters will move their vote to the 2nd best-placed candidate.
This is of course a simplification, that does not take into accounts the following factors:
- Non-voters
- Voters who change their vote between 2 rounds (such as tactical voters)
- Voters who do not want to participate in the "Republican Front"
- The possibility of a "right-wing republican front" against the NUPES alliance
- Pre-elections alliances others than NUPES and ENSEMBLE.
(Too Long;Didn't Run the code)
Here is the output of the code
566 departments
Majority = 283
Potential 1st round wins:
nupes = 37
centre_droit = 11
extreme_droite = 5
Simulating 566 elections...
= RESULTS =
tripartites count 479
quadripartites count 23
front republicain deputies: 233
Deputies count {'nupes': 293, 'macron': 256, 'pecresse': 1, 'lepen': 16, 'zemmour': 0}
We see that, by applying the presidential election voters to the legislative election, the hypothesis that "there is a chance" for NUPES to win is confirmed.
Note that since the presidential election and the announcement of NUPES, the polls show even better national enthusiasm for NUPES.
This doesn't mean the election is in the bag however, as there are many ways for reality to deviate from this simplistic model (for example, historically turnout is far lower in the legislative election).