Portfolio.

user image

Optimizing Mental Health Data Management Using SQLAlchemy

Cover Image for Optimizing Mental Health Data Management Using SQLAlchemy

How Studying Abroad Affects Mental Health: A Data-Driven Analysis

Introduction

Studying abroad can be a transformative experience, but it also brings unique mental health challenges. Using a 2018 survey dataset from a Japanese international university, this project analyzes the psychological impact of studying in a foreign country. Leveraging SQL, Python (Pandas, SQLAlchemy), and data visualization tools, I explored how factors like social connectedness, acculturative stress, and length of stay correlate with depression—and why international students may face higher risks.

Key Findings at a Glance

  1. Higher Depression Scores

    1. International students averaged 8.5/25 on the PHQ-9 depression scale, compared to 8.0 for domestic students.
  2. Social Connectedness Matters

    1. A strong negative correlation (-0.54) between social ties and depression for international students.
  3. Acculturative Stress Plays a Role

    1. Stress levels showed a moderate positive correlation (0.41) with depression for international students.
  4. Length of Stay Has Mixed Effects

    1. Depression scores fluctuated for international students over time, peaking after 6+ years.

Methodology: SQL & Python in Action

Tools Used

  • Data Extraction: Kaggle API

  • Analysis: SQLAlchemy, Pandas

  • Visualization: Matplotlib, Seaborn

SQL Queries for Insights

I ran targeted SQL queries to compare international and domestic students:

Example: Social Connectedness vs. Depression

Result: International students with lower social connectedness averaged 20% higher depression scores.
  • As social ties strengthen, depression scores drop, especially for international students.

Acculturative Stress Impact

  • Higher stress = Higher depression, with international students most affected.

Actionable Recommendations

  1. For Universities:

    1. Expand peer mentorship and cultural integration programs

    2. Offer targeted counseling for long-term international students.

  2. For Students:

    1. Prioritize building social networks early.

    2. Use stress-management resources (e.g., workshops, mindfulness apps).

Future Research Directions : To deepen these insights, future studies could explore:

  • The role of language proficiency in stress levels.

  • How extracurriculars (e.g., clubs, sports) mitigate depression.

  • Longitudinal tracking of mental health trends.

Conclusion

Data reveals a clear need for tailored mental health support for international students. By addressing social isolation and acculturative stress, universities can foster healthier, more inclusive environments—turning challenges abroad into opportunities for growth.

Explore the Code & Dataset: [GitHub Repo Link] | Questions? Let’s discuss in the comments!

Check it out!