Historic flooding in Pakistan submerged a third of the country this summer - Getty Images, 2022

Historic flooding in Pakistan submerged a third of the country this summer - Getty Images, 2022

Motivation

Last year 90% of all climate finance went exclusively to projects that reduce greenhouse gas emissions. Helping communities adapt to climate change has received little funding even though the impacts of sea level rise, heavy precipitation, extreme heat, and drought are here and now.

It is difficult to finance adaptation projects because they are not as easily monetized compared to clean power where electricity generation can be sold. One potential solution to this problem is a “debt-for-climate swap”.

In a debt-for-climate swap, countries who borrowed money from other nations, development banks, or private creditors could have that debt forgiven or restructured, if the money that was to be spent on debt repayment was instead diverted to climate projects. This has the opportunity to increase a country’s fiscal space to fund climate adaptation and resilience projects while not waiting on financial aid from other countries.

There has been a lot of interest in debt-for-climate swaps from developing countries and multilateral development banks, especially at COP27. This analysis seeks to help narrow the focus on which countries would be best suited for a swap by answering the following questions.

  • Who are the most climate vulnerable nations?

  • What is the relationship between how climate vulnerable a country is and its income and debt levels?

  • Are climate vulnerable nations already receiving substantial funding from the United Nations or would they benefit from debt relief to finance climate adaptation projects?

Methodology

To do this analysis, I combined four data sets.

  • The Notre Dame Global Adaptation Initiative (ND-GAIN) Index summarizes a country’s vulnerability to climate change in combination with its readiness to improve resilience.

  • The International Monetary Fund’s World Economic Outlook from October 2022 contains macroeconomic data series for individual countries, including their gross sovereign debt levels and income groups.

  • The World Bank Group’s Debt Sustainability Analysis determines a country’s debt-carrying capacity and provides a risk rating of external and overall public debt distress.

  • The United Nations Green Climate Fund project funding data shows how much money the world’s largest climate fund is allocating to different countries.

The embedded code below displays the data ingestion, integration, and cleaning process.

#Load Datasets 
ND_Gain <- here("00_data_raw","1. ND-GAIN_vulnerability data.xlsx") %>% read_excel()
IMF_WEO2022 <- here("00_data_raw","2. country_features_2022-10.csv") %>% read_csv()
GCF <- here("00_data_raw","3. GCF_ODL-Export-countries-1666878279196.xlsx") %>% read_excel()
WB_DSA <- here("00_data_raw","4. World Bank_DSA.xlsx") %>% read_excel()
Coordinates <- here("00_data_raw","5. countries_codes_and_coordinates.csv") %>% read_csv()
colnames (Coordinates) [3] <- "ISO3"


#Join datasets by ISO3 Country Codes
Debt4Climate_raw <- ND_Gain %>% 
  left_join(WB_DSA, by = c("ISO3")) %>% 
  left_join(GCF, by = c("ISO3")) %>% 
  left_join(IMF_WEO2022, by = c("ISO3")) %>%
  left_join(Coordinates, by= c("ISO3"))

#Narrowing variables of interest 
Debt4Climate_clean_1 <- Debt4Climate_raw %>%
  select(`ISO3`,`Name`,`Latitude (average)`,`Longitude (average)`,`wb_region`, `wb_income_group`,`2020`, `Vulnerability Level`,`Rank Percentile`, `debt_gross_percent_of_gdp`,  `Risk of external debt distress`, `Risk of overall debt distress`,`RP Financing $`,`FA Financing $`)

#Clean up column names
colnames (Debt4Climate_clean_1) [1] <- "ISO_A3"
colnames (Debt4Climate_clean_1) [2] <- "Country"
colnames (Debt4Climate_clean_1) [3] <- "lat" 
colnames (Debt4Climate_clean_1) [4] <- "lng" 
colnames (Debt4Climate_clean_1) [5] <- "Region" 
colnames (Debt4Climate_clean_1) [6] <- "Income_Group"
colnames (Debt4Climate_clean_1) [7] <- "Vulnerability_Score" 
colnames (Debt4Climate_clean_1) [8] <- "Climate_Vulnerability_Level"
colnames (Debt4Climate_clean_1) [9] <- "Climate_Vulnerability_Percentile" 
colnames (Debt4Climate_clean_1) [10] <- "Gross_Debt_as_Percent_of_GDP" 
colnames (Debt4Climate_clean_1) [11] <- "External_debt_distress" 
colnames (Debt4Climate_clean_1) [12] <- "Overall_debt_distress" 
colnames (Debt4Climate_clean_1) [13] <- "GCF_Readiness_Financing" 
colnames (Debt4Climate_clean_1) [14] <- "GCF_Funded_Activities" 

#Adding new column to sum total GCF financing
Debt4Climate_clean_2 <- Debt4Climate_clean_1 %>%
mutate(TotalGCF = rowSums(across(c(GCF_Readiness_Financing,GCF_Funded_Activities))))
colnames (Debt4Climate_clean_2) [15] <- "Total_GCF_Financing" 

