Giter Site home page Giter Site logo

robinxlu / fred Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zachwill/fred

0.0 0.0 0.0 172 KB

Python wrapper for the St. Louis Fed's FRED API.

Home Page: http://api.stlouisfed.org/docs/fred/

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%

fred's Introduction

fred

Build Status

Python wrapper of the St. Louis Federal Reserve Bank's FRED API web service for retrieving economic data.

FRED API Documentation: http://api.stlouisfed.org/docs/fred/

Sign up for a FRED API key: http://api.stlouisfed.org/api_key.html

API Key

You can save your API key, and have it automatically accessible, on the command line:

$ export FRED_API_KEY=my_api_key

Usage

This wrapper hopes to make working with the Fred API as easy as possible.

>>> import fred

# Save your FRED API key.
>>> fred.key('my_fred_api_key')


# Interact with economic data categories.
>>> fred.category()

>>> fred.categories(24)

>>> fred.children(24)

>>> fred.related(32073)

>>> fred.category(series=True)

>>> fred.category_series(123)


# Interact with economic data releases.
>>> fred.releases()

>>> fred.release(250)

>>> fred.dates()


# Interact with economic data series.
>>> fred.series('GNPCA')

>>> fred.series('GNPCA', release=True)

>>> fred.observations('AAA')

>>> fred.search('search term')

>>> fred.updates()

>>> fred.vintage('AAA')


# Query economic data sources.
>>> fred.sources()

>>> fred.source(23)

NOTE: Normally, data is returned in dictionary format instead of XML. If you're looking for XML output, however, just pass in the xml=True keyword argument.

>>> import fred

>>> fred.releases(xml=True)

fred's People

Contributors

zachwill avatar alekzvik avatar stevendborrelli avatar dmitri123 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.