Downloads various stlouisfed.org FRED files to CSV files and creates plots based on category, release, series, source, or tag
Project description
FREDquery
FredQuery uses the stlouisfed.org FRED API(https://fred.stlouisfed.org/docs/api/fred/) for the most part to access FRED data. To access the data you have to use an api_key that can be acquired here(https://fred.stlouisfed.org/docs/api/api_key.html). These scripts assume that the api_key is available through the FRED_API_KEY environmental variable. Each script including fredsources script will collect basic data for its type. For example fredcategories will collect data for all its categories. They can also collect series and observations(timeseries) for its type. To find a series, first invoke the command with it's type. For example: 'fredcategories --categories --showcategories' This will display the categories in a table in your browser. Choose a series based on the typeid you choose from the first fred command. For example: 'fredcategories --series --categoryid 32145 --showseries' From the output of this command you will be able to choose the time series observations that you wish to evaluate.
This is a work in progress fredplotseries creates plots for a comma separated list of series_id. fredplot creates plots and descriptions for series related to categories, releases, sources, or tags. The descriptions are taken from the series data while the plots use the observation data
[Usage]
##
## fredcategories
##
usage: fredcategories [-h] [--categories] [--showcategories] [--series]
[--showseries] [--observations]
[--categoryid CATEGORYID] [--file FILE]
[--directory DIRECTORY]
collect and report stlouisfed.org FRED categories and/or series
options:
-h, --help show this help message and exit
--categories report category data
--showcategories show categories in your browser
--series report series urls for categories collected
--showseries show series for a category in your browser
--observations report timeseries data for categories
--categoryid CATEGORYID
categories are identified by category_id
--file FILE path to an output filename if just a filename and--
directory is not provided the file is created in the
current directory
--directory DIRECTORY
directory to write the output use --directory for
storing observations, filenames autogenerated
##
## fredreleases
##
usage: fredreleases [-h] [--releases] [--showreleases] [--series]
[--showseries] [--observations] [--releaseid RELEASEID]
[--seriesid SERIESID] [--file FILE]
[--directory DIRECTORY]
collect and report stlouisfed.org FRED releases and/or their time series
options:
-h, --help show this help message and exit
--releases return releases
--showreleases show releases in your browser
--series return series by series_id or by release_id
--showseries show series for a release_id in your browser
--observations return timeseries for all series collected
--releaseid RELEASEID
a release_id identifies a FRED release
--seriesid SERIESID a series_id identifies a FRED series
--file FILE path to an output filename if just a filename and--
directory is not provided the file is created in the
current directory
--directory DIRECTORY
directory to write the output, if --observations
filenames are autogenerated
##
## fredseries
##
usage: fredseries [-h] [--series] [--showseries] [--observations]
[--categories] [--releases] [--sources] [--tags]
[--updates] --seriesid SERIESID [--file FILE]
[--directory DIRECTORY]
collect and report stlouisfed.org FRED series
options:
-h, --help show this help message and exit
--series report series urls for series_id
--showseries show the series in your browser
--observations report timeseries data for series
--categories report categories for this series
--releases report categories for this series
--sources report sources for this series
--tags report tags for this series
--updates report updates for this series
--seriesid SERIESID series are identified by series_id
--file FILE path to an output filename if just a filename and--
directory is not provided the file is created in the
current directory
--directory DIRECTORY
directory to write the output use --directory for
storing observations, filenames autogenerated
##
## fredplot
##
usage: fredplot [-h] [--categoryid CATEGORYID] [--releaseid RELEASEID]
[--sourceid SOURCEID] [--tagname TAGNAME]
[--directory DIRECTORY]
plot a set of St. Louis Fed FRED series
options:
-h, --help show this help message and exit
--categoryid CATEGORYID
FRED category_id
--releaseid RELEASEID
FRED release_id
--sourceid SOURCEID FRED source_id
--tagname TAGNAME FRED tagname
--directory DIRECTORY
where to store html
##
## fredplotseries
##
usage: fredplotseries [-h] --serieslist SERIESLIST [--htmlfile HTMLFILE]
plot a series list
options:
-h, --help show this help message and exit
--serieslist SERIESLIST
comma separated list of FRED series_id's
--htmlfile HTMLFILE path to file that will contain the plot
##
## fredsources
##
usage: fredsources [-h] [--sources] [--showsources] [--releases]
[--showreleasesforsid] [--series] [--showseries]
[--observations] [--sourceid SOURCEID] [--file FILE]
[--directory DIRECTORY]
collect and report stlouisfed.org FRED sources and/or their releases
options:
-h, --help show this help message and exit
--sources return sources
--showsources show sources in your browser
--releases return releases for a source_id
--showreleasesforsid show releases for a source_id in your browser
--series return series for a source_id
--showseries show series for a series_id in your browser
--observations return observations for a source_id
--sourceid SOURCEID a source_id identifies a FRED source
--file FILE path to an output filename if just a filename and--
directory is not provided the file is created in the
current directory
--directory DIRECTORY
directory to write the output, if --observations
filenames are autogenerated
##
## fredtags
##
usage: fredtags [-h] [--tags] [--showtags] [--series] [--showseries]
[--observations] [--tagname TAGNAME] [--seriesid SERIESID]
[--file FILE] [--directory DIRECTORY]
collect and report stlouisfed.org FRED tags and/or their series
options:
-h, --help show this help message and exit
--tags return tags
--showtags show tags in your browser
--series return series for a tag_id or for a series_id
--showseries show series for a tagname in your browser
--observations report timeseries data for tags
--tagname TAGNAME comma separated list of tag_names
--seriesid SERIESID series_id - identifies a series
--file FILE path to an output filename if just a filename and--
directory is not provided the file is created in the
current directory
--directory DIRECTORY
save the output to the directory specified
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file fredquery-0.0.49.tar.gz
.
File metadata
- Download URL: fredquery-0.0.49.tar.gz
- Upload date:
- Size: 2.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f060012025ec0755de306782fc2932ae667bb5b779f6fa7b83099ff14bc2d54 |
|
MD5 | f0afd20e22da9cf6370a183aa3326a66 |
|
BLAKE2b-256 | 5ce71de2fd150a33f771cd2f80234c2496a2897f600191597b324ded9db76648 |
File details
Details for the file fredquery-0.0.49-py3-none-any.whl
.
File metadata
- Download URL: fredquery-0.0.49-py3-none-any.whl
- Upload date:
- Size: 24.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ce1782b77c36e9549ba6fdca88a104743d345affd938fd27dd426c946252d11 |
|
MD5 | 0d02e3768b751868de085486489dca6e |
|
BLAKE2b-256 | 420012b2c5f237d738674766a8d52ca824489dc73161415f0088156171bb869a |