MHI / README.md
Rakesh
Upload 3 files
dee9b3a verified

πŸ₯ Health Parameter Transition Dashboard

A comprehensive interactive dashboard for analyzing health parameter transitions between old and new measurements, with location-based filtering capabilities.

πŸ“Š Features

Health Parameters Analyzed

  • HbA1c - Blood glucose control indicator
  • LDL - Low-density lipoprotein cholesterol
  • BMI - Body Mass Index
  • BP - Blood Pressure
  • Biometrics - Overall biometric assessment
  • MHI - Mental Health Index

Dashboard Capabilities

  • Transition Analysis: Compare old vs new health parameter tags (Red/Orange/Green)
  • Location Filtering: Filter analysis by shared location
  • Interactive Visualizations:
    • Transition heatmaps
    • Sankey flow diagrams
    • Summary bar charts
  • Key Metrics:
    • Improvement rates
    • Decline rates
    • Stability rates
    • User counts per parameter
  • Export Functionality: Download summary reports as CSV files

Tag Classification System

  • 🟒 Green: Optimal/Good health status
  • 🟑 Orange: Sub-optimal/Warning status
  • πŸ”΄ Red: Alert/Poor health status

πŸš€ Quick Start

Prerequisites

  • Python 3.7 or higher
  • pip package manager

Installation

  1. Clone or download the project files

    # Ensure you have these files in your directory:
    # - health_dashboard.py
    # - run_dashboard.py
    # - requirements.txt
    # - Combines 2,3,7,9,11(Sheet1).csv
    
  2. Install required packages

    pip install -r requirements.txt
    
  3. Run the dashboard

    python run_dashboard.py
    

    Or directly with Streamlit:

    streamlit run health_dashboard.py
    
  4. Access the dashboard

    • Open your web browser and go to: http://localhost:8501
    • The dashboard will automatically load with your data

πŸ“ˆ Using the Dashboard

1. Location Filter

  • Use the sidebar to select a specific location or view "All Locations"
  • The dashboard will update all visualizations based on your selection

2. Overall Summary

  • View key metrics at the top: total users, average improvement/decline rates
  • See the summary chart showing transition rates across all parameters

3. Parameter-wise Analysis

  • Navigate through tabs for each health parameter
  • Each tab shows:
    • Metrics: User counts and transition statistics
    • Heatmap: Visual transition matrix
    • Sankey Diagram: Flow visualization of transitions
    • Detailed Table: Raw transition data

4. Key Insights

  • Automatically generated insights based on the data
  • Highlights parameters with excellent improvement or concerning decline rates

5. Export Data

  • Click "Generate Summary Report" to create downloadable CSV files
  • Reports include all transition statistics by parameter

πŸ“Š Understanding the Visualizations

Transition Heatmap

  • Rows: Old health status
  • Columns: New health status
  • Values: Number of users who transitioned
  • Colors: Intensity indicates frequency of transitions

Sankey Diagram

  • Left side: Old status distribution
  • Right side: New status distribution
  • Flows: Show movement between statuses
  • Width: Proportional to number of users

Summary Charts

  • Stacked bars: Show percentage breakdown of improvements/declines/stable
  • Colors: Green (improved), Red (declined), Orange (stable)

πŸ” Data Requirements

The dashboard expects a CSV file with the following columns:

  • Location Shared: Location information for filtering
  • Health parameter columns (old and new tags):
    • Hba1c tag old, Hba1c tag
    • LDLtag old, LDLtag
    • BMItag old, BMItag
    • Bptag old, Bptag
    • biometric tag old, biometric tag
    • MHI old, MHI NEW

πŸ› οΈ Technical Details

Dependencies

  • Streamlit: Web application framework
  • Pandas: Data manipulation and analysis
  • Plotly: Interactive visualizations
  • NumPy: Numerical computations

Performance Features

  • Data caching for faster load times
  • Responsive design for various screen sizes
  • Efficient transition calculations

πŸ“ Interpreting Results

Improvement Indicators

  • Green β†’ Green: Maintained optimal status
  • Orange β†’ Green: Improved from sub-optimal to optimal
  • Red β†’ Orange/Green: Improved from alert status

Decline Indicators

  • Green β†’ Orange/Red: Declined from optimal status
  • Orange β†’ Red: Declined from sub-optimal to alert

Key Metrics

  • Improvement Rate: Percentage of users who moved to better health status
  • Decline Rate: Percentage of users who moved to worse health status
  • Stable Rate: Percentage of users who maintained the same status

🎯 Use Cases

  1. Health Program Evaluation: Assess effectiveness of health interventions
  2. Location-based Analysis: Compare health outcomes across different locations
  3. Parameter-specific Insights: Identify which health areas need attention
  4. Trend Monitoring: Track health improvements or declines over time
  5. Resource Allocation: Focus resources on parameters with high decline rates

πŸ”§ Troubleshooting

Common Issues

  1. Data file not found

    • Ensure Combines 2,3,7,9,11(Sheet1).csv is in the same directory
    • Check file name spelling and extension
  2. Missing packages

    • Run: pip install -r requirements.txt
    • Ensure you have Python 3.7+ installed
  3. Dashboard won't load

    • Check if port 8501 is available
    • Try: streamlit run health_dashboard.py --server.port 8502
  4. No data showing

    • Verify your CSV has the required columns
    • Check that location filter includes your data

πŸ“ž Support

For issues or questions:

  1. Check the troubleshooting section above
  2. Verify your data format matches the requirements
  3. Ensure all dependencies are properly installed

πŸ“„ License

This dashboard is provided as-is for health data analysis purposes.


Made with ❀️ for better health outcomes