You will need your own FRED API key that could be obtained at FRED website after registering for free account. See "FRED Key" section of the code in FRED_GDP_COMPONENTS.R for details.
This graph, posted on FRED Twitter, prompted my replication exercise.
fredr - access FRED API
tidyverse - preparing data
dygraphs - visualization library
xts - working with time-based data for visualization
rvest - web scrapping for Recession data