Created
January 15, 2021 11:22
-
-
Save bttomio/3472e7bbf6afdeb4897fbaddf45fce47 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Leading Indicators OECD: Reference series: Gross Domestic Product (GDP): Normalised [LORSGPNO] | |
# Level, rate or national currency, seasonally adjusted [STSA] | |
library(OECD) | |
dataset <- "MEI" # MAIN ECONOMIC INDICATORS | |
filter_list <- list("", "LORSGPNO", "STSA", "M") # SEQUENCE SENSITIVE | |
GDP <- get_dataset(dataset = dataset, filter = filter_list) | |
library(ggplot2) | |
GDP_all <- GDP %>% | |
subset(obsTime >= "2020-01") %>% | |
ggplot(aes(x = obsTime, y = obsValue, group = LOCATION, colour = LOCATION)) + | |
geom_line() + | |
theme_minimal() + | |
theme(legend.position = "bottom", axis.title.x = element_blank()) + | |
labs(y = "GDP (2005 = 100)") | |
library(gghighlight) | |
GDP_CHN <- GDP %>% | |
subset(obsTime >= "2020-01") %>% | |
ggplot(aes(x = obsTime, y = obsValue, group = LOCATION, colour = LOCATION)) + | |
geom_line() + | |
theme_minimal() + | |
theme(legend.position = "bottom", axis.title.x = element_blank()) + | |
labs(y = "GDP (2005 = 100)") + | |
gghighlight(LOCATION == "CHN", label_params = c(box.padding = 0.5, max.overlaps = Inf)) | |
GDP_FRA <- GDP %>% | |
subset(obsTime >= "2020-01") %>% | |
ggplot(aes(x = obsTime, y = obsValue, group = LOCATION, colour = LOCATION)) + | |
geom_line() + | |
theme_minimal() + | |
theme(legend.position = "bottom", axis.title.x = element_blank()) + | |
labs(y = "GDP (2005 = 100)") + | |
gghighlight(LOCATION == "FRA", label_params = c(box.padding = 0.5, max.overlaps = Inf)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment