Lock in $30 Savings on PRO—Offer Ends Soon! ⏳

Harlem Election Rematch: Money and Demographics...

Harlem Election Rematch: Money and Demographics in the 13th

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

Avatar for Haronil Estevez

Haronil Estevez

August 16, 2014
Tweet

Other Decks in Programming

Transcript

  1. Harlem  Elec*on  Rematch   Money  And  Demographics  in  the  

    13th   Haronil  Estevez   @he8897   github.com/he334/pygotham2014  
  2. Summary   •  Congressional  Electoral  Process   •  History  of

     New  York’s  13th  Congressional   District   •  Recent  Demographic  Changes  in  the  13th   •  Open  Source  Government  Data   •  Using  Numpy,  Pandas,  and  Matplotlib  To   Analyze  and  Visualize  Campaign  Data  
  3. Reappor*onment  Process   •  Each  State  Gets  “X”  Number  Of

     House   Representa*ves   •  Number  of  Reps  Based  on  Popula*on  Totals   •  Last  Census  Taken  2010   •  435  Congressional  Seats  
  4. Redistric*ng   •  Dividing  Geographic  Area  of  State  Into  

    Congressional  Districts   •  Not  Always  Straigh^orward,  Some*mes   Imposed  By  Judges  (New  York)   •  Not  Without  The  Risk  Of  Gerrymandering  
  5. Gerrymandering   •  Using  The  Power  Of  Redistric*ng  to  ensure

      that  one  party,  candidate,  or  ethnic  group   gets  to  dominate  the  poli*cs  of  a  par*cular   district    
  6. Prohibi*ons  On  Redistric*ng   •  The  Vo*ng  Rights  Act  of

     1965   •  9  states  with  a  history  of  racial  discrimina*on   need  approval  from  the  United  States  Jus*ce   Department  before  implemen*ng  redistric*ng   plans   •  Shelby  County  v.  Holder  -­‐  struck  down  the   formula  used  to  determine  which  states  are   subject  to  this  prohibi*on  
  7. History  of  New  York’s  13th   Congressional  District   • 

    Majority  minority.     •  Both  Manhagan  and  The  Bronx   •  Italian  and  Jewish  At  Beginning  Of  20th  Century   •  Adam  Clayton  Powell  Jr.  13th’s  first  black   congressman   •  Great  Migra*on  of  African  Americans  From  The   South  To  Northern  States   •  Represented  For  Decades  by  Democra*c   Congressman  Charles  Rangel  
  8. Harlem  Aler  Second  World  War   •  Adam  Clayton  Powell

     Jr.   •  The  Second  Great  Migra*on   •  Economic  Troubles  Of  70’s  and  80’s   •  Revitaliza*on  
  9. Recent  Demographic  Shils  in  the  13th   •  Increase  in

     number  of  La*nos  And  Asians  Living   In  The  13th   •  15th  congressional  district  was  replaced  with  the   13th  as  part  of  the  decennial  redistric*ng   •  New  district  includes  parts  of  South  Bronx  and   has  a  larger  La*no  popula*on   •  Senator  Espaillat  ran  against  Rangel  in  2012   hoping  to  take  advantage  of  these  demographic   shils   •  Espaillat  lost  by  less  than  1,100  votes  and  ran   again  in  2014  
  10. Open  Source  Government  Data   •  May  2013  –  Obama

     announces  Open  Data   Policy   •  More  machine-­‐readable  government  data    
  11. Open  Data  7  Key  Criteria   •  Public   • 

    Accessible   •  Well  Described   •  Reusable   •  Complete   •  Timely   •  Managed  postrelease  
  12. Interested  in  4  Types  Of  Data   •  Census  Burea

     Demographics  Data   •  Geographic  Boundaries  Data  For  Assembly   and  Congressional  Districts   •  Campaign  Contribu*on  Data   •  Vo*ng  Results  Data  by  Congressional  and   Assembly  District  
  13. Census  Data   •  American  FactFinder  website  lets  you  search

      based  on:   –  Topics  (age,  income,  year)   –  Geographies  (state,  coun*es,  places)   –  Race  and  Ethnic  Groups   •  "QT-­‐P03"  census  table  for  both  the  111th  and  113th  New   York  Congress   •  State  Assembly  and  Congressional  District   Geographic  Shape  Files  from  New  York  State's   Department  of  City  Planning  
  14. Shape  Files   •  Interested  in  .shp  and  .dbf  files

      •  .shp  file  contains  the  geometry,  like  points,   lines,  and  polygons   •  .dbf  file  contains  agributes  of  the   corresponding  geometry  
  15. Thanks!   •  Thanks  PyGotham  organizers.   •  Q  &

     A   •  Slides  and  IPython  notebooks:  github.com/ he334/pygotham2014   •  @he8897