In this project, I conducted a comprehensive data analysis of depression among students using a large-scale survey dataset. The analysis was performed in R within a Jupyter Notebook as part of the Google Data Analytics Capstone project.
student_depression_analysis.ipynb– Jupyter Notebook containing the complete analysis, visualizations, and interpretations.student_depression_dataset.csv– The dataset containing the student depression data.LICENSE– MIT License governing use and distribution of this project.
- Programming Language: R 4.4.3
- Environment: Jupyter Notebook
The dataset used in this project is the Student Depression Dataset, sourced from Kaggle. It contains anonymized, self-reported survey responses from students across diverse academic and demographic backgrounds.
Ensure the following libraries are installed:
- autofileIO (A custom package I created for automatically reading and writing files)
- dplyr
- janitor
- tidyr
- skimr
- ggplot2
- stringr
- forcats
To get started, first clone or download this repository to your local machine.
git clone https://github.com/ankito090/Student-Depression-Analysis.git
or
[Download the Repository]https://codeload.github.com/ankito090/Student-Depression-Analysis/zip/refs/heads/main)
Ensure that R and Jupyter Notebook are installed on your machine. If not:
-
Download and install R from CRAN.
-
To use R within Jupyter Notebook, install Anaconda, which includes Jupyter Notebook.
-
After installing Anaconda, open Anaconda Navigator or launch a terminal and type:
jupyter notebookThis will open the Jupyter interface in your browser.
To enable R in Jupyter, follow these steps:
-
Open R or RStudio
-
Run the following in the R console:
install.packages("IRkernel") IRkernel::installspec(user = FALSE)You should now see R as a kernel option when creating a new notebook in Jupyter.
-
In R or RStudio, install the required packages (if not already installed) by running:
install.packages(c("dplyr", "janitor", "tidyr", "skimr", "ggplot2", "stringr", "forcats")) -
Also, install the custom autofileIO package used in this project by running:
install.packages("devtools") devtools::install_github("ankito090/autofileIO")
Open your terminal or CLI and navigate to the root directory of the cloned or downloaded project using this command:
cd path/to/project-directory
Replace path/to/project-directory with the actual path where the project is saved.
jupyter notebook student_depression_analysis.ipynb
