STAN (STructural ANalysis) Industrial - STANI4
Data - OECD
Nobs - Javascript
Data Structure
| id | description |
|---|---|
| COU | Country |
| VAR | Variable |
| IND | Industry |
| TIME | Time |
| OBS_VALUE | Observation Value |
| TIME_FORMAT | Time Format |
| OBS_STATUS | Observation Status |
| UNIT | Unit |
| POWERCODE | Unit multiplier |
| REFERENCEPERIOD | Reference period |
VAR
IND
Example 1: Car production
Code
STANI4 %>%
filter(IND == "2900",
VAR == "GOPS",
COU == c("FRA", "DEU")) %>%
year_to_date %>%
left_join(STANI4_var %>% pluck("VAR"), by = c("VAR" = "id")) %>%
rename(VAR_desc = label) %>%
left_join(STANI4_var %>% pluck("COU"), by = c("COU" = "id")) %>%
rename(COU_desc = label) %>%
select(VAR_desc, COU_desc, date, obsValue) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue/10^9, color = COU_desc, linetype = COU_desc)) +
scale_color_manual(values = viridis(3)[1:2]) +
theme_minimal() + xlab("") + ylab("") +
scale_x_date(breaks = seq(1960, 2020, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%y")) +
scale_y_continuous(breaks = seq(0, 30, 5),
labels = dollar_format(accuracy = 1, suffix = " Mds€", prefix = "")) +
theme(legend.position = c(0.25, 0.9),
legend.title = element_blank(),
legend.direction = "horizontal")