This project analyzes the mental health data of students and visualizes the results using Python. The analysis includes data on anxiety, depression, and panic attacks, along with their relation to age and years of study.
Before you begin, ensure you have met the following requirements:
- You have Python 3.x installed.
- You have
pip
installed.
To install the required libraries, run the following commands:
pip install pandas matplotlib scipy notebook
-
Clone the repository:
If the project is hosted on a version control system like GitHub, you can clone the repository. Otherwise, download the project files.
git clone https://github.com/shliamin/Python-Medical-Data-Analysis.git
-
Navigate to the project directory:
cd Python-Medical-Data-Analysis
-
Ensure the
students.csv
file is in the project directory.
-
Start Jupyter Notebook:
Run the following command to start Jupyter Notebook:
jupyter notebook
-
Open the notebook:
In the Jupyter Notebook interface, navigate to and open the
Student Mental Health Analysis.ipynb
file. -
Run the notebook:
Execute each cell in the notebook sequentially to perform the analysis and generate the visualizations.
The notebook contains the following sections:
- Import necessary libraries: Import
pandas
,matplotlib.pyplot
, andscipy.stats
. - Load data: Load data from the
students.csv
file into a DataFrame and display column names. - Data preparation: Convert relevant columns to numeric and clean the 'Your current year of Study' column.
- Anxiety Analysis: Analyze and visualize anxiety data by age.
- Depression Analysis: Analyze and visualize depression data by age.
- Panic Attack Analysis: Analyze and visualize panic attack data by age.
- Age vs. Year of Study Analysis: Analyze and visualize the relationship between age and year of study.
- T-Test Analysis: Perform a t-test between students with and without anxiety for years of study.
Below are examples of the visualizations and analysis you will generate:
- Absolute and relative values of anxiety, depression, and panic attacks by age.
- Relationship between age and year of study.
- Results of the t-test between students with and without anxiety.