Country Presets
ElectoralSim includes pre-configured setups for 23 countries plus the EU Parliament.
Available Presets
| Preset | Country | System | Seats | Parties |
|---|---|---|---|---|
india |
India | FPTP | 543 | 17 |
usa |
USA | FPTP | 435 | 2 |
uk |
UK | FPTP | 650 | 5 |
germany |
Germany | MMP (PR) | 598 | 6 |
brazil |
Brazil | PR | 513 | 7 |
france |
France | Two-Round | 577 | 4 |
japan |
Japan | Mixed | 465 | 5 |
australia_house |
Australia | IRV | 151 | 5 |
australia_senate |
Australia | STV | 76 | 4 |
south_africa |
South Africa | PR | 400 | 5 |
canada |
Canada | FPTP | 338 | 5 |
chile |
Chile | PR | 155 | 6 |
ireland |
Ireland | PR-STV | 39 | 6 |
israel |
Israel | PR | 120 | 6 |
mexico |
Mexico | FPTP | 300 | 6 |
netherlands |
Netherlands | PR | 150 | 8 |
norway |
Norway | PR | 169 | 7 |
nz |
New Zealand | MMP | 120 | 6 |
scotland |
Scotland | AMS | 129 | 5 |
spain |
Spain | PR | 350 | 6 |
sweden |
Sweden | PR | 349 | 7 |
switzerland |
Switzerland | PR | 200 | 5 |
wales |
Wales | AMS | 60 | 4 |
Using Presets
Quick Start
from electoral_sim import ElectionModel
model = ElectionModel.from_preset("germany", n_voters=100_000)
results = model.run_election()
Override Parameters
Access Config Directly
from electoral_sim import germany_config
config = germany_config(n_voters=100_000)
print(f"System: {config.electoral_system}")
print(f"Parties: {[p.name for p in config.parties]}")
Specialized Simulations
India (Full Simulation)
For state-wise breakdown and alliance tracking:
from electoral_sim import simulate_india_election
result = simulate_india_election(
n_voters_per_constituency=1000,
seed=42
)
See India documentation for details.
EU Parliament
27 member states, 720 MEPs, 8 political groups:
from electoral_sim import simulate_eu_election
result = simulate_eu_election(
n_voters_per_mep=500,
seed=42
)
See Countries documentation for details.
Detailed Documentation
- India (Lok Sabha) — 543 constituencies, state-level results
- Other Countries — USA, UK, Germany, EU, and more