Title: “Economic Performance Analysis of G20 Countries Post Formation Using the Penn World Table”
Objective:
The aim of this analysis is to evaluate the economic performance of G20
countries since the group’s formation in 1999. Key indicators such as
GDP growth, GDP per capita, and human capital index are analyzed using
the Penn World Table to identify trends and insights into economic
developments in member nations.
Dataset Used:
The Penn World Table (version 10.01) provides
comprehensive economic data for countries globally, making it suitable
for examining G20 nations’ performance.
Steps Taken:
Tools Used:
dplyr library
for operations like filter, select, and
mutate.A summary table was generated to showcase the following: - Average GDP Growth: Average annual GDP growth rates for each G20 country. - GDP Per Capita: Average GDP per capita to reflect living standards. - Human Capital Index: Average human capital levels as a measure of skill and education.
The data was arranged in descending order of average GDP growth to highlight top-performing countries.
GDP Growth Trends:
A line chart was plotted to visualize GDP growth trends for G20
countries over the years.
Country Comparisons:
A bar chart compared the average GDP growth of G20 countries, providing
a clear picture of relative performance.
GDP Per Capita vs. Human Capital:
A scatter plot illustrated the relationship between GDP per capita and
human capital index, offering insights into how skill levels influence
economic output.
This analysis provided valuable insights into the economic performance of G20 nations over the past two decades. The findings emphasize the importance of GDP growth, human capital, and living standards in shaping a country’s economic trajectory. Further studies could focus on external factors like trade policies and global economic events to enrich the understanding of performance trends.
Now code Part
# Load necessary libraries
library(dplyr)
## Warning: package 'dplyr' was built under R version 4.4.2
##
## 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)
## Warning: package 'ggplot2' was built under R version 4.4.2
library(readxl)
## Warning: package 'readxl' was built under R version 4.4.2
# Load the Penn World Table Excel file
data <- read_excel("C:\\Users\\VANSH JAIN\\Downloads\\pwt1001.xlsx",sheet="Data")
# Define G20 countries
g20_countries <- c("Argentina", "Australia", "Brazil", "Canada", "China", "France", "Germany",
"India", "Indonesia", "Italy", "Japan", "Mexico", "Russia", "Saudi Arabia",
"South Africa", "South Korea", "Turkey", "United Kingdom", "United States")
# Filter for G20 countries and years after 1999
g20_data <- data %>%
filter(country %in% g20_countries & year > 1999) %>%
select(country, year, rgdpe, rgdpo, pop, hc) # Select relevant columns
# Add new variables: GDP growth rate and GDP per capita
g20_data <- g20_data %>%
group_by(country) %>%
mutate(
GDP_growth = (rgdpo - lag(rgdpo)) / lag(rgdpo) * 100,
GDP_per_capita = rgdpo / pop
) %>%
ungroup()
# Summarize data: Average GDP growth and GDP per capita by country
summary_table <- g20_data %>%
group_by(country) %>%
summarize(
Avg_GDP_growth = mean(GDP_growth, na.rm = TRUE),
Avg_GDP_per_capita = mean(GDP_per_capita, na.rm = TRUE),
Avg_Human_Capital = mean(hc, na.rm = TRUE)
) %>%
arrange(desc(Avg_GDP_growth))
# Display the summary table
print(summary_table)
## # A tibble: 17 × 4
## country Avg_GDP_growth Avg_GDP_per_capita Avg_Human_Capital
## <chr> <dbl> <dbl> <dbl>
## 1 Saudi Arabia 7.92 43671. 2.48
## 2 India 7.71 4286. 1.96
## 3 Indonesia 7.69 7529. 2.32
## 4 China 7.24 9415. 2.48
## 5 Turkey 5.54 19545. 2.23
## 6 Argentina 3.58 17978. 2.86
## 7 Brazil 3.49 12870. 2.51
## 8 Australia 3.27 47794. 3.49
## 9 South Africa 2.74 12192. 2.49
## 10 Mexico 2.65 16926. 2.60
## 11 Canada 2.07 46307. 3.63
## 12 United States 2.03 55254. 3.68
## 13 United Kingdom 1.98 39747. 3.67
## 14 Germany 1.86 44856. 3.63
## 15 France 1.76 39243. 3.05
## 16 Italy 1.02 37881. 2.97
## 17 Japan 0.240 39225. 3.48
# Save the summary table as a CSV file
write.csv(summary_table, "G20_Summary_Table.csv", row.names = FALSE)
# Visualization 1: GDP growth trends over time for G20 countries
ggplot(g20_data, aes(x = year, y = GDP_growth, color = country)) +
geom_line() +
labs(title = "GDP Growth Trends for G20 Countries (Post-1999)",
x = "Year", y = "GDP Growth (%)") +
theme_minimal()
## Warning: Removed 17 rows containing missing values or values outside the scale range
## (`geom_line()`).
# Visualization 2: Bar chart of average GDP growth by country
ggplot(summary_table, aes(x = reorder(country, -Avg_GDP_growth), y = Avg_GDP_growth)) +
geom_bar(stat = "identity", fill = "blue") +
coord_flip() +
labs(title = "Average GDP Growth of G20 Countries (Post-1999)",
x = "Country", y = "Average GDP Growth (%)") +
theme_minimal()
# Visualization 3: Scatter plot of GDP per capita vs. human capital
ggplot(g20_data, aes(x = GDP_per_capita, y = hc, color = country)) +
geom_point() +
labs(title = "GDP Per Capita vs. Human Capital Index (G20 Countries)",
x = "GDP Per Capita", y = "Human Capital Index") +
theme_minimal()