Last active
February 12, 2018 13:25
-
-
Save bdoohan/587bc3834ef059ef46cc132918b474e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<script>\n", | |
"code_show=true; \n", | |
"function code_toggle() {\n", | |
" if (code_show){\n", | |
" $('div.input').hide();\n", | |
" } else {\n", | |
" $('div.input').show();\n", | |
" }\n", | |
" code_show = !code_show\n", | |
"} \n", | |
"$( document ).ready(code_toggle);\n", | |
"</script>\n", | |
"<form action=\"javascript:code_toggle()\"><input type=\"submit\" value=\"Click here to toggle on/off the raw code.\"></form>" | |
], | |
"text/plain": [ | |
"<IPython.core.display.HTML object>" | |
] | |
}, | |
"execution_count": 1, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"from IPython.display import HTML\n", | |
"\n", | |
"HTML('''<script>\n", | |
"code_show=true; \n", | |
"function code_toggle() {\n", | |
" if (code_show){\n", | |
" $('div.input').hide();\n", | |
" } else {\n", | |
" $('div.input').show();\n", | |
" }\n", | |
" code_show = !code_show\n", | |
"} \n", | |
"$( document ).ready(code_toggle);\n", | |
"</script>\n", | |
"<form action=\"javascript:code_toggle()\"><input type=\"submit\" value=\"Click here to toggle on/off the raw code.\"></form>''')" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# Ward D Election Results" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Brendan Doohan \n", | |
"February 10, 2018" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 4, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"import pandas as pd\n", | |
"import numpy as np\n", | |
"import seaborn as sns; sns.set()\n", | |
"import warnings\n", | |
"warnings.filterwarnings('ignore')\n", | |
"import matplotlib.pyplot as plt" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 5, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"import os\n", | |
"#os.chdir(\"C:\\\\Users\\\\nwdoohanbr\\\\Desktop\\\\WardD\\\\Jersey-City-Ward-D-Election\")\n", | |
"os.chdir(\"/Users/brendandoohan/Desktop/Jersey City Ward D Election/Jersey-City-Ward-D-Election\")" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<img src=\"https://github.com/bdoohan/Jersey-City-Ward-D-Election/blob/master/District%20Guide.jpeg?raw=true\" alt=\"Districts\" height=\"600\" width=\"600\" align=\"right\" hspace=0>\n", | |
"<p align=\"left\">This whitepaper analyzes the results of Jersey City city council race for Ward D that was held on November 7th. In that election, incumbent Michael Yun (\"Yun\") ran against Moriah Kinberg (\"Mo\"), Carmen Vega (\"Vega\") and Rafael Torres (\"Torres\"). Yun won the election.</p> \n", | |
"\n", | |
"- Yun won with **2,613** votes \\* \n", | |
"- Mo had **1,335** votes \n", | |
"- Vega had **397** votes \n", | |
"- Torres had **131** votes\n", | |
"\n", | |
"<sub>* These numbers are taken from the voting machine printouts from November 7th. The final totals cannot be broken out from the data given by the Board of Elections.</sub> \n", | |
"<p>This paper breaks down the results by district, race, and candidate. The predictive model used to identify likely voters is also analyzed.</p>\n", | |
"<br clear=\"left\"></br>\n", | |
"<p>Specifically, this paper addresses the following questions:</p> " | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 6, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"results = pd.read_csv(\"JC_WARD_D_edited.csv\", header=0, error_bad_lines=False, verbose=False, encoding=\"UTF-7\")" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 7, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"results = results.drop('Unnamed: 8', axis=1)" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Questions to Ask" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"1. How was turnout by district?\n", | |
"2. What was the racial makeup of those who did vote?\n", | |
"3. Did Mo's supporters come out and vote? \n", | |
"4. Where did Mo perform best? How about the rest of the candidates?\n", | |
"5. Was the [Random Forest model](https://en.wikipedia.org/wiki/Random_forest) successful in identifying likely voters?" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"The paper then concludes by aggregating these insights to summarize what can be learned from the results of election. The insights aim to shed light on the voting behavior of Ward D--a ward experiencing rapid changes in terms of development and demographics." | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Q1. How was turnout by district?" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<img src=\"https://raw.githubusercontent.com/bdoohan/Jersey-City-Ward-D-Election/master/All%20Voters%20Prcnt%20Labels.jpeg\" alt=\"Districts\" height=\"700\" width=\"700\" align=\"right\" hspace=0>\n", | |
"<p align=\"left\">This chart breaks down voter turnout by District. The colors correspond to the percent of total voters that each district represents. Blue colors show districts that had a high percentage of the total votes.</p> \n", | |
"<br clear=\"left\"></br>\n", | |
" <p>This chart shows the percet of total voters from each district. District 4, for example, had about 4.8% of the total votes.</p>\n", | |
"<br clear=\"left\"></br>\n", | |
" <p>Districts 13, 4, 5, 7 and 15 had high turnout. Overall, <b>the East side of the Heights came out and voted.</b> This is a section where Mo had strong support. The districts will be broken out for each candidate in the later sections.</p>\n", | |
"<br clear=\"left\"></br>\n", | |
"\n", | |
"<p>Here are the vote percentages for each district:</p> " | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 22, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style>\n", | |
" .dataframe thead tr:only-child th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: left;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th>Dist_VotI</th>\n", | |
" <th>1.0</th>\n", | |
" <th>2.0</th>\n", | |
" <th>3.0</th>\n", | |
" <th>4.0</th>\n", | |
" <th>5.0</th>\n", | |
" <th>6.0</th>\n", | |
" <th>7.0</th>\n", | |
" <th>8.0</th>\n", | |
" <th>9.0</th>\n", | |
" <th>10.0</th>\n", | |
" <th>11.0</th>\n", | |
" <th>12.0</th>\n", | |
" <th>13.0</th>\n", | |
" <th>14.0</th>\n", | |
" <th>15.0</th>\n", | |
" <th>16.0</th>\n", | |
" <th>17.0</th>\n", | |
" <th>18.0</th>\n", | |
" <th>19.0</th>\n", | |
" <th>20.0</th>\n", | |
" <th>21.0</th>\n", | |
" <th>22.0</th>\n", | |
" <th>23.0</th>\n", | |
" <th>24.0</th>\n", | |
" <th>25.0</th>\n", | |
" <th>26.0</th>\n", | |
" <th>27.0</th>\n", | |
" <th>28.0</th>\n", | |
" <th>29.0</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>District</th>\n", | |
" <td>1</td>\n", | |
" <td>2</td>\n", | |
" <td>3</td>\n", | |
" <td>4</td>\n", | |
" <td>5</td>\n", | |
" <td>6</td>\n", | |
" <td>7</td>\n", | |
" <td>8</td>\n", | |
" <td>9</td>\n", | |
" <td>10</td>\n", | |
" <td>11</td>\n", | |
" <td>12</td>\n", | |
" <td>13</td>\n", | |
" <td>14</td>\n", | |
" <td>15</td>\n", | |
" <td>16</td>\n", | |
" <td>17</td>\n", | |
" <td>18</td>\n", | |
" <td>19</td>\n", | |
" <td>20</td>\n", | |
" <td>21</td>\n", | |
" <td>22</td>\n", | |
" <td>23</td>\n", | |
" <td>24</td>\n", | |
" <td>25</td>\n", | |
" <td>26</td>\n", | |
" <td>27</td>\n", | |
" <td>28</td>\n", | |
" <td>29</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>Voter_Prcnt</th>\n", | |
" <td>2.8481</td>\n", | |
" <td>2.8481</td>\n", | |
" <td>3.35443</td>\n", | |
" <td>4.84177</td>\n", | |
" <td>4.36709</td>\n", | |
" <td>3.25949</td>\n", | |
" <td>3.9557</td>\n", | |
" <td>3.59177</td>\n", | |
" <td>4.03481</td>\n", | |
" <td>3.84494</td>\n", | |
" <td>2.34177</td>\n", | |
" <td>3.79747</td>\n", | |
" <td>5.77532</td>\n", | |
" <td>2.43671</td>\n", | |
" <td>3.98734</td>\n", | |
" <td>2.54747</td>\n", | |
" <td>3.37025</td>\n", | |
" <td>2.86392</td>\n", | |
" <td>3.37025</td>\n", | |
" <td>4.38291</td>\n", | |
" <td>3.60759</td>\n", | |
" <td>3.60759</td>\n", | |
" <td>2.54747</td>\n", | |
" <td>2.2943</td>\n", | |
" <td>3.84494</td>\n", | |
" <td>3.08544</td>\n", | |
" <td>4.11392</td>\n", | |
" <td>1.17089</td>\n", | |
" <td>3.71835</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
"Dist_VotI 1.0 2.0 3.0 4.0 5.0 6.0 7.0 \\\n", | |
"District 1 2 3 4 5 6 7 \n", | |
"Voter_Prcnt 2.8481 2.8481 3.35443 4.84177 4.36709 3.25949 3.9557 \n", | |
"\n", | |
"Dist_VotI 8.0 9.0 10.0 11.0 12.0 13.0 14.0 \\\n", | |
"District 8 9 10 11 12 13 14 \n", | |
"Voter_Prcnt 3.59177 4.03481 3.84494 2.34177 3.79747 5.77532 2.43671 \n", | |
"\n", | |
"Dist_VotI 15.0 16.0 17.0 18.0 19.0 20.0 21.0 \\\n", | |
"District 15 16 17 18 19 20 21 \n", | |
"Voter_Prcnt 3.98734 2.54747 3.37025 2.86392 3.37025 4.38291 3.60759 \n", | |
"\n", | |
"Dist_VotI 22.0 23.0 24.0 25.0 26.0 27.0 28.0 \\\n", | |
"District 22 23 24 25 26 27 28 \n", | |
"Voter_Prcnt 3.60759 2.54747 2.2943 3.84494 3.08544 4.11392 1.17089 \n", | |
"\n", | |
"Dist_VotI 29.0 \n", | |
"District 29 \n", | |
"Voter_Prcnt 3.71835 " | |
] | |
}, | |
"execution_count": 22, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"from IPython.display import display\n", | |
"pd.options.display.max_columns = None\n", | |
"tots = results[results.Dist_VotI!=31][\"Voter_ID\"].count()\n", | |
"adf = pd.DataFrame(\n", | |
" 100*(results[results.Dist_VotI!=31].groupby('Dist_VotI')[\"Voter_ID\"].count()/tots)\n", | |
")\n", | |
"adf[\"District\"] = adf.index\n", | |
"adf.columns = [\"Voter_Prcnt\", \"District\"]\n", | |
"adf[\"District\"] = adf.District.astype(int).copy()\n", | |
"adf[[\"District\", \"Voter_Prcnt\"]].astype(object).T" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Q2. What was the racial makeup of those who did vote?" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Using [U.S. Census data](https://www.census.gov/topics/population/genealogy/data/2000_surnames.html), the race of each voter was identified. This method is not without its faults; however, it does serve as a functioning proxy for race classification." | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"#### White voters" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<img src=\"https://github.com/bdoohan/Jersey-City-Ward-D-Election/blob/master/Prcnt%20White%20Labels.jpeg?raw=true\" alt=\"White_Voters\" height=\"700\" width=\"700\" align=\"right\" hspace=0>\n", | |
"<p align=\"left\">This chart shows the percent of Ward D <b>white voters</b> for each District. Blue colors show districts that had a high percentage of the total <b>white voters</b>.</p> \n", | |
"<br clear=\"left\"></br>\n", | |
" <p>Districts 4, 5, 7 and 9 have a high percentage of the total white votes. Overall, <b>the East side of the Heights is where much of the white voters live.</b> This is also a section where Mo had strong support.</p>\n", | |
"<br clear=\"left\"></br>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"#### Hispanic voters" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<img src=\"https://github.com/bdoohan/Jersey-City-Ward-D-Election/blob/master/Prcnt%20hispanic%20Labels.jpeg?raw=true\" alt=\"Hispanic_Voters\" height=\"700\" width=\"700\" align=\"right\" hspace=0>\n", | |
"<p align=\"left\">This chart shows the percent of Ward D <b>hispanic voters</b> for each District. Blue colors show districts that had a high percentage of the total <b>hispanic voters</b>.</p> \n", | |
"<br clear=\"left\"></br>\n", | |
" <p>Districts 13, 20, 5, 27 and 22 have a high percentage of the total hispanic votes. Overall, <b>the North and West sides of the Heights are where much of the hispanic voters live.</b></p>\n", | |
"<br clear=\"left\"></br>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"#### Black voters" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<img src=\"https://github.com/bdoohan/Jersey-City-Ward-D-Election/blob/master/Prcnt%20Black%20Labels.jpeg?raw=true\" alt=\"Black_Voters\" height=\"700\" width=\"700\" align=\"right\" hspace=0>\n", | |
"<p align=\"left\">This chart shows the percent of Ward D <b>black voters</b> for each District. Blue colors show districts that had a high percentage of the total <b>black voters</b>.</p> \n", | |
"<br clear=\"left\"></br>\n", | |
" <p>Districts 12, 13, and 20 have a high percentage of the total black votes. Overall, <b>the center of the Heights is where much of the black voters live.</b></p>\n", | |
"<br clear=\"left\"></br>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"#### Asian voters" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<img src=\"https://github.com/bdoohan/Jersey-City-Ward-D-Election/blob/master/Prcnt%20Asian%20Labels.jpeg?raw=true\" alt=\"Asian_Voters\" height=\"700\" width=\"700\" align=\"right\" hspace=0>\n", | |
"<p align=\"left\">This chart shows the percent of Ward D <b>Asian voters</b> for each District. Blue colors show districts that had a high percentage of the total <b>Asian voters</b>.</p> \n", | |
"<br clear=\"left\"></br>\n", | |
" <p>Districts 22, 23, 25, 27 and 29 have a high percentage of the total Asian votes. Overall, <b>the westside of the Heights is where much of the Asian voters live.</b></p>\n", | |
"<br clear=\"left\"></br>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Q3. Did Mo's supporters come out and vote?" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<img src=\"https://github.com/bdoohan/Jersey-City-Ward-D-Election/blob/master/Mo%20Supporters%20Prcnt%20Labels.jpeg?raw=true\" alt=\"Mo_supporters\" height=\"700\" width=\"700\" align=\"right\" hspace=0>\n", | |
"<p align=\"left\">This chart shows where most of Mo's supporters live in Ward D. Blue colors show districts that had a high percentage of <b>Mo's supporters</b>.</p> \n", | |
"<br clear=\"left\"></br>\n", | |
" <p>Districts 4, 7 and 13 have a high percentage of Mo's supporters. Overall, <b>Mo's supporters live east of Central Avenue and near Congress Street.</b></p>\n", | |
"<br clear=\"left\"></br>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Overall, **52%** of Mo's supporters voted on Election Day. Here is the **percent turnout** by District:" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 85, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"results_mo[\"turnout_rate\"] = results_mo.voted.astype(float)/results_mo.mo_supporter.astype(float)\n", | |
"results_mo[\"turnout_rate\"] = results_mo[\"turnout_rate\"].astype(float)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 108, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"results_mo = results_mo[results_mo[\"Dist_VotI_y\"] != 'District'].copy()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 109, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"results_mo[\"Dist_VotI_x\"] = results_mo[\"Dist_VotI_x\"].astype(float)\n", | |
"results_mo[\"Dist_VotI_y\"] = results_mo[\"Dist_VotI_y\"].astype(float)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 119, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"results_mo[\"District\"] = results_mo[[\"Dist_VotI_x\", \"Dist_VotI_y\"]].max(axis=1)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 164, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"turnout = pd.DataFrame(results_mo.groupby(\"District\")[\"turnout_rate\"].mean())\n", | |
"turnout[\"District\"] = turnout.index\n", | |
"turnout = turnout[turnout.District.between(1,29)]" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 165, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"turnout[\"District\"] = turnout.District.astype(int)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 201, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAElCAYAAADtFjXiAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlYVGX7B/AvzLAogzuWL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n98ssvIiQkREyfPl18/PHH4qefftLYEiyr9PR0ER4eLj777DORkZEhTY+MjNQZ\nr1arxS+//CJOnDgh7t27J2bOnCmCgoJEWlqawWWFhYWVOP+nn34SQgiRm5srIiIixMiRI8XixYtF\nTk6OVuz169fF/v37RV5envj888/FO++8IxYtWiSysrJ05p46dare03d1iY+PFwcOHBD5+fnio48+\nEtOmTRO3bt3SG79t2zYxb948MWPGDBEeHi5+/fXXUi+rWKU6C0ifnj17ak1buXIlNm/eDCEEpkyZ\ngvz8fPTr1w9CzyGP2bNnY/Lkybh16xYCAwPx888/w8rKCmPHjoWHh4dG7KhRo2BtbY26detCCIEr\nV64gODgYZmZm+O677/TWqVAo8NJLLwEAXnjhBajVaq2Y77//HjExMZg4cSJWrFiBRo0a4fbt25g0\naRJcXV214q2srBAcHIzTp09j9erVCAkJwdtvv40GDRpg+PDhWvEffvghJk2ahOzsbIwfPx7btm2D\nra0tRo0ahR49emjE5uTkSBehODs747PPPsN7772HrKwsvesYFxeHQ4cOSReZtW7dGl27dtV7FlNp\nZWRkYPXq1bCyssLIkSNRs2ZNAEBUVBQCAgK04oUQ2Lt3L+rUqYNGjRohPDwc5ubmmDp1qt6D2I8L\nDw9HUFCQznm7du1Ct27d8ODBA0RGRiI1NRWvv/46Jk6cCBsbG634Gzdu4PLly3jzzTexevVqnDlz\nBq+88gomTJig9Ut406ZNw+zZs426mGf//v1QKpVo27YtIiIikJWVhalTp+I///mPVuz27duRlJSE\nvLw81KxZE+3atYO7u7tW3EcffQS1Wg13d3fY2NggNzcXCQkJOHjwIBYsWKAVHxsbq7c+X19fjccz\nZsyAt7c3CgsLMWzYMKxevRr29vY4cuSIzud//PHHyMvLQ1paGu7duwdfX1/Y2Nhg7ty5WLlypUas\nn5+f9LcQApcuXcLJkycBAD/88INW7nXr1qFbt25YsGABGjRogLlz5+LQoUMIDg7Gp59+qhE7c+ZM\nTJkyBQsWLMCLL76I9957D0ePHsW0adOwevVqrdwnTpzA2LFjMWzYMPj4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GomXLlnBwcADwaNDu3r07HB0dMWXKFLi6uuL8+fNQKBR679lerHnz5khOTkZaWhoA\nICwsDHv37i3Vc4nkxAZABODOnTvSaaB9+vTB7du3NX74platWvD19cWAAQPg4+ODgoIC9O/fH40b\nN0Z2djamT5+uN/cLL7yAOXPmYMyYMejZsyesra3h4+ODFi1a4OTJk/jkk0/KYxWJtPAsICIiE8Ut\nACIiE8UGQERkotgAiIhMFBsAEZGJYgMgIjJRbABERCaKDYCIyESxARARmaj/A6eVffwl15dJAAAA\nAElFTkSuQmCC\n", | |
"text/plain": [ | |
"<matplotlib.figure.Figure at 0x1a18b4de10>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"import math \n", | |
"turnout.set_index(turnout.District)\n", | |
"turnout.turnout_rate.plot(kind=\"bar\")\n", | |
"plt.xlabel(\"District\")\n", | |
"plt.ylabel(\"Turnout Rate\")\n", | |
"plt.title(\"Turnout Rate by District\", fontsize=20)\n", | |
"plt.axhline(y=0.5, color='r', linestyle='--')\n", | |
"plt.show()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<p align=\"left\"> Districts <b>4, 5, 6, 7 and 19</b> stood out from the rest. Mo's base in <b>the eastern section of the Heights</b> did come out and vote. However, supporters outside of this section largely failed to come out on Election day.</p>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Q4. Where did Mo perform best? How about the rest fo the candidates?" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"**N.B.** Color coding is specific to each candidate. Red colors show where the candidate did worse relative to his/her average number of votes. Blue shows where they did above average." | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<img src=\"https://github.com/bdoohan/Jersey-City-Ward-D-Election/blob/master/Mo%20Total%20Labels.jpeg?raw=true\" alt=\"Mo_Voters\" height=\"700\" width=\"700\" align=\"right\" hspace=0>\n", | |
"<p align=\"left\">This chart shows the <b>total</b> votes for Mo for each District. Blue colors show districts with higher vote counts.</p> \n", | |
"<br clear=\"left\"></br>\n", | |
" <p>Districts <b>3, 4, 5, 7, 8, 9 and 10</b> were the best for Mo.</p>\n", | |
"<br clear=\"left\"></br>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Yun" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<img src=\"https://github.com/bdoohan/Jersey-City-Ward-D-Election/blob/master/Yun%20Total%20Labels.jpeg?raw=true\" alt=\"Yun_Voters\" height=\"700\" width=\"700\" align=\"right\" hspace=0>\n", | |
"<p align=\"left\">This chart shows the <b>total</b> votes for Yun for each District. Blue colors show districts with higher vote counts.</p> \n", | |
"<br clear=\"left\"></br>\n", | |
"<p align=\"left\">Yun did well on the Western Slope and in the hispanic neighborhoods.</p> \n" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Vega" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<img src=\"https://github.com/bdoohan/Jersey-City-Ward-D-Election/blob/master/Carmen%20Total%20Labels.jpeg?raw=true\" alt=\"Yun_Voters\" height=\"700\" width=\"700\" align=\"right\" hspace=0>\n", | |
"<p align=\"left\">This chart shows the <b>total</b> votes for Vega for each District. Blue colors show districts with higher vote counts.</p> \n", | |
"<br clear=\"left\"></br>\n", | |
"<p align=\"left\">Vega had low turnout in most districts.</p> " | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Torres" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<img src=\"https://github.com/bdoohan/Jersey-City-Ward-D-Election/blob/master/Torres%20Totals%20Labels.jpeg?raw=true\" alt=\"Yun_Voters\" height=\"700\" width=\"700\" align=\"right\" hspace=0>\n", | |
"<p align=\"left\">This chart shows the <b>total</b> votes for Torres for each District. Blue colors show districts with higher vote counts.</p> \n", | |
"<br clear=\"left\"></br>\n", | |
"<p align=\"left\">Torres had low turnout across Ward D.</p> " | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Q5. How did the model do at predicting whether someone was going to vote?" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"For Mo's campaign a [Random Forest](https://en.wikipedia.org/wiki/Random_forest) model was used to predict who would vote. The model assigned a likelihood of voting to each voter. A likelihood close to 0 meant that the person was unlikely to vote; a value closer to 1 meant they were likely to vote. These predictions were then used to focus canvassing and phone banking efforts. \n", | |
"\n", | |
"Usually any likelihood greater than .50 (50%) is interpreted as a positive event. So, for example, if someone's likelihood was 0.55, they would be labelled as likely to vote. However, for this campaign, a decision was made to only label people with likelihoods of 0.85 or higher as people likely to vote. This made the model's predictions much more accurate. \n", | |
"\n", | |
"Using the 0.85 likelihood cutoff, the model had an accuracy of **75%**. This means that the model correctly predicted whether or not a voter would vote 75% of the time. Part of this success is due to the fact that turnout overall was low. Many people did not come out and vote, compared to previous elections. That is, having a high cutoff value of 85% meant that most people were predicted not to vote. This is exactly what happened since turnout was so low." | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Summary" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"- **Demographic** \n", | |
" \n", | |
" - Mo won the white vote on the eastern side of the Ward \n", | |
" - Mo lost the Western Slope, which is predominantly asian \n", | |
"\n", | |
" \n", | |
"\n", | |
"- **Geographic** \n", | |
"\n", | |
" - Mo struggled west of Central Avenue\n", | |
" - Mo did well east of Central Avenue \n", | |
"\n", | |
" \n", | |
"\n", | |
"- **Base health** \n", | |
"\n", | |
" - 52% of Mo's supporters came out to vote\n", | |
" - Most of this turnout came from supporters east of Central Avenue\n", | |
"\n", | |
"\n", | |
"\n", | |
"- **Competitors** \n", | |
" \n", | |
" - Yun did well across most districts, with strong performance in the asian and hispanic neighborhoods\n", | |
"\n", | |
"\n", | |
"\n", | |
"- **Change Research Survey** \n", | |
" \n", | |
" - The survey indicated that those who knew Mo liked her and would vote for her\n", | |
" - Data from the election confirm this finding, showing that Mo did well where most of her supporters lived\n", | |
" - Survey had Yun with 62% and Mo with 30%; actual results were Yun 52% and Mo with 38%" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## Code" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 8, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"def get_last(string):\n", | |
" return(str(string).split(\"|\")[0])\n", | |
"def get_first(string):\n", | |
" try:\n", | |
" return(str(string).split(\"|\")[1])\n", | |
" except:\n", | |
" return(\"\")\n", | |
"def get_middle(string):\n", | |
" try:\n", | |
" return(str(string).split(\"|\")[2])\n", | |
" except:\n", | |
" return(\"\")\n", | |
"\n", | |
"results[\"last_name\"] = results.Voter_Name.apply(get_last)\n", | |
"results[\"first_name\"] = results.Voter_Name.apply(get_first)\n", | |
"results[\"middle_name\"] = results.Voter_Name.apply(get_middle)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 9, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"url = 'https://raw.githubusercontent.com/fivethirtyeight/data/master/most-common-name/surnames.csv'\n", | |
"races = pd.read_csv(url,index_col=0)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 205, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"races[\"last_name\"] = races.index\n", | |
"races = races.reset_index()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 11, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"def get_race(arow): \n", | |
" if arow[\"pctblack\"]==\"((S))\":\n", | |
" arow[\"pctblack\"] = 0.00\n", | |
" if arow[\"pctaian\"]==\"((S))\":\n", | |
" arow[\"pctaian\"] = 0.00\n", | |
" try:\n", | |
" guess = arow[[\"pctwhite\", \"pctblack\", \"pctapi\", \"pctaian\", \"pct2prace\", \"pcthispanic\"]].astype(float).idxmax(axis=1)\n", | |
" return(guess)\n", | |
" except:\n", | |
" return(\"Unidentified\")" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 12, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"mapping = {'(S)':.00001}\n", | |
"races = races.replace({'pctblack': mapping, 'pctaian': mapping,\n", | |
" 'pctwhite': mapping, 'pctapi': mapping, \n", | |
" 'pct2prace': mapping, 'pcthispanic': mapping})" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 13, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"races[\"guess\"] = races.apply(lambda x: get_race(x), axis=1)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 14, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"races[\"guess\"] = races.guess.str.replace(\"pct\", \"\")" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 17, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"results_race = pd.merge(results, races, on=\"last_name\", how=\"left\")" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 18, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"results_race.guess.fillna(\"Unidentified\", inplace=True)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 74, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"mo_base = pd.read_csv(\"Election Day Mo Supporter List - Master 11052017.csv\", \n", | |
" names = [\"first_name\", \"last_name\", \"full_name\", \"address\", \"Dist_VotI\", \"email\", \"phone\"])" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 75, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"mo_base[\"mo_supporter\"] = int(1)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 77, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"results['first_name'] = results['first_name'].apply(lambda x: x.strip(\" \"))\n", | |
"results['first_name'] = results['first_name'].apply(lambda x: x.upper())" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 78, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"results['last_name'] = results['last_name'].apply(lambda x: x.strip(\" \"))\n", | |
"results['last_name'] = results['last_name'].apply(lambda x: x.upper())" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 79, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"mo_base['first_name'] = mo_base['first_name'].astype(str).apply(lambda x: x.strip(\" \"))\n", | |
"mo_base['last_name'] = mo_base['last_name'].astype(str).apply(lambda x: x.strip(\" \"))\n", | |
"mo_base['first_name'] = mo_base['first_name'].astype(str).apply(lambda x: x.split(',', 1)[0])\n", | |
"mo_base['last_name'] = mo_base['last_name'].apply(lambda x: x.upper())\n", | |
"mo_base['first_name'] = mo_base['first_name'].apply(lambda x: x.upper())" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 80, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"results[\"voted\"] = int(1)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 81, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"results_mo = pd.merge(results, mo_base[[\"first_name\", \"last_name\", \"mo_supporter\", \"Dist_VotI\"]],\n", | |
" on=[\"last_name\", \"first_name\"], how=\"right\")" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 82, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"results_mo.drop_duplicates(inplace=True, subset=[\"Voter_ID\", \"last_name\", \"first_name\", \"voted\", \"mo_supporter\"])" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 83, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"results_mo.fillna(0, inplace=True)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"x = results_race_mo.groupby([\"Dist_VotI\", \"guess\"])[\"Voter_ID\"].count().unstack()\n", | |
"races_dist = pd.DataFrame(x)\n", | |
"races_dist[\"District\"] = races_dist.index" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"x = results_race_mo.groupby(\"Dist_VotI\")[\"Voter_ID\"].count()\n", | |
"votes = pd.DataFrame(x)\n", | |
"votes[\"District\"] = votes.index" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"mo_groupby = mo_base.groupby(\"Dist_VotI\", as_index=False).mo_supporter.count() " | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"results_race_mo[\"Dist_VotI\"] = results_race_mo.Dist_VotI.astype(str).copy()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"mo_groupby[\"Dist_VotI\"] = mo_groupby.Dist_VotI.astype(str).copy()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"results_race_mo[\"Dist_VotI\"] = results_race_mo.Dist_VotI.copy()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"results_groupby = pd.DataFrame(\n", | |
" results_race_mo.groupby([\"Dist_VotI\", \"mo_supporter\"])[\"Voter_ID\"].count().fillna(0).replace('NaN', 0)\n", | |
" )" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"results_groupby.unstack()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"results_groupby = results_groupby.unstack()\n", | |
"#results_groupby[\"Dist_VotI\"] = results_groupby.index\n", | |
"#results_groupby[\"Dist_VotI\"] = results_groupby[\"Dist_VotI\"].round(0)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"mo_groupby = mo_groupby.convert_objects(convert_numeric=True)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"results_groupby.transpose().head()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"mo_turnout = pd.merge(\n", | |
" results_groupby.transpose(),\n", | |
" mo_groupby,\n", | |
" on=\"Dist_VotI\",\n", | |
" how=\"inner\")" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"mo_turnout.columns = [\"District\", \"Total_Voters\", \"Mo_Voters\", \"District_x\", \"Mo_supporters\"]" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"mo_turnout[\"turnout_rate\"] = mo_turnout[\"Mo_Voters\"]/ mo_turnout.Mo_supporters" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"import matplotlib.pyplot as plt\n", | |
"#import plotly.plotly as py\n", | |
"# Learn about API authentication here: https://plot.ly/python/getting-started\n", | |
"# Find your api_key here: https://plot.ly/settings/api\n", | |
"\n", | |
"y = mo_turnout.turnout_rate\n", | |
"x = mo_turnout.District\n", | |
"width = 1/1.5\n", | |
"plt.bar(x, y, width, color=\"blue\")\n", | |
"#fig = plt.gcf()\n", | |
"#plot_url = py.plot_mpl(fig, filename='mpl-basic-bar')\n", | |
"plt.show()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"probs = pd.read_csv(\"Data/voters_with_petition_flag.csv\")" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"probs[\"Voter_ID\"] = probs[\"VOTER.ID\"].astype(str)\n", | |
"results_race_mo[\"Voter_ID\"] = results_race_mo[\"Voter_ID\"].astype(str) " | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"model_eval = pd.merge(probs[[\"Voter_ID\", \"LAST.NAME\", \"FIRST.NAME\", \n", | |
" \"likely_to_vote\"]], results_race_mo, on=\"Voter_ID\", how=\"left\")" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 206, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"model_eval = pd.read_csv(\"model_eval.csv\")" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 207, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"#model_eval.to_csv(\"model_eval.csv\", index=False)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 221, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"model_eval[\"pred_vote\"] = model_eval.likely_to_vote.apply(lambda x: 1 if x>0.85 else 0)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 222, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"import math\n", | |
"model_eval[\"act_vote\"] = model_eval.Voter_Name.apply(lambda x: 0 if pd.isnull(x) == True else 1)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 223, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"model_eval_deduped = pd.DataFrame(\n", | |
" model_eval.fillna(0).groupby([\"Voter_ID\", \"LAST.NAME\", \"FIRST.NAME\"])[[\"Dist_VotI\", \"pred_vote\", \"act_vote\"]].max()\n", | |
")" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 224, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"model_eval_deduped[\"Voter_ID\"] = model_eval_deduped.index.get_level_values(0)\n", | |
"model_eval_deduped[\"LAST.NAME\"] = model_eval_deduped.index.get_level_values(1)\n", | |
"model_eval_deduped[\"FIRST.NAME\"] = model_eval_deduped.index.get_level_values(2)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 225, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"model_eval_deduped.sort_values(\"Voter_ID\", inplace=True)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 228, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"from sklearn.metrics import cohen_kappa_score\n", | |
"from sklearn.metrics import accuracy_score" | |
] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python 2", | |
"language": "python", | |
"name": "python2" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 2 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython2", | |
"version": "2.7.13" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment