Skip to main content

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 --text-only

# Enable verbose logging
mind-metrics --source dataset/mental_health_workplace_survey -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:

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:

  1. Summary Statistics: Key metrics and trends in your data
  2. Visualizations: Charts showing burnout patterns, correlations, and distributions
  3. Reports: Detailed analysis reports in JSON or CSV format
  4. 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
uv run mypy group-7/

Project Structure

group-7/
โ”œโ”€โ”€ CITATION.cff
โ”œโ”€โ”€ CONDUCT.md
โ”œโ”€โ”€ CONTRIBUTING.md
โ”œโ”€โ”€ LICENSE.md
โ”œโ”€โ”€ dataset/
โ”‚   โ”œโ”€โ”€ mental_health_workplace_survey.csv
โ”œโ”€โ”€ pyproject.toml
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ __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=src

# 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

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Add tests for your changes
  5. Run the test suite
  6. Commit your changes (git commit -m 'feat: add amazing feature')
  7. Push to the branch (git push origin feature/amazing-feature)
  8. 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


Made with โค๏ธ for better workplace mental health

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mind_metrics-0.9.4.tar.gz (58.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mind_metrics-0.9.4-py3-none-any.whl (43.9 kB view details)

Uploaded Python 3

File details

Details for the file mind_metrics-0.9.4.tar.gz.

File metadata

  • Download URL: mind_metrics-0.9.4.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

Hashes for mind_metrics-0.9.4.tar.gz
Algorithm Hash digest
SHA256 2495806256996f3d0f9a66cf387aa31cf4cf0f6a6d0e53003291c49cc62ce2fe
MD5 4db286be95b7fdc672fe20b88535fd1c
BLAKE2b-256 879385e051c4a39e59ce8eccbb5d518d2cde9e260c4a9ab99d19f2936efe90b7

See more details on using hashes here.

File details

Details for the file mind_metrics-0.9.4-py3-none-any.whl.

File metadata

  • Download URL: mind_metrics-0.9.4-py3-none-any.whl
  • Upload date:
  • Size: 43.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for mind_metrics-0.9.4-py3-none-any.whl
Algorithm Hash digest
SHA256 36feb4d26e4ac28ec6c502ce72310649e88bfbaeb257396761075c527822ab0e
MD5 b012357c6c65ef598476cabcfd8ab385
BLAKE2b-256 ab3a00cc8b43925694782b96f83fe3d5d316a00c420dc6cf0dd1df72d7cc2b5e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page