I have begun developing a R wrapper for the FRED API.  It is hosted on GitHub at:  You will need to sign up for a FRED API key to use the wrapper.

Let’s say you want to pull Annual Real Gross National Product. Here’s how you could do it:

> fred <- fredAPI()
> fred$key('My FRED API key here')
> xml <- fred$series_observations('GNPCA')


Thoughts from Big Data Economic Papers

I have started reading The Data Revolution and Economic Analysis, a paper written by two Stanford professors.  It is a great paper and I highly recommend it.

One passage spurred on some thoughts for me.  It reads:

In health care, it is now common for insurers to adjust payments and quality measures based on “risk scores”, which are derived from predictive models of individual health costs and outcomes. An individual’s risk score is typically a weighted sum of health indicators that identify whether an individual has different chronic conditions, with the weights chosen based on a statistical analysis.

I thought of computing macroeconomic risk scores for, say , the risk of entering a recession.  Economic indicators would be used to construct the risk factors.

I also thought of Varian’s paper that gave a methodology for determining the importance of a variable for inclusion into a model.  This process may inform the weighting decision.

I would love to write a Python program that would use the FRED API and pull data and compute the risk score.


St. Louis Fed FRED API

I just wanted to pass on a link that I intend to use. I read an article that stated there is a lack of data sets for people interested in becoming a data scientist to use. I found that strange given the large amounts of data available in the Economics field.

The St. Louis Federal Reserve Bank, has the Federal Reserve Economic Data system or FRED. There are 212,000 time series from 62 sources. They also have an API, and a 3rd party Python wrapper.