Synopsis

On the Datathon organized by Data4Good in December 2014, the theme was to analyze the data of Election Canada related to donations to various political parties. This is the analysis results of our team:

Source Data

The Dataset contains the records of donations to 5 major political parties across all Canada covering the period 2004 - 2013:


The pre-processed data has done a major cleanup of the orginal data. The data we use for this analysis is the all_contributions_2004_to_2013.csv file generated by the script concatenate_all_csvs.R on 2014-12-17. For convenience, the CSV file is supplied in bz2 compressed format along with this document. The CSV file still suffers some minor data quality issues, but is largely usable to conduct the analysis:


Info Description
CSV Size 283 MB (uncompressed size, All provinces, period 2004 - 2013)
Total records 1,633,883
Province 4572 Unknown (0.3%). After extra cleanup, it remains 1958 (0.1%) unknown province codes, accounting for $540K donation
Cities 1419 missing city names
. We have made an extra cleanup and have been able to recover most of the missing province codes and to fix the names for the most important cities
Contributor “Home” Riding Names 92,541 missing (5.6%)
“Target” Riding Names 1,452,448 missing (88.8%)
. The riding names are severely missing. The analysis results related to Ridings are mostly inaccurate. However, the analysis code is generic and can be reapplied at a later time on higher quality data.
contributor_id 240,235 unique contributors, 0 missing. This is just to emphasize that the contributor_id is critical to the accuracy of this analysis. Because almost every result in this analysis is based on various counts of contributors. Care must be taken to determine this ID in the pre-processed data

Analysis Results

1. Tax Credits
How much public money pumped into the system each year


Tax Calculation Rules, Section “Tax Credits for Political Contributions”

Contribution vs Tax Credits
Year YearAmt (million) YearTaxCredits (million) Ratio
2004 19.69 14.77 75%
2005 28.69 21.52 75%
2006 26.12 19.59 75%
2007 21.73 16.30 75%
2008 32.19 24.14 75%
2009 28.31 21.23 75%
2010 26.56 19.85 75%
2011 38.12 28.57 75%
2012 27.83 20.76 75%
2013 29.71 21.93 74%
TOTAL 278.94 208.66 75%


2A. Regional Variation
Highest Contributing Cities


Top50 Contributing Cities in Canada (2004-2013)
RankByAmount city province AmountKCAD ContribCount RankByCount AvgAmtByContrib
1 TORONTO ON 26936 125071 1 $215
2 CALGARY AB 15278 78242 2 $195
3 OTTAWA ON 13319 77822 3 $171
4 VANCOUVER BC 9372 49316 5 $190
5 EDMONTON AB 9128 62060 4 $147
6 MONTREAL QC 7711 22328 8 $345
7 WINNIPEG MB 7280 49186 6 $148
8 VICTORIA BC 4396 34196 7 $129
9 MISSISSAUGA ON 4221 18479 11 $228
10 NORTH YORK ON 3614 17278 13 $209
11 LONDON ON 3317 21883 9 $152
12 SASKATOON SK 3040 21525 10 $141
13 SURREY BC 2887 16176 14 $178
14 BRAMPTON ON 2861 10476 23 $273
15 ETOBICOKE ON 2657 14272 17 $186
16 REGINA SK 2554 17699 12 $144
17 OAKVILLE ON 2252 10647 22 $212
18 WESTMOUNT QC 2234 4059 64 $550
19 WEST VANCOUVER BC 2142 8714 29 $246
20 SCARBOROUGH ON 1990 13817 18 $144
21 NEPEAN ON 1958 13119 19 $149
22 HALIFAX NS 1939 14351 15 $135
23 NORTH VANCOUVER BC 1766 10023 24 $176
24 HAMILTON ON 1765 14293 16 $123
25 GATINEAU QC 1573 6211 41 $253
26 KINGSTON ON 1571 11420 21 $138
27 BURLINGTON ON 1492 9173 28 $163
28 BURNABY BC 1457 12609 20 $116
29 LAVAL QC 1453 3508 73 $414
30 THORNHILL ON 1450 7107 33 $204
31 KELOWNA BC 1382 9484 26 $146
32 KITCHENER ON 1377 9295 27 $148
33 QUEBEC QC 1353 5790 43 $234
34 RICHMOND BC 1315 6678 38 $197
35 GUELPH ON 1284 9708 25 $132
36 ABBOTSFORD BC 1265 8319 30 $152
37 WATERLOO ON 1193 7126 32 $167
38 MARKHAM ON 1165 5011 49 $232
39 SUDBURY ON 1164 5492 45 $212
40 WINDSOR ON 1142 8174 31 $140
41 RICHMOND HILL ON 1041 4648 55 $224
42 COQUITLAM BC 889 4182 60 $213
43 PETERBOROUGH ON 866 6786 37 $128
44 RED DEER AB 833 6078 42 $137
45 LETHBRIDGE AB 826 7002 34 $118
46 ST JOHN’S NL 821 3934 66 $209
47 THUNDER BAY ON 820 6800 36 $121
48 KANATA ON 782 5342 46 $146
49 SHERWOOD PARK AB 776 4735 53 $164
50 LANGLEY BC 766 4213 59 $182



