Monday, December 21, 2020

आर्थिक वर्ष २०७७७८ को चार महिनाको आर्थिक तथा वित्तीय अवस्थाको संक्षिप्त झलक

  • २०७७ कात्तिकमा वार्षिक बिन्दुगत उपभोक्ता मुद्रास्फीति ४.०५  प्रतिशत  रहेको  छ  ।  

  • तरकारी उपसमुहको  मूल्यवृद्धि  २०.८८  प्रतिशत  र दाल  तथा गेडागुडीउपसमुहको  मूल्यवृद्धि  १३.७० प्रतिशत रहेको छ।

  • कुल  वस्तु निर्यात १०.८ प्रतिशतले वृद्धि भई रु.४० अर्ब २०करोड पुगेको छ ।

  • कुल वस्तु आयात १०.६ प्रतिशतले घटेर रु.४०२ अर्ब ४९करोड कायम भएको छ ।

  • कुल वस्तु व्यापार घाटा १२.५ प्रतिशतले घटी रु.३६२ अर्ब २९करोड कायम भएको छ ।

  • खुद सेवा आय रु.१५ अर्ब ६४ करोडले घाटामा रहेको छ ।

  • विप्रेषण आप्रवाह ११.२ प्रतिशतले वृद्धि भई रु.३३७ अर्ब ७२ करोड पुगेको छ ।

  • वैदेशिक रोजगारीका लागि अन्तिम श्रम स्वीकृति लिने नेपालीको संख्या ७५.८ प्रतिशतले कमी आएको छ ।

  • चालु खाता रु.२० अर्ब ४६ करोडले बचतमा रहेको छ ।

  • शोधनान्तर स्थिति रु.११० अर्ब ६५ करोडले बचतमा रहेको छ ।

  • कुल विदेशी विनिमय सञ्चिति ७.४ प्रतिशतले वृद्धि भई  २०७७  कात्तिक  मसान्तमा  रु.१५०६  अर्ब  ६  करोड पुगेको छ ।

  • बैकिङ्ग क्षेत्रसँग रहेको विदेशी विनिमय सञ्चिति १५.४  महिनाको  वस्तु  आयात  र  १४.०  महिनाको  वस्तु  तथा  सेवा  आयात  धान्न  पर्याप्त  रहने  देखिन्छ  ।

  • बैंकिङ्ग कारोबारमा आधारित सरकारको वित्त स्थिति रु.१०अर्ब २३ करोडले घाटामा रहेको छ ।

  • संघीय सरकारको कुल खर्च रु.२५०अर्ब ४१ करोड रहेको छ ।

  • बैंकिङ्ग कारोबारमा आधारित राजस्व संकलन रु.२४०अर्ब १५करोड रहेकोे छ ।

  • सरकारका विभिन्न खातामा रु.२२०अर्ब ९८करोड नगद मौज्दात रहेको छ ।

  • विस्तृत मुद्राप्रदाय ६.४प्रतिशतले बढेको छ ।

  • कुल आन्तरिक कर्जा ४.४प्रतिशतले बढेको छ ।

  • बैंक तथा वित्तीय संस्थाहरूमा रहेकोनिक्षेप ५ प्रतिशतले बढेको छ ।

  • बैंक तथा वित्तीय संस्थाहरुबाट निजी क्षेत्रमा प्रवाहित कर्जा ४.९ प्रतिशतले बढेको छ ।

  • कुल ४६ हजार ३४३ ऋणीलाई सहुलियतपूर्ण कर्जा प्रवाह भई रु.७९ अर्ब ७५करोड कर्जा बक्यौता रहेको छ ।

  • वाणिज्य बैंकहरुको औसत आधार दर २०७६ कात्तिकमा ९.५०प्रतिशत रहेकोमा २०७७ कात्तिकमा ७.५७ प्रतिशत कायम भएको छ ।

  • २०७७ कात्तिकमा वाणिज्य बैंकहरुको निक्षेपको भारित औसत ब्याजदर ५.३१ प्रतिशत र कर्जाको भारित औसत ब्याजदर ९.५२ प्रतिशत रहेको छ ।

  • इजाजतप्राप्त  बैंक  तथा वित्तीय संस्थाहरुको संख्या २०७७ कात्तिक मसान्तमा  १४६ कायम  भएको  छ ।

  • बैंक तथा वित्तीय संस्थाहरुको शाखा संख्या २०७७ असार मसान्तमा ९७६५ रहेकोमा २०७७ कात्तिक मसान्तमा ९९३७ पुगेको छ ।

  • नेपाल  स्टक  एक्सचेन्ज  लिमिटेडमा सूचीकृत कम्पनीहरूको संख्या २१२ रहेको छ । 

    Source : https://www.nrb.org.np/contents/uploads/2020/12/Current-Macroeconomic-and-Financial-Situation-Nepali-Based-on-Four-Months-data-2020.21.pdf

