Code
%>%
PCPIH_IX group_by(FREQ) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
print_table_conditional()
FREQ | Nobs |
---|---|
M | 37451 |
Q | 13060 |
A | 3150 |
Data - IMF - CPI
%>%
PCPIH_IX group_by(FREQ) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
print_table_conditional()
FREQ | Nobs |
---|---|
M | 37451 |
Q | 13060 |
A | 3150 |
%>%
PCPIH_IX left_join(REF_AREA, by = "REF_AREA") %>%
group_by(REF_AREA, Ref_area, FREQ) %>%
summarise(Nobs = n(),
first = first(TIME_PERIOD),
last = last(TIME_PERIOD)) %>%
arrange(-Nobs) %>%
mutate(Flag = gsub(" ", "-", str_to_lower(gsub(" ", "-", Ref_area))),
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 .} {
%>%
PCPIH_IX filter(REF_AREA %in% c("GB", "FR", "DE"),
== "A") %>%
FREQ year_to_date2() %>%
left_join(REF_AREA, by = "REF_AREA") %>%
filter(!is.na(OBS_VALUE)) %>%
ggplot(.) + theme_minimal() + xlab("") + ylab("") +
geom_line(aes(x = date, y = OBS_VALUE, color = Ref_area, linetype = Ref_area)) +
scale_x_date(breaks = seq(1950, 2020, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%y")) +
scale_y_log10(breaks = seq(0, 200, 10),
labels = dollar_format(accuracy = 1, prefix = "")) +
scale_color_manual(values = viridis(5)[1:4]) +
theme(legend.position = c(0.2, 0.80),
legend.title = element_blank())
%>%
PCPIH_IX filter(REF_AREA %in% c("GB", "FR", "DE"),
== "M") %>%
FREQ month_to_date2() %>%
left_join(REF_AREA, by = "REF_AREA") %>%
filter(!is.na(OBS_VALUE)) %>%
ggplot(.) + theme_minimal() + xlab("") + ylab("") +
geom_line(aes(x = date, y = OBS_VALUE, color = Ref_area, linetype = Ref_area)) +
scale_x_date(breaks = seq(1950, 2020, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%y")) +
scale_y_log10(breaks = seq(0, 200, 10),
labels = dollar_format(accuracy = 1, prefix = "")) +
scale_color_manual(values = viridis(5)[1:4]) +
theme(legend.position = c(0.2, 0.80),
legend.title = element_blank())
%>%
PCPIH_IX filter(REF_AREA %in% c("IT", "ES", "GR"),
== "A") %>%
FREQ year_to_date2() %>%
left_join(REF_AREA, by = "REF_AREA") %>%
filter(!is.na(OBS_VALUE)) %>%
ggplot(.) + theme_minimal() + xlab("") + ylab("") +
geom_line(aes(x = date, y = OBS_VALUE, color = Ref_area, linetype = Ref_area)) +
scale_x_date(breaks = seq(1950, 2020, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%y")) +
scale_y_log10(breaks = c(seq(1, 5, 1), seq(0, 200, 10)),
labels = dollar_format(accuracy = 1, prefix = "")) +
scale_color_manual(values = viridis(5)[1:4]) +
theme(legend.position = c(0.2, 0.80),
legend.title = element_blank())
%>%
PCPIH_IX filter(REF_AREA %in% c("PT", "JP", "NO"),
== "A") %>%
FREQ year_to_date2() %>%
left_join(REF_AREA, by = "REF_AREA") %>%
filter(!is.na(OBS_VALUE)) %>%
ggplot(.) + theme_minimal() + xlab("") + ylab("") +
geom_line(aes(x = date, y = OBS_VALUE, color = Ref_area, linetype = Ref_area)) +
scale_x_date(breaks = seq(1950, 2020, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%y")) +
scale_y_log10(breaks = c(seq(1, 5, 1), seq(0, 200, 10)),
labels = dollar_format(accuracy = 1, prefix = "")) +
scale_color_manual(values = viridis(5)[1:4]) +
theme(legend.position = c(0.2, 0.80),
legend.title = element_blank())