Skip to content

Instantly share code, notes, and snippets.

View anbnyc's full-sized avatar

Alec Barrett anbnyc

View GitHub Profile
year winner totVote evFor evAgainst pctVote
2012 Barack Obama 538 332 206 61.71%
2008 Barack Obama 538 365 173 67.84%
2004 George W. Bush 538 286 251 53.16%
2000 George W. Bush 538 271 266 50.37%
1996 Bill Clinton 538 379 159 70.45%
1992 Bill Clinton 538 370 168 68.77%
1988 George H. W. Bush 538 426 111 79.18%
1984 Ronald Reagan 538 525 13 97.58%
1980 Ronald Reagan 538 489 49 90.89%
@anbnyc
anbnyc / 2012pres.csv
Created September 20, 2015 13:46
module 5 - scatterplot!
state obamaEv romneyEv netEv obamaPv romneyPv otherPv totalVote
AL 0 9 -9 795696 1255925 22717 2074338
AK 0 3 -3 122640 164676 13179 300495
AZ 0 11 -11 1025232 1233654 40368 2299254
AR 0 6 -6 394409 647744 27315 1069468
CA 55 0 55 7854285 4839958 344304 13038547
CO 9 0 9 1323102 1185243 61177 2569522
CT 7 0 7 905083 634892 18985 1558960
DE 3 0 3 242584 165484 5853 413921
DC 3 0 3 267070 21381 5313 293764
@anbnyc
anbnyc / 2012pres.csv
Last active September 14, 2015 01:44
module 4 - cleaner and improved bar graph!
AL 0 9 -9 795696 1255925 22717 2074338
AK 0 3 -3 122640 164676 13179 300495
AZ 0 11 -11 1025232 1233654 40368 2299254
AR 0 6 -6 394409 647744 27315 1069468
CA 55 0 55 7854285 4839958 344304 13038547
CO 9 0 9 1323102 1185243 61177 2569522
CT 7 0 7 905083 634892 18985 1558960
DE 3 0 3 242584 165484 5853 413921
DC 3 0 3 267070 21381 5313 293764
@anbnyc
anbnyc / 2012pres.csv
Last active September 8, 2015 13:11
module 3 - first binding of data to objects
AL 0 9 -9 795696 1255925 22717 2074338
AK 0 3 -3 122640 164676 13179 300495
AZ 0 11 -11 1025232 1233654 40368 2299254
AR 0 6 -6 394409 647744 27315 1069468
CA 55 0 55 7854285 4839958 344304 13038547
CO 9 0 9 1323102 1185243 61177 2569522
CT 7 0 7 905083 634892 18985 1558960
DE 3 0 3 242584 165484 5853 413921
DC 3 0 3 267070 21381 5313 293764
@anbnyc
anbnyc / 2012pres.csv
Last active August 28, 2015 15:18
Module 2 Project - loading data to D3
State Obama EV Romney EV Obama PV Romney PV Other PV Total Vote
AL 0 9 795696 1255925 22717 2074338
AK 0 3 122640 164676 13179 300495
AZ 0 11 1025232 1233654 40368 2299254
AR 0 6 394409 647744 27315 1069468
CA 55 0 7854285 4839958 344304 13038547
CO 9 0 1323102 1185243 61177 2569522
CT 7 0 905083 634892 18985 1558960
DE 3 0 242584 165484 5853 413921
DC 3 0 267070 21381 5313 293764
@anbnyc
anbnyc / 2012pres.csv
Created August 23, 2015 19:50
Electoral and popular vote by state from 2012 Presidential Election
AL 0 9 795696 1255925 22717 2074338
AK 0 3 122640 164676 13179 300495
AZ 0 11 1025232 1233654 40368 2299254
AR 0 6 394409 647744 27315 1069468
CA 55 0 7854285 4839958 344304 13038547
CO 9 0 1323102 1185243 61177 2569522
CT 7 0 905083 634892 18985 1558960
DE 3 0 242584 165484 5853 413921
DC 3 0 267070 21381 5313 293764