Inflation, GDP deflator (annual %)

Data - WDI

Info

source dataset .html .RData

bis

XRU

2024-05-10 2024-09-15

bis

XRU_D

2024-08-28 2024-08-28

Data on inflation

source dataset .html .RData

bis

CPI

2024-07-01 2022-01-20

ecb

CES

2024-09-15 2024-01-12

eurostat

nama_10_co3_p3

2024-09-16 2024-09-16

eurostat

prc_hicp_cow

2024-09-15 2024-09-15

eurostat

prc_hicp_ctrb

2024-09-15 2024-09-15

eurostat

prc_hicp_inw

2024-09-15 2024-09-15

eurostat

prc_hicp_manr

2024-09-15 2024-09-15

eurostat

prc_hicp_midx

2024-09-15 2024-09-15

eurostat

prc_hicp_mmor

2024-09-15 2024-09-18

eurostat

prc_ppp_ind

2024-09-15 2024-06-30

eurostat

sts_inpp_m

2024-06-24 2024-09-18

eurostat

sts_inppd_m

2024-09-15 2024-09-15

eurostat

sts_inppnd_m

2024-06-24 2024-09-15

fred

cpi

2024-09-18 2024-09-18

fred

inflation

2024-09-18 2024-09-18

imf

CPI

2024-06-20 2020-03-13

oecd

MEI_PRICES_PPI

2024-09-15 2024-04-15

oecd

PPP2017

2024-04-16 2023-07-25

oecd

PRICES_CPI

2024-04-16 2024-04-15

wdi

FP.CPI.TOTL.ZG

2023-01-15 2024-09-18

wdi

NY.GDP.DEFL.KD.ZG

2024-09-15 2024-09-18

Data on xrates

source dataset .html .RData

bdf

EXR

2024-07-26 2024-06-18

bis

EER

2024-08-09 2024-08-28

bis

EER_D

2024-08-28 2024-05-10

bis

XRU

2024-05-10 2024-09-15

bis

XRU_D

2024-08-28 2024-08-28

ecb

EXR

2024-09-15 2024-09-15

eurostat

ert_bil_eur_d

2024-09-15 2024-08-28

eurostat

ert_h_eur_d

2024-09-15 2024-06-08

fred

xrates

2024-09-14 2024-09-18

gfd

xrates

2024-06-20 2021-01-08

oecd

REFSERIES_MSIT

2024-09-15 2024-04-30

oecd

SNA_TABLE4

2024-09-15 2024-04-30

wdi

PA.NUS.FCRF

2024-08-28 2024-09-18

LAST_COMPILE

LAST_COMPILE
2024-09-18

Last

Code
NY.GDP.DEFL.KD.ZG %>%
  group_by(year) %>%
  summarise(Nobs = n()) %>%
  arrange(desc(year)) %>%
  head(1) %>%
  print_table_conditional()
year Nobs
2023 234

Nobs - Javascript

Code
NY.GDP.DEFL.KD.ZG %>%
  left_join(iso2c, by = "iso2c") %>%
  group_by(iso2c, Iso2c) %>%
  rename(value = value) %>%
  mutate(value = round(value, 2)) %>%
  summarise(Nobs = n(),
            `Year 1` = first(year),
            `Inflation 1` = first(value) %>% paste0(" %"),
            `Year 2` = last(year),
            `Inflation 2` = last(value) %>% paste0(" %")) %>%
  arrange(-Nobs) %>%
  mutate(Flag = gsub(" ", "-", str_to_lower(Iso2c)),
         Flag = paste0('<img src="../../icon/flag/vsmall/', Flag, '.png" alt="Flag">')) %>%
  select(Flag, everything()) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F, escape = F) else .}

Periods of Deflation

Table

Code
NY.GDP.DEFL.KD.ZG %>%
  filter(value < 0) %>%
  arrange(value) %>%
  mutate(value = round(value, 2)) %>%
  left_join(iso2c, by = "iso2c") %>%
  select(iso2c, Iso2c, year, value) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}

Indonesia 1967

