Skip to content

Instantly share code, notes, and snippets.

@ginseng666
ginseng666 / data_turnout.csv
Last active August 29, 2015 14:19
Elections, Lower Austria, changes in turnout and electorate
number name region electorate_1995 electorate_2015 votes_1995 votes_2015 turnout_1995 turnout_2015 turnout_change voters_change votes_change voters_change_p votes_change_p
32101 Absdorf 3 1260 1736 1088 1268 86.35 73.04 -13.31 476 180 37.78 16.54
31701 Achau 4 954 1277 819 794 85.85 62.18 -23.67 323 -25 33.86 -3.05
30801 Aderklaa 2 147 218 125 161 85.03 73.85 -11.18 71 36 48.30 28.80
31301 Aggsbach 1 719 763 585 618 81.36 81.00 -0.37 44 33 6.12 5.64
31001 Alberndorf im Pulkautal 2 685 820 559 580 81.61 70.73 -10.87 135 21 19.71 3.76
31302 Albrechtsberg an der grossen Krems 1 1078 1137 868 874 80.52 76.87 -3.65 59 6 5.47 0.69
30601 Alland 4 2246 2769 1590 1706 70.79 61.61 -9.18 523 116 23.29 7.30
32501 Allentsteig 1 2293 2110 1803 1496 78.63 70.90 -7.73 -183 -307 -7.98 -17.03
30501 Allhartsberg 3 1325 1805 1172 1461 88.45 80.94 -7.51 480 289 36.23 24.66
@ginseng666
ginseng666 / data.csv
Last active August 29, 2015 14:19 — forked from jkeohan/data.csv
Location 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012
Australia 6.2 6 5.8 5.7 5.8 5.8 5.8 4.6 4.8 5.1 4.6
Austria 21.3 18.7 19.7 21 22.1 24.1 25.3 27.8 27.2 26.6 29.5
Belgium 1.3 1.5 1.6 2 2.3 2.7 3.1 3.8 4.2 4.9 5.1
Brazil 39.4 42 42.3 42.9 43.3 44.4 44.5 45.8 44 42.7 42.2
Canada 16.9 15.6 15.6 15.9 15.7 16.2 16.8 17.5 17.1 18 17.9
Chile 26.2 24.8 24.2 25.1 25.3 23.5 24.4 26.1 22 23.1 24.1
China (People's Republic of) 18.4 16.2 14.5 13.7 12.8 12.5 12.6 12.1 11.4 10.7 9.8
Czech Republic 3.7 3.4 3.8 4 4.2 4.7 4.9 5.8 6.3 6.9 7.5
Denmark 11 11.9 13.6 15 14.2 16.1 16.7 17.8 20 22.2 24.4
@ginseng666
ginseng666 / index.html
Created April 22, 2015 12:15
Polling Data Austria 2006-2015
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title>Polling Data Austria 2006-2015</title>
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<h1>Polling Data Austria, 2006-2015</h1>
<div id="teaser"><p>Newspapers publish opinion polls regularly. While single results for the so called "Sonntagsfrage" ("Who would you vote for at the moment?") fluctuate often, a time series can show some general trends - like a decline in support for SPOE and OEVP, the regain in strength of the FPOE (after almost breaking apart), the rise and fall of the BZOE after the death of its leader Joerg Haider or the limited success of new parties. Adding the margin of error shows another thing: Many times it is not possible to identify the strongest party with certainty. Since the last election in 2013 three parties are competing for the first place.</p>
@ginseng666
ginseng666 / gemeinden.json
Last active September 18, 2015 06:45
Gemeindegrenzen Österreich, Stand September 2015 / map borders of Austrian municipalities, September 2015 (geojson/topojson, utf8)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ginseng666
ginseng666 / index.html
Last active October 14, 2015 18:52
voting districts encoded as same-sized rectangles
<!DOCTYPE html>
<head>
<title>displaying voting districts</title>
<meta charset="utf-8">
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/topojson/1.6.19/topojson.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/queue-async/1.0.7/queue.min.js"></script>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
@ginseng666
ginseng666 / hexbin.min.js
Last active October 14, 2015 19:05
voting districts hexagonal
!function(){d3.hexbin=function(){function u(n){var r={};return n.forEach(function(n,t){var a=s.call(u,n,t)/o,e=Math.round(a),c=h.call(u,n,t)/i-(1&e?.5:0),f=Math.round(c),l=a-e;if(3*Math.abs(l)>1){var v=c-f,g=f+(f>c?-1:1)/2,m=e+(e>a?-1:1),M=c-g,d=a-m;v*v+l*l>M*M+d*d&&(f=g+(1&e?1:-1)/2,e=m)}var j=f+"-"+e,p=r[j];p?p.push(n):(p=r[j]=[n],p.i=f,p.j=e,p.x=(f+(1&e?.5:0))*i,p.y=e*o)}),d3.values(r)}function a(r){var t=0,u=0;return n.map(function(n){var a=Math.sin(n)*r,e=-Math.cos(n)*r,i=a-t,o=e-u;return t=a,u=e,[i,o]})}var e,i,o,c=1,f=1,h=r,s=t;return u.x=function(n){return arguments.length?(h=n,u):h},u.y=function(n){return arguments.length?(s=n,u):s},u.hexagon=function(n){return arguments.length<1&&(n=e),"m"+a(n).join("l")+"z"},u.centers=function(){for(var n=[],r=0,t=!1,u=0;f+e>r;r+=o,t=!t,++u)for(var a=t?i/2:0,h=0;c+i/2>a;a+=i,++h){var s=[a,r];s.i=h,s.j=u,n.push(s)}return n},u.mesh=function(){var n=a(e).slice(0,4).join("l");return u.centers().map(function(r){return"M"+r+"m"+n}).join("")},u.size=function(n){return arg
@ginseng666
ginseng666 / index.html
Last active October 22, 2016 07:43
Tutorial Balkendiagramm
<!DOCTYPE html>
<head>
<title>ein Balkendiagramm</title>
<meta charset="utf-8">
<script src="https://d3js.org/d3.v4.min.js"></script>
</head>
<body>
<script>
var ergebnis = [
@ginseng666
ginseng666 / gemeindeergebnisse.csv
Last active October 23, 2016 08:28
Tutorial Ergebnis-Landkarte
GKZ Gebietsname Wahlberechtigte abgegeben ungueltig gueltig Griss Hofer Hundstorfer Khol Lugner Van der Bellen
G00000 Österreich 6382507 4371825 92655 4279170 810641 1499971 482790 475767 96783 913218
G00099 Wahlkarten - Österreich 0 543129 8355 534774 117323 136832 64349 57203 9025 150042
G10000 Burgenland 232028 180207 4354 175853 21870 73676 30802 22910 3317 23278
G10099 Wahlkarten - Burgenland 0 15590 234 15356 2267 5021 2761 2302 185 2820
G10100 Eisenstadt(Stadt) 10567 8002 125 7877 1369 2763 703 1271 103 1668
G10101 Eisenstadt 10567 7088 118 6970 1192 2522 615 1091 92 1458
G10199 Wahlkarten - Eisenstadt(Stadt) 0 914 7 907 177 241 88 180 11 210
G10200 Rust(Stadt) 1545 1286 35 1251 147 516 251 141 20 176
G10201 Rust 1545 1110 33 1077 122 463 218 122 15 137
@ginseng666
ginseng666 / aut_2017.json
Created August 30, 2017 08:51
Templates Offene Wahlen - responsive bar chart, line chart, svg map, canvas map
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ginseng666
ginseng666 / daten_2013in2017.txt
Created September 30, 2017 16:33
offene wahlen: darstellung länder
gkz name wahlberechtigte abgegeben gueltig spoe oevp fpoe bzoe gruene frank neos kpoe pirat cpoe wandl m euaus slp winner
G10101 Eisenstadt 10407 7378 7229 1699 2421 1084 155 888 419 434 47 54 28 0 0 0 0 oevp
G10201 Rust 1554 1167 1146 454 254 237 17 69 73 34 3 3 2 0 0 0 0 spoe
G10301 Breitenbrunn am Neusiedler See 1586 1187 1164 455 254 171 35 113 64 50 9 9 4 0 0 0 0 spoe
G10302 Donnerskirchen 1458 1108 1089 332 384 172 23 75 63 30 3 5 2 0 0 0 0 oevp
G10303 Großhöflein 1655 1229 1202 379 347 192 42 95 94 46 4 3 0 0 0 0 0 spoe
G10304 Hornstein 2217 1576 1538 616 291 278 47 123 104 60 9 8 2 0 0 0 0 spoe
G10305 Klingenbach 909 704 695 354 164 92 11 20 38 9 4 1 2 0 0 0 0 spoe
G10306 Leithaprodersdorf 974 808 785 180 368 106 9 53 36 25 6 0 2 0 0 0 0 oevp
G10307 Mörbisch am See 1869 1432 1406 550 302 302 22 79 87 41 9 8 6 0 0 0 0 spoe