Skip to main content

'A simplified aggegate of FRED data using fredapi package'

Project description

lazy_fred

example workflow

lazy_fred: Effortless FRED Data Collection

lazy_fred is a Python library designed to simplify the process of collecting economic data from the Federal Reserve Economic Data (FRED) API. It automates searching for relevant series, filtering by frequency and popularity, and exporting the data into convenient CSV files.

Features

  • Automated Search: Searches FRED across various economic categories.
  • Filtered Selection: Selects series based on popularity and frequency (daily, weekly, monthly).
  • Error Handling: Includes retry mechanisms and logging for robust data collection.
  • CSV Export: Saves the collected data in separate CSV files for easy analysis.

Installation

  1. Clone the Repository:

    git clone https://github.com/your-username/lazy_fred.git
    
  2. Install Dependencies:

    pip install -r requirements.txt
    
  3. Obtain a FRED API Key:

    • Visit the FRED website and get your free API key.

    • Create a .env file in the project root directory and add your API key:

      API_KEY=your_api_key_here
      

Usage

  1. Configure Search Categories:

    • Modify the search_categories list in the script to include the categories of interest.
  2. Run the Script:

    python lazy_fred.py
    
  3. Output:

    • The script will create three CSV files in your project directory:
      • lazy_fred_Search.csv: Contains the search results from FRED.
      • daily_data.csv: Contains daily time series data.
      • monthly_data.csv: Contains monthly time series data.
      • weekly_data.csv: Contains weekly time series data.

Code Structure

  • AccessFred Class:

    • Handles API key retrieval and validation.
  • collect_categories Class:

    • Executes searches across categories and consolidates results.
  • daily_export, monthly_export, and weekly_export Classes:

    • Filter series by frequency and popularity.
    • Collect and export time series data.

Contributions

Contributions are welcome! Feel free to open issues or submit pull requests.

License

This project is licensed under the MIT License.

Disclaimer

This library is not affiliated with or endorsed by the Federal Reserve Bank of St. Louis or the FRED project.

Acknowledgments

  • This project utilizes the fredapi library for interacting with the FRED API.

Contact

For any questions or feedback, please open an issue in the repository.

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

lazy_fred-0.1.2.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lazy_fred-0.1.2-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file lazy_fred-0.1.2.tar.gz.

File metadata

  • Download URL: lazy_fred-0.1.2.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.3 Windows/11

File hashes

Hashes for lazy_fred-0.1.2.tar.gz
Algorithm Hash digest
SHA256 b48f917d7573dd692a33d135bd0f66f73a8582e4d5fb464a0f3d30f13e5d8405
MD5 d96fe24743fdac4ffc3197af162fc79e
BLAKE2b-256 65bc7cbe37ad84688b2900081a9fb07388b48f85b123adf1d3f429e664b1ee26

See more details on using hashes here.

File details

Details for the file lazy_fred-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: lazy_fred-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.3 Windows/11

File hashes

Hashes for lazy_fred-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 18e081ec98d26419b4001715c1524f362eb577c3823b6403cfca792e9b9f5a58
MD5 49f867eb74261bcb5e95d16ee344fa2a
BLAKE2b-256 cf1ae4bad52293906d8c8dba4596e25cc5e321b09b577aa7ac18653a0efeeda6

See more details on using hashes here.

Supported by

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