FRED Tags¶
Setup¶
In [1]:
Copied!
import pyfredapi as pf
import pyfredapi as pf
Get all tags¶
In [2]:
Copied!
tags = pf.get_tags()
tags = pf.get_tags()
In [3]:
Copied!
tags["tags"][0:3]
tags["tags"][0:3]
Out[3]:
[{'name': 'nsa',
'group_id': 'seas',
'notes': 'Not Seasonally Adjusted',
'created': '2012-02-27 10:18:19-06',
'popularity': 100,
'series_count': 728472},
{'name': 'usa',
'group_id': 'geo',
'notes': 'United States of America',
'created': '2012-02-27 10:18:19-06',
'popularity': 100,
'series_count': 658320},
{'name': 'public domain: citation requested',
'group_id': 'cc',
'notes': None,
'created': '2018-12-17 23:33:13-06',
'popularity': 99,
'series_count': 612154}]
Get all series with matching tags¶
If you want to find all series with certain tag you can use get_series_matching_tags.
For example, you can find series that are published monthly.
In [4]:
Copied!
monthly_series = pf.get_series_matching_tags(tag_names="monthly")
monthly_series = pf.get_series_matching_tags(tag_names="monthly")
In [5]:
Copied!
len(monthly_series["seriess"])
len(monthly_series["seriess"])
Out[5]:
1000