#Banking Statistics of Nepal in pictures #Written by Rohan Byanjankar #Visit my blog: https://www.rohanbyanjankar.com.np/ #Importing libraries library(readxl) library(ggplot2) library(ggthemes) library(ggrepel) #Retriving working directory getwd() #Setting working directory setwd("D:/~Drive Share (Rohan)/01 Shared Access/Banking and Finance") #Importing excel data data <- read_excel("deposit and loan.xlsx") data$deposit_karba=data$deposit/100000 #Attaching data to database attach(data) ln_deposit <- log(per_deposit) ln_loan <- log(per_loan) #District-wise per capita Deposit and Loan in 2019/20 p <- ggplot(data,aes(x=ln_deposit,y=ln_loan,label= District , color=Province,size=per_deposit/100000))+ geom_point()+ geom_text_repel(nudge_x = 0.4,size=6.5)+ geom_abline(lty=4,color="black")+ ggtitle("District-wise per capita Deposit and Loan in 2019/20")+ xlab("Logged per capita deposit")+ ylab("Logged per capita loan")+ labs(caption = "Source: Nepal Rastra Bank (2020)", size=12)+ theme_economist()+ scale_size_continuous(name = "Rs. in Lakhs") p+theme( plot.title = element_text(size=22,color="dark blue"), plot.caption = element_text(size=12.5,color="dark grey",hjust = 0,face = "italic"), axis.text = element_text(size=12), axis.title = element_text(size=15), legend.title = element_text(size=18), legend.text = element_text(size=16) ) ln_depositt <- log(deposit) ln_loant <- log(loan) #District-wise Total Deposit and Loan in 2019/20 p1 <- ggplot(data,aes(x=ln_depositt,y=ln_loant,label= District , color=Province,size=deposit_karba))+ geom_point()+ geom_text_repel(nudge_x = 0.8,size=5.5)+ geom_abline(lty=4,color="black")+ ggtitle("District-wise Total Deposit and Loan in 2019/20")+ xlab("Logged total deposit")+ ylab("Logged total loan")+ labs(caption = "Source: Nepal Rastra Bank (2020)", size=12)+ scale_size_continuous(name = "Rs. in Kharba")+ theme_economist()+ theme( plot.title = element_text(size=22,color="dark blue"), plot.caption = element_text(size=12.5,color="dark grey",hjust = 0,face = "italic" ), axis.text = element_text(size=12), axis.title = element_text(size=15), legend.title = element_text(size=18), legend.text = element_text(size=16) ) p1 #District-wise number of branch and ATM in 2019/20 p2 <- ggplot(data,aes(x=log(branch),y=log(atm),label= District , color=Province,size=atm))+ geom_point()+ geom_text_repel(nudge_x = 0.8,size=5.5)+ geom_abline(lty=4,color="black")+ ggtitle("District-wise number of branch and ATM in 2019/20")+ xlab("Total branches in log scale")+ ylab("Total ATMs in log scale")+ labs(caption = "Source: Nepal Rastra Bank (2020)", size=12)+ scale_size_continuous(name = "Numbers")+ theme_economist()+ theme( plot.title = element_text(size=22,color="dark blue"), plot.caption = element_text(size=12.5,color="dark grey",hjust = 0,face = "italic" ), axis.text = element_text(size=12), axis.title = element_text(size=15), legend.title = element_text(size=18), legend.text = element_text(size=16) ) p2 #District-wise Financial Access Index in 2019/20 p3 <- ggplot(data,aes(x=District,y=fai,label= fai_label ,color=Province,size=fai))+ geom_point()+ geom_text_repel(nudge_x = 4,size=5)+ geom_abline(lty=4,color="black")+ ggtitle("District-wise Financial Access Index in 2019/20")+ xlab("")+ ylab("Financial Access Index")+ labs(caption = "Source: Nepal Rastra Bank (2020)", size=12)+ scale_size_continuous(name = "Index")+ theme_economist()+ theme( plot.title = element_text(size=22,color="dark blue"), plot.caption = element_text(size=12.5,color="dark grey",hjust = 0,face = "italic" ), axis.text = element_text(size=12), axis.text.x = element_text(size=0), axis.title = element_text(size=15), legend.title = element_text(size=18), legend.text = element_text(size=16) ) p3 #District-wise Total deposit and Financial Access Index in 2019/20 p4 <- ggplot(data,aes(x=ln_depositt,y=fai,label= District ,color=Province,size=deposit_karba))+ geom_point()+ geom_text_repel(nudge_x = 1.5,size=4)+ geom_abline(lty=4,color="black")+ ggtitle("District-wise Total deposit and Financial Access Index in 2019/20")+ xlab("Total deposit in log scale")+ ylab("Financial Access Index")+ labs(caption = "Source: Nepal Rastra Bank (2020)", size=12)+ scale_size_continuous(name = "Deposit in Rs. Kharba")+ theme_economist()+ theme( plot.title = element_text(size=22,color="dark blue"), plot.caption = element_text(size=12.5,color="dark grey",hjust = 0,face = "italic" ), axis.text = element_text(size=12), axis.text.x = element_text(size=12), axis.title = element_text(size=15), legend.title = element_text(size=18), legend.text = element_text(size=16) ) p4 #Box plot of per-capita deposit by Province p5 <- ggplot(data,aes(x=Province,y=log(per_deposit),fill=Province,size=deposit_karba))+ geom_boxplot(outlier.colour = "red",outlier.shape = 7,outlier.size = 5)+ stat_boxplot(geom = "errorbar")+ ggtitle("Per-capita Deposit by Province")+ ylab("Per capita deposit in log scale")+ xlab("Province")+ theme_economist()+ theme( plot.title = element_text(size=22,color="dark blue"), plot.caption = element_text(size=12.5,color="dark grey",hjust = 0,face = "italic" ), axis.text = element_text(size=12), axis.text.x = element_text(size=12), axis.title = element_text(size=15), legend.title = element_text(size=18), legend.text = element_text(size=16) ) p5 #Box plot of per-capita deposit by Province p6 <- ggplot(data,aes(x=Province,y=log(per_deposit),fill=Province,size=deposit_karba))+ geom_boxplot(outlier.colour = "red",outlier.shape = 7,outlier.size = 5)+ stat_boxplot(geom = "errorbar")+ ggtitle("Per-capita Deposit by Province")+ ylab("Per capita deposit in log scale")+ xlab("Province")+ labs(caption = "Source: Nepal Rastra Bank (2020)")+ theme_economist()+ theme( plot.title = element_text(size=22,color="dark blue"), plot.caption = element_text(size=12.5,color="dark grey",hjust = 0,face = "italic" ), axis.text = element_text(size=12), axis.text.x = element_text(size=12), axis.title = element_text(size=15), legend.title = element_text(size=18), legend.text = element_text(size=16) ) p6 #Box plot of per-capita loan by Province p7 <- ggplot(data,aes(x=Province,y=log(per_loan),fill=Province,size=deposit_karba))+ geom_boxplot(outlier.colour = "red",outlier.shape = 7,outlier.size = 5)+ stat_boxplot(geom = "errorbar")+ ggtitle("Per-capita Loan by Province")+ ylab("Per capita loan in log scale")+ xlab("Province")+ labs(caption = "Source: Nepal Rastra Bank (2020)")+ theme_economist()+ theme( plot.title = element_text(size=22,color="dark blue"), plot.caption = element_text(size=12.5,color="dark grey",hjust = 0,face = "italic" ), axis.text = element_text(size=12), axis.text.x = element_text(size=12), axis.title = element_text(size=15), legend.title = element_text(size=18), legend.text = element_text(size=16) ) p7 #Box plot of FAI by Province p8 <- ggplot(data,aes(x=Province,y=fai,fill=Province,label=District))+ geom_boxplot(outlier.colour = "red",outlier.shape = 7,outlier.size = 5)+ stat_boxplot(geom = "errorbar")+ ggtitle("Financial Access Index by Province")+ ylab("Financial Access Index")+ xlab("Province")+ labs(caption = "Source: Nepal Rastra Bank (2020)")+ theme_economist()+ theme( plot.title = element_text(size=22,color="dark blue"), plot.caption = element_text(size=12.5,color="dark grey",hjust = 0,face = "italic" ), axis.text = element_text(size=12), axis.text.x = element_text(size=12), axis.title = element_text(size=15), legend.title = element_text(size=18), legend.text = element_text(size=16) ) p8