fredeco package

Submodules

fredeco.fredData module

fredeco.fredData.explore(fred_api, data)[source]

Explore some key statistics of a data frame of indicators retreived from FRED®.

This function returns a data frame with some information related to each economic indicator of the data frame x. Most of the information provided are statistics calculated by the function for each one of the indicators. All columns names should be FRED® indicators IDs.

Parameters:
  • fred_api (str) – Your registered FRED API keys. You can use the function fredKey.request_api_key() to request an API key on the FRED website.

  • x (data frame) – a data frame of indicators retreived from FRED®. All columns names should be FRED® indicators IDs.

Example

from fredeco.fredData import explore

explore(fred_api=’4e5rty8wfr’,df)

fredeco.fredData.fred_multi_series(series, fred_api, frequency='a', starttime='1776-07-04', endtime='9999-12-31', transform='lin')[source]

Retrieve data for several economic indicators from FRED® API.

This method return a data frame of several variables.

Parameters:
  • fred_api (str) – Your registered FRED API keys. You can use the function fredKey.request_api_key() to request an API key on the FRED website.

  • series (str) – A time series ID, such as GDP.

  • frequency (str) – The frequency of data. The default value is ‘a’ for annual data; ‘q’ is for quarterly data; ‘m’ is for monthly data

  • starttime (str) – The first date, as a string, of the time series data to retrieve. The default value is ‘1776-07-04’.

  • endtime (str) – The last date, as a string, of the time series data to retrieve. The default value is ‘9999-12-31’.

  • transform (str) –

Example

from fredeco.fredData import fred_multi_series

fred_multi_series(series=[‘GDP’,’GDPCA’],fred_api=’4e5rty8wfr’)

fredeco.fredData.fred_series(series, fred_api, frequency='a', starttime='1776-07-04', endtime='9999-12-31', transform='lin')[source]

Retreive and economic indicator from FRED® API

Parameters:
  • series (str) – A time series ID, such as GDP.

  • fred_api (str) –

  • website. (Your registered FRED API keys. You can use the function fredKey.request_api_key() to request an API key on the FRED) –

  • frequency (str) – The frequency of data. The default value is ‘a’ for annual data; ‘q’ is for quarterly data; ‘m’ is for monthly data

  • starttime (str) – The first date, as a string, of the time series data to retrieve. The default value is ‘1776-07-04’.

  • endtime (str) – The last date, as a string, of the time series data to retrieve. The default value is ‘9999-12-31’.

  • transform (str) –

Example

from fredeco.fredData import fred_series

fred_series(series=’GDP’,fred_api=’4e5rty8wfr’)

fredeco.fredData.units(data)[source]

Unit of each series of data frame of FRED® data.

This function returns a list

Parameters:
  • fred_api (str) – Your registered FRED API keys. You can use the function fredKey.request_api_key() to request an API key on the FRED website.

  • data (data frame) – a data frame of indicators retreived from FRED®. All columns names should be FRED® indicators IDs.

Example

from fredeco.fredData import units

units(fred_api=’4e5rty8wfr’,df)

fredeco.fredKey module

fredeco.fredKey.request_api_key()[source]

Get a FRED® API Key, from FRED® website.

This function open the webpage where the user can request for a FRED® API Key. The API Key is necessary to use the current Python package

fredeco.fredSearch module

fredeco.fredSearch.fred_info_series(fred_api, series)[source]

Find the information that describe an economic indicator.

This function returns a dictionnary of information that describe a series, such as its title, if it is seasonally adjusted or not, the date of last update, the unit used as measure, the notes where data source may be found etc.

Parameters:
  • fred_api (str) – Your registered FRED API keys. You can use the function fredKey.request_api_key() to request an API key on the FRED website.

  • series (str) – A time series ID.

Example

from fredeco.fredSearch import fred_info_series

fred_info_series(series=’GDP’,fred_api=fred_api)

fredeco.fredSearch.fred_list_series(fred_api, category_id=0)[source]

Find the series of a category

This function returns a data frame with information related to all series for a specific category of data provided by FRED.

Parameters:
  • fred_api (str) – Your registered FRED API keys. You can use the function fredKey.request_api_key() to request an API key on the FRED website.

  • category_id (int) – The id for a category of series. The default value is 0, which is the root category.

Example

from fredeco.fredSearch import fred_list_series

fred_list_series(fred_api, category_id=125)

Search for series related to one or several keywords.

This function returns a data frame of variables related to the keywords indicated by the user. The data frame provide several information for the series provided, such as their id, title, frequency, units of measurement, some notes related to their respective source etc.

Parameters:
  • fred_api (str) – Your registered FRED API keys. You can use the function fredKey.request_api_key() to request an API key on the FRED website. Your registered FRED API keys. You can request an API key: https://fredaccount.stlouisfed.org/apikeys

  • str (text) – The keywords to look for among the variables available in FRED data.

Example

from fredeco.fredSearch import fred_info_series

fred_search(fred_api,text=’Price index’)

fredeco.fredSearch.fred_vintagedates(fred_api, series)[source]

Historical dates of release of new or revised data

This function returns a list of historical dates of release of new or revised data for a specific series.

Parameters:
  • fred_api (str) – Your registered FRED API keys. You can use the function fredKey.request_api_key() to request an API key on the FRED website. Your registered FRED API keys. You can request an API key: https://fredaccount.stlouisfed.org/apikeys

  • series (str) – A time series ID.

Example

from fredeco.fredSearch import fred_vintagedates

fredSearch.fred_vintagedates(fred_api,series=’GDP’)

Module contents