Skip to content

Introduction

This notebook explores the impact of attending university in a different country on student mental health. Drawing from a survey conducted by a Japanese international university in 2018 and subsequent published research, we aim to analyze if similar conclusions can be drawn for international students using PostgreSQL. The study highlighted that international students face a higher risk of mental health difficulties, with social connectedness and acculturative stress being significant factors predictive of depression.

Data Description

Field NameDescription
inter_domTypes of students (international or domestic)
japanese_cateJapanese language proficiency
english_cateEnglish language proficiency
academicCurrent academic level (undergraduate or graduate)
ageCurrent age of student
stayCurrent length of stay in years
todepTotal score of depression (PHQ-9 test)
toscTotal score of social connectedness (SCS test)
toasTotal score of acculturative stress (ASISS test)

Task 1: Loading Data:

We execute the SQL query to load the CSV file into the PostgreSQL environment, naming it as students. This step allows us to access and analyze the dataset within the PostgreSQL database. The dataset has already undergone cleaning processes, ensuring its readiness for analysis.

Spinner
DataFrameas
students
variable
-- Run this code to save the CSV file as students
SELECT * 
FROM 'students.csv';

Task 2: Exploratory Data Analysis:

We conduct an exploratory analysis to examine the relationship between the length of stay and mental health indicators for international students. Using SQL queries, we calculate descriptive statistics such as the count of international students, average scores on depression, social connectedness, and acculturative stress across different lengths of stay.

Spinner
DataFrameas
df
variable
-- selecting require column fields
SELECT
	stay,
	COUNT (*) as count_int,
	ROUND(AVG(todep), 2) AS average_phq,
	ROUND(AVG(tosc), 2) AS average_scs,
	ROUND(AVG(toas), 2) AS average_as
-- specifying table
FROM students
-- filtering for international students
WHERE inter_dom = 'Inter'
-- grouping by stay
GROUP BY stay
ORDER BY stay DESC;