Skip to main content

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]
[--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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fredquery-0.0.43.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

fredquery-0.0.43-py3-none-any.whl (23.7 kB view details)

Uploaded Python 3

File details

Details for the file fredquery-0.0.43.tar.gz.

File metadata

  • Download URL: fredquery-0.0.43.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

Hashes for fredquery-0.0.43.tar.gz
Algorithm Hash digest
SHA256 36c4b9dfe97b68e8103a222ebd3187ca50eafb737448a1046e2e27712aceb56c
MD5 175d8293bd1ef713a39b7f56837455d0
BLAKE2b-256 f0610f9ed02e043e51b9396f40234ac3d1ae8cab8e2dda9027f9966930807933

See more details on using hashes here.

File details

Details for the file fredquery-0.0.43-py3-none-any.whl.

File metadata

  • Download URL: fredquery-0.0.43-py3-none-any.whl
  • Upload date:
  • Size: 23.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.14

File hashes

Hashes for fredquery-0.0.43-py3-none-any.whl
Algorithm Hash digest
SHA256 ad35e4d4e6162535ede73f806c38c7f3c128cabc643b7366ffc333acbbd50c61
MD5 3e589ba3a0e944c2e700e85719c5d691
BLAKE2b-256 e5cb6d588c199cedce03fbd111c552e3adb34f1347057a32003935e163163f15

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page