How India’s External Debt Stocks Stand Among The BRICS (Brazil, Russia, India, Chna and South Africa)?
In this research project I am exploring the World Bank’s recent report, “International Debt Statistic 2020” and focus on how India’s external debt has changed since India fully opened its economy in 1991 (called the “Liberalization, Privatization and Globalization (LPG)”) and compare it with the BRICS countries (an acronymn given to the group of countries consisting of : Brazil, Russia, India, China and South Africa). We look at the nominal value of the eternal debt stocks in USD as well as proportion to India’s Gross National Income (GNI). And the numbers are staggering
According to the World Bank , “Total external debt is debt owed to nonresidents repayable in currency, goods, or services. Total external debt is the sum of public, publicly guaranteed, and private nonguaranteed long-term debt, use of IMF credit, and short-term debt. Short-term debt includes all debt having an original maturity of one year or less and interest in arrears on long-term debt”. In other words, total external debt is India’s creditors outside the domestic territory to whom India has an obligation to repay.
The primary goal of this project is to learn how to extract World Bank data using the API in R. Secondary goal, is whether we can tell a story with the data?
First we download an updated list of inidicators. Both packages come with a downloaded list. That list appears to be still current for wbstats, as it is a newer package, for WDI however it is not up to date.
library(wbstats) and store its indicators## Load Library wbstats and store its indicators
library(wbstats)
new_wb_cache <- wbcache()
# Find What you are looking for:
wbsearch("external.debt.*total", cache = new_wb_cache)
#External debt stocks, total (DOD, current US$) DT.DOD.DECT.CD
#External debt stocks (% of GNI) DT.DOD.DECT.GN.ZS## Download Data
wb_dat <- wb(indicator = c("DT.DOD.DECT.CD", "DT.DOD.DECT.GN.ZS"))
names(wb_dat) ## What All Variables DO we have?wb_countries <- wbcountries()
names(wb_countries)
wb_dat <- merge(wb_dat, y = wb_countries[c("iso2c", "region", "long", "lat")], by = "iso2c", all.x = TRUE)
head(wb_dat)
table(wb_dat$region)
wb_dat <- subset(wb_dat, region != "Aggregates") # this also removes NAs
##wbstats
head(wb_dat)
table(wb_dat$indicatorID)
wb_dat$indicatorID[wb_dat$indicatorID == "DT.DOD.DECT.CD"] <- "Ext.Debt.CurrUSD"
wb_dat$indicatorID[wb_dat$indicatorID == "DT.DOD.DECT.GN.ZS"] <- "ExDebt.PctGNI"wb_dat.wide <- dcast(wb_dat, iso2c + country + date + region + long + lat ~ indicatorID, value.var = 'value') ##CAST INTO WIDE USING RESHAPE2
mydata = wb_dat.wide[wb_dat.wide$date>="1991",]
mydata = mydata[order(mydata$country, mydata$date),]
mydata$Ext.Debt.CurrUSD = mydata$Ext.Debt.CurrUSD/1000000000
mydata.india <- subset(mydata, country=="India" & date>=1991)
mydata.india$date = as.numeric(mydata.india$date)
summary(mydata.india)## BASE PLOT
par(mgp=c(2,0.5,0),
mar = c(8, 5, 3, 5),
bg = "white",
font.main=1,
font.lab=1,
family="Georgia",
col.main="black",
col.sub ="black",
col.lab= "black",
cex.main=0.9,
cex.lab=0.9,
tck=-0.0, tcl = -0.0,
xpd=T)
plot(mydata.india$date, (mydata.india$Ext.Debt.CurrUSD),
type="n",
main ="External Debt Stocks of India \n(in Billions, Current USD) 1991-2018",
xlab = "Years",
ylab = "External Debt Stocks \n(Billions, Curr. USD)",
las = 2,
xaxt="n", yaxt="n", xaxs="i", yaxs="i", ylim=c(0,600),
frame.plot=FALSE
)
## ADDING RECTANGLES : THEY MAKE IT LOOK PROFESSIONAL:
rect(1992,0,1996,600,col= rgb(241/255,241/255,241/255),border = "transparent")
rect(2000,0,2004,600,col= rgb(241/255,241/255,241/255),border = "transparent")
rect(2008,0,2012,600,col= rgb(241/255,241/255,241/255),border = "transparent")
rect(2016,0,2018,600,col= rgb(241/255,241/255,241/255),border = "transparent")
## ADDING AXIS STRUCTURE
axis(1, at=seq(1991, 2018, 1), las=2, cex.axis=0.8)
axis(2, at=seq(0, 600, 50), las=2, cex.axis=0.8)
##ADDING LINE:
lines(mydata.india$date, (mydata.india$Ext.Debt.CurrUSD),
type = 'o', pch=22,col = "#E75D53",lwd = 2.5)
## ADDING LINE INDICATING KINK AT 2005
par(xpd=FALSE)
abline(v=2005, col= "#FB8072")
par(new = T)
plot(mydata.india$date, mydata.india$ExDebt.PctGNI,
type="n", axes = FALSE, xlab ="", ylab ="",
xaxt="n", yaxt="n", xaxs="i", yaxs="i", ylim=c(10,40))
axis(side = 4, at=seq(10, 40, 5), las=2, cex.axis=0.8)
mtext(side = 4, line=1.5,'External Debt (% of GNI)')
lines(mydata.india$date, mydata.india$ExDebt.PctGNI,
type = 'o', pch=22,col = "#474747",lwd = 2.5)
par(xpd=T)
legend(1991, 2,
c("External Debt Stocks (Billions Current USD)","External Debt as % of GNI"),
lty=c(1,1),
pch =c(22,22),
col=c("#E75D53", "#474747"),
horiz=F,
box.lty = 0, cex=0.9,
bg=rgb(241/255,241/255,241/255,alpha=0.5))Here, we see where India stands in external debt compared to other developing countries.
## BASE PLOT
##, out.width="500px", out.height="500px"
par(mgp=c(2,0.5,0),
mar = c(8, 5, 3, 5),
bg = "white",
font.main=1,
font.lab=1,
family="Georgia",
col.main="black",
col.sub ="black",
col.lab= "black",
cex.main=0.9,
cex.lab=0.9,
tck=-0.0, tcl = -0.0,
xpd=T)
plot(mydata.india$date, mydata.india$Ext.Debt.CurrUSD,
type="n",
main ="External Debt Stocks of Brazil, Russia, India, China and South Africa \n(in Billions, Current USD) 1991-2018",
xlab = "Years",
ylab = "External Debt Stocks \n(Billions, Curr. USD)",
las = 2,
xaxt="n", yaxt="n", xaxs="i", yaxs="i", ylim=c(0,1000),
frame.plot=FALSE
)
## ADDING RECTANGLES : THEY MAKE IT LOOK PROFESSIONAL:
rect(1992,0,1996,1000,col= rgb(241/255,241/255,241/255),border = "transparent")
rect(2000,0,2004,1000,col= rgb(241/255,241/255,241/255),border = "transparent")
rect(2008,0,2012,1000,col= rgb(241/255,241/255,241/255),border = "transparent")
rect(2016,0,2018,1000,col= rgb(241/255,241/255,241/255),border = "transparent")
## ADDING AXIS STRUCTURE
axis(1, at=seq(1991, 2018, 1), las=2, cex.axis=0.8)
axis(2, at=seq(0, 1000, 100), las=2, cex.axis=0.8)
##ADDING LINE:
lines(mydata.india$date, (mydata.india$Ext.Debt.CurrUSD),
type = 'o', pch=22,col = "#E75D53",lwd = 3.5)
lines(mydata$date[mydata$country=="Brazil"],
mydata$Ext.Debt.CurrUSD[mydata$country=="Brazil"],
type = 'l',col = "#1C2498",lwd = 2.5)
lines(mydata$date[mydata$country=="Russian Federation"],
mydata$Ext.Debt.CurrUSD[mydata$country=="Russian Federation"],
type = 'l',col = "#13F2A7",lwd = 2.5)
lines(mydata$date[mydata$country=="South Africa"],
mydata$Ext.Debt.CurrUSD[mydata$country=="South Africa"],
type = 'l',col = "#763A3A",lwd = 2.5)
par(new = T)
plot(mydata$date[mydata$country=="China"],
mydata$Ext.Debt.CurrUSD[mydata$country=="China"],
type="n", axes = FALSE, xlab ="", ylab ="",
xaxt="n", yaxt="n", xaxs="i", yaxs="i", ylim=c(0,2000))
axis(side = 4, at=seq(0, 2000, 100), las=2, cex.axis=0.8)
mtext(side = 4, line=1.8,'External Debt for China')
lines(mydata$date[mydata$country=="China"],
mydata$Ext.Debt.CurrUSD[mydata$country=="China"],
type = 'l',col = "#135C07",lwd = 2.5)
##LEGEND
par(xpd=T)
legend(1991, -500,
c("India","Brazil","Russian Federation", "South Africa", "China"),
lty=c(1,1,1,1,1),
pch =c(22,NA,NA,NA,NA),
col=c("#E75D53", "#1C2498", "#13F2A7", "#763A3A","#135C07"),
horiz=F,ncol=3,
box.lty = 0, cex=1,
bg=rgb(241/255,241/255,241/255,alpha=0.5))FINDINGS:
- China has the largest external debt stocks in current USD since 2012. - As of 2018, China’s external debt stocks stand at USD 1.9 Trillion. - Brazil is marginally higher in external debt stocks to India. - Russia has experienced quite a voltility in its external debt stocks. - South Africa is the lowest among the BRICS standing about 100 billion USD as of 2018.
## BASE PLOT
par(mgp=c(2,0.5,0),
mar = c(8, 5, 3, 5),
bg = "white",
font.main=1,
font.lab=1,
family="Georgia",
col.main="black",
col.sub ="black",
col.lab= "black",
cex.main=0.9,
cex.lab=0.9,
tck=-0.0, tcl = -0.0,
xpd=T)
plot(mydata.india$date, mydata.india$ExDebt.PctGNI,
type="n",
main ="External Debt Stocks of Brazil, Russia, India, China and South Africa \n(% of GNI) 1991-2018",
xlab = "Years",
ylab = "External Debt Stocks \n(% of GNI)",
las = 2,
xaxt="n", yaxt="n", xaxs="i", yaxs="i", ylim=c(0,100),
frame.plot=FALSE
)
## ADDING RECTANGLES : THEY MAKE IT LOOK PROFESSIONAL:
rect(1992,0,1996,100,col= rgb(241/255,241/255,241/255),border = "transparent")
rect(2000,0,2004,100,col= rgb(241/255,241/255,241/255),border = "transparent")
rect(2008,0,2012,100,col= rgb(241/255,241/255,241/255),border = "transparent")
rect(2016,0,2018,100,col= rgb(241/255,241/255,241/255),border = "transparent")
## ADDING AXIS STRUCTURE
axis(1, at=seq(1991, 2018, 1), las=2, cex.axis=0.8)
axis(2, at=seq(0, 100, 10), las=2, cex.axis=0.8)
##ADDING LINE:
lines(mydata.india$date, mydata.india$ExDebt.PctGNI,
type = 'o', pch=22,col = "#E75D53",lwd = 3.5)
lines(mydata$date[mydata$country=="Brazil"],
mydata$ExDebt.PctGNI[mydata$country=="Brazil"],
type = 'l',col = "#1C2498",lwd = 2.0)
lines(mydata$date[mydata$country=="Russian Federation"],
mydata$ExDebt.PctGNI[mydata$country=="Russian Federation"],
type = 'l',col = "#13F2A7",lwd = 2.0)
lines(mydata$date[mydata$country=="South Africa"],
mydata$ExDebt.PctGNI[mydata$country=="South Africa"],
type = 'l',col = "#763A3A",lwd = 2.0)
lines(mydata$date[mydata$country=="China"],
mydata$ExDebt.PctGNI[mydata$country=="China"],
type = 'l',col = "#135C07",lwd = 2.0)
##LEGEND
par(xpd=T)
legend(1991, -30,
c("India","Brazil","Russian Federation", "South Africa", "China"),
lty=c(1,1,1,1,1),
pch =c(22,NA,NA,NA,NA),
col=c("#E75D53", "#1C2498", "#13F2A7", "#763A3A","#135C07"),
horiz=F,ncol=3,
box.lty = 0, cex=1,
bg=rgb(241/255,241/255,241/255,alpha=0.5))Debt is a burden not only for a household but for an economy too. Debt holdings and repayment capacity indicate an economy’s holding in the world and to its creditors. Here, we have examined the “External Debt Stocks (Billions Current USD)” of India and compared it to Brazil, Russia, India, China and South Africa (aka BRICS). The findings are :
In nominal terms, these are staggering numbers. However, the true comparison comes through measuing these external debt stocks to the Gross National Income generated by an economy that measures its capacity to repay its debt. I find :