Inflation rates vs Unemployment rates for G-20 countries

The Phillips curve theory suggests that there is a negative relationship between unemployment rates and inflation rates. In other words, when the unemployment rate increases, the inflation rate decreases, and vice versa. However, this relationship is not universal and may vary depending on the country and its economic conditions.

When examining a chart comparing unemployment and inflation rates for G-20 countries from 1990 to 2021, some countries may exhibit a clear Phillips curve relationship, while others may not show any relationship at all. This is particularly true for countries that have experienced hyperinflation, where the relationship may be difficult to discern.

For Korea and Japan, it is apparent that there is a clear relationship between unemployment and inflation rates. However, the European Union displays an opposite relationship, where inflation and unemployment move in the same direction. In the United States, there is a weak Phillips curve relationship.

The following R-codes generate

library(wbstats)
library(tidyverse)

Set G20 country codes

g20 <- c(“ARG”, “AUS”, “BRA”, “CAN”, “CHN”, “FRA”, “DEU”, “IND”, “IDN”, “ITA”, “JPN”, “KOR”, “MEX”, “RUS”, “SAU”, “ZAF”, “TUR”, “GBR”, “USA”, “EUU”)

Download inflation rates

inflation <- wb(indicator = “FP.CPI.TOTL.ZG”, country = g20, startdate = “1990”, enddate = “2022”)

Download unemployment rates

unemployment <- wb(indicator = “SL.UEM.TOTL.ZS”, country = g20, startdate = “1990”, enddate = “2022”)

Combine the two data frames into one

data <- left_join(inflation, unemployment, by = c(“country”, “date”))

head(data)

library(ggplot2)
library(ggpubr)

Combine the inflation and unemployment data frames

df <- inflation %>%
left_join(unemployment, by = c(“country”, “date”))

Loop through each country and create a scatter plot

plots_list <- list() for (c in unique(df$country)) { df_subset <- df %>% filter(country == c)
p <- ggplot(df_subset, aes(x = value.y, y = value.x)) +
geom_point() +
labs(title = c)
plots_list[[c]] <- p
}

Display the scatter plots using ggarrange

ggarrange(plotlist = plots_list, ncol = 4, nrow = 5)

Filter the data to keep only the United States

us_data <- data %>%
filter(country == “United States”)

Create a scatter chart

ggplot(us_data, aes(x = value.y, y = value.x)) +
geom_point(aes(color = us_data$date)) +
geom_smooth(method = “lm”, se = FALSE, color = “blue”) +
labs(x = “Unemployment rate”, y = “Inflation rate”,
title = “Inflation rate vs. Unemployment rate in the United States”)

Filter the data to keep only Korea

korea_data <- data %>%
filter(country == “Korea, Rep.”)

Create a scatter chart

ggplot(korea_data, aes(x = value.y, y = value.x)) +
geom_point(aes(color = korea_data$date)) +
geom_smooth(method = “lm”, se = FALSE, color = “blue”) +
labs(x = “Unemployment rate”, y = “Inflation rate”,
title = “Inflation rate vs. Unemployment rate in Korea”)

Filter the data to keep only Korea

EU_data <- data %>%
filter(country == “European Union”)

Create a scatter chart

ggplot(EU_data, aes(x = value.y, y = value.x)) +
geom_point(aes(color = EU_data$date)) +
geom_smooth(method = “lm”, se = FALSE, color = “blue”) +
labs(x = “Unemployment rate”, y = “Inflation rate”,
title = “Inflation rate vs. Unemployment rate in European Union”)

data$country

Filter the data to keep only Korea

Japan_data <- data %>%
filter(country ==”Japan”)

Create a scatter chart

ggplot(Japan_data, aes(x = value.y, y = value.x)) +
geom_point(aes(color = Japan_data$date)) +
geom_smooth(method = “lm”, se = FALSE, color = “blue”) +
labs(x = “Unemployment rate”, y = “Inflation rate”,
title = “Inflation rate vs. Unemployment rate in Japna”)

ggplot(data, aes(x = value.y, y = value.x)) +
geom_point(aes(color = country)) +
scale_x_continuous(“Unemployment Rate”, labels = scales::percent_format()) +
scale_y_continuous(“Inflation Rate”, labels = scales::percent_format()) +
theme_bw()

Filter inflation data for 2021

inflation_2021 <- inflation %>%
filter(data$date == 2021)

unemployment_2021<- unemployment %>%

filter(unemployment$date== 2021)

Calculate average inflation ra

avg_inflation_2021 <- mean(inflation_2021$value)

Create bar chart with average line and label