Friday, December 18, 2020

Bar Chart Race/Bar Chart Animation in R

R is a very powerful software for data visualization. In this  post, I present a simple case of how data can be visualized in Bar Chart Race in R. I have used the COVID cases data by country and showed the evolution of COVID cases in the 10 most affected countries during the last 350 days. 

rm(list=ls())  # removes the existing objects from the environment.  

# library used

library(tidyverse)
library(readxl)
library(dplyr)
library(gganimate) 

# setting working directory
setwd('C:/Users/siddhabhatta/Desktop/October31')
# data source : https://www.ecdc.europa.eu/en/covid-19/data

# importing data 

The data and R script can be downloaded from the link below:

https://drive.google.com/drive/folders/1HkPFE7v4fIx2rOOJnhE1E52rCQlGkigq?usp=sharing

 data=read_excel('coviddec14.xlsx')
 
# first few observations

head(data)

# creating a new date variable with standard date format

 data$date<-as.Date(data$dateRep, format="%m/%d/%y")
head(data$date)
 
# Making the country names short

data$country[data$country=="United_States_of_America"]<-"USA"
data$country[data$country=="United_Kingdom"]<-"UK"
data$country[data$country=="Cases_on_an_international_conveyance_Japan"]<-"Intl_CV_Center_Japan"   

#groupoing the data by country and date and finding cumulated total of cases per day
datanew<-data %>% # %>%  can be read as then   
  select(country, cases, date, continent) %>%  
   group_by(continent, country, date) %>%
  summarise(total=sum(cases)) %>%
  mutate(cumtotal=cumsum(total))
 # prepare data by ranks and filter the top 10 countries
 data2=datanew %>%
   group_by(date) %>%
   arrange(date, -cumtotal) %>%  
   mutate(rank = 1:n()) %>%  
  filter(rank <= 10)
# producing the static 350 ggplots 

data2 %>%  
  ggplot()+  
  aes(xmin = 0 ,  
      xmax = cumtotal) +  
  aes(ymin = rank - 0.45,  
      ymax = rank + 0.45,  
      y = rank) +  
  facet_wrap(~ date) +  
  geom_rect(alpha = .7) +  
  aes(fill = continent) +  
  scale_fill_viridis_d(option = "magma",  
                       direction = -1) +  
  scale_x_continuous(  
    limits = c(-5000000, 16000000),  
    breaks = c(-5000000, 0, 4000000, 8000000, 12000000, 16000000)) +  
  geom_text(col = "darkblue",  
            hjust = "right",  
            aes(label = country),  
            x = -100) +
  geom_text(col = "darkblue",  
            hjust = "right",  
            aes(label = paste(cumtotal), x=12000000)) +
    scale_y_reverse() +  
  labs(fill = NULL) +
  ggtitle("Evolution of Covid-19 Cases")+
  labs(x = "Covid Cases") +  
  labs(y = "Top 10 Countries") +  
  theme_classic() ->  
  my_plot
# saves the plot in the object my_plot

# animate the 350 frames by date and save it as p

 p<-my_plot +  
  facet_null() +  
  geom_text(x = 8000000 , y = -10,  
            family = "Times",  
            aes(label = as.character(date)),  
            size = 12, col = "green") +
    aes(group = country) +  
 transition_time(date)

#Animate p with total 350 frames and 5 frames per second

 animate(p, nframes=350, fps=5, width=1000)

Saving the results as gif format 

 gif<- animate(p, fps = 5,  width = 1000, height = 700,
        renderer = gifski_renderer("gganim.gif"), end_pause = 15, start_pause =  15)
anim_save("gganim.gif", animation = gif )
 

 Here is the output.


 And here is the video explanation.

Thursday, December 17, 2020

Session on 'GDP: Concepts, Measurement, Problems and Uses

I am conducting a live session on 'GDP: Concepts, Measurement, Problems and Uses' on coming Saturday (19 December 2020).

Please, register at https://forms.gle/tpPr4UjxbaSmhRmP6 to participate in the session.

Or join the You Tube Live session at the link provided below:

Please, share the link to your friends so that they may benefit from the session.
 
We will cover :
-GDP and Associated Concepts
-How GDP is Measured.
-Production, Expenditure and Income Approaches to GDP
-Which method is appropriate for Nepal ?
-How GDP is measured in Nepal?
-GDP as a measure of the size of the economy 
-GDP at producer's/market price and GDP at basic price
-GDP at current prices and GDP at constant prices 
-Structure/Composition of GDP
-Sectoral contribution to economic growth.
-Why GDP is an important indicator for the economy?
-GDP Deflator
-GNI , GNDI and PCI
-Domestic and National Savings
-Where remittances are recorded?
-How economic growth rate is measured?
-GDP at PPP
-Problems in GDP Measurement
-Uses of GDP 