#Making vulnerability ranking names consistent with debt distress
Debt4Climate_clean_1$Climate_Vulnerability_Level[Debt4Climate_clean_1$Climate_Vulnerability_Level=="Medium"]<-"Moderate" 

#Converting climate vulnerability percentiles from decimals to percent
Debt4Climate_clean_1$ Climate_Vulnerability_Percentile <- Debt4Climate_clean_1$Climate_Vulnerability_Percentile*(100)

#Remove extraneous columns and create final clean dataset
Debt4Climate_clean_3 <- subset(Debt4Climate_clean_2, select = -c(GCF_Readiness_Financing,GCF_Funded_Activities))

#Eliminating any duplicates
Debt4Climate_clean_final <- unique (Debt4Climate_clean_3)

#Save down processed excel file
write_csv(Debt4Climate_clean_final, here("03_data_processed", "Debt4Climate.csv"))

Vulnerability and Income

In the first analysis, I examine the relationship between climate vulnerability and income level and find that the poorest countries are often the most vulnerable to climate change, and vice versa. Some of these countries, like Sudan, Eritrea, Mozambique, and Zambia also have debt levels above 100% of their GDP.

The graph below is interactive with the ability to zoom in on any particular quadrant of the data.

climatedebt <- read.csv(here("03_data_processed", "Debt4Climate.csv"))

climatedebt$Income_Group <- factor(climatedebt$Income_Group, levels = c("High", "Upper Middle", "Lower Middle", "Low"))

income <- ggplot(climatedebt, aes(x= Vulnerability_Score, y = Gross_Debt_as_Percent_of_GDP, text = paste ("Country: ",Country, "\nDebt as % of GDP: ", Gross_Debt_as_Percent_of_GDP), color = Income_Group))+
  geom_point()+ 
    geom_label_repel(aes(label =ifelse(Vulnerability_Score >=.59 ,as.character(Country),'')),
                  box.padding   = 0.35, 
                  point.padding = 0.35,
                  segment.color = 'grey50', 
                  show_guide=F) +
  
  geom_label_repel(aes(label =ifelse(Vulnerability_Score <=.29 ,as.character(Country),'')),
                  box.padding   = 0.35, 
                  point.padding = 0.35,
                  segment.color = 'grey50', 
                  show_guide=F) +
  labs(
    x = "Climate Vulnerability Score",
    y = "Gross Debt as % of GDP",
    title = "Climate vulnerable nations are often poorer",
    caption = "Data source: ND-GAIN Index, World Economic Outlook, World Bank Debt Sustainability Analysis",
    color = "Country Income Level"
  )+
  theme_pander ()

ggplotly (income, tooltip = "text") %>%
    layout(margin = list(b=160), 
           annotations = 
           list(x = .86, y = -.3,
                text = "Source: ND-GAIN Index, World Economic Outlook", 
                showarrow = F, xref='paper', yref='paper', 
                xanchor='right', yanchor='auto', xshift=0, yshift=0,
                font=list(size=15, color="black")))

Vulnerability and Debt

In the second analysis, I examine the relationship between climate vulnerability and debt sustainability. Many of the countries on the highest end of the climate vulnerability index are also at high risk of debt distress or are already in debt distress, like Sudan, Zimbabwe, and Chad. This reinforces the need to explore mechanisms which can defuse the twin crisis of debt sustainability and climate change for these vulnerable nations.

climatedebt <- read.csv(here("03_data_processed", "Debt4Climate.csv"))
windowsFonts(A = windowsFont("Times New Roman")) 

climatedebt$Overall_debt_distress <- factor(climatedebt$Overall_debt_distress, levels = c("In distress", "High", "Moderate", "Low", "NA"))
  
climatedebt %>%
  ggplot(aes(x= Vulnerability_Score, y = Gross_Debt_as_Percent_of_GDP, label= Country, color = Overall_debt_distress, family = "A"))+
  geom_point()+
   theme_pander ()+ 
    theme(plot.title  = element_text(family = "A"),
        plot.subtitle = element_text(family = "A"),
        axis.title.x  = element_text(family = "A"),
        axis.title.y  = element_text(family = "A"),
        axis.text.x   = element_text(family = "A"),
        axis.text.y   = element_text(family = "A"), 
        legend.text = element_text(family = "A"),
        legend.title = element_text(family = "A"))+
     guides(color = guide_legend(override.aes = list(size = 3)))+
    geom_label_repel(aes(label =ifelse(Overall_debt_distress == "High" ,as.character(Country),'')),
                  box.padding   = unit (.25,"lines"),
                  point.padding = unit (.25, "lines"),
                  segment.color = 'grey50', 
                  show_guide=F) +
      
      geom_label_repel(aes(label =ifelse(Overall_debt_distress == "In distress" ,as.character(Country),'')),
                  box.padding   = unit (1.5,"lines"),
                  point.padding = unit(1.5, "lines"),
                  segment.color = 'grey50', 
                  show_guide=F) +

  labs(
    x = "Climate Vulnerability Score",
    y = "Gross Debt as % of GDP",
    title = "Many of the most vulnerable countries are in high debt distress",
    caption = "Source: ND-GAIN Index, World Economic Outlook, World Bank Debt Sustainability Analysis",
    color = "Overall Debt Distress"
  )+
  xlim (.55,.68)+
  ylim (0,200)

