mortada / fredapi

Python API for FRED (Federal Reserve Economic Data) and ALFRED (Archival FRED)
Apache License 2.0
898 stars 159 forks source link

Tags #29

Open swainsubrat opened 4 years ago

swainsubrat commented 4 years ago

Is there anything to pull tags for a series data

mortada commented 4 years ago

do you mean this? https://research.stlouisfed.org/docs/api/fred/series_tags.html

fadhilmch commented 4 years ago

do you mean this? https://research.stlouisfed.org/docs/api/fred/series_tags.html

Is this possible? the search by tags

dctian commented 4 years ago

+1 It would be great to be able to search series data by tags. thanks!

fadhilmch commented 4 years ago

https://github.com/mortada/fredapi/pull/32 I've created the search by tags and made this pull request.

TomasKoutek commented 2 years ago

Hi guys, as an alternative you can use my package pystlouisfed

series_tags

Get the FRED tags for a series.

>>> from pystlouisfed import FRED
>>> fred = FRED(api_key='abcdefghijklmnopqrstuvwxyz123456')
>>> fred.series_tags(series_id='STLFSI').head()
             group_id                             notes                   created  popularity  series_count
name                                                                                                       
stlfsi            rls  St. Louis Financial Stress Index 2012-08-16 20:21:17+00:00          19             2
fsi               gen            Financial Stress Index 2014-08-08 19:01:37+00:00          26            36
weekly           freq                                   2012-02-27 16:18:19+00:00          68          3492
financial         gen                                   2012-02-27 16:18:19+00:00          55         21680
discontinued      gen                                   2012-02-27 16:18:19+00:00          67         40372

tags_series

Get the series matching all tags in the tag_names parameter and no tags in the exclude_tag_names parameter.

>>> from pystlouisfed import FRED
>>> fred = FRED(api_key='abcdefghijklmnopqrstuvwxyz123456')
>>> fred.tags_series(tag_names=['food', 'oecd']).head()
                realtime_start realtime_end                                              title observation_start observation_end  frequency frequency_short           units     units_short      seasonal_adjustment seasonal_adjustment_short              last_updated  popularity  group_popularity                                              notes
id                                                                                                                                                                                                                                                                                                                                                       
AUSCPICORAINMEI     2022-02-06   2022-02-06  Consumer Price Index: All Items Excluding Food...        1972-01-01      2020-01-01     Annual               A  Index 2015=100  Index 2015=100  Not Seasonally Adjusted                       NSA 2021-02-17 18:27:39+00:00           1                11  Copyright, 2016, OECD. Reprinted with permissi...
AUSCPICORQINMEI     2022-02-06   2022-02-06  Consumer Price Index: All Items Excluding Food...        1971-04-01      2021-07-01  Quarterly               Q  Index 2015=100  Index 2015=100  Not Seasonally Adjusted                       NSA 2021-12-14 21:57:04+00:00          11                11  Copyright, 2016, OECD. Reprinted with permissi...
AUSCPIFODAINMEI     2022-02-06   2022-02-06           Consumer Price Index: Food for Australia        1977-01-01      2017-01-01     Annual               A  Index 2010=100  Index 2010=100  Not Seasonally Adjusted                       NSA 2018-03-09 21:12:09+00:00           1                 2  Copyright, 2016, OECD. Reprinted with permissi...
AUSCPIFODQINMEI     2022-02-06   2022-02-06           Consumer Price Index: Food for Australia        1976-07-01      2018-01-01  Quarterly               Q  Index 2010=100  Index 2010=100  Not Seasonally Adjusted                       NSA 2018-04-24 19:51:04+00:00           2                 2  Copyright, 2016, OECD. Reprinted with permissi...
AUTCPICORAINMEI     2022-02-06   2022-02-06  Consumer Price Index: All Items Excluding Food...        1966-01-01      2020-01-01     Annual               A  Index 2015=100  Index 2015=100  Not Seasonally Adjusted                       NSA 2021-03-16 22:37:57+00:00           0                 1  Copyright, 2016, OECD. Reprinted with permissi...