Inflation, GDP deflator (annual %)
Data - WDI
Info
Data on inflation
source | dataset | .html | .RData |
---|---|---|---|
2024-07-01 | 2022-01-20 | ||
2024-09-15 | 2024-01-12 | ||
2024-09-16 | 2024-09-16 | ||
2024-09-15 | 2024-09-15 | ||
2024-09-15 | 2024-09-15 | ||
2024-09-15 | 2024-09-15 | ||
2024-09-15 | 2024-09-15 | ||
2024-09-15 | 2024-09-15 | ||
2024-09-15 | 2024-09-18 | ||
2024-09-15 | 2024-06-30 | ||
2024-06-24 | 2024-09-18 | ||
2024-09-15 | 2024-09-15 | ||
2024-06-24 | 2024-09-15 | ||
2024-09-18 | 2024-09-18 | ||
2024-09-18 | 2024-09-18 | ||
2024-06-20 | 2020-03-13 | ||
2024-09-15 | 2024-04-15 | ||
2024-04-16 | 2023-07-25 | ||
2024-04-16 | 2024-04-15 | ||
2023-01-15 | 2024-09-18 | ||
2024-09-15 | 2024-09-18 |
Data on xrates
source | dataset | .html | .RData |
---|---|---|---|
2024-07-26 | 2024-06-18 | ||
2024-08-09 | 2024-08-28 | ||
2024-08-28 | 2024-05-10 | ||
2024-05-10 | 2024-09-15 | ||
2024-08-28 | 2024-08-28 | ||
2024-09-15 | 2024-09-15 | ||
2024-09-15 | 2024-08-28 | ||
2024-09-15 | 2024-06-08 | ||
2024-09-14 | 2024-09-18 | ||
2024-06-20 | 2021-01-08 | ||
2024-09-15 | 2024-04-30 | ||
2024-09-15 | 2024-04-30 | ||
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"),
>= as.Date("1990-01-01"),
date <= as.Date("2005-01-01")) %>%
date 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"),
>= as.Date("1990-01-01"),
date <= as.Date("2005-01-01")) %>%
date 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",
<= as.Date("1980-01-01")) %>%
date 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",
>= as.Date("1997-01-01")) %>%
date 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",
>= as.Date("1960-01-01"),
date <= as.Date("1970-01-01")) %>%
date 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",
>= as.Date("1960-01-01"),
date <= as.Date("1980-01-01")) %>%
date 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",
>= as.Date("1993-01-01"),
date <= as.Date("2003-01-01")) %>%
date 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",
>= as.Date("1996-01-01"),
date <= as.Date("2005-01-01")) %>%
date 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",
>= as.Date("1996-01-01"),
date <= as.Date("2020-01-01")) %>%
date 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",
>= as.Date("1992-01-01"),
date <= as.Date("2020-01-01")) %>%
date 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")