Downloads various stlouisfed.org FRED files converting many to CSV files
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.
[Usage]
##
## fredcategories
##
usage: fredcategories [-h] [--categories] [--showcategories] [--series]
[--showseries] [--observations]
[--categoryid CATEGORYID] [--seriesid SERIESID]
[--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
--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
##
## fredreleases
##
usage: fredreleases [-h] [--releases] [--showreleases] [--series]
[--showseriesforid] [--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
--showseriesforid 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] [--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
--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
##
## fredplotseries
##
usage: fredplotseries [-h] --serieslist SERIESLIST
plot a series list
options:
-h, --help show this help message and exit
--serieslist SERIESLIST
comma separated list of FRED series_id's
##
## fredsources
##
usage: fredsources [-h] [--sources] [--showsources] [--releases]
[--showreleasesforsid] [--series] [--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
--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 tag_id identifies a FRED tag
--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.42.tar.gz
.
File metadata
- Download URL: fredquery-0.0.42.tar.gz
- Upload date:
- Size: 1.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1cb97ca0128e084321543865f047d8059d27705b2773c3f968473e4db65f4e9c |
|
MD5 | e9df3dee7d0bc5f7a30b13b8ffd0c68a |
|
BLAKE2b-256 | 13a54d8457e284e19596fb42cb8ee58c11be04d0d73ce540c88e4c9e330c6b6d |
File details
Details for the file fredquery-0.0.42-py3-none-any.whl
.
File metadata
- Download URL: fredquery-0.0.42-py3-none-any.whl
- Upload date:
- Size: 22.7 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 | 9f7a9d4b4247a03a16d7c4bd3fc1c48a604433f133d8d701b57c47264e459382 |
|
MD5 | 9f027c8988cf1a9ef688a98c3fb12985 |
|
BLAKE2b-256 | 2e7605e719f564b251e5af259add619e641dc841097caeb040aa3a14acc96a0c |