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.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:

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

  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-1.0.1.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-1.0.1-py3-none-any.whl (44.2 kB view details)

Uploaded Python 3

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

Hashes for mind_metrics-1.0.1.tar.gz
Algorithm Hash digest
SHA256 81fc8d9cf788a7488c8a03e7544fca7ccd08f7d4f7f1b94610b6c2d59aaaf9d6
MD5 c1d72aab29bd1552d0f51a15d326b3c0
BLAKE2b-256 93a990ab5204b7a9ad175df7c8570fd7bbfd69a5a5157f210959c6bd3252db5d

See more details on using hashes here.

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

Hashes for mind_metrics-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ac3b462c8c1b68d6c67dfb7976d6e2679d3f9de6e94da086b25599d9187dc4b9
MD5 48a100b7a0b7ca4a2583d816740f0e20
BLAKE2b-256 dd39e9586b03b686c3c0f3e994b9c83f597a024ca0ab1c60d3230aa25242ae0f

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