library(tidyverse)
library(qs)
library(lubridate)
library(DT)
theme_set(theme_minimal())
options(DT.options = list(dom="ftp"))
mt <- parallel::detectCores()/2
This data set contains a total of 92,844 donation records between February 1-10, 2022. A total of $8,421,807 worth of donations were recorded.
donations <- qread("./data/donations-cleantext.qs", nthreads=mt)
daily_donations <- donations %>%
mutate(day = date(donation_date)) %>%
group_by(day) %>%
summarise(
top_donation = max(donation_amount),
total_donation = sum(donation_amount)
) %>%
mutate(
top_donation = scales::comma(top_donation),
top_donation = str_c("Top donation: $", top_donation),
top_donation = str_wrap(top_donation, width=15)
)
ggplot(daily_donations, aes(x=day, y=total_donation)) +
geom_col() +
geom_text(aes(label=top_donation), colour="forestgreen", size=3, nudge_y=1e5) +
scale_y_continuous(labels=scales::comma) +
scale_x_date(date_breaks="1 day", date_labels="%e") +
labs(
x="February", y="Total donations ($)",
title="Freedom Convoy GiveSendGo daily donations",
caption="Freedom Convoy's GoFundMe was frozen on January 25th"
)
donations %>%
filter(donation_amount > 500) %>%
arrange(desc(donation_amount)) %>%
select(donation_email, donation_country, donation_amount) %>%
datatable(colnames = c("Email domain", "Country", "Donation amount")) %>%
formatCurrency(columns="donation_amount")
Possible that VPNs were used. Number of donations counts the number of donation transactions, therefore some donators may be included in this count more than once.
donations %>%
group_by(donation_country) %>%
summarise(
n_donations = n(),
total_donations = sum(donation_amount)
) %>%
filter(total_donations > 100) %>%
arrange(desc(total_donations)) %>%
datatable(colnames = c("Country", "Number of donations", "Total donations (USD)")) %>%
formatCurrency(columns="n_donations", currency="", digits=0) %>%
formatCurrency(columns="total_donations")
donations %>%
count(donation_email) %>%
slice_max(order_by=n, n=15)
## # A tibble: 15 x 2
## donation_email n
## <chr> <int>
## 1 gmail.com 37410
## 2 hotmail.com 11168
## 3 yahoo.com 9340
## 4 protonmail.com 3589
## 5 aol.com 2363
## 6 outlook.com 1705
## 7 comcast.net 1480
## 8 icloud.com 1405
## 9 yahoo.ca 1337
## 10 shaw.ca 1239
## 11 msn.com 951
## 12 me.com 778
## 13 telus.net 709
## 14 live.com 699
## 15 rogers.com 629
I heard a rumour... that some federal public service employees were dumb enough to use their work emails... Or maybe it was intentional 🤷♂️.
donations %>%
filter(str_detect(donation_email, "gc\\.ca")) %>%
select(donation_email, donation_amount)
## # A tibble: 1 x 2
## donation_email donation_amount
## <chr> <dbl>
## 1 csc-scc.gc.ca 102
CSC-SCC is Correctional Services Canada 👀.
Now, onto the American government employees:
donations %>%
filter(str_detect(donation_email, "\\.gov")) %>%
select(donation_email, donation_amount)
## # A tibble: 8 x 2
## donation_email donation_amount
## <chr> <dbl>
## 1 nasa.gov 25
## 2 nasa.gov 20
## 3 usdoj.gov 50
## 4 bop.gov 40
## 5 delaware.gov 50
## 6 usdoj.gov 25
## 7 bop.gov 25
## 8 tsa.dhs.gov 50
email_finder <- function(domain) {
donations %>%
filter(str_detect(donation_email, pattern=domain)) %>%
group_by(donation_email) %>%
summarise(
n_donations = n(),
total_donations = sum(donation_amount)
) %>%
arrange(desc(total_donations)) %>%
datatable(colnames = c("Email domain", "Number of donations", "Total donations (USD)")) %>%
formatCurrency(columns="total_donations")
}
Number of donations counts the number of donation transactions, therefore some donators may be included in this count more than once.
alberta <- "(?:\\.|^)(?:auarts|athabascau|macewan|mtroyal|ualberta|ucalgary|ulethbridge)\\.ca"
email_finder(alberta)
bc <- "(?:\\.|^)(?:capilanou|ecuad|kpu|royalroads|sfu|tru|ubc|uvic|ufv|unbc|viu)\\.ca"
email_finder(bc)
manitoba <- "(?:\\.|^)(?:brandonu|ucn|umanitoba|ustboniface|uwinnipeg)\\.ca"
email_finder(manitoba)
nb <- "(?:\\.|^)(?:mta|stu|unb|umoncton)\\.ca"
email_finder(nb)
nfld <- "(?:\\.|^)(?:mun)\\.ca"
email_finder(nfld)
ns <- "(?:\\.|^)(?:acadiau|cbu|dal|msvu|nscad|stfx)\\.ca"
email_finder(ns)
ontario <- "(?:\\.|^)(?:algomau|brocku|carleton|lakeheadu|laurentian|mcmaster|nipissingu|ocadu|queensu|rmc-cmr|ryerson|trentu|uontario|uoguelph|ontariotechu|uottawa|utoronto|uwaterloo|uwo|uwindsor|wlu|yorku)\\.ca"
email_finder(ontario)
pei <- "(?:\\.|^)(?:upei)\\.ca"
email_finder(pei)
quebec <- "(?:\\.|^)(?:ubishops|concordia|etsmtl|enap|inrs|mcgill|umontreal|usherbrooke|uqo|uqac|uqam|uqar|uqtr|ulaval)\\.ca"
email_finder(quebec)
sask <- "(?:\\.|^)(?:uregina|usask)\\.ca"
email_finder(sask)
yukon <- "(?:\\.|^)(?:yukonu)\\.ca"
email_finder(yukon)
privateu <- "(?:\\.|^)(?:ambrose\\.edu|boothuc\\.ca|burmanu\\.ca|cmu\\.ca|concordia\\.ab\\.ca|crandallu\\.ca|kingswood\\.edu|providenceuc\\.ca|questu\\.ca|redeemer\\.ca|stmu\\.ca|ssu\\.ca|kingsu\\.ca|twu\\.ca|tyndale\\.ca|ucanwest\\.ca|ufred\\.ca|yorkvilleu\\.ca)"
email_finder(privateu)
There are too many colleges in Canada and they aren't all using .ca domains...
hbs.edu is Harvard Business School 👀.
edu <- "(?:\\.|^).*\\.edu"
email_finder(edu)