source("Preprocessing data and functions - CRS donors, projects, and channels.R")
# Groups
yr_income<- getGroupStats(crssub, c("Year","Income"))
yr_region <- getGroupStats(crssub, c("Year","Region"))
yr_donortype <- getGroupStats(crssub, c("Year","DonorType"))
yr_mlattype <- getGroupStats(crssub, c("Year","MultilateralType"))
# Individuals
yr_recipient <- getGroupStats(crssub, c("Year","RecipientName","ISO","Income","Region"))
yr_donors <- getGroupStats(crssub, c("Year","DonorName","DonorCode", "DonorType", "MultilateralType"))
# Averages across individuals in groups
yr_income_recipient_avgs <- getGroupAvgs(yr_recipient, c("Year","Income"))
yr_region_recipient_avgs <- getGroupAvgs(yr_recipient, c("Year","Region"))
yr_donortype_donor_avgs <- getGroupAvgs(yr_donors, c("Year","DonorType"))
yr_mlattype_donor_avgs <- getGroupAvgs(yr_donors, c("Year", "MultilateralType"))
# Combine with group tables
yr_income <- yr_income %>% left_join(yr_income_recipient_avgs, by=c("Year","Income"))
yr_region <- yr_region %>% left_join(yr_region_recipient_avgs, by=c("Year","Region"))
yr_donortype <- yr_donortype %>% left_join(yr_donortype_donor_avgs, by=c("Year","DonorType"))
yr_mlattype <- yr_mlattype %>% left_join(yr_mlattype_donor_avgs, by=c("Year","MultilateralType"))
# Combine with individual tables
yr_recipient <- yr_recipient%>%left_join(yr_income%>%select(Year, Income, contains("median")), by=c("Year","Income"))
yr_donors <- yr_donors%>%left_join(yr_donortype%>%select(Year, DonorType, contains("median")), by=c("Year","DonorType"))
Data: This report is based off of the OECD Creditor Reporting System data, accessed via the bulk download files on 6/18/2024.
Filters: I have looked at a subset of the CRS as follows:
Country Programmable Aid (excluding items listed in CPA definition)
Rows with commitments data
Commitments in constant $US
Low income and lower middle income countries only
Note that some of the small multiples are on different axes scales
plotTS(yr_income, "USD_Commitment_Defl","","Total commitments",GROUP="Income")
plotTS(yr_region, "USD_Commitment_Defl","","Total commitments",GROUP="Region")
# Low income
plotTS(yr_recipient%>%filter(Income %in% c("Low income")), "USD_Commitment_Defl","Total Commitments (Constant $US)","Low income",FACET="RecipientName", FACET_SCALES = "free_y", FACET_CONST="median_USD_Commitment_Defl")
# Lower middle income
plotTS(yr_recipient%>%filter(Income %in% c("Lower middle income")), "USD_Commitment_Defl","Total Commitments (Constant $US)","Lower middle income",FACET="RecipientName", FACET_SCALES = "free_y", FACET_CONST="median_USD_Commitment_Defl")
plotTS(yr_mlattype%>%filter(!is.na(MultilateralType)), "USD_Commitment_Defl","","Total commitments",GROUP="MultilateralType")
# DAC
plotTS(yr_donors%>%filter(DonorType=="DAC"), "USD_Commitment_Defl","Total Commitments (Constant $US)","DAC",FACET="DonorName", FACET_SCALES = "free_y", FACET_CONST="median_USD_Commitment_Defl")
# Multilateral
plotTS(yr_donors%>%filter(DonorType=="Multilateral"), "USD_Commitment_Defl","Total Commitments (Constant $US)","DAC",FACET="DonorName", FACET_SCALES = "free_y", FACET_CONST="median_USD_Commitment_Defl")
Total annual commitments / # of donors
This can also be thought of as an average annual commitment size per donor:
plotTS(yr_income, "usd_commits_per_donor","","Total annual commitments / # distinct donors",GROUP="Income")
plotTS(yr_income, "median_usd_commits_per_donor","","Total annual commitments / # distinct donors",GROUP="Income")
plotTS(yr_region, "usd_commits_per_donor","","Total annual commitments / # distinct donors",GROUP="Region")
# Low income
plotTS(yr_recipient%>%filter(Income %in% c("Low income")), "usd_commits_per_donor","Total annual commitments / # of Donors","Low income",FACET="RecipientName", FACET_SCALES = "free_y", FACET_CONST="median_usd_commits_per_donor")
# Lower middle income
plotTS(yr_recipient%>%filter(Income %in% c("Lower middle income")), "usd_commits_per_donor","Total annual commitments / # of Donors","Lower middle income",FACET="RecipientName", FACET_SCALES = "free_y", FACET_CONST="median_usd_commits_per_donor")
plotTS(yr_donortype, "usd_commits_per_donor","","Total annual commitments / # distinct donors",GROUP="DonorType")
plotTS(yr_mlattype, "usd_commits_per_donor","","Total annual commitments / # distinct donors",GROUP="MultilateralType")
# DAC
plotTS(yr_donors%>%filter(DonorType=="DAC"), "usd_commits_per_donor","Total annual commitments / # of Donors","DAC",FACET="DonorName", FACET_SCALES = "free_y", FACET_CONST="median_usd_commits_per_donor")
# Multilateral
plotTS(yr_donors%>%filter(DonorType=="Multilateral"), "usd_commits_per_donor","Total annual commitments / # of Donors","DAC",FACET="DonorName", FACET_SCALES = "free_y", FACET_CONST="median_usd_commits_per_donor")
Total annual commitments / # of projects
This can also be thought of as an average annual project size:
How to interpret:
plotTS(yr_income, "usd_commits_per_proj","","Total annual commitments / # distinct projects",GROUP="Income")
plotTS(yr_income, "median_usd_commits_per_proj","","Total annual commitments / # distinct donors",GROUP="Income")
plotTS(yr_region, "usd_commits_per_proj","","Total annual commitments / # distinct projects",GROUP="Region")
# Low income
plotTS(yr_recipient%>%filter(Income %in% c("Low income")), "usd_commits_per_proj","Total annual commitments / # of Projects","Low income",FACET="RecipientName", FACET_SCALES = "free_y", FACET_CONST="median_usd_commits_per_proj")
# Lower middle income
plotTS(yr_recipient%>%filter(Income %in% c("Lower middle income")), "usd_commits_per_proj","Total annual commitments / # of Projects","Lower middle income",FACET="RecipientName", FACET_SCALES = "free_y", FACET_CONST="median_usd_commits_per_proj")
plotTS(yr_donortype, "usd_commits_per_proj","","Total annual commitments / # distinct projects",GROUP="DonorType")
plotTS(yr_mlattype, "usd_commits_per_proj","","Total annual commitments / # distinct projects",GROUP="MultilateralType")
# DAC
plotTS(yr_donors%>%filter(DonorType=="DAC"), "usd_commits_per_proj","Total annual commitments / # of Projects","DAC",FACET="DonorName", FACET_SCALES = "free_y", FACET_CONST="median_usd_commits_per_proj")
# Multilateral
plotTS(yr_donors%>%filter(DonorType=="Multilateral"), "usd_commits_per_proj","Total annual commitments / # of Projects","DAC",FACET="DonorName", FACET_SCALES = "free_y", FACET_CONST="median_usd_commits_per_proj")
Total annual commitments / # of transactions
This can also be thought of as an average transaction size:
plotTS(yr_income, "usd_commits_per_trans","","Total annual commitments / # distinct transactions",GROUP="Income")
plotTS(yr_income, "median_usd_commits_per_trans","","Total annual commitments / # distinct donors",GROUP="Income")
plotTS(yr_region, "usd_commits_per_trans","","Total annual commitments / # distinct transactions",GROUP="Region")
# Low income
plotTS(yr_recipient%>%filter(Income %in% c("Low income")), "usd_commits_per_trans","Total annual commitments / # of Transactions","Low income",FACET="RecipientName", FACET_SCALES = "free_y", FACET_CONST="median_usd_commits_per_trans")
# Lower middle income
plotTS(yr_recipient%>%filter(Income %in% c("Lower middle income")), "usd_commits_per_trans","Total annual commitments / # of Transactions","Lower middle income",FACET="RecipientName", FACET_SCALES = "free_y", FACET_CONST="median_usd_commits_per_trans")
plotTS(yr_donortype, "usd_commits_per_trans","","Total annual commitments / # distinct transactions",GROUP="DonorType")
plotTS(yr_mlattype, "usd_commits_per_trans","","Total annual commitments / # distinct transactions",GROUP="MultilateralType")
# DAC
plotTS(yr_donors%>%filter(DonorType=="DAC"), "usd_commits_per_trans","Total annual commitments / # of Transactions","DAC",FACET="DonorName", FACET_SCALES = "free_y", FACET_CONST="median_usd_commits_per_trans")
# Multilateral
plotTS(yr_donors%>%filter(DonorType=="Multilateral"), "usd_commits_per_trans","Total annual commitments / # of Transactions","DAC",FACET="DonorName", FACET_SCALES = "free_y", FACET_CONST="median_usd_commits_per_trans")