Code
NY.GDP.DEFL.KD.ZG %>%
  filter(iso2c %in% c("ID")) %>%
  left_join(iso2c, by = "iso2c") %>%
  year_to_date() %>%
  ggplot(.) + geom_line() + theme_minimal() + 
  aes(x = date, y = value/100) + 
  xlab("") + ylab("Inflation, GDP deflator") +
  scale_x_date(breaks = seq(1900, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 10000, 20),
                     labels = percent_format(a = 1)) + 
  geom_hline(yintercept = 0, linetype = "dashed", color = "black")

Code
PA.NUS.FCRF %>%
  filter(iso2c %in% c("ID")) %>%
  left_join(iso2c, by = "iso2c") %>%
  year_to_date %>%
  ggplot(.) + theme_minimal() + xlab("") + ylab("") +
  geom_line(aes(x = date, y = value)) +
  scale_x_date(breaks = seq(1950, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_log10()

Timor-Leste 2015

Code
NY.GDP.DEFL.KD.ZG %>%
  filter(iso2c %in% c("TL")) %>%
  left_join(iso2c, by = "iso2c") %>%
  year_to_date() %>%
  ggplot(.) + geom_line() + theme_minimal() + 
  aes(x = date, y = value/100) + 
  xlab("") + ylab("Inflation, GDP deflator") +
  scale_x_date(breaks = seq(1900, 2100, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 10000, 20),
                     labels = percent_format(a = 1)) + 
  geom_hline(yintercept = 0, linetype = "dashed", color = "black")

Code
PA.NUS.FCRF %>%
  filter(iso2c %in% c("TL")) %>%
  left_join(iso2c, by = "iso2c") %>%
  year_to_date %>%
  ggplot(.) + theme_minimal() + xlab("") + ylab("") +
  geom_line(aes(x = date, y = value)) +
  scale_x_date(breaks = seq(1950, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_log10()

Brunei Darussalam 1986

Brunei Darussalam - Pegged to the Singapore dollar

Code
NY.GDP.DEFL.KD.ZG %>%
  filter(iso2c %in% c("BN")) %>%
  left_join(iso2c, by = "iso2c") %>%
  year_to_date() %>%
  ggplot(.) + geom_line() + theme_minimal() + 
  aes(x = date, y = value/100) + 
  xlab("") + ylab("Inflation, GDP deflator") +
  scale_x_date(breaks = seq(1900, 2100, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 10000, 20),
                     labels = percent_format(a = 1)) + 
  geom_hline(yintercept = 0, linetype = "dashed", color = "black")

Code
PA.NUS.FCRF %>%
  filter(iso2c %in% c("BN", "SG")) %>%
  left_join(iso2c, by = "iso2c") %>%
  year_to_date %>%
  ggplot(.) + theme_minimal() + xlab("") + ylab("") +
  geom_line(aes(x = date, y = value, color = Iso2c)) +
  scale_x_date(breaks = seq(1950, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_log10()

Code
PA.NUS.FCRF %>%
  filter(iso2c %in% c("SG")) %>%
  left_join(iso2c, by = "iso2c") %>%
  year_to_date %>%
  ggplot(.) + theme_minimal() + xlab("") + ylab("") +
  geom_line(aes(x = date, y = value)) +
  scale_x_date(breaks = seq(1950, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_log10()

Singapore 1999

Code
NY.GDP.DEFL.KD.ZG %>%
  filter(iso2c %in% c("SG")) %>%
  left_join(iso2c, by = "iso2c") %>%
  year_to_date() %>%
  ggplot(.) + geom_line() + theme_minimal() + 
  aes(x = date, y = value/100) + 
  xlab("") + ylab("Inflation, GDP deflator") +
  scale_x_date(breaks = seq(1900, 2100, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 10000, 1),
                     labels = percent_format(a = 1)) + 
  geom_hline(yintercept = 0, linetype = "dashed", color = "black")

Code
PA.NUS.FCRF %>%
  filter(iso2c %in% c("SG")) %>%
  left_join(iso2c, by = "iso2c") %>%
  year_to_date %>%
  ggplot(.) + theme_minimal() + xlab("") + ylab("") +
  geom_line(aes(x = date, y = value)) +
  scale_x_date(breaks = seq(1950, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_log10()

Sri Lanka, Nigeria, Pakistan

All

Code
NY.GDP.DEFL.KD.ZG %>%
  filter(iso2c %in% c("LK", "NG", "PK", "GH")) %>%
  left_join(iso2c, by = "iso2c") %>%
  year_to_date() %>%
  left_join(colors, by = c("Iso2c" = "country")) %>%
  mutate(value = value/100) %>%
  ggplot(.) + geom_line(aes(x = date, y = value, color = color)) +
  xlab("") + ylab("Inflation, consumer prices") +
  theme_minimal() + scale_color_identity() + add_4flags +
  scale_x_date(breaks = seq(1900, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 10000, 2),
                     labels = percent_format(a = 1)) + 
  geom_hline(yintercept = 0, linetype = "dashed", color = "grey")

2000-

Code
NY.GDP.DEFL.KD.ZG %>%
  filter(iso2c %in% c("LK", "NG", "PK", "GH")) %>%
  left_join(iso2c, by = "iso2c") %>%
  year_to_date() %>%
  filter(date >+ as.Date("2000-01-01")) %>%
  left_join(colors, by = c("Iso2c" = "country")) %>%
  mutate(value = value/100,
         color = ifelse(iso2c == "GH", color2, color)) %>%
  ggplot(.) + geom_line(aes(x = date, y = value, color = color)) +
  xlab("") + ylab("Inflation, GDP Deflator") +
  theme_minimal() + scale_color_identity() + add_4flags +
  scale_x_date(breaks = seq(1900, 2100, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 10000, 5),
                     labels = percent_format(a = 1)) + 
  geom_hline(yintercept = 0, linetype = "dashed", color = "grey")

Israel

All

Code
NY.GDP.DEFL.KD.ZG %>%
  filter(iso2c %in% c("IS")) %>%
  left_join(iso2c, by = "iso2c") %>%
  year_to_date() %>%
  ggplot(.) + geom_line() + theme_minimal() + 
  aes(x = date, y = value/100) + 
  xlab("") + ylab("Inflation, GDP deflator") +
  scale_color_manual(values = viridis(4)[1:3]) +
  theme(legend.title = element_blank(),
        legend.position = c(0.85, 0.85)) +
  scale_x_date(breaks = seq(1900, 2100, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 10000, 2),
                     labels = percent_format(a = 1)) + 
  geom_hline(yintercept = 0, linetype = "dashed", color = "black")

1993-

Code
NY.GDP.DEFL.KD.ZG %>%
  filter(iso2c %in% c("IS")) %>%
  left_join(iso2c, by = "iso2c") %>%
  year_to_date() %>%
  filter(date >= as.Date("1993-01-01")) %>%
  ggplot(.) + geom_line() + theme_minimal() + 
  aes(x = date, y = value/100) + 
  xlab("") + ylab("Inflation, GDP deflator") +
  scale_color_manual(values = viridis(4)[1:3]) +
  theme(legend.title = element_blank(),
        legend.position = c(0.85, 0.85)) +
  scale_x_date(breaks = seq(1900, 2100, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 10000, 2),
                     labels = percent_format(a = 1)) + 
  geom_hline(yintercept = 0, linetype = "dashed", color = "black")

Hungary

All

Code
NY.GDP.DEFL.KD.ZG %>%
  filter(iso2c %in% c("HU")) %>%
  left_join(iso2c, by = "iso2c") %>%
  year_to_date() %>%
  ggplot(.) + geom_line() + theme_minimal() + 
  aes(x = date, y = value/100) + 
  xlab("") + ylab("Inflation, GDP deflator") +
  scale_color_manual(values = viridis(4)[1:3]) +
  theme(legend.title = element_blank(),
        legend.position = c(0.85, 0.85)) +
  scale_x_date(breaks = seq(1900, 2100, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 10000, 2),
                     labels = percent_format(a = 1)) + 
  geom_hline(yintercept = 0, linetype = "dashed", color = "black")

1993-

Code
NY.GDP.DEFL.KD.ZG %>%
  filter(iso2c %in% c("HU")) %>%
  left_join(iso2c, by = "iso2c") %>%
  year_to_date() %>%
  filter(date >= as.Date("1993-01-01")) %>%
  ggplot(.) + geom_line() + theme_minimal() + 
  aes(x = date, y = value/100) + 
  xlab("") + ylab("Inflation, GDP deflator") +
  scale_color_manual(values = viridis(4)[1:3]) +
  theme(legend.title = element_blank(),
        legend.position = c(0.85, 0.85)) +
  scale_x_date(breaks = seq(1900, 2100, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 10000, 2),
                     labels = percent_format(a = 1)) + 
  geom_hline(yintercept = 0, linetype = "dashed", color = "black")

Hong Kong

Code
NY.GDP.DEFL.KD.ZG %>%
  filter(iso2c %in% c("HK")) %>%
  left_join(iso2c, by = "iso2c") %>%
  year_to_date() %>%
  ggplot(.) + geom_line() + theme_minimal() + 
  aes(x = date, y = value/100) + 
  xlab("") + ylab("Inflation, GDP deflator") +
  scale_color_manual(values = viridis(4)[1:3]) +
  theme(legend.title = element_blank(),
        legend.position = c(0.85, 0.85)) +
  scale_x_date(breaks = seq(1900, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 10000, 2),
                     labels = percent_format(a = 1)) + 
  geom_hline(yintercept = 0, linetype = "dashed", color = "grey")

France, Italy, Germany

Code
NY.GDP.DEFL.KD.ZG %>%
  filter(iso2c %in% c("FR", "DE", "IT")) %>%
  left_join(iso2c, by = "iso2c") %>%
  year_to_date() %>%
  left_join(colors, by = c("Iso2c" = "country")) %>%
  mutate(value = value/100) %>%
  ggplot(.) + geom_line(aes(x = date, y = value, color = color)) +
  xlab("") + ylab("Inflation, GDP deflator") +
  theme_minimal() + scale_color_identity() + add_3flags +
  scale_x_date(breaks = seq(1900, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 10000, 2),
                     labels = percent_format(a = 1)) + 
  geom_hline(yintercept = 0, linetype = "dashed", color = "grey")

1997 Asian Financial Crisis

Indonesia, Philippines, Singapore

Code
NY.GDP.DEFL.KD.ZG %>%
  year_to_date() %>%
  filter(iso2c %in% c("SG", "PH", "ID"),
         date >= as.Date("1990-01-01"),
         date <= as.Date("2005-01-01")) %>%
  left_join(iso2c, by = "iso2c") %>%
  left_join(colors, by = c("Iso2c" = "country")) %>%
  mutate(value = value/100) %>%
  ggplot(.) + geom_line(aes(x = date, y = value, color = color)) +
  xlab("") + ylab("Inflation, GDP deflator") +
  theme_minimal() + scale_color_identity() + add_3flags +
  scale_x_date(breaks = seq(1900, 2100, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 10000, 5),
                     labels = percent_format(a = 1)) + 
  geom_hline(yintercept = 0, linetype = "dashed", color = "grey")

Thailand, Malaysia, South Korea

Code
NY.GDP.DEFL.KD.ZG %>%
  year_to_date() %>%
  filter(iso2c %in% c("TH", "MY", "KR"),
         date >= as.Date("1990-01-01"),
         date <= as.Date("2005-01-01")) %>%
  left_join(iso2c, by = "iso2c") %>%
  mutate(value = value/100,
         Iso2c = ifelse(iso2c == "KR", "Korea", Iso2c)) %>%
  left_join(colors, by = c("Iso2c" = "country")) %>%
  ggplot(.) + geom_line(aes(x = date, y = value, color = color)) +
  xlab("") + ylab("Inflation, GDP deflator") +
  theme_minimal() + scale_color_identity() + add_3flags +
  scale_x_date(breaks = seq(1900, 2100, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 10000, 1),
                     labels = percent_format(a = 1)) + 
  geom_hline(yintercept = 0, linetype = "dashed", color = "grey")

Denmark, Netherlands, Sweden

Code
NY.GDP.DEFL.KD.ZG %>%
  filter(iso2c %in% c("DK", "SE", "c")) %>%
  left_join(iso2c, by = "iso2c") %>%
  year_to_date() %>%
  left_join(colors, by = c("Iso2c" = "country")) %>%
  mutate(value = value/100) %>%
  ggplot(.) + geom_line(aes(x = date, y = value, color = color)) +
  xlab("") + ylab("Inflation, GDP deflator") +
  theme_minimal() + scale_color_identity() + add_2flags +
  scale_x_date(breaks = seq(1900, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 10000, 2),
                     labels = percent_format(a = 1)) + 
  geom_hline(yintercept = 0, linetype = "dashed", color = "grey")

United States, United Kingdom, Japan

Code
NY.GDP.DEFL.KD.ZG %>%
  filter(iso2c %in% c("JP", "US", "GB")) %>%
  left_join(iso2c, by = "iso2c") %>%
  year_to_date() %>%
  left_join(colors, by = c("Iso2c" = "country")) %>%
  mutate(value = value/100) %>%
  ggplot(.) + geom_line(aes(x = date, y = value, color = color)) +
  xlab("") + ylab("Inflation, GDP deflator") +
  theme_minimal() + scale_color_identity() + add_3flags +
  scale_x_date(breaks = seq(1900, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 10000, 2),
                     labels = percent_format(a = 1)) + 
  geom_hline(yintercept = 0, linetype = "dashed", color = "grey")

Brazil

All

Code
NY.GDP.DEFL.KD.ZG %>%
  year_to_date() %>%
  filter(iso2c == "BR") %>%
  ggplot(.) + geom_line() + theme_minimal() + 
  aes(x = date, y = value/100) + xlab("") + ylab("Inflation") +
  scale_x_date(breaks = seq(1900, 2025, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 10000, 100),
                     labels = percent_format(a = 1)) + 
  geom_hline(yintercept = 0, linetype = "dashed", color = "grey")

1960-1980

Code
NY.GDP.DEFL.KD.ZG %>%
  year_to_date() %>%
  filter(iso2c == "BR",
         date <= as.Date("1980-01-01")) %>%
  ggplot(.) + geom_line() + theme_minimal() + 
  aes(x = date, y = value/100) + xlab("") + ylab("Inflation") +
  scale_x_date(breaks = seq(1900, 2025, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 10000, 10),
                     labels = percent_format(a = 1)) + 
  geom_hline(yintercept = 0, linetype = "dashed", color = "grey")

1997-

Code
NY.GDP.DEFL.KD.ZG %>%
  year_to_date() %>%
  filter(iso2c == "BR",
         date >= as.Date("1997-01-01")) %>%
  ggplot(.) + geom_line() + theme_minimal() + 
  aes(x = date, y = value/100) + xlab("") + ylab("Inflation") +
  scale_x_date(breaks = seq(1900, 2025, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 10000, 2),
                     labels = percent_format(a = 1)) + 
  geom_hline(yintercept = 0, linetype = "dashed", color = "grey")

Chile

All

Code
NY.GDP.DEFL.KD.ZG %>%
  year_to_date() %>%
  filter(iso2c == "CL") %>%
  ggplot(.) + geom_line() + theme_minimal() + 
  aes(x = date, y = value/100) + xlab("") + ylab("Inflation") +
  scale_x_date(breaks = seq(1900, 2025, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 10000, 100),
                     labels = percent_format(a = 1)) + 
  geom_hline(yintercept = 0, linetype = "dashed", color = "grey")

1960-1970

Code
NY.GDP.DEFL.KD.ZG %>%
  year_to_date() %>%
  filter(iso2c == "CL",
         date >= as.Date("1960-01-01"),
         date <= as.Date("1970-01-01")) %>%
  ggplot(.) + geom_line() + theme_minimal() + 
  aes(x = date, y = value/100) + xlab("") + ylab("Inflation") +
  scale_x_date(breaks = seq(1900, 2025, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 10000, 10),
                     labels = percent_format(a = 1)) + 
  geom_hline(yintercept = 0, linetype = "dashed", color = "grey")

1960-1980

Code
NY.GDP.DEFL.KD.ZG %>%
  year_to_date() %>%
  filter(iso2c == "CL",
         date >= as.Date("1960-01-01"),
         date <= as.Date("1980-01-01")) %>%
  ggplot(.) + geom_line() + theme_minimal() + 
  aes(x = date, y = value/100) + xlab("") + ylab("Inflation") +
  scale_x_date(breaks = seq(1900, 2025, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 10000, 100),
                     labels = percent_format(a = 1)) + 
  geom_hline(yintercept = 0, linetype = "dashed", color = "grey")

Venezuela

All

Code
NY.GDP.DEFL.KD.ZG %>%
  year_to_date() %>%
  filter(iso2c == "VE") %>%
  ggplot(.) + geom_line() + theme_minimal() + 
  aes(x = date, y = value/100) + xlab("") + ylab("Inflation") +
  scale_x_date(breaks = seq(1900, 2025, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 10000, 10),
                     labels = percent_format(a = 1)) + 
  geom_hline(yintercept = 0, linetype = "dashed", color = "grey")

Argentina

All

Code
NY.GDP.DEFL.KD.ZG %>%
  year_to_date() %>%
  filter(iso2c == "AR") %>%
  ggplot(.) + geom_line() + theme_minimal() + 
  aes(x = date, y = value/100) + xlab("") + ylab("Inflation") +
  scale_x_date(breaks = seq(1900, 2025, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 10000, 100),
                     labels = percent_format(a = 1)) + 
  geom_hline(yintercept = 0, linetype = "dashed", color = "grey")

CPI, 1993-2003

Code
NY.GDP.DEFL.KD.ZG %>%
  year_to_date() %>%
  filter(iso2c == "AR",
         date >= as.Date("1993-01-01"),
         date <= as.Date("2003-01-01")) %>%
  mutate(cpi = 100*cumprod(1 + value/100)) %>%
  ggplot(.) + geom_line() + theme_minimal() + 
  aes(x = date, y = cpi) + xlab("") + ylab("Price Index") +
  scale_x_date(breaks = seq(1900, 2100, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_log10(breaks = seq(-100, 10000, 5)) + 
  geom_hline(yintercept = 0, linetype = "dashed", color = "grey")

1996-2005

Code
NY.GDP.DEFL.KD.ZG %>%
  year_to_date() %>%
  filter(iso2c == "AR",
         date >= as.Date("1996-01-01"),
         date <= as.Date("2005-01-01")) %>%
  ggplot(.) + geom_line() + theme_minimal() + 
  aes(x = date, y = value/100) + xlab("") + ylab("Inflation") +
  scale_x_date(breaks = seq(1900, 2100, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 10000, 5),
                     labels = percent_format(a = 1)) + 
  geom_hline(yintercept = 0, linetype = "dashed", color = "grey")

1996-2020

Code
NY.GDP.DEFL.KD.ZG %>%
  year_to_date() %>%
  filter(iso2c == "AR",
         date >= as.Date("1996-01-01"),
         date <= as.Date("2020-01-01")) %>%
  ggplot(.) + geom_line() + theme_minimal() + 
  aes(x = date, y = value/100) + xlab("") + ylab("Inflation") +
  scale_x_date(breaks = seq(1900, 2100, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 10000, 5),
                     labels = percent_format(a = 1)) + 
  geom_hline(yintercept = 0, linetype = "dashed", color = "grey")

1992-2020

Code
NY.GDP.DEFL.KD.ZG %>%
  year_to_date() %>%
  filter(iso2c == "AR",
         date >= as.Date("1992-01-01"),
         date <= as.Date("2020-01-01")) %>%
  ggplot(.) + geom_line(aes(x = date, y = value/100)) + 
  theme_minimal() + xlab("") + ylab("Inflation") +
  scale_x_date(breaks = seq(1900, 2100, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  geom_rect(data = data_frame(start = as.Date("1996-01-01"), 
                              end = as.Date("2001-01-01")), 
            aes(xmin = start, xmax = end, ymin = -Inf, ymax = +Inf), 
            fill = viridis(3)[3], alpha = 0.2) +
  scale_y_continuous(breaks = 0.01*seq(-100, 10000, 5),
                     labels = percent_format(a = 1)) + 
  geom_hline(yintercept = 0, linetype = "dashed", color = "grey")

China

Code
NY.GDP.DEFL.KD.ZG %>%
  filter(iso2c == "CN") %>%
  year_to_date() %>%
  ggplot(.) + geom_line() + theme_minimal() + 
  aes(x = date, y = value/100) + xlab("") + ylab("Inflation") +
  scale_x_date(breaks = seq(1900, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 10000, 5),
                     labels = percent_format(a = 1)) + 
  geom_hline(yintercept = 0, linetype = "dashed", color = "grey")