Workplace Mental Health Analytics - A comprehensive data analysis application for mental health survey data
Project description
Mind Metrics
Mind Metrics is a comprehensive data analysis application for workplace mental health survey data. It provides insights into burnout patterns, stress factors, and workplace well-being metrics through interactive visualizations and statistical analysis.
Features
- ๐ Comprehensive Analytics: Analyze burnout levels, job satisfaction, stress patterns, and productivity metrics
- ๐ Interactive Visualizations: Generate insightful plots and charts for mental health data
- ๐ง Flexible Data Input: Support for CSV and Excel files with automatic data validation
- ๐ฅ๏ธ Command Line Interface: Easy-to-use CLI built with Click framework
- ๐ Detailed Reporting: Generate comprehensive reports on workplace mental health trends
- ๐งช Robust Testing: Comprehensive test suite ensuring data integrity and reliability
Installation
From PyPI (Recommended)
pip install mind-metrics
From Source
git clone https://codebase.helmholtz.cloud/tud-rse-pojects-2025/group-7.git
cd group-7
pip install uv
uv sync
uv pip install -e .
Quick Start
Basic Usage
# Analyze a mental health dataset
mind-metrics --source dataset/mental_health_workplace_survey.csv
# Run in text-only mode (no GUI plots)
mind-metrics --source dataset/mental_health_workplace_survey.csv --text-only
# Enable verbose logging
mind-metrics --source dataset/mental_health_workplace_survey.csv -vv
# Get help
mind-metrics --help
Example Analysis
# Comprehensive analysis with debug output
mind-metrics --source https://example.com/survey.csv -vvv --text-only
Data Format
Mind Metrics expects datasets with the following key columns:
- EmployeeID: Unique identifier for employees
- Age: Employee age
- Gender: Employee gender
- BurnoutLevel: Burnout score (0-10 scale)
- JobSatisfaction: Job satisfaction score (0-10 scale)
- StressLevel: Stress level (0-10 scale)
- WorkLifeBalanceScore: Work-life balance rating
- HasMentalHealthSupport: Whether employee has mental health support
For a complete list of supported columns, see our data schema documentation.
Example Dataset
Mind Metrics includes an example dataset (mental_health_workplace_survey.csv) for testing and demonstration purposes. This dataset is based on the "Mental Health and Burnout in the Workplace" dataset by Khushi Yadav, available on Kaggle.
Dataset Attribution
The example dataset used in this project is derived from:
- Title: Mental Health and Burnout in the Workplace
- Author: Khushi Yadav
- Source: Kaggle
- URL: https://www.kaggle.com/datasets/khushikyad001/mental-health-and-burnout-in-the-workplace
- License: MIT License
We thank the original dataset creator for making this valuable data available for research and development purposes.
Command Line Options
Options:
--source TEXT URL or path to dataset (CSV/Excel) [required]
-v, -vv, -vvv Verbose output (WARNING/INFO/DEBUG levels)
--text-only Suppress graphical output
--output-dir TEXT Directory for output files [default: ./output]
--format [json|csv] Output format for reports [default: json]
--help Show this message and exit.
Output
Mind Metrics generates several types of output:
- Summary Statistics: Key metrics and trends in your data
- Visualizations: Charts showing burnout patterns, correlations, and distributions
- Reports: Detailed analysis reports in JSON or CSV format
- Recommendations: Data-driven insights for improving workplace mental health
Development
Setting up Development Environment
# Clone the repository
git clone https://codebase.helmholtz.cloud/tud-rse-pojects-2025/group-7.git
cd group-7
# Install dependencies
uv sync
# Install pre-commit hooks
pre-commit install
# Run tests
uv run pytest
# Run linting
uv run ruff check mind_metrics/ tests/
uv run mypy mind_metrics/
Project Structure
group-7/
โโโ CITATION.cff
โโโ CONDUCT.md
โโโ CONTRIBUTING.md
โโโ LICENSE.md
โโโ dataset/
โ โโโ mental_health_workplace_survey.csv
โโโ pyproject.toml
โโโ README.md
โโโ mind_metrics/
โ โโโ __init__.py
โ โโโ __main__.py # Main entry point
โ โโโ cli.py # Command line interface
โ โโโ data/
โ โ โโโ __init__.py
โ โ โโโ loader.py # Data loading and validation
โ โ โโโ cleaner.py # Data cleaning utilities
โ โโโ analysis/
โ โ โโโ __init__.py
โ โ โโโ burnout.py # Burnout analysis
โ โ โโโ correlations.py # Correlation analysis
โ โ โโโ statistics.py # Statistical computations
โ โโโ visualization/
โ โ โโโ __init__.py
โ โ โโโ plots.py # Plotting functions
โ โ โโโ dashboard.py # Dashboard generation
โ โโโ utils/
โ โโโ __init__.py
โ โโโ logger.py # Logging configuration
โ โโโ validation.py # Data validation utilities
โโโ tests/
โ โโโ conftest.py
โ โโโ integration/
โ โ โโโ test_cli.py
โ โ โโโ test_end_to_end.py
โ โโโ unit/
โ โโโ test_burnout_analyzer.py
โ โโโ test_data_cleaner.py
โ โโโ test_data_loader.py
โ โโโ test_validation.py
โโโ uv.lock
Running Tests
# Run all tests
uv run pytest
# Run with coverage
uv run pytest --cov=mind_metrics
# Run specific test file
uv run pytest tests/test_data_loader.py
Contributing
We welcome contributions! Please see our Contributing Guide for details on how to get started.
Development Workflow
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Add tests for your changes
- Run the test suite
- Commit your changes (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Merge Request
Documentation
Citation
If you use Mind Metrics in your research, please cite it:
@software{mind_metrics,
title = {Mind Metrics: Workplace Mental Health Analytics},
author = {Group 7},
year = {2025},
url = {https://codebase.helmholtz.cloud/tud-rse-pojects-2025/group-7},
version = {1.0.0}
}
License
This project is licensed under the MIT License - see the LICENSE.md file for details.
Acknowledgments
- Mental health research community for inspiration
- Khushi Yadav for the "Mental Health and Burnout in the Workplace" dataset from Kaggle
- Open source contributors and maintainers
- Survey participants who make this research possible
Support
- ๐ง Email: support@mindmetrics.dev
- ๐ Issues: GitLab Issues
- ๐ Documentation: Project Documentation
Made with โค๏ธ for better workplace mental health
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mind_metrics-1.0.1.tar.gz.
File metadata
- Download URL: mind_metrics-1.0.1.tar.gz
- Upload date:
- Size: 58.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81fc8d9cf788a7488c8a03e7544fca7ccd08f7d4f7f1b94610b6c2d59aaaf9d6
|
|
| MD5 |
c1d72aab29bd1552d0f51a15d326b3c0
|
|
| BLAKE2b-256 |
93a990ab5204b7a9ad175df7c8570fd7bbfd69a5a5157f210959c6bd3252db5d
|
File details
Details for the file mind_metrics-1.0.1-py3-none-any.whl.
File metadata
- Download URL: mind_metrics-1.0.1-py3-none-any.whl
- Upload date:
- Size: 44.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac3b462c8c1b68d6c67dfb7976d6e2679d3f9de6e94da086b25599d9187dc4b9
|
|
| MD5 |
48a100b7a0b7ca4a2583d816740f0e20
|
|
| BLAKE2b-256 |
dd39e9586b03b686c3c0f3e994b9c83f597a024ca0ab1c60d3230aa25242ae0f
|