GithubHelp home page GithubHelp logo

bitcababy / fredr-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sboysel/fredr

0.0 1.0 0.0 2.58 MB

An R client for the Federal Reserve Economic Data (FRED) API

Home Page: http://sboysel.github.io/fredr/

License: Other

R 99.68% Makefile 0.32%

fredr-1's Introduction

fredr

Codecov CRAN CRAN Downloads R-CMD-check

fredr provides a complete set of R bindings to the Federal Reserve of Economic Data (FRED) RESTful API, provided by the Federal Reserve Bank of St. Louis. The functions allow the user to search for and fetch time series observations as well as associated metadata within the FRED database.

The core function in this package is fredr(), which fetches observations for a FRED series. That said, there are many other FRED endpoints exposed through fredr, such as fredr_series_search_text(), which allows you to search for a FRED series by text.

We strongly encourage referencing the FRED API documentation to leverage the full power of fredr.

You’ll also need a free API key to use fredr. See ?fredr_set_key().

Installation

You can download fredr from CRAN with:

install.packages("fredr")

To get the development version of the package:

# install.packages("devtools")
devtools::install_github("sboysel/fredr")

Example

You can use fredr() to fetch series from FRED. This fetches the US unemployment rate series from 1990-2000.

library(fredr)

fredr(
  series_id = "UNRATE",
  observation_start = as.Date("1990-01-01"),
  observation_end = as.Date("2000-01-01")
)
#> # A tibble: 121 x 5
#>    date       series_id value realtime_start realtime_end
#>    <date>     <chr>     <dbl> <date>         <date>      
#>  1 1990-01-01 UNRATE      5.4 2021-01-29     2021-01-29  
#>  2 1990-02-01 UNRATE      5.3 2021-01-29     2021-01-29  
#>  3 1990-03-01 UNRATE      5.2 2021-01-29     2021-01-29  
#>  4 1990-04-01 UNRATE      5.4 2021-01-29     2021-01-29  
#>  5 1990-05-01 UNRATE      5.4 2021-01-29     2021-01-29  
#>  6 1990-06-01 UNRATE      5.2 2021-01-29     2021-01-29  
#>  7 1990-07-01 UNRATE      5.5 2021-01-29     2021-01-29  
#>  8 1990-08-01 UNRATE      5.7 2021-01-29     2021-01-29  
#>  9 1990-09-01 UNRATE      5.9 2021-01-29     2021-01-29  
#> 10 1990-10-01 UNRATE      5.9 2021-01-29     2021-01-29  
#> # … with 111 more rows

Usage

See the Get started article.

Documentation

See the documentation site.

Restrictions

According to the FRED team, the following data sources do not permit redistribution through the FRED API:

  • ICE Libor Rates
  • ICE Swap Rates
  • LBMA Gold Price: Daily Prices
  • LBMA Silver Price: Daily Prices

If you need data from any of these sources, it is recommended to download the data directly from the FRED website. The series in these sources can be found here.

Code of Conduct

Please note that the fredr project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

See Also

There are several other existing R packages designed for the FRED API:

fredr-1's People

Contributors

davisvaughan avatar sboysel avatar

Watchers

 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.