If you have any questions, regarding GDP, please, do not hesitate to put them during registration.

Wednesday, December 9, 2020

Line Chart Animation in R

R is a powerful software environment for dealing with graphics. In this post, I illustrate the use of R for producing line chart animation. I will use Nepal Stock exchange data with 2205 daily observations.

The data and R script can be downloaded from here.

# It uses the following packages in R 

library(ggplot2)
library(lubridate)
library(dplyr)
library(gganimate)
library(tidyr)

 # First set the working directory 

 setwd("C:/Users/siddhabhatta/Desktop/October31")
# read the data by using the 'readxl' package.

library(readxl)
nepse=read_excel('nepse.xlsx')

head(nepse)

# save date as standard date format
nepse$new_date<-as.Date(nepse$date, format="%m/%d/%y")
head(nepse$new_date)
summary(nepse)

# produce a static line plot
ggplot(data=nepse, aes(x=new_date, y=close))+
  geom_line(color="blue",  size=1.0)+
  theme_classic()+
  ggtitle("Nepse Index Movement in Nepal")

# add aesthetics and labels to the plot  and save it as an object (p here) 
p<-nepse %>%
  ggplot(aes(x=new_date, y=close))+
  geom_line(color="blue",  size=1.0)+
  geom_point(size=5, color="green")+
  geom_text(aes(label=new_date),color="darkblue", fontface="bold", vjust=-2)+
  geom_text(aes(label=close),color="red",fontface="bold", vjust=-4)+
  theme_classic()+
  theme(plot.title = element_text(hjust = 0.5))+
  ggtitle("NEPSE Index Movement of the Past 2205 Days")+

  transition_reveal(new_date) # this last line produces the animation by date
animate(p, fps=2, nframes=500, width=1200) # number of frames 500 and frame per second is 2

# you can save the animation in gif format by usng the following line of codes
p1<-animate(p, nframes=500,  fps = 2,  width = 1200,
        renderer = gifski_renderer())
anim_save("animation.gif", animation = p1 )

Here is the output.

Here is the video explanation in my YouTube Channel.


 



Friday, December 4, 2020

How to Estimate the GDP Loss due to COVID-19

Many of my followers have asked a lot of queries about how to estimate the GDP loss due to a crisis such as COVID-19. In this blog, I illustrate a simple but scientific approach to calculate such loss.

To calculate the GDP Loss, we need : 

 1. The information about last year GDP
2. Projection about baseline GDP growth in the crisis year.
3. Information about actual GDP growth in the crisis year.

Let us take the case of Nepal.  

In the year 2018/19, GDP in nominal terms in Nepal was Rs. 3458793 million.

In the year 2019/20, the economy was expected to follow the trend growth of the past three years i.e. economic growth rate was projected to be 7 percent. With the deflator growth of 6.5 percent (a measure of inflation), the growth rate of nominal GDP would be :  ((1*1.07*1.065)-1)*100=13.955 

With  this, GDP in  2019/20 would be 3458793*1.13955=Rs. 3941467 million. This is the size that Nepali economy would achieve has there no COVID-19.  So it is called baseline GDP

Now, lets us come to the case of COVID-19. If we assume that the growth rate is zero percent, then the growth rate of nominal GDP can be calculated as : 1*1.0*1.065=6.5 percent(1*(1+growth_rate/100)*(1+deflator_inflation/100). As such the actual GDP size in 2019/20 is : 3458793*1.065=3683614 million.

Now, GDP Loss=Baseline GDP-Actual GDP=Rs. 3941467-Rs. 3683614=Rs. 257.826 million or Rs. 257 billion. 

Loss in GDP in percent =257826/3941467 =6.54 percent 

Again suppose that the economy contracted by 2 percent  in 2019/20 instead of growing by zero percent. The size of GDP in 2019/20 would be Rs. 3458973*0.98*1.06489=Rs. 3609568 million.

GDP Loss =3941467-3609568=331491 million or 331 billion.

Loss in GDP in percent =331491/3941467 =8.41 percent .


If we assume that the economic growth rate would be 6 percent had there no corona crisis, GDP loss would be  Rs. 221 billion in case zero growth and Rs. 295 billion in case of contraction by 2 percent.  

This simple calculation shows that the economy lost between Rs. 221 billion to 331 billion income in 2019/20 which is about 5.7 percent to 8.4 percent of GDP.