FRED ML - Federal Reserve Economic Data Machine Learning System
A comprehensive Machine Learning system for analyzing Federal Reserve Economic Data (FRED) with automated data processing, advanced analytics, and interactive visualizations.
π Features
- π Real-time Data Processing: Automated FRED API integration
- π€ Machine Learning Analytics: Advanced statistical modeling
- π Interactive Visualizations: Dynamic charts and dashboards
- π Automated Workflows: CI/CD pipeline with quality gates
- βοΈ Cloud-Native: AWS Lambda and S3 integration
- π§ͺ Comprehensive Testing: Unit, integration, and E2E tests
π Project Structure
FRED_ML/
βββ π src/ # Core application code
β βββ π core/ # Core pipeline components
β βββ π analysis/ # Economic analysis modules
β βββ π visualization/ # Data visualization components
β βββ π lambda/ # AWS Lambda functions
βββ π scripts/ # Utility and demo scripts
β βββ π streamlit_demo.py # Interactive Streamlit demo
β βββ π run_tests.py # Test runner
β βββ π simple_demo.py # Command-line demo
βββ π tests/ # Comprehensive test suite
β βββ π unit/ # Unit tests
β βββ π integration/ # Integration tests
β βββ π e2e/ # End-to-end tests
βββ π docs/ # Documentation
β βββ π api/ # API documentation
β βββ π architecture/ # System architecture docs
β βββ π CONVERSATION_SUMMARY.md
βββ π config/ # Configuration files
βββ π data/ # Data storage
β βββ π raw/ # Raw data files
β βββ π processed/ # Processed data
β βββ π exports/ # Generated exports
βββ π deploy/ # Deployment configurations
β βββ π docker/ # Docker configurations
β βββ π kubernetes/ # Kubernetes manifests
β βββ π helm/ # Helm charts
βββ π infrastructure/ # Infrastructure as code
β βββ π ci-cd/ # CI/CD configurations
β βββ π monitoring/ # Monitoring setup
β βββ π alerts/ # Alert configurations
βββ π .github/workflows/ # GitHub Actions workflows
βββ π requirements.txt # Python dependencies
βββ π pyproject.toml # Project configuration
βββ π Dockerfile # Container configuration
βββ π Makefile # Build automation
βββ π README.md # This file
π οΈ Quick Start
Prerequisites
- Python 3.8+
- AWS Account (for cloud features)
- FRED API Key
Installation
Clone the repository
git clone https://github.com/your-org/fred-ml.git cd fred-ml
Install dependencies
pip install -r requirements.txt
Set up environment variables
export AWS_ACCESS_KEY_ID="your_access_key" export AWS_SECRET_ACCESS_KEY="your_secret_key" export AWS_DEFAULT_REGION="us-east-1" export FRED_API_KEY="your_fred_api_key"
Run the interactive demo
streamlit run scripts/streamlit_demo.py
π§ͺ Testing
Run all tests
python scripts/run_tests.py
Run specific test types
# Unit tests
python -m pytest tests/unit/
# Integration tests
python -m pytest tests/integration/
# End-to-end tests
python -m pytest tests/e2e/
Development testing
python scripts/test_dev.py
π Deployment
Local Development
# Start development environment
python scripts/dev_setup.py
# Run development tests
python scripts/run_dev_tests.py
Production Deployment
# Deploy to AWS
python scripts/deploy_aws.py
# Deploy complete system
python scripts/deploy_complete.py
π Demo Applications
Interactive Streamlit Demo
streamlit run scripts/streamlit_demo.py
Access at: http://localhost:8501
Command-line Demo
python scripts/simple_demo.py
π§ Configuration
Environment Variables
AWS_ACCESS_KEY_ID
: AWS access keyAWS_SECRET_ACCESS_KEY
: AWS secret keyAWS_DEFAULT_REGION
: AWS region (default: us-east-1)FRED_API_KEY
: FRED API key
Configuration Files
config/pipeline.yaml
: Pipeline configurationconfig/settings.py
: Application settings
π System Architecture
Components
- Frontend: Streamlit interactive dashboard
- Backend: AWS Lambda serverless functions
- Storage: AWS S3 for data persistence
- Scheduling: EventBridge for automated triggers
- Data Source: FRED API for economic indicators
Data Flow
FRED API β AWS Lambda β S3 Storage β Streamlit Dashboard
β
EventBridge (Scheduling)
β
CloudWatch (Monitoring)
π§ͺ Testing Strategy
Test Types
- Unit Tests: Individual component testing
- Integration Tests: API and data flow testing
- End-to-End Tests: Complete system workflow testing
Coverage
- Core pipeline components: 100%
- API integrations: 100%
- Data processing: 100%
- Visualization components: 100%
π CI/CD Pipeline
GitHub Actions Workflows
- Main Pipeline: Production deployments
- Pull Request Checks: Code quality validation
- Scheduled Maintenance: Automated updates
- Release Management: Version control
Quality Gates
- Automated testing
- Code linting and formatting
- Security vulnerability scanning
- Documentation generation
π Documentation
π€ Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests:
python scripts/run_tests.py
- Submit a pull request
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Support
For support and questions:
- Create an issue on GitHub
- Check the documentation
- Review the conversation summary
FRED ML - Transforming economic data analysis with machine learning and automation.