A Streamlit web application for visualizing flu and influenza-like illness (ILI) forecasts at Lehigh University, developed by the Computational Uncertainty Lab.
- Current Status Alerts: Visual indicators showing LOW/MEDIUM/HIGH flu and ILI activity compared to historical data
- 4-Week Ahead Forecasts: Probability-based forecasts showing chances of increase/decrease
- Target Selection: Toggle between ILI and Flu Cases
- Temporal Forecasts:
- Absolute case counts with 95% prediction intervals
- Percentage positive trends with historical comparisons
- Interactive Visualizations: Altair charts with tooltips and zoom capabilities
- Current Week Indicator: Visual marker showing the most recent data point
- 4-Week Panel Views: Side-by-side comparison of ILI and Flu forecasts
- Historical Comparisons: Black dots showing historical averages for the same week across seasons
- Prediction Intervals: Blue shaded 80% uncertainty bands
- Median Forecasts: Blue dots indicating the predicted median values
- Weekly Labels: Clear labeling with MMWR week numbers and end dates
- Current week case counts and percentages
- Historical context for current activity levels
- 4-week horizon forecasts with uncertainty quantification
- Season-specific tracking (currently 2025/26 season)
-
Install Dependencies:
cd webapp pip install -r requirements.txt -
Run the Application:
streamlit run main.py
-
Access the Dashboard: Open your browser to
http://localhost:8501
The app expects the following data structure:
webapp/
├── forecasts/
│ └── 2025_26/
│ └── tempo/
│ ├── flu/
│ │ ├── *_tempo_forecast_flu.csv
│ │ └── *_tempo_forecast_prob_above_median_flu.csv
│ └── ili/
│ ├── *_tempo_forecast_ili.csv
│ └── *_tempo_forecast_prob_above_median_ili.csv
├── analysis_data/
│ ├── weekly_data.csv # Lab-confirmed flu cases
│ ├── influenza_like_illness.csv # ILI diagnoses
│ └── from_week_to_season_week.csv # Week mapping data
webapp/
├── main.py # Main app with data loading and navigation
├── app.py # Single-page version (legacy)
├── requirements.txt # Python dependencies
├── complogo.001.png # Lab logo
├── pages/
│ ├── __init__.py
│ ├── quick_look.py # Main forecast page with alerts and selections
│ └── detailed_look.py # 4-week panel comparison view
├── forecasts/ # Forecast data organized by season
└── analysis_data/ # Historical and current observation data
- Navigate: Use the sidebar dropdown to switch between "Quick Look" and "Detailed Look"
- Select Target: In Quick Look, toggle between ILI and Flu Cases using the segmented control
- View Alerts: Check the colored alert boxes for current activity levels
- Interpret Forecasts:
- Red/upward: Probability of increase above historical median
- Blue/downward: Probability of decrease below historical median
- Explore Data: Hover over charts for detailed tooltips, zoom and pan for closer inspection
- ILI (Influenza-Like Illness): Diagnosed when fever >38°C with respiratory symptoms
- Flu Cases: Lab-confirmed influenza via testing
- Historical Average: Black dots represent the mean of past observations for that week
- Predicted Median: Blue dots show the forecast median
- 80% PI: Blue shaded region containing 80% of probable outcomes
- 95% PI: Wider interval shown in temporal charts
To add new pages:
- Create a new file in
pages/directory with ashow()function - Import the module in
main.py - Add to the page selection dropdown in the sidebar
Computational Uncertainty Lab, Lehigh University
- PI: Prof. Thomas McAndrew
- Flu-Crew Team: Kelechi Anyanwu, Ava Baker, Ava Delauro, Eric Shapiro, Holden Engelhardt, Lela Boermeester
This project was determined to be not human subjects research by the Lehigh University IRB (2367498-1) on September 24, 2025.