Data Visualization and Analysis of BD Economy

Normal Data visualization

library(ggplot2)
ggplot(data=data, aes(x=Year, y=GDP, fill=Year)) +
    geom_bar(stat="identity")+
  labs(title="GDP of Bangladesh")+theme_classic()

Analysis: Here we can see the data of bangladesh total GDP from (2003-2019). in 2003 it was 221.9 but in 2019 it became 817.6 which is increased by four times over 15 years.

Interactive data visualization and analysis of Inflation rate

library(ggplot2)
library(plotly)
## 
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
## 
##     last_plot
## The following object is masked from 'package:stats':
## 
##     filter
## The following object is masked from 'package:graphics':
## 
##     layout
i<-ggplot(data = data)+
  geom_point(mapping=aes(x=Year,y=Inflation.rate),col="#7d3c98", size=1, shape=19)+
labs(title="Inflation rate of BD (1980-2019)", y="Inflation Rate", x="Year")+
  theme(
    plot.title = element_text(color="#f4511e", size=10, hjust = 0.5, face="bold"),
    axis.title.x = element_text(color="#6600CC", size=10, face="bold"),
    axis.title.y = element_text(color="#993333", size=10, face="bold"),
  )

ggplotly(i)

Analysis: In this chart we can observe inflation rate of Bangladesh from (2003-2019). As we can see in the year of 2011 Bangladesh had highest inflation rate on the other hand 2009 there was lowest inflation rate. which is 4.90%

Animated data Visualization

library(ggplot2)
library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr     1.1.2     ✔ readr     2.1.4
## ✔ forcats   1.0.0     ✔ stringr   1.5.0
## ✔ lubridate 1.9.2     ✔ tibble    3.2.1
## ✔ purrr     1.0.1     ✔ tidyr     1.3.0
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks plotly::filter(), stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(gganimate)
library(plotly)

bd <- data %>%
  ggplot(aes(GDP.per.capita,GDP, colour=Year))+
  geom_point(alpha= 0.5, show.legend = TRUE)+
  labs(title = 'Year: {Data_time}', x='GDP.per.capita', y='GDP') +
  transition_time(Year) +
  shadow_wake(.1)+
  ease_aes('linear')
bd

anim_save("BD_GDP.gif", bd)  

Analysis: This animated graph showing relation between GDP and GDP per capita of bangladesh and how its increasing over the years (2003-2019)