knitr::opts_chunk$set( message = FALSE, collapse = TRUE, comment = "#>" )
library(econdata) library(ggplot2) library(tidyr)
fc_labels <- c( "infl" = "Inflation (Annualized QoQ, %)", "un" = "Unemployment (%)", "ff" = "Policy rate (%)" ) gather(sw2001, variable, value, -date, factor_key = TRUE) %>% ggplot(aes(date, value)) + geom_line() + facet_wrap( ~ variable, labeller = labeller(variable = as_labeller(fc_labels))) + theme_bw() + labs(x = "", y = "", # title = "Stock & Watson (2001). 'Vector Autoregressions'", # subtitle = " Journal of Economic Perspectives", title = "US quarterly data from 1960:Q1 to 2000:Q4")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.