Vulnerability and Finance

The third analysis looks at how international climate finance disbursed through the United Nations Green Climate Fund (GCF) is allocated across climate vulnerable countries, and what the income and debt profiles of those countries are (the larger the circle, the larger its debt as a % of GDP).

The countries with the highest climate vulnerability are not receiving a substantial amount of GCF money. The countries getting the most financing are mostly lower-middle income countries, like India, Indonesia, and Mongolia, who are not as climate vulnerable and have relatively modest debt levels. This means that debt-for-climate swaps are not a good fit for these countries, unlike those countries with higher climate vulnerability, receive little international support, and have higher debt levels.

The graph below is interactive with the ability to zoom in on any particular quadrant of the data.

library(scales)

climatedebt$Income_Group <- factor(climatedebt$Income_Group, levels = c("High", "Upper Middle", "Lower Middle", "Low"))

finance <- ggplot(climatedebt,aes(
  x= Vulnerability_Score, 
  y = Total_GCF_Financing,      
  text = paste ("Country: ", Country, "\nDebt as % of GDP:",Gross_Debt_as_Percent_of_GDP, "\nTotal GCF Financing: $", comma(Total_GCF_Financing)),
  size = Gross_Debt_as_Percent_of_GDP,
  color = Income_Group))+
  geom_point(alpha = 0.4)+
  scale_size(range = c(.1,11), guide = 'none')+
  scale_y_continuous(labels = label_number(suffix = " M", scale = 1e-6))+
  guides(color = guide_legend(override.aes = list(size = 3)))+

  labs(
    x = "Climate Vulnerability Score",
    y = "Total Green Climate Fund Financing (millions)",
    title = "U.N. climate finance is not going to the most vulnerable nations",
    caption = "Data source: ND-GAIN, World Economic Outlook, U.N. Green Climate Fund",
    color ="Income Group" )+
  theme_pander ()

ggplotly (finance, tooltip = "text", mode = 'markers', marker = list(size = Gross_Debt_as_Percent_of_GDP)) %>%
    layout(margin = list(b=160), 
           annotations = 
           list(x = .92, y = -.3,
                text = "Source: ND-GAIN, World Economic Outlook, U.N. Green Climate Fund", 
                showarrow = F, xref='paper', yref='paper', 
                xanchor='right', yanchor='auto', xshift=0, yshift=0,
                font=list(size=15, color="black")))

Mapping Climate Vulnerability

This map provides summary analysis of climate vulnerability across the world with specific profiles on each country’s debt level which can help narrow the set of countries where debt-for-climate swaps are an appropriate solution.

library (geojson)
library (geojsonio)
library(jsonlite)
library(here)
library (leaflet)
library (dplyr)
library (tidyverse)
library(shinythemes)
library (htmltools)
library(tidyr)
library(lubridate)
library (openxlsx)
library(geojsonR)


world <- geojsonio::geojson_read(here("03_data_processed","Debt4Climate.geojson"), parse = FALSE , what = "sp")
world$Vulnerability_Score <- as.numeric(world$Vulnerability_Score)

pal <- colorBin("YlOrRd",domain = world$Vulnerability_Score, bins = c(.2, .37, .43, .51, .67))

labels <- sprintf(
    "<strong>%s</strong>
    <br/>Vulnerability Score: %s
    <br/>Vulnerability Percentile: %s 
    <br/>Debt as percentage of GDP: %s 
    <br/>Risk of Debt Distress: %s",
 world$Country, world$Vulnerability_Score, world$Climate_Vulnerability_Percentile, world$Gross_Debt_as_Percent_of_GDP, world$Overall_debt_distress
) %>% lapply(htmltools::HTML)

tag.map.title <- tags$style(HTML("
  .leaflet-control.map-title { 
    transform: translate(-90%,10%);
    position: fixed !important;
    left: 50%;
    text-align: left;
    padding-left: 10px; 
    padding-right: 10px; 
    background: rgba(255,255,255,0.75);
    font-weight: bold;
    font-size: 15px;
  }
"))

title <- tags$div(
  tag.map.title, HTML("Assessing Climate Vulnerability and Debt Sustainability")
) 

leaflet(world) %>%
  setView(0,0,1) %>%
  addTiles() %>% 
  addControl(title, position = "topleft", className="map-title") %>%
  addPolygons(fillColor = ~pal(Vulnerability_Score),
              weight = 2,
              opacity = 1,
              color = "white",
              dashArray = "1",
              fillOpacity = 0.7,
              highlight = highlightOptions(weight = 5,
                                           color = "#666",
                                           dashArray = "",
                                           fillOpacity = 0.7,
                                           bringToFront = TRUE),
              label = labels,
              labelOptions = labelOptions(style = list("font-weight" = "normal", padding = "3px 8px"),
                                          textsize = "12px",
                                          direction = "auto")) %>%
 leaflet::addLegend(pal = pal, values = world$Vulnerability_Score, opacity = 0.7, 
            title = "Climate Vulnerability", position = "bottomright")