Rows: 355 Columns: 42
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (12): Country, ISO2, ISO3, Indicator, Unit, Source, CTS_Code, CTS_Name, ...
dbl (30): ObjectId, F1985, F1986, F1987, F1990, F1991, F1992, F1993, F1994, ...
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
green_debt
# A tibble: 355 × 42
ObjectId Country ISO2 ISO3 Indicator Unit Source CTS_Code CTS_Name
<dbl> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
1 1 Argentina AR ARG Green Bo… Bill… Refin… ECFFI Green B…
2 2 Australia AU AUS Green Bo… Bill… Refin… ECFFI Green B…
3 3 Austria AT AUT Green Bo… Bill… Refin… ECFFI Green B…
4 4 Austria AT AUT Sovereig… Bill… Refin… ECFF Green B…
5 5 Bangladesh BD BGD Green Bo… Bill… Refin… ECFFI Green B…
6 6 Belarus, Rep. … BY BLR Green Bo… Bill… Refin… ECFFI Green B…
7 7 Belarus, Rep. … BY BLR Sovereig… Bill… Refin… ECFF Green B…
8 8 Belgium BE BEL Green Bo… Bill… Refin… ECFFI Green B…
9 9 Belgium BE BEL Sovereig… Bill… Refin… ECFF Green B…
10 10 Bermuda BM BMU Green Bo… Bill… Refin… ECFFI Green B…
# ℹ 345 more rows
# ℹ 33 more variables: CTS_Full_Descriptor <chr>, Type_of_Issuer <chr>,
# Use_of_Proceed <chr>, Principal_Currency <chr>, F1985 <dbl>, F1986 <dbl>,
# F1987 <dbl>, F1990 <dbl>, F1991 <dbl>, F1992 <dbl>, F1993 <dbl>,
# F1994 <dbl>, F1999 <dbl>, F2000 <dbl>, F2002 <dbl>, F2003 <dbl>,
# F2004 <dbl>, F2007 <dbl>, F2008 <dbl>, F2009 <dbl>, F2010 <dbl>,
# F2011 <dbl>, F2012 <dbl>, F2013 <dbl>, F2014 <dbl>, F2015 <dbl>, …
3.5.0.1 Homework problem 1:
Use the countrycode package to add the region as a variable to green_debt_subset.
# we want to compare these two indicatorsindicators_we_want <-c("Green Bond Issuances by Country", "Sovereign Green Bond Issuances")green_debt_subset <- green_debt |># from the janitor package -- makes variables snake_case so they are easier to work withclean_names() |># filter for the vector of indicators we defined abovefilter(indicator %in% indicators_we_want) |># "f\\d{4}" is a regular expression (regex) that searches for all columns that are f + four digits.# Ask ChatGPT to explain this to you.select(country, iso3, indicator, matches("f\\d{4}")) green_debt_subset
# A tibble: 107 × 32
country iso3 indicator f1985 f1986 f1987 f1990 f1991 f1992 f1993 f1994 f1999
<chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
1 Argent… ARG Green Bo… NA NA NA NA NA NA NA NA NA
2 Austra… AUS Green Bo… NA NA NA NA NA NA NA NA NA
3 Austria AUT Green Bo… NA NA NA NA NA NA NA NA NA
4 Austria AUT Sovereig… NA NA NA NA NA NA NA NA NA
5 Bangla… BGD Green Bo… NA NA NA NA NA NA NA NA NA
6 Belaru… BLR Green Bo… NA NA NA NA NA NA NA NA NA
7 Belaru… BLR Sovereig… NA NA NA NA NA NA NA NA NA
8 Belgium BEL Green Bo… NA NA NA NA NA NA NA NA NA
9 Belgium BEL Sovereig… NA NA NA NA NA NA NA NA NA
10 Bermuda BMU Green Bo… NA NA NA NA NA NA NA NA NA
# ℹ 97 more rows
# ℹ 20 more variables: f2000 <dbl>, f2002 <dbl>, f2003 <dbl>, f2004 <dbl>,
# f2007 <dbl>, f2008 <dbl>, f2009 <dbl>, f2010 <dbl>, f2011 <dbl>,
# f2012 <dbl>, f2013 <dbl>, f2014 <dbl>, f2015 <dbl>, f2016 <dbl>,
# f2017 <dbl>, f2018 <dbl>, f2019 <dbl>, f2020 <dbl>, f2021 <dbl>,
# f2022 <dbl>
# A tibble: 107 × 33
region country iso3 indicator f1985 f1986 f1987 f1990 f1991 f1992 f1993
<chr> <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
1 Latin Amer… Argent… ARG Green Bo… NA NA NA NA NA NA NA
2 East Asia … Austra… AUS Green Bo… NA NA NA NA NA NA NA
3 Europe & C… Austria AUT Green Bo… NA NA NA NA NA NA NA
4 Europe & C… Austria AUT Sovereig… NA NA NA NA NA NA NA
5 South Asia Bangla… BGD Green Bo… NA NA NA NA NA NA NA
6 Europe & C… Belaru… BLR Green Bo… NA NA NA NA NA NA NA
7 Europe & C… Belaru… BLR Sovereig… NA NA NA NA NA NA NA
8 Europe & C… Belgium BEL Green Bo… NA NA NA NA NA NA NA
9 Europe & C… Belgium BEL Sovereig… NA NA NA NA NA NA NA
10 North Amer… Bermuda BMU Green Bo… NA NA NA NA NA NA NA
# ℹ 97 more rows
# ℹ 22 more variables: f1994 <dbl>, f1999 <dbl>, f2000 <dbl>, f2002 <dbl>,
# f2003 <dbl>, f2004 <dbl>, f2007 <dbl>, f2008 <dbl>, f2009 <dbl>,
# f2010 <dbl>, f2011 <dbl>, f2012 <dbl>, f2013 <dbl>, f2014 <dbl>,
# f2015 <dbl>, f2016 <dbl>, f2017 <dbl>, f2018 <dbl>, f2019 <dbl>,
# f2020 <dbl>, f2021 <dbl>, f2022 <dbl>
Calculate the cumulative issuance of green bonds by region.
# A tibble: 7 × 2
region cumulative_issuance
<chr> <dbl>
1 East Asia & Pacific 586.
2 Europe & Central Asia 1395.
3 Latin America & Caribbean 99.8
4 Middle East & North Africa 10.3
5 North America 239.
6 South Asia 15.0
7 Sub-Saharan Africa 16.2
Use ggplot2 to make a data visualization comparing regional cumulative issuance.
library(ggplot2)ggplot(cumulative_issuance_by_region, aes(x =reorder(region, cumulative_issuance), y = cumulative_issuance, fill = region)) +geom_bar(stat ="identity") +theme_minimal() +scale_y_continuous(labels = scales::label_dollar(suffix =" bn"),expand =c(0,0)) +labs(x ="Region", y ="Cumulative Issuance of Green Bonds", title ="Comparative Cumulative Issuance of Green Bonds by Region") +coord_flip()
3.5.0.2 Homework problem 2:
Use the full green_debt dataset
Use clean_names() to make the variable names snake_case
Filter out observations where type_of_issuer is “Not Applicable”
Use the tools taught in this chapter to provide a compelling data visualization and some repeatable factoids that provide actionable insights about green bond issuers.
# A tibble: 7 × 43
# Groups: type_of_issuer [7]
object_id country iso2 iso3 indicator unit source cts_code cts_name
<dbl> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
1 350 World <NA> WLD Green Bond Issua… Bill… Refin… ECFFI Green B…
2 347 World <NA> WLD Green Bond Issua… Bill… Refin… ECFFI Green B…
3 351 World <NA> WLD Green Bond Issua… Bill… Refin… ECFFI Green B…
4 353 World <NA> WLD Green Bond Issua… Bill… Refin… ECFFI Green B…
5 352 World <NA> WLD Green Bond Issua… Bill… Refin… ECFFI Green B…
6 348 World <NA> WLD Green Bond Issua… Bill… Refin… ECFFI Green B…
7 349 World <NA> WLD Green Bond Issua… Bill… Refin… ECFFI Green B…
# ℹ 34 more variables: cts_full_descriptor <chr>, type_of_issuer <chr>,
# use_of_proceed <chr>, principal_currency <chr>, f1985 <dbl>, f1986 <dbl>,
# f1987 <dbl>, f1990 <dbl>, f1991 <dbl>, f1992 <dbl>, f1993 <dbl>,
# f1994 <dbl>, f1999 <dbl>, f2000 <dbl>, f2002 <dbl>, f2003 <dbl>,
# f2004 <dbl>, f2007 <dbl>, f2008 <dbl>, f2009 <dbl>, f2010 <dbl>,
# f2011 <dbl>, f2012 <dbl>, f2013 <dbl>, f2014 <dbl>, f2015 <dbl>,
# f2016 <dbl>, f2017 <dbl>, f2018 <dbl>, f2019 <dbl>, f2020 <dbl>, …
ggplot(total_issuance_by_issuer, aes(x =reorder(type_of_issuer, total_issuance), y = total_issuance, fill = type_of_issuer)) +geom_bar(stat ="identity") +theme_minimal() +labs(x ="Type of Issuer", y ="Total Issuance", title ="Total Green Bond Issuance by Issuer Type") +coord_flip()
Nonfinancial corporations are the leading issuers of green bonds. This indicates a significant engagement from the corporate sector in raising capital for green projects, which suggests a strong corporate commitment to sustainability initiatives. The presence of various issuer types, such as sovereign entities, state-owned entities, and local and state governments, illustrates the multi-faceted approach to funding green initiatives. It suggests that green finance is a priority across different levels of governance and institutional structures.
3.5.0.3 Homework problem 3:
Repeat the process from problem 2 for use_of_proceed and for principal_currency
# A tibble: 138 × 42
object_id country iso2 iso3 indicator unit source cts_code cts_name
<dbl> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
1 209 World <NA> WLD Cumulative Gree… Share Refin… ECFF Green B…
2 210 World <NA> WLD Cumulative Gree… Bill… Refin… ECFF Green B…
3 211 World <NA> WLD Cumulative Gree… Share Refin… ECFF Green B…
4 212 World <NA> WLD Cumulative Gree… Bill… Refin… ECFF Green B…
5 213 World <NA> WLD Cumulative Gree… Share Refin… ECFF Green B…
6 214 World <NA> WLD Cumulative Gree… Bill… Refin… ECFF Green B…
7 215 World <NA> WLD Cumulative Gree… Share Refin… ECFF Green B…
8 216 World <NA> WLD Cumulative Gree… Bill… Refin… ECFF Green B…
9 217 World <NA> WLD Cumulative Gree… Share Refin… ECFF Green B…
10 218 World <NA> WLD Cumulative Gree… Bill… Refin… ECFF Green B…
# ℹ 128 more rows
# ℹ 33 more variables: cts_full_descriptor <chr>, type_of_issuer <chr>,
# use_of_proceed <chr>, principal_currency <chr>, f1985 <dbl>, f1986 <dbl>,
# f1987 <dbl>, f1990 <dbl>, f1991 <dbl>, f1992 <dbl>, f1993 <dbl>,
# f1994 <dbl>, f1999 <dbl>, f2000 <dbl>, f2002 <dbl>, f2003 <dbl>,
# f2004 <dbl>, f2007 <dbl>, f2008 <dbl>, f2009 <dbl>, f2010 <dbl>,
# f2011 <dbl>, f2012 <dbl>, f2013 <dbl>, f2014 <dbl>, f2015 <dbl>, …
# Calculate total issuance by use_of_proceedtotal_issuance_by_use_top10 <- green_debt_problem3 |>group_by(use_of_proceed) |>mutate(total_issuance =rowSums(across(starts_with("f")), na.rm =TRUE))|>arrange(desc(total_issuance))|>ungroup()|>top_n(10, total_issuance)total_issuance_by_use_top10
# A tibble: 10 × 43
object_id country iso2 iso3 indicator unit source cts_code cts_name
<dbl> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
1 234 World <NA> WLD Cumulative Gree… Bill… Refin… ECFF Green B…
2 248 World <NA> WLD Cumulative Gree… Bill… Refin… ECFF Green B…
3 236 World <NA> WLD Cumulative Gree… Bill… Refin… ECFF Green B…
4 244 World <NA> WLD Cumulative Gree… Bill… Refin… ECFF Green B…
5 270 World <NA> WLD Cumulative Gree… Bill… Refin… ECFF Green B…
6 308 World <NA> WLD Cumulative Gree… Bill… Refin… ECFF Green B…
7 222 World <NA> WLD Cumulative Gree… Bill… Refin… ECFF Green B…
8 232 World <NA> WLD Cumulative Gree… Bill… Refin… ECFF Green B…
9 220 World <NA> WLD Cumulative Gree… Bill… Refin… ECFF Green B…
10 334 World <NA> WLD Cumulative Gree… Bill… Refin… ECFF Green B…
# ℹ 34 more variables: cts_full_descriptor <chr>, type_of_issuer <chr>,
# use_of_proceed <chr>, principal_currency <chr>, f1985 <dbl>, f1986 <dbl>,
# f1987 <dbl>, f1990 <dbl>, f1991 <dbl>, f1992 <dbl>, f1993 <dbl>,
# f1994 <dbl>, f1999 <dbl>, f2000 <dbl>, f2002 <dbl>, f2003 <dbl>,
# f2004 <dbl>, f2007 <dbl>, f2008 <dbl>, f2009 <dbl>, f2010 <dbl>,
# f2011 <dbl>, f2012 <dbl>, f2013 <dbl>, f2014 <dbl>, f2015 <dbl>,
# f2016 <dbl>, f2017 <dbl>, f2018 <dbl>, f2019 <dbl>, f2020 <dbl>, …
What are green bond proceeds used for?
# Plot total issuance by use_of_proceedlibrary(ggplot2)ggplot(total_issuance_by_use_top10, aes(x =reorder(use_of_proceed, total_issuance), y = total_issuance, fill = use_of_proceed)) +geom_bar(stat ="identity") +theme_minimal() +scale_y_continuous(labels = scales::label_dollar(suffix =" bn"),expand =c(0,0)) +labs(x ="Use of Proceed", y ="Total Issuance", title ="Top 10 Uses of Green Bond Proceeds by Total Issuance") +coord_flip() +theme(legend.position ="none",axis.text.x =element_text(angle =45, hjust =1),plot.title =element_text(hjust =0.5),axis.text.y =element_text(size =7) # Adjust the text size if the labels are overlapping )
The top 1 green bond proceeds is used for clean transport energy.
What do we know about the currency of issuance? Is that changing over time?
# A tibble: 10 × 43
object_id country iso2 iso3 indicator unit source cts_code cts_name
<dbl> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
1 138 World <NA> WLD Cumulative Gree… Bill… Refin… ECFF Green B…
2 206 World <NA> WLD Cumulative Gree… Bill… Refin… ECFF Green B…
3 128 World <NA> WLD Cumulative Gree… Bill… Refin… ECFF Green B…
4 194 World <NA> WLD Cumulative Gree… Bill… Refin… ECFF Green B…
5 120 World <NA> WLD Cumulative Gree… Bill… Refin… ECFF Green B…
6 122 World <NA> WLD Cumulative Gree… Bill… Refin… ECFF Green B…
7 154 World <NA> WLD Cumulative Gree… Bill… Refin… ECFF Green B…
8 114 World <NA> WLD Cumulative Gree… Bill… Refin… ECFF Green B…
9 196 World <NA> WLD Cumulative Gree… Bill… Refin… ECFF Green B…
10 134 World <NA> WLD Cumulative Gree… Bill… Refin… ECFF Green B…
# ℹ 34 more variables: cts_full_descriptor <chr>, type_of_issuer <chr>,
# use_of_proceed <chr>, principal_currency <chr>, f1985 <dbl>, f1986 <dbl>,
# f1987 <dbl>, f1990 <dbl>, f1991 <dbl>, f1992 <dbl>, f1993 <dbl>,
# f1994 <dbl>, f1999 <dbl>, f2000 <dbl>, f2002 <dbl>, f2003 <dbl>,
# f2004 <dbl>, f2007 <dbl>, f2008 <dbl>, f2009 <dbl>, f2010 <dbl>,
# f2011 <dbl>, f2012 <dbl>, f2013 <dbl>, f2014 <dbl>, f2015 <dbl>,
# f2016 <dbl>, f2017 <dbl>, f2018 <dbl>, f2019 <dbl>, f2020 <dbl>, …
# Plot total issuance by principal currencyggplot(total_currency_top10, aes(x = principal_currency, y = total_issuance, fill = principal_currency)) +geom_bar(stat ="identity") +theme_minimal() +labs(x ="Principal Currency", y ="Total Issuance", title ="Total Green Bond Issuance by Principal Currency") +coord_flip()