Skip to content

Latest commit

 

History

History
206 lines (201 loc) · 7.89 KB

README.md

File metadata and controls

206 lines (201 loc) · 7.89 KB

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] [--children]
[--showchildren] [--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
--children report category child data
--showchildren show children of a category 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