library(readr)
library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
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
library(gganimate)
library(transformr)
library(gifski)
library(av)
Indicators <- read_csv("Economic Indicators.csv")
## Rows: 304 Columns: 6
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (1): Country
## dbl (5): Year, GDP (in billion USD), Inflation Rate (%), Unemployment Rate (...
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
head(Indicators)
## # A tibble: 6 × 6
##   Country  Year `GDP (in billion USD)` `Inflation Rate (%)`
##   <chr>   <dbl>                  <dbl>                <dbl>
## 1 USA      2010                  15000                 1.64
## 2 USA      2011                  15500                 3.16
## 3 USA      2012                  16000                 2.07
## 4 USA      2013                  16500                 1.5 
## 5 USA      2014                  17000                 1.62
## 6 USA      2015                  17500                 0.12
## # ℹ 2 more variables: `Unemployment Rate (%)` <dbl>,
## #   `Economic Growth (%)` <dbl>

Dataset Overview

The dataset contains information on macroeconomic indicators for multiple countries over several years. Here are the variables:

Statistic Visualisation

# Subset for emerging market countries
selected_countries <- c("Bangladesh", "India", "Indonesia", "Malaysia", 
                        "Pakistan", "Vietnam")

FilteredIndicators <- Indicators %>%
  filter(Country %in% selected_countries)

Plot 2: Inflation Rate (%) Over Time

ggplot(FilteredIndicators, aes(x = Year, y = `Inflation Rate (%)`, color = Country)) +
  geom_line(linewidth = 1) +
  labs(
    title = "Inflation Trends (2010–2025)",
    subtitle = "Emerging Markets",
    x = "Year",
    y = "Inflation Rate (%)",
    color = "Country"
    ) +
  theme_light()

This line chart depicts the rates of Inflation in emerging economies in South Asia over the period of 2010 to 2025. It can be noted that Pakistan historically and currently has the highest rate of inflation, sitting at around 25% in 2025. The other four economies have has similarly fluatuating rates around the 5% mark.

Interactive Plot

Plot: 2: Inflation Rates over time

p2 <- ggplot(FilteredIndicators, aes(x = Year, y = `Inflation Rate (%)`, color = Country)) +
  geom_line(linewidth = 1) +
  labs(
    title = "Inflation Trends (2010–2025)",
    subtitle = "Emerging Markets",
    x = "Year",
    y = "Inflation Rate (%)",
    color = "Country"
  ) +
  theme_light()

ggplotly(p2)

Animated Chart

Animated_GDP <- ggplot(FilteredIndicators, aes(x = `Economic Growth (%)`,
                                                y = Country,
                                                color = Country)) +
  geom_point(size = 6, alpha = 0.8) +
  labs(
    title = "Economic Growth Rates Over Time: {frame_time}",
    x = "Economic Growth (%)",
    y = "Country"
  ) +
  xlim(0, NA) +
  transition_time(Year) +
  ease_aes('linear') +
  theme_minimal(base_size = 14) +
  theme(legend.position = "none")

Animated_GDP
animate(Animated_GDP, fps = 5, renderer = gifski_renderer())

This is an animation that depicts the economic growth rates over the period of 2010 to 2025, categoried by country.