Giter Site home page Giter Site logo

floriangrust / fred-economical-data-custom-function-in-google-sheets Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 2.0 22 KB

Custom Function (Google Sheets) to Import FRED® Economical Data

License: MIT License

JavaScript 100.00%
google-sheets economic-data fred-api custom-functions google-apps-script

fred-economical-data-custom-function-in-google-sheets's Introduction

Custom Function (Google Sheets) to Import FRED® Economical Data

This product uses the FRED® API but is not endorsed or certified by the Federal Reserve Bank of St. Louis.

1. What's FRED®?

https://fred.stlouisfed.org/docs/api/fred/fred.html

2. Setup

2.1. Create a custom function in Google Sheets

https://developers.google.com/apps-script/guides/sheets/functions

2.2. Request an API-Key

https://fred.stlouisfed.org/docs/api/fred/#API

2.3. Modify the function to use your API-Key for requests

Change the variable api_key to your API-Key (32 character lower-cased alpha-numeric string)

var api_key = 'abcdefghijklmnopqrstuvwxyz123456';

3. Examples

3.1. Get the newest value (Gross Domestic Product, Series-ID = GDP):

=fredDATA("GDP",0)

grafik

3.2. Get all historical values (Unemployment Rate, Series-ID = UNRATE):

=fredDATA("UNRATE",1)

grafik

4. Use Case ("Buffett-Indicator" - Stock Market Capitalization-to-GDP Ratio)

=query(fredDATA("WILL5000PR",0),"select Col2 offset 1",0)*1.05/QUERY(fredDATA("GDP",0),"select Col2 offset 1",0)

fred-economical-data-custom-function-in-google-sheets's People

Contributors

floriangrust avatar

Stargazers

 avatar  avatar  avatar  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.