1. Learn
  2. /
  3. Courses
  4. /
  5. Importing and Managing Financial Data in R

Exercise

Find and import Unemployment Rate data from FRED

Both getSymbols() and Quandl() provide access to the FRED database. In this exercise, you will find the FRED symbol for the United States civilian unemployment rate. Then you will use the series name to download the data directly from FRED using getSymbols(), and from the Quandl database using Quandl().

Remember that getSymbols() specifies the data source using the src argument and that Quandl() specifies it as part of the Quandl code (i.e. database/series).

Both the quantmod and Quandl packages have been loaded for you, so you just need to find the symbol and call getSymbols() and Quandl().

Instructions

100 XP
  • Assign the FRED series name to an object called series_name. To find the FRED series name, go to the FRED website and search for "United States civilian unemployment rate".
  • Use getSymbols() to load the data. Remember to set the src argument!
  • Create an object named quandl_code (prepend the Quandl database name (FRED) to the series_name).
  • Use Quandl() to load the data. Assign the data to an object named unemploy_rate. Remember to include the database in the Quandl code!