π₯ 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
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).csvInstall required packages
pip install -r requirements.txtRun the dashboard
python run_dashboard.pyOr directly with Streamlit:
streamlit run health_dashboard.pyAccess the dashboard
- Open your web browser and go to:
http://localhost:8501 - The dashboard will automatically load with your data
- Open your web browser and go to:
π 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 tagLDLtag old,LDLtagBMItag old,BMItagBptag old,Bptagbiometric tag old,biometric tagMHI 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
- Health Program Evaluation: Assess effectiveness of health interventions
- Location-based Analysis: Compare health outcomes across different locations
- Parameter-specific Insights: Identify which health areas need attention
- Trend Monitoring: Track health improvements or declines over time
- Resource Allocation: Focus resources on parameters with high decline rates
π§ Troubleshooting
Common Issues
Data file not found
- Ensure
Combines 2,3,7,9,11(Sheet1).csvis in the same directory - Check file name spelling and extension
- Ensure
Missing packages
- Run:
pip install -r requirements.txt - Ensure you have Python 3.7+ installed
- Run:
Dashboard won't load
- Check if port 8501 is available
- Try:
streamlit run health_dashboard.py --server.port 8502
No data showing
- Verify your CSV has the required columns
- Check that location filter includes your data
π Support
For issues or questions:
- Check the troubleshooting section above
- Verify your data format matches the requirements
- Ensure all dependencies are properly installed
π License
This dashboard is provided as-is for health data analysis purposes.
Made with β€οΈ for better health outcomes