- Interactive Dashboard: Explore data with dynamic filters.
- Linear Regression Forecasting: Generate future projections.
- Rich Visualizations: View monthly trends, category compositions, and forecast results.
- Optimized Initial Load:
- Fast Startup: Implemented efficient database checks to bypass CSV reprocessing if data is already seeded in SQLite. Subsequent app loads are now significantly faster.
- SQLite Backend: Uses SQLAlchemy ORM for robust data management, moving beyond direct CSV reads for improved query performance.
- Configuration Management: Centralized settings in
app/config/settings.py
for easy maintenance. - Data Validation: Ensures data quality before processing and storage.
- Caching Strategy:
- In-session performance: 85% faster subsequent operations
- Smart data retrieval: Multi-tier caching with strategic TTL (Time to Live)
- User experience: Sub-second response for tab switching and filtering
- Resource efficiency: Eliminates redundant database queries
- Impact: performance gain ~85% faster
- Without Caching: Department change → 2.1s load time
- With Caching: Department change → 0.3s load time
- Create Kaggle account and generate API token
- Create
.env
file in root directory: KAGGLE_USERNAME=your_username KAGGLE_KEY=your_api_key
For winsows
git clone https://github.com/ht-l1/Foresight-Analytics.git
.\venv\Scripts\activate
pip install -r requirements.txt
streamlit run run.py
Foresight-Analytics
├─ app
│ ├─ config
│ │ ├─ settings.py
│ │ └─ __init__.py
│ ├─ data
│ │ ├─ data_loader.py
│ │ ├─ test_supabase.py
│ │ └─ __init__.py
│ ├─ database
│ │ ├─ models.py
│ │ └─ supabase_manager.py
│ ├─ models
│ │ ├─ forecaster.py
│ │ └─ __init__.py
│ ├─ utils
│ │ ├─ logger.py
│ │ ├─ validators.py
│ │ └─ __init__.py
│ └─ __init__.py
├─ data
│ ├─ foresight_analytics.db
│ └─ train.csv
├─ LICENSE
├─ README.md
├─ requirements.txt
└─ run.py