Introdução aos dados da eleição de 2018

Visualização Interativa de Dados com plotly em R

Adam Loy

Statistician, Carleton College

A eleição de 2018

  • 435 cadeiras na Câmara dos Representantes
  • 35 cadeiras no Senado
  • 36 governadores

Democratas

  • Recuperar perdas
  • Energizar eleitores
  • Assumir o controle do Legislativo

Republicanos

  • Manter eleitores engajados
  • Fortalecer sua posição
  • Manter o impulso
Visualização Interativa de Dados com plotly em R

Comparecimento de eleitores

McDonald, Michael P. 2018. "2018 November General Election Turnout Rates" United States Elections Project. Acesso em 12 nov. 2018.

glimpse(turnout)
Rows: 51
Columns: 7
$ state       <fct> Alabama, Alaska, Arizona, Arkansas, California, ...
$ state.abbr  <fct> AL, AK, AZ, AR, CA, CO, CT, DE, DC, FL, GA, HI, ...
$ turnout2018 <dbl> 0.474, 0.537, 0.486, 0.412, 0.478, 0.619, 0.526,...
$ turnout2014 <dbl> 0.332, 0.548, 0.341, 0.403, 0.307, 0.547, 0.425,...
$ ballots     <int> 1725000, 280000, 2385000, 895000, 12250000, 2540...
$ vep         <int> 3641209, 521777, 4910625, 2171940, 25635139, 410...
$ vap         <int> 3802714, 554426, 5519036, 2319740, 30836229, 444...
Visualização Interativa de Dados com plotly em R

Arrecadação de campanha

glimpse(fundraising)
Rows: 2,412
Columns: 13
$ name         <fct> CUMMINGS, ELIJAH E, BROWN, ALVIN, ANGLE, SHARRON E, S...
$ id           <fct> H6MD07160, H8FL05140, H6NV02172, H2IL20042, H2PA15099...
$ office       <fct> H, H, H, H, H, H, H, H, H, H, H, H, H, H, H, H, H, H,...
$ state        <fct> MD, FL, NV, IL, PA, NJ, NH, AZ, KS, FL, MT, NC, CA, N...
...
$ receipts     <dbl> 944365.35, 450694.05, 52390.03, 1890067.19, 3926.00, ...
$ disbursement <dbl> 1051584.48, 447395.51, 34936.59, 1567978.53, 4705.16,...
$ cash.on.hand <dbl> 847733.69, 3298.54, 17568.45, 1158378.38, 64.36, -299...
$ debt.owed    <dbl> 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 314610.47, 0.00, ...
$ end.date     <fct> 10/17/18, 9/30/18, 9/30/18, 10/17/18, 9/30/18, 10/19/...
$ start.date   <fct> 1/1/17, 1/1/18, 10/1/17, 1/1/17, 1/1/17, 2/18/17, 4/1...
Visualização Interativa de Dados com plotly em R

Resultados no Congresso

glimpse(senate_winners)
Rows: 33
Columns: 7
$ name      <fct> SINEMA, KYRSTEN, FEINSTEIN, DIANNE, MURPHY, CHRISTOPH...
$ id        <fct> S8AZ00197, S0CA00199, S2CT00132, S8DE00079, S8FL00273...
$ state     <fct> AZ, CA, CT, DE, FL, HI, IN, MA, MD, ME, MI, MN, MO, M...
$ party     <fct> DEM, DEM, DEM, DEM, REP, DEM, REP, DEM, DEM, IND, DEM...
$ incumbent <fct> OPEN, INCUMBENT, INCUMBENT, INCUMBENT, CHALLENGER, IN...
$ votes     <int> 938976, 4777661, 818614, 217358, 4097689, 276133, 115...
$ pct.vote  <dbl> 48.87364, 54.44503, 59.42544, 61.31725, 50.07701, 71....
Visualização Interativa de Dados com plotly em R

Vamos explorar

Visualização Interativa de Dados com plotly em R

Preparing Video For Download...