Update (2025)
I have rebuilt this tool using modern JavaScript for faster performance.
In this blogpost I will talk about a software that I created using R Shiny. This software allows you to enter vote shares for parties that compete in 2023 Turkish General Elections for each electoral district. It then calculates the seat distribution using the D'Hondt method and creates a table for the seat distribution.
Context: The 2023 Election Systems
2023 General Elections in Turkey sparked a debate on the best way to enter the election for parties. First, the threshold was decreased to 7% but the alliance voting system—which allowed parties to benefit from the distribution of alliance votes—was removed. Following these changes, the discussion revolved around how smaller parties should enter the election and whether larger parties of the alliance can benefit from entering the election under a single ticket (entering under the most powerful party in that district) so that they will receive the most seats.
In People’s Alliance, HUDA-PAR and DSP entered the election under the incumbent AKP, and MHP entered the election as a party. In Nation Alliance, Gelecek, Deva, DP, and SP entered the election from CHP lists and IYIP entered on its own. The same issue was also discussed in Labour and Freedom Alliance where YSP and TIP entered under a general ticket in some districts but on their own in others. Turkey has 87 electoral districts with d’Hondt being used to allocate seats to parties in all of them.
The Simulator
Following this discussion, I developed a parliamentary election simulator for the 2023 Turkish National Elections. This application allows you to select a specific district and input the vote shares for different political parties. Using the D'Hondt method, the application calculates the allocation of seats for each party within that district.
You can access the original R-Shiny version here:
2023 Turkish Parliamentary Election Simulator (ShinyApps)
In this app, you can choose the electoral district that you would like to simulate. Changing the district will also change the total number of seats to be allocated as shown in the table on the right.
One positive aspect of this simulator is that you are able to enter either the vote share or the number of votes received, depending on your preference and the precision you would like.
Features
According to news sites in the 2018 elections, CHP won 35.78%, IYI won 12.5%, AKP won 29.57%, MHP won 10.58%, and HDP won 8.56% of the vote. We can enter these numbers into our simulator. When entering the vote shares you can notice two features:
- Live Verification: You can see the total number of votes entered at the bottom of the right table. This ensures you do not have to worry about going above 100% or making calculation errors.
- Dynamic Sorting: When you enter a party's vote it will be placed above others in the table automatically based on results. For example, if you entered CHP's vote last; it will be placed at the top of the table since they earned the most seats from the district.