ggplot(inflation_2021, aes(x = country, y = value)) +
geom_bar(stat = “identity”, fill = “blue”) +
geom_hline(yintercept = avg_inflation_2021, color = “red”, linetype = “dashed”) +
geom_text(aes(x = 0, y = avg_inflation_2021, label = paste0(“Avg: “, round(avg_inflation_2021, 2), “%”)),
hjust = -5.1, vjust = -0.5, color = “red”, fontface = “bold”) +
labs(title = “Inflation Rates in G-20 Countries, 2021”,
x = “Country”,
y = “Inflation Rate (%)”) +
theme_bw() +
theme(plot.title = element_text(size = 14, face = “bold”),
axis.text.x = element_text(angle = 45, vjust = 0.5))

Real GDP growth rates of G-20 countries from 2011 to 2022

The chart displayed in the website depicts the trend of global economic growth rates from 2010 to 2022 for G-20 countries, divided into three categories of countries based on their economic orientation – commodity-exporting, manufacturing-oriented, and service-oriented.

The chart shows that during the period of low inflation between 2010 and 2020, most countries experienced steady economic growth rates. However, the growth rates differed among the three categories of countries. Commodity-exporting countries, such as Russia and Brazil, had high growth rates in the early 2010s but experienced a significant decline in the mid-2010s. In contrast, service-oriented countries, such as U.S and EU, had consistently high growth rates throughout the period. Manufacturing-oriented countries, such as Germany and Japan, had relatively lower but steady growth rates during the entire period.

The chart also shows that in 2020 and 2021, during a high inflation period, the growth rates of most countries declined. However, it is interesting to note that some commodity-exporting countries, such as Russia and Saudi Arabia, experienced a significant increase in growth rates during this period, as predicted earlier. Meanwhile, manufacturing-oriented countries, such as Japan and Germany, experienced a more substantial decline in growth rates during the same period.

Countries that rely heavily on commodity exports, such as Russia, Brazil, Saudi Arabia, and Argentina, have experienced some ups and downs, but their economic growth rates are expected to rise in the 2020s during a period of high inflation. On the other hand, manufacturing-oriented countries like Japan, Germany, South Korea, and China are likely to experience slower growth rates in the 2020s.

Source: World Bank

library(wbstats)
library(tidyverse)

wbsearch(“Real GDP”)

g20 <- c(“ARG”, “AUS”, “BRA”, “CAN”, “CHN”, “FRA”, “DEU”, “IND”, “IDN”, “ITA”, “JPN”, “KOR”, “MEX”, “RUS”, “SAU”, “ZAF”, “TUR”, “GBR”, “USA”, “EUU”)
gdp <- wb(indicator = “NY.GDP.MKTP.KD”, country = g20, startdate = 2010, enddate = 2022)

head(gdp)

real_gdp <- gdp %>%
mutate(year = as.numeric(substr(date, 1, 4))) %>% # extract year from “date” column
filter(year == 2020) %>%
select(country, value) %>% # change “gdp” to “value”
rename(gdp2020 = value)

library(dplyr)

gdp_sorted <- gdp %>%
arrange(country, date)

gdp_growth <- gdp_sorted %>%
group_by(country) %>%
mutate(gdp_growth_rate = 100*(value – lag(value))/lag(value)) %>%

ungroup()

library(ggplot2)

ggplot(gdp_growth, aes(x = country, y = gdp_growth_rate)) +
geom_bar(stat = “identity”) +
xlab(“Country”) +
ylab(“GDP growth rate”) +
ggtitle(“GDP growth rate by country, 2011-2022”)

head(gdp_growth)

gdp_growth<-na.omit(gdp_growth)

head(gdp_growth)

library(ggplot2)

ggplot(gdp_growth, aes(x = factor(gdp_growth$date), y = as.numeric(gdp_growth_rate))) +
geom_bar(stat = “identity”, position = “dodge”) +
facet_wrap(~ country, ncol = 3, scales = “free_y”) +
labs(title = “GDP Growth Rate by Country (2011-2022)”,
x = “Year”,
y = “GDP Growth Rate”) +
theme_bw()

The real GDP growth rates of G-20 countries during COVID pandemic

The G-20 countries, except China and Turkey, experienced negative economic growth of -4.5% on average during the pandemic from 2019 to 2020. The worst-performing countries were England, Argentina, and Italy, while France and Mexico also experienced negative growth. These western countries were compelled to implement strong monetary and fiscal policies to mitigate the economic impact of the pandemic.

Source: World Bank

In 2021, the G-20 countries made significant strides toward recovering from the COVID-19 pandemic. On average, these countries experienced an impressive economic growth rate of 5.61%. Notably, China and Turkey continued to grow at exceptionally high rates, while western nations that implemented robust monetary and fiscal policies also enjoyed substantial growth. However, these policies have also led to high inflation rates in some western countries, which is a concern moving forward.

Source: World Bank