
I choose USRECM because, after a bit more searching, I find that it’s the one that the St. Three series look like they might fit: USREC, USRECM, and USRECP. I chose a monthlyįrequency because the unemployment data are reported monthly-see My search to series with a monthly frequency. The tags() option restricts the results of the search to series fredsearch nber recession, tags(usa monthly) I performĪnother fredsearch, this time hunting for nber recession. Next, I need the series that contains the recession indicator. The detail option provides more detail about the matches found Notes: The unemployment rate represents the number of unemploy. I confirm this suspicion with another fredsearch: More keywords will narrow a search fewer keywords will pick up more series.ĬPIAUCSL Consumer Price Ind. Searches for all series in the database that match all the keywords “headline”, “unemployment”, and “rate”. The command takes a list of keywords as its Most of the time, I would use the GUI, but for this post I searchįor it with fredsearch. The FRED GUI, or I could search using the fredsearch command. I could look it up online, or I could search with
Highlight line graph r code#
To import the data, I need to know the FRED code for I first add recession shading to a plot of the unemployment


We will use the import fred command to pull the FRED data directly into Stata. It also contains some utility series, one of which happens to be an indicator variable that indicates whether a given month or quarter belongs to an NBER–defined recession.

Louis, contains time-series data on thousands of economic indicators from GDP and employment to exchange rates and trade flows. The Federal Reserve Economic Database (FRED), maintained by the Federal Reserve Bank of St. As of February 2020, the list of recession dates is located at. A recession is the time between a peak and a trough. The National Bureau of Economic Research (NBER) defines a recession as “a significant decline in economic activity spread across the economy, lasting more than a few months, normally visible in real GDP, real income, employment, industrial production, and wholesale–retail sales.” The NBER maintains a list of turning-point months in which the “peaks” and “troughs” in business activity occurred.
Highlight line graph r how to#
This post also demostrates how to build a complex graph in Stata, beginning with the basic pieces and finishing with a polished product. In this post, I will show you a simple way to add recession shading to graphs using data provided by import fred. Sometimes, I like to augment a time-series graph with shading that indicates periods of recession.
