John Lekberg

Money Raised by 2020 Candidates

Created 2019-07-17.

Receipts for democratic and republican candidates.

I used the FEC's campaign finance data for the 2020 presidential election.

Since multiple parties were represented, the first thing I did was look at the amount of candidates in each party (see "Amount of Candidates in each party"):

ggplot(df, aes(party)) + geom_histogram(stat="count")

Based on that, I decided to focus on just the democratic party and the republican party.

The graphic shows the amount of receipts per candidate. Some differences we see between the parties:

Amount of Candidates in each party

Code used to create "Money Raised by 2020 Candidates"

code.r - Main code used to generate the graphic.
df <- read.csv("~/Downloads/totals-2019-07-17T17_22_47.csv")
df %<>% dplyr::filter(has_raised_funds == "t")
df %<>% dplyr::filter(party %in% c("DEM", "REP"))

df %>%
  arrange(receipts) %>%  
  ggplot(aes(reorder(name, receipts), receipts)) +
  coord_flip() +
  facet_grid(party_full ~ ., scales="free", space="free") +
  xlab("Candidates for President") +