# FRED ML - Federal Reserve Economic Data Machine Learning System [![CI/CD](https://github.com/your-org/fred-ml/actions/workflows/ci-cd.yml/badge.svg)](https://github.com/your-org/fred-ml/actions/workflows/ci-cd.yml) [![Tests](https://img.shields.io/badge/tests-passing-brightgreen)](https://github.com/your-org/fred-ml/actions/workflows/ci-cd.yml) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) 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 1. **Clone the repository** ```bash git clone https://github.com/your-org/fred-ml.git cd fred-ml ``` 2. **Install dependencies** ```bash pip install -r requirements.txt ``` 3. **Set up environment variables** ```bash 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" ``` 4. **Run the interactive demo** ```bash streamlit run scripts/streamlit_demo.py ``` ## ๐Ÿงช Testing ### Run all tests ```bash python scripts/run_tests.py ``` ### Run specific test types ```bash # 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 ```bash python scripts/test_dev.py ``` ## ๐Ÿš€ Deployment ### Local Development ```bash # Start development environment python scripts/dev_setup.py # Run development tests python scripts/run_dev_tests.py ``` ### Production Deployment ```bash # Deploy to AWS python scripts/deploy_aws.py # Deploy complete system python scripts/deploy_complete.py ``` ## ๐Ÿ“Š Demo Applications ### Interactive Streamlit Demo ```bash streamlit run scripts/streamlit_demo.py ``` Access at: http://localhost:8501 ### Command-line Demo ```bash python scripts/simple_demo.py ``` ## ๐Ÿ”ง Configuration ### Environment Variables - `AWS_ACCESS_KEY_ID`: AWS access key - `AWS_SECRET_ACCESS_KEY`: AWS secret key - `AWS_DEFAULT_REGION`: AWS region (default: us-east-1) - `FRED_API_KEY`: FRED API key ### Configuration Files - `config/pipeline.yaml`: Pipeline configuration - `config/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 - [API Documentation](docs/api/) - [Architecture Guide](docs/architecture/) - [Deployment Guide](docs/deployment/) - [User Guide](docs/user-guide/) - [Conversation Summary](docs/CONVERSATION_SUMMARY.md) ## ๐Ÿค Contributing 1. Fork the repository 2. Create a feature branch 3. Make your changes 4. Run tests: `python scripts/run_tests.py` 5. Submit a pull request ## ๐Ÿ“„ License This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. ## ๐Ÿ†˜ Support For support and questions: - Create an issue on GitHub - Check the [documentation](docs/) - Review the [conversation summary](docs/CONVERSATION_SUMMARY.md) --- **FRED ML** - Transforming economic data analysis with machine learning and automation.