2. Main Content
We will graphically represent the misery index for each country and compare them to assess economic downturns and prosperity.
The dataset we have chosen includes a variety of economic indicators for multiple countries on a per-timezone basis. This dataset comprises economic metrics such as annual consumer price inflation rates, GDP deflator inflation rates, real interest rates, deposit and lending interest rates, as well as total unemployment rates for different countries (both national estimates and ILO model estimates). Additionally, it contains information on each country’s ISO code, administrative region, and income level.
We will utilize the concept of the misery index, closely related to the economic indicators included in this dataset, to conduct a fresh analysis. Our primary objective is to calculate the misery index for each country using this dataset, allowing us to analyze the economic prosperity or distress of each nation. Furthermore, we aim to propose straightforward measures within the dataset’s economic indicators that can help reduce the misery index.
The misery index is a numerical representation of the economic hardship that people experience, quantifying the combination of inflation and unemployment rates during a specific period.
We will graphically represent the misery index for each country and compare them to assess economic downturns and prosperity.
We think that the pain index will be affected by the economic situation and that there will be special patterns in inflation and unemployment among the economic indicators of the data.
library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.1.3 ✔ readr 2.1.4
## ✔ forcats 1.0.0 ✔ stringr 1.5.0
## ✔ ggplot2 3.4.3 ✔ tibble 3.2.1
## ✔ lubridate 1.9.2 ✔ tidyr 1.3.0
## ✔ purrr 1.0.2
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
data <- read_csv("inflation interest unemployment.csv")
## Rows: 13832 Columns: 13
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (5): country, iso3c, iso2c, adminregion, incomeLevel
## dbl (8): year, Inflation, consumer prices (annual %), Inflation, GDP deflato...
##
## ℹ 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.
data$Inflation <- ifelse(is.na(data$`Inflation, consumer prices (annual %)`),
0,
data$`Inflation, consumer prices (annual %)`)
data$Unemployment <- ifelse(is.na(data$`Unemployment, total (% of total labor force) (national estimate)`),
data$`Unemployment, total (% of total labor force) (modeled ILO estimate)`,
data$`Unemployment, total (% of total labor force) (national estimate)`)
# 고통 지수 계산
data$PainIndex <- data$Inflation + data$Unemployment
# NA가 아닌 PainIndex만 필터링
data <- data %>%
filter(!is.na(PainIndex))
# 특정 국가 선택
selected_countries <- c("Korea, Rep.", "China", "United States", "Canada")
data_selected <- data %>%
filter(country %in% selected_countries)
# 시각화
p <- ggplot(data_selected, aes(x = country, y = PainIndex)) +
geom_boxplot() +
labs(x = "Country", y = "Pain Index", title = "Boxplot of Pain Index by Selected Countries")
print(p)
This is a rough visual representation of four countries that we are
focusing on.
korea_data <- data %>%
filter(country == 'Korea, Rep.') %>%
select(country,
year,
inflation_rate = `Inflation, consumer prices (annual %)`,
real_interest_rate = `Real interest rate (%)`,
unemployment_rate = `Unemployment, total (% of total labor force) (modeled ILO estimate)`) %>%
filter(!is.na(inflation_rate) & !is.na(unemployment_rate)) %>%
mutate(misery_index = inflation_rate + unemployment_rate)
p <- ggplot(korea_data, aes(x = year, y = misery_index)) + geom_line(color = "blue") +
geom_point(color = "red") +
annotate(geom = "rect", xmin = 1997.5, xmax = 1998.5, ymin = 13, ymax = 15, fill = "red", alpha = 0.2) +
annotate(geom = "text", x = 1999, y = 14.5, label = "A surprisingly high", hjust = 0) +
labs(title = "Korean Misery Index",
x = "Year",
y = "Misery Index")
print(p)
Through the misery index graph, we can observe that the index reached its highest point towards the end of the 1990s. In 1997, South Korea experienced the Asian financial crisis, which is reflected in the increase of the misery index during that period.
usa_data <- data %>%
filter(country == "United States") %>%
select(year,
inflation_rate = `Inflation, consumer prices (annual %)`,
unemployment_rate = `Unemployment, total (% of total labor force) (modeled ILO estimate)`) %>%
filter(!is.na(inflation_rate) & !is.na(unemployment_rate))
usa_data <- usa_data %>%
mutate(misery_index = inflation_rate + unemployment_rate)
p <- ggplot(usa_data, aes(x = year, y = misery_index)) + geom_line(color = "blue") +
geom_point(color = "red") +
annotate(geom = "rect", xmin = 2010.5, xmax = 2011.5, ymin = 11.5, ymax = 12.5, fill = "red", alpha = 0.2) +
annotate(geom = "text", x = 2012, y = 11.9, label = "A surprisingly high", hjust = 0) +
labs(title = "USA Misery Index",
x = "Year",
y = "Misery Index")
print(p)
From the graph, it is evident that the misery index increased in the late 2000s. In 2008, the global financial crisis occurred, leading to a noticeable rise in the misery index.
china_data <- data %>%
filter(country == "China") %>%
select(year,
inflation_rate = `Inflation, consumer prices (annual %)`,
real_interest_rate = `Real interest rate (%)`,
unemployment_rate = `Unemployment, total (% of total labor force) (modeled ILO estimate)`) %>%
filter(!is.na(inflation_rate) & !is.na(unemployment_rate))
china_data <- china_data %>%
mutate(misery_index = inflation_rate + unemployment_rate)
p <- ggplot(china_data, aes(x = year, y = misery_index)) + geom_line(color = "blue") +
geom_point(color = "red") +
annotate(geom = "rect", xmin = 1998.5, xmax = 1999.5, ymin = 1, ymax = 3, fill = "red", alpha = 0.2) +
annotate(geom = "text", x = 2000, y = 2, label = "A surprisingly low", hjust = 0) +
labs(title = "China Misery Index",
x = "Year",
y = "Misery Index")
print(p)
Around 1997, we can observe that China’s misery index significantly decreased. During the 1990s, China achieved rapid economic growth, thanks to various contributing factors.
canada_data <- data %>%
filter(country == "Canada") %>%
select(year,
inflation_rate = `Inflation, consumer prices (annual %)`,
unemployment_rate = `Unemployment, total (% of total labor force) (modeled ILO estimate)`) %>%
filter(!is.na(inflation_rate) & !is.na(unemployment_rate))
canada_data <- canada_data %>%
mutate(misery_index = inflation_rate + unemployment_rate)
p <- ggplot(canada_data, aes(x = year, y = misery_index)) + geom_line(color = "blue") +
geom_point(color = "red") +
annotate(geom = "rect", xmin = 2006, xmax = 2008, ymin = 7.7, ymax = 8.7, fill = "red", alpha = 0.2) +
annotate(geom = "text", x = 2008, y = 8.2, label = "A surprisingly low", hjust = 0) +
labs(title = "Canada Misery Index",
x = "Year",
y = "Misery Index")
print(p)
From the graph, we can observe that around 2007, the misery index showed a decline. During that period, Canada’s economic growth was driven by a combination of factors, including its resources, agriculture, technology investments, international trade, and government policies.
Ultimately, to reduce the misery index, it is necessary to lower inflation and unemployment rates. We aim to analyze the relationship between inflation and interest rates, as well as the relationship between inflation and unemployment, examining each factor.
korea_data <- data %>%
filter(country == "Korea, Rep.") %>%
select(year,
inflation_rate = `Inflation, consumer prices (annual %)`,
lending_rate = `Lending interest rate (%)`) %>%
filter(!is.na(inflation_rate) & !is.na(lending_rate))
p <- ggplot(korea_data, aes(x = inflation_rate, y = lending_rate)) + geom_point() +
geom_smooth(method = "lm", color = "blue") +
labs(title = "Relationship Between Inflation and Lending Interest Rate in Korea",
x = "Inflation (%)", y = "Lending Interest Rate (%)")
print(p)
## `geom_smooth()` using formula = 'y ~ x'
When examining the relationship between inflation and interest rates, we can observe a positive correlation. In other words, as inflation rises, so do interest rates.
korea_data <- data %>%
filter(country == "Korea, Rep.") %>%
select(year,
inflation_rate = `Inflation, consumer prices (annual %)`,
unemployment_rate = `Unemployment, total (% of total labor force) (modeled ILO estimate)`) %>%
filter(!is.na(inflation_rate) & !is.na(unemployment_rate))
p <- ggplot(korea_data, aes(x = inflation_rate, y = unemployment_rate)) + geom_point() +
geom_smooth(method = "lm", color = "blue") +
labs(title = "Relationship Between Inflation and Unemployment Rate in Korea",
x = "Inflation (%)", y = "Unemployment Rate (%)")
print(p)
## `geom_smooth()` using formula = 'y ~ x'
When examining the relationship between unemployment and inflation rates, we can observe a negative correlation. This represents the Phillips Curve, implying that to reduce unemployment, a higher inflation rate must be accepted.
We could see the limitations of the Phillips Curve. The Phillips Curve is based on empirical data and may not be applicable to all situations. Additionally, since the 2000s, we can observe a flattening phenomenon in the Phillips Curve, and it’s evident that there is only a very weak relationship between the unemployment rate and the inflation rate.
The Phillips Curve is a curve that indicates a short-term inverse relationship (negative correlation) between the inflation rate and the unemployment rate.

We need to examine economic indicators such as inflation, interest rates, and unemployment, and adjust each element appropriately to reduce the misery index. While the Phillips Curve tendency between inflation and unemployment is weak, it still needs to be considered. Additionally, policy-making should proceed with reference to other economic indicators.