Skip to content

Conversation

@RishithaGolla
Copy link

✨ Feature: Employee Well-being Analysis App

πŸ“Œ Summary

This PR adds a Preswald-powered web app that analyzes the impact of remote work on employee mental health.

πŸ“Š Features Implemented

βœ” Filters employees with high stress levels using SQL queries
βœ” Interactive slider to filter employees by work hours
βœ” Dynamic tables for real-time data exploration
βœ” Scatter plot visualization (Hours Worked vs. Age)

πŸ“‚ Files Added

  • community_gallery/employee_wellbeing_analysis/hello.py (Preswald app script)
  • community_gallery/employee_wellbeing_analysis/data/Impact_of_Remote_Work_on_Mental_Health.csv
  • community_gallery/employee_wellbeing_analysis/README.md (Project documentation)

πŸ”§ Challenges & Fixes

  • Error Encountered:

    ImportError: cannot import name 'view' from 'preswald'
    (/Users/rishithagolla/venvwork/lib/python3.11/site-packages/preswald/__init__.py)
  • Screenshot
    image

  • Fix: Removed view from the import statement, as it is not available in the current version of preswald.

  • Confirmed the issue on macOS (Python 3.11.5) and adjusted the code accordingly.

  • Validated the fix by running the app successfully after removing view.

πŸ“ How to Test

  1. Clone the repository:
    git clone https://github.com/StructuredLabs/preswald.git
    cd preswald/community_gallery/employee_well_being_analysis
  2. Run the application:
    preswald run
  3. Verify:
    • The app loads correctly without errors.
    • The slider filters employees by work hours.
    • The dynamic table updates based on the selected threshold.
    • The scatter plot displays the correct visualization.

πŸ–₯ Environment

  • OS: macOS
  • Python Version: 3.11.5
  • Preswald Version: (Run pip show preswald to check)

βœ… Checklist

  • Code follows the project’s style guidelines
  • Changes are tested and verified
  • Documentation is updated where necessary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant