Changing demographics in New York State's 13th Congressional District led to a close election that was decided by fewer than 1,100 votes two years ago. The contest between the long standing incumbent Representative Charles B. Rangel and State Senator Adriano D. Espaillat will be replayed this June. In this talk I will use Python Numpy and pandas to analyze campaign contribution data provided for each candidate provided by the US Federal Election Commission and the United State Census Bureau.
The talk will explain how to group campaign contributors by categories such as State and Occupation, and will show how to plot aggregated statistics as a bar plot and on map. It will also explore whether one candidate received many small contributions or a small number of big contributions. The talk will explore whether these donation distributions had a bigger impact on the election results versus endorsements from well known politicians. Finally, it will explore the effect of an increase in the Latino population and gentrification.
Slides and IPython notebooks: http://github.com/he334/pygotham2014
To view IPython notebooks online, use nbviewer, ie: http://nbviewer.ipython.org/github/he334/pygotham2014/blob/master/pandas_occupation_example.ipynb