Top 5 Cities per Province (2004-2013)
province city ContribCount AmountKCAD AvgAmtByContrib
1 AB CALGARY 78242 15278 $195
2 AB EDMONTON 62060 9128 $147
3 AB RED DEER 6078 833 $137
4 AB LETHBRIDGE 7002 826 $118
5 AB SHERWOOD PARK 4735 776 $164
6 BC VANCOUVER 49316 9372 $190
7 BC VICTORIA 34196 4396 $129
8 BC SURREY 16176 2887 $178
9 BC WEST VANCOUVER 8714 2142 $246
10 BC NORTH VANCOUVER 10023 1766 $176
11 MB WINNIPEG 49186 7280 $148
12 MB BRANDON 3720 378 $102
13 MB STEINBACH 1458 218 $150
14 MB PORTAGE LA PRAIRIE 1392 206 $148
15 MB WINKLER 1164 194 $167
16 NB FREDERICTON 3742 760 $203
17 NB MONCTON 2352 547 $233
18 NB SAINT JOHN 2752 395 $144
19 NB ROTHESAY 754 189 $251
20 NB MIRAMICHI 498 120 $241
21 NL ST JOHN’S 3934 821 $209
22 NL CORNER BROOK 495 87 $176
23 NL CONCEPTION BAY SOUTH 263 68 $259
24 NL MOUNT PEARL 199 57 $286
25 NL BAY ROBERTS 72 37 $514
26 NS HALIFAX 14351 1939 $135
27 NS DARTMOUTH 4963 636 $128
28 NS BEDFORD 967 252 $261
29 NS TRURO 1256 209 $166
30 NS SYDNEY 1231 205 $167
31 NT YELLOWKNIFE 2183 443 $203
32 NT HAY RIVER 228 42 $184
33 NT FORT SMITH 226 34 $150
34 NT FORT SIMPSON 60 29 $483
35 NT INUVIK 214 24 $112
36 NU IQALUIT 487 119 $244
37 NU CAMBRIDGE BAY 70 17 $243
38 NU ARVIAT 39 10 $256
39 NU OTTAWA 8 5 $625
40 NU RESOLUTE 6 5 $833
41 ON TORONTO 125071 26936 $215
42 ON OTTAWA 77822 13319 $171
43 ON MISSISSAUGA 18479 4221 $228
44 ON NORTH YORK 17278 3614 $209
45 ON LONDON 21883 3317 $152
46 PE CHARLOTTETOWN 3067 556 $181
47 PE SUMMERSIDE 632 132 $209
48 PE KENSINGTON 330 78 $236
49 PE O’LEARY 214 73 $341
50 PE CORNWALL 369 67 $182
51 QC MONTREAL 22328 7711 $345
52 QC WESTMOUNT 4059 2234 $550
53 QC GATINEAU 6211 1573 $253
54 QC LAVAL 3508 1453 $414
55 QC QUEBEC 5790 1353 $234
56 SK SASKATOON 21525 3040 $141
57 SK REGINA 17699 2554 $144
58 SK MOOSE JAW 4100 424 $103
59 SK PRINCE ALBERT 2613 322 $123
60 SK SWIFT CURRENT 1718 204 $119
61 YT WHITEHORSE 4100 653 $159
62 YT MARSH LAKE 65 21 $323
63 YT DAWSON 135 21 $156
64 YT DAWSON CITY 110 15 $136
65 YT TESLIN 124 10 $81
66 zOTHER NA 1341 346 $258
67 zOTHER BRAMPTON 32 15 $469
68 zOTHER LAVAL 7 12 $1714
69 zOTHER MISSISSAUGA 17 11 $647
70 zOTHER TORONTO 10 8 $800




2B. Regional Variation
Highest Contributing Province / Per Capita


Additional Data: Population per Province


3. Trends of Donation to Political Parties per Year



