Wahlen Prognose Wahlanteile

Wahlen 2023


Hochrechnung Wahlanteile Schweiz

Hochrechnung Wahlanteile Schweiz
Partei % 2019 % 2023 d s
SVP 25.6 28 2.4 0
SP 16.8 18.3 1.5 0
Mitte 13.8 14.1 0.3 0
FDP 15.1 14 -1.1 0
GPS 13.2 9.8 -3.4 0
GLP 7.8 7.6 -0.2 0
Andere 1.8 2.8 1 0
EVP 2.1 2 -0.1 0
EDU 1 1.2 0.2 0
PdA/Sol. 1 0.7 -0.3 0
Lega 0.8 0.5 -0.3 0
MCR 0.2 0.5 0.3 0
FGA 0.3 0.2 -0.1 0
LPS   0.2 0.2 0
SD 0.1 0.1 0 0
CSP 0.3 0.1 -0.2 0
s_avg
0

Code

read "kantonsresultate.csv"
read "kantone.csv"
join natural
extend w = round(proj_sum/sitze)
extend wmin = round(projmin_sum/sitze)
extend wmax = round(projmax_sum/sitze)
project p, w sum, wmin sum, wmax sum
project inline w_sum sum
project inline wmin_sum sum
project inline wmax_sum sum
extend perc = round(1000*w_sum/w_sum_sum)/10
extend percmin = round(1000*wmin_sum/wmin_sum_sum)/10
extend percmax = round(1000*wmax_sum/wmax_sum_sum)/10
project p, perc, percmin, percmax
read "parteien.csv"
join natural
read "letztewahl_ch.csv"
project p, w_alt
join left
project partei, w_alt, perc, percmin, percmax
extend c = percmin
update percmin = percmax where percmin > percmax
update percmax = c where percmin = percmax
project partei, w_alt, percmin, perc, percmax
order perc 9
label w_alt "% 2019", percmin "2023 min", perc "% 2023", percmax "2023 max", partei "Partei"
dup
select partei regex "SVP|^SP|FDP|Mitte|GPS|GLP|EVP"
extend s = abs(percmax-percmin)/2
update percmin = perc - s
update perc = s
update percmax = s
project partei, w_alt, percmin, perc, percmax
' Hochrechnung Wahlanteile Schweiz
delegate "barchart -colors #ccc,#040,#6a6,#ada -rough -stacks 0,1,1"
' Hochrechnung Wahlanteile Schweiz
pop
extend d = perc - w_alt
extend s = abs(percmax-percmin)/2
project partei, w_alt, perc, d, s
print
project s avg
print