Everybody likes Games Done Quick, and the events have contributed significant amounts to charity.
I just wanted to look at how much exactly.

gdq_raw <- read_html("https://en.wikipedia.org/wiki/Games_Done_Quick") %>%
        html_table(fill = TRUE)

gdq <- bind_rows(
  gdq_raw[[2]] %>%
  mutate(event = "AGDQ"),
  gdq_raw[[3]] %>% 
  mutate(event = "SGDQ")
) %>%
  transmute(amount  = parse_number(`Amount raised`),
            charity = str_replace_all(Charity, "\\[\\d+\\]", ""),
            year    = str_extract(Dates, "\\d{4}"),
            event   = event) %>%
  filter(!is.na(amount))

Well, now we got the data from Wikipedia. Let’s take a look.

ggplot(data = gdq, aes(x = year, y = amount, fill = event)) +
  geom_col(position = "dodge") +
  scale_y_continuous(labels = dollar_format()) +
  scale_fill_brewer(palette = "Set1") +
  labs(title = "Games Done Quick Donation Totals",
       subtitle = "Amounts Raised at Each Event",
       x = "Year of Event", y = "Amount Raised", fill = "Event",
       caption = "Data from\nhttps://en.wikipedia.org/wiki/Games_Done_Quick")
looking_at_data
looking_at_data

Boy that sure are some numbers. Let’s look at the cumulative donations per charity.

Since most events benefit Doctors Without Borders and Prevent Cancer Foundation respectively, I’ll exclude the other charities (CARE and Organisation for Autism Research) from this graph, they’ll come up later.

gdq %>% 
  filter(charity %in% c("Doctors Without Borders", "Prevent Cancer Foundation")) %>%
  mutate(charity = factor(charity, 
                          levels = c("Prevent Cancer Foundation", 
                                     "Doctors Without Borders"), ordered = TRUE)) %>%
  group_by(charity) %>%
  mutate(cum_amount = cumsum(amount)) %>%
  {
    ggplot(data = ., aes(x = year, y = cum_amount, fill = charity)) +
      geom_col(position = "dodge") +
      scale_y_continuous(labels = dollar_format()) +
      scale_fill_brewer(palette = "Set1") +
      labs(title = "Games Done Quick Donation Totals",
           subtitle = "Cumulative Amount Raised for Each Charity",
           x = "Year of Event", y = "Amount Raised", fill = "Charity",
           caption = "Data from\nhttps://en.wikipedia.org/wiki/Games_Done_Quick")
  }
per_charity
per_charity

Okay, now cumulative totals:

gdq %>% 
  group_by(charity) %>%
  mutate(cum_amount = sum(amount)) %>%
  {
    ggplot(data = ., aes(x = reorder(charity, cum_amount), y = cum_amount)) +
      geom_col(position = "dodge", alpha = .7) +
      geom_label(aes(label = dollar(cum_amount), y = 2e6)) +
      coord_flip() +
      scale_y_continuous(labels = dollar_format()) +
      scale_fill_brewer(palette = "Set2") +
      labs(title = "Games Done Quick Donation Totals",
           subtitle = "Cumulative Amount Raised for Each Charity",
           x = "Charity", y = "Amount Raised",
           caption = "Data from\nhttps://en.wikipedia.org/wiki/Games_Done_Quick")
  }
cum_total
cum_total

And as a grand total, Games Done Quick has raised $16,499,002 for charity.
Neat.