4. Single or Multiple Parties?
How many people donate to 1, 2, 3, 4 Parties?


Several analysis have been done on this question. The number of persons contributing to one single party represents the overwhelming majority. The simplest results is the summary table below. The counts are made on unique contributor_id for the entire dataset.

Please note that it is also possible to break down the count per Year. The code is supplied as comments in the R Markdown document. But the results are not displayed here.

Number of Unique Contributors per Frequency of Parties Donated (2004 - 2013)
PartyFreq DonorCount TotalDonor PercentTotal
1 232356 240235 96.7%
2 7468 240235 3.1%
3 393 240235 0.2%
4 18 240235 0%


5A. Donation Schedule
How many people donate one lump sum every year?


A lump sum Donation is when the contributor makes ONE single donation a year.


5B. Donation Schedule
How many donate more than once per year?


In the majority of case, the Frequency of donation varies from 1 to 12 times per year. There are some outliers above 12 up to 155 times per year. For these outliers we group them together by range.

Frequency of Donation per Year
Year TotalDonor 1 2 3 4 5 6 7 8 9 10 11 12 13-15 16-20 21-30 31+
2004 33400 15820 6705 4202 2048 1025 540 340 252 178 167 173 781 1046 102 21 0
2005 46813 18587 10587 7106 3467 1791 990 585 299 228 216 246 1081 1453 139 38 0
2006 43265 18241 9415 5933 2874 1500 817 526 366 297 231 301 1660 973 86 43 2
2007 43167 19492 9018 5169 2294 1223 729 445 326 271 229 361 2184 1287 88 51 0
2008 60368 27354 12498 7200 3472 1916 1126 674 456 479 378 447 1942 2102 242 81 1
2009 51822 23348 10838 5817 2819 1544 924 527 367 430 373 455 2618 1535 147 74 6
2010 50180 22666 10546 5322 2530 1412 849 588 387 329 320 380 3137 1512 117 82 3
2011 69164 29178 15713 8132 3882 2139 1342 916 557 542 462 617 2590 2666 322 100 6
2012 51740 19782 10909 6037 2944 1788 1035 685 511 449 466 568 3634 2429 330 164 9
2013 52722 20048 9850 6067 3244 1930 1219 841 614 488 482 678 4220 2371 337 312 21



To summarize the table above visually, we average all the values for the entire period in a single plot. Although the averaged values over 10 years are not 100% representative of a frequency within a year. In practice, the values are quite consistent year over year. The “average” plot below is reasonably correct to show the relative proportions between various frequencies.


6. Riding vs Federal
How many people donating at both levels (to National Party and to the local Riding)


Column Name Description
Single Level means the Contributor makes a donation to either at the Riding level OR at the Federal level
Multi Level means the Contributor makes donations to both the Riding AND Federal levels


Contribution by Level of Donation
Year SingleLevel Ratio1 MultiLevel Ratio2 TotalDonor
2004 32217 96% 1183 4% 33400
2005 45062 96% 1751 4% 46813
2006 42094 97% 1171 3% 43265
2007 41614 96% 1553 4% 43167
2008 57604 95% 2764 5% 60368
2009 49337 95% 2485 5% 51822
2010 47942 96% 2238 4% 50180
2011 65512 95% 3652 5% 69164
2012 49673 96% 2067 4% 51740
2013 50975 97% 1747 3% 52722




7. Home Riding vs Away Riding
Number of Donors inside and outside of the “home” Riding


Please note that the data suffers a severe quality issue on the Riding information:

Column Name Description
SingleRiding number of Contributors to one single riding
MultiRiding number of Contributors to more than one riding
MissingRiding number of Contributors when either home/target riding name is missing


Count of Contributors
Year SingleRiding PercentSingle MultiRiding PercentMulti MissingRiding MissingPercent TotalUniqueDonor
2004 9711 29.1% 137 0.4% 23552 70.5% 33400
2005 12003 25.6% 197 0.4% 34613 73.9% 46813
2006 7775 18% 52 0.1% 35438 81.9% 43265
2007 12632 29.3% 173 0.4% 30362 70.3% 43167
2008 18601 30.8% 299 0.5% 41468 68.7% 60368
2009 14486 28% 193 0.4% 37143 71.7% 51822
2010 14878 29.6% 183 0.4% 35119 70% 50180
2011 17533 25.3% 257 0.4% 51374 74.3% 69164
2012 9499 18.4% 132 0.3% 42109 81.4% 51740
2013 6505 12.3% 60 0.1% 46157 87.5% 52722



Environment