A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | <- Your 32-character FRED API Key goes in cell A1. | |||||||||||||||||||||||||
2 | Request your FRED API key from | https://research.stlouisfed.org/docs/api/api_key.html | ||||||||||||||||||||||||
3 | ||||||||||||||||||||||||||
4 | Purpose | |||||||||||||||||||||||||
5 | Retrieve one or more time series from FRED to Google Sheets. | |||||||||||||||||||||||||
6 | Try a beta version that will retrieve multiple time series joined by date at common frequency. | |||||||||||||||||||||||||
7 | https://docs.google.com/spreadsheets/d/17-UuMBeqfIZQ9Qf-w-VzCuENI9TTkLt3lP7-z6xQ1Ac/copy#gid=719802045 | |||||||||||||||||||||||||
8 | ||||||||||||||||||||||||||
9 | Use | |||||||||||||||||||||||||
10 | On Notes/Technical sheet: copy your 32-character FRED API Key to a one-cell Named Range called APIKey (currently cell A1 above). | |||||||||||||||||||||||||
11 | On any sheet: copy a gray/blue box from Template; set FRED series name in blue cell; and adjust values in pale blue section by selecting frequency, dates, etc. (blanks give the FRED defaults). | |||||||||||||||||||||||||
12 | You need the sheet Notes/Technical and one copy of the gray/blue box from Template. It is ok to delete the appendixes, which include a search facility, examples, and detailed demonstrations of the API calls. | |||||||||||||||||||||||||
13 | ||||||||||||||||||||||||||
14 | Technical Notes | |||||||||||||||||||||||||
15 | Uses =IMPORTXML() with calls to the FRED API to get series metadata or observation data; to see raw XML, use =IMPORTDATA() | |||||||||||||||||||||||||
16 | About the FRED API | https://fred.stlouisfed.org/docs/api/fred/ | ||||||||||||||||||||||||
17 | Documentation of parameters | https://fred.stlouisfed.org/docs/api/fred/series_observations.html#Parameters | ||||||||||||||||||||||||
18 | Michael Ash (UMass Amherst) & the FRED team (Federal Reserve Bank of St. Louis). Comments welcome: | mailto:mash@econs.umass.edu | ||||||||||||||||||||||||
19 | ||||||||||||||||||||||||||
20 | Formatting for Dropdown Menus (do not alter or delete this section) | |||||||||||||||||||||||||
21 | units-pretty | units-api-parameter | ||||||||||||||||||||||||
22 | Default Units | lin | ||||||||||||||||||||||||
23 | Change from Previous Period | chg | ||||||||||||||||||||||||
24 | Change from Year Ago | ch1 | ||||||||||||||||||||||||
25 | Percent Change from Previous Period | pch | ||||||||||||||||||||||||
26 | Percent Change from Year Ago | pc1 | ||||||||||||||||||||||||
27 | Compounded Annual Rate of Change | pca | ||||||||||||||||||||||||
28 | Continuously Compounded Rate of Change | cch | ||||||||||||||||||||||||
29 | Compounded | cca | ||||||||||||||||||||||||
30 | Log | log | ||||||||||||||||||||||||
31 | ||||||||||||||||||||||||||
32 | order-pretty | order-api-parameter | ||||||||||||||||||||||||
33 | Ascending | asc | ||||||||||||||||||||||||
34 | Descending | desc | ||||||||||||||||||||||||
35 | ||||||||||||||||||||||||||
36 | frequency-pretty | frequency-api-parameter | ||||||||||||||||||||||||
37 | Daily | d | ||||||||||||||||||||||||
38 | Weekly | w | ||||||||||||||||||||||||
39 | Bi-weekly | bw | ||||||||||||||||||||||||
40 | Monthly | m | ||||||||||||||||||||||||
41 | Quarterly | q | ||||||||||||||||||||||||
42 | Seminannual | sa | ||||||||||||||||||||||||
43 | Annual | a | ||||||||||||||||||||||||
44 | Weekly Ending Friday | wef | ||||||||||||||||||||||||
45 | Weekly Ending Thursday | weth | ||||||||||||||||||||||||
46 | Weekly Ending Wednesday | wew | ||||||||||||||||||||||||
47 | Weekly Ending Tuesday | wetu | ||||||||||||||||||||||||
48 | Weekly Ending Monday | wem | ||||||||||||||||||||||||
49 | Weekly Ending Sunday | wesu | ||||||||||||||||||||||||
50 | Weekly Ending Saturday | wesa | ||||||||||||||||||||||||
51 | Biweekly Ending Wednesday | bwew | ||||||||||||||||||||||||
52 | Biweekly Ending Monday | bwem | ||||||||||||||||||||||||
53 | ||||||||||||||||||||||||||
54 | frequency-aggregation-pretty | frequency-aggregation-api-parameter | ||||||||||||||||||||||||
55 | Average | avg | ||||||||||||||||||||||||
56 | End of Period | eop | ||||||||||||||||||||||||
57 | Sum | sum | ||||||||||||||||||||||||
58 | ||||||||||||||||||||||||||
59 | ||||||||||||||||||||||||||
60 | ||||||||||||||||||||||||||
61 | BSD License | |||||||||||||||||||||||||
62 | Copyright 2020 Michael Ash | |||||||||||||||||||||||||
63 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: | |||||||||||||||||||||||||
64 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. | |||||||||||||||||||||||||
65 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. | |||||||||||||||||||||||||
66 | 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. | |||||||||||||||||||||||||
67 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |