Sample bubble chart
read "ef2015.csv"
extend jahr = 2015
read "ef2019.csv"
extend jahr = 2019
union
project inline kanton, jahr, fiktive_waehlende sum
extend wahlanteil = fiktive_waehlende / fiktive_waehlende_sum
select partei == "GPS"
dup
project kanton, jahr, wahlanteil
deserialize
swap
project kanton, fiktive_waehlende_sum avg
// scale bubbles to pixels
update fiktive_waehlende_sum_avg = fiktive_waehlende_sum_avg / 20000
join natural
label _2015 "GPS"
delegate "bubblechart -colors green"
print
kanton | GPS | 2019 | fiktive_waehlende_sum_avg |
---|---|---|---|
Aargau | 0.054699359813 | 0.09781515812 | 9.689624974983 |
Basel-Landschaft | 0.141946447834 | 0.179956924321 | 4.157225049996 |
Basel-Stadt | 0.111801286892 | 0.176950322124 | 2.736899999986 |
Bern / Berne | 0.085068155108 | 0.135850420564 | 17.543524975117 |
Fribourg / Freiburg | 0.052855051944 | 0.124637955254 | 4.462375000026 |
Genève | 0.11467571274 | 0.24611560228 | 5.07767499998 |
Glarus | 0.027493102089 | 0.5074 | |
Graubünden / Grigioni / Grischun | 0.055164734579 | 2.91710005 | |
Jura | 0.072749624863 | 0.156239544894 | 1.257700025003 |
Luzern | 0.070726947628 | 0.122282280478 | 6.730549999986 |
Neuchâtel | 0.0930884808 | 0.208081268403 | 2.246024975013 |
Schaffhausen | 0.034234729337 | 0.068296305019 | 1.535575024995 |
Schwyz | 0.014063653137 | 0.02609770846 | 2.634825 |
Solothurn | 0.055552994152 | 0.114172107104 | 4.167549974995 |
St. Gallen | 0.057460045162 | 0.105356506437 | 6.995125024986 |
Thurgau | 0.054373874605 | 0.105991751305 | 3.715924974993 |
Ticino | 0.035280994265 | 0.121137413954 | 5.595174999972 |
Uri | 0.26282844958 | 0 | 0.6622 |
Valais / Wallis | 0.048884399201 | 0.105883539641 | 6.116649999996 |
Vaud | 0.112503453229 | 0.196775988825 | 9.093599974986 |
Zug | 0.071574869954 | 0.192295270865 | 1.958924975001 |
Zürich | 0.068892244905 | 0.140771127038 | 21.178550025069 |