The Institute of International Finance (IIF) produces a Sustainable Debt Monitor with useful information about the volume, sector, and geography of various types of sustainable debt products.
here("01_data_raw", "iif", "Sustainable_debt_monitor.xlsx") %>% excel_sheets()
## [1] "Table of contents" "Country coverage"
## [3] "1a_global markets - issuance" "1b_global markets - outstanding"
## [5] "2a_MM by country" "2b_MM by sector"
## [7] "3a_EM&FM by country" "3b_EM&FM by sector"
## [9] "4a_offshore centers by country" "4b_offshore centers by sector"
## [11] "5_supranationals by country" "6_outstanding amt by country "
## [13] "7_Share of ESG debt issuance"
Make the data on “1a_global markets - issuance” into a cohesive dataset:
here("01_data_raw", "iif", "Sustainable_debt_monitor.xlsx") %>%
#specify the sheet + the range of cells in excel
read_excel(sheet = "1a_global markets - issuance",
range = "B4:G41") %>%
# rename the first column to "date"
rename(date = `$ billion`) %>%
# Tidy the dataset by making the column names into long format
pivot_longer(cols = -date, names_to = "geography", values_to = "issuance_bn_usd") %>%
# coerce the date column into a date object using lubridate::ymd() (year-month_date)
mutate(date = ymd(date)) %>%
# Add a column that includes the name of this specific data
add_column(issuance_type = "Sustainable debt (bonds and loans)")
There are 11 different sub-datasets on this worksheet, so let’s save ourselves some time and make a function.
process_iif_gb_issuance <- function(range, issuance_type) {
here("01_data_raw", "iif", "Sustainable_debt_monitor.xlsx") %>%
read_excel(sheet = "1a_global markets - issuance", range = range) %>%
rename(date = `$ billion`) %>%
pivot_longer(cols = -date, names_to = "geography", values_to = "issuance_bn_usd") %>%
mutate(date = ymd(date)) %>%
add_column(issuance_type = issuance_type)
}
Let’s use this functions to create a data object from the first set of data
bonds_and_loans <- process_iif_gb_issuance(range = "B4:G41",
issuance_type = "Sustainable debt (bonds and loans)")
bonds_and_loans
bonds <- process_iif_gb_issuance(range = "I4:N41",
issuance_type = "Sustainable bonds")
bonds
loans <- process_iif_gb_issuance(range = "P4:U41",
issuance_type = "Sustainable loans")
loans
greenabs <- process_iif_gb_issuance(range = "AD4:AI41",
issuance_type = "Green ABS")
greenabs
greenbonds <- process_iif_gb_issuance(range = "W4:AB41",
issuance_type = "Green bonds")
greenbonds
susbonds <- process_iif_gb_issuance(range = "AK4:AP41",
issuance_type = "Sustainability bonds")
susbonds
socialbonds <- process_iif_gb_issuance(range = "AR4:AW41",
issuance_type = "Social bonds")
socialbonds
socialbonds <- process_iif_gb_issuance(range = "AR4:AW41",
issuance_type = "Social bonds")
socialbonds
greenmunicipal <- process_iif_gb_issuance(range = "AY4:BD41",
issuance_type = "Green municipal bonds")
greenmunicipal
suslinkedbonds <- process_iif_gb_issuance(range = "BF4:BK41",
issuance_type = "Sustainability-linked bonds")
suslinkedbonds
greenloans <- process_iif_gb_issuance(range = "BM4:BR41",
issuance_type = "Green loans")
greenloans
suslinkedloans <- process_iif_gb_issuance(range = "BT4:BY41",
issuance_type = "Sustainability-linked loans")
suslinkedloans
Now we can bind them together into one dataset
iif_issuance_data <- bonds_and_loans %>%
bind_rows(bonds)%>%
bind_rows(loans)%>%
bind_rows(greenbonds)%>%
bind_rows(greenabs)%>%
bind_rows(susbonds)%>%
bind_rows(socialbonds)%>%
bind_rows(greenmunicipal)%>%
bind_rows(suslinkedbonds)%>%
bind_rows(greenloans)%>%
bind_rows(suslinkedloans)
iif_issuance_data
compsusdebt<- iif_issuance_data %>%
filter(issuance_type == "Sustainable debt (bonds and loans)")
ggplot(compsusdebt, aes (x = date, y = issuance_bn_usd, group = geography))+
geom_line(aes(colour = geography))+
geom_point(aes(x = date, y = issuance_bn_usd, colour = geography))+
labs(
title = "Sustainable debt (bonds and loans)",
subtitle = "Geographical Comparison (Year 2013 - 2022)",
caption = "Data from IIF",
tag = "Figure 1",
x = "Year",
y = "issuance_bn_usd",
colour = "Geography"
)+
theme_gray()