Documentation for the ECODATA Package
1 About the Package
This package makes it easy to download economic data that is publicly available on FRED (Federal Reserve Economic Data) or World Bank Data and make professional publication-ready plots with just a few lines of code.
The ecodata package is primarily targeted to novice R users and its primary intention to make the easy things easier. Still, experienced R users might find some of the procedures in this package convenient. With just two or three lines of code, you can use the package to download several variables from FRED and/or World Bank, produce plots, and document your data sources. The package provides a unified framework for downloading and plotting data from either source.
2 Getting Started
Vignette: Getting Started
Start here if you are new to the ecodata package. This vignette provides an overview of the package and demonstrates many of the most common uses for the package. The vignette also describes how to install the package and set it up to work with the FRED API.
Posit Cloud: Use the package in Posit Cloud
Posit Cloud is a cloud-based platform for RStudio. The package is pre-installed in Posit Cloud, so you can use it without having to install it yourself. You must create an account on Posit Cloud, if you have not already done so. Free plans are available.
3 Instructional Vignettes
These vignettes are examples of prompts to use in undergraduate macroeconomics courses to help students use data to think critically about macroeconomics concepts, and learn how to accomplish this using the ecodata package.
Vignette: Supply and Demand for Housing
This vignette demonstrates how to download and visualize data on construction prices, new house prices, and housing starts and examine whether the data matches what a supply and demand model would predict for the housing market.
Vignette: Exchange Rates and Interest Rates
This vignette demonstrates how to download and visualize data on exchange rates and interest rates interest rates in different countries and examine whether the data matches what a supply and demand model for currencies would predict for the relationship between exchange rates and interest rates.
Vignette: Unemployment and Recessions
This vignette demonstrates how to download and visualize data on unemployment and during the 2008-2009 recession and subsequent recovery, and compare the experiences across different U.S. states.
4 Reference
-
The reference manual provides detailed information about the functions in the package and how to use them.
5 Presentations
- Presentation slides for the St. Louis Fed Professors’ Conference, November 7-8, 2024.