Link

FRED API for R

I have begun developing a R wrapper for the FRED API.  It is hosted on GitHub at: https://github.com/mikeasilva/fredAPI.  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')

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s