Teen_Mental_Health_Analysis

Visualization Report

Objective

The visualization notebook explores patterns in the cleaned teen mental health dataset using pandas, Matplotlib, and Seaborn.

Notebook:

teen_visiualize.ipynb

Visualizations Included

1. Depression Label Count

Chart type: bar chart

Purpose:

Interpretation:

2. Average Social Media Hours By Depression Label

Chart type: bar chart

Purpose:

Observed result:

Depression Label Average Daily Social Media Hours
0 4.48
1 6.72

Interpretation:

3. Sleep Hours Distribution

Chart type: histogram

Purpose:

How to read it:

Observed summary:

4. Stress vs Anxiety

Chart type: scatter plot

Purpose:

How to read it:

Recommended improvement:

plt.scatter(df["stress_level"], df["anxiety_level"], alpha=0.3)

The alpha value makes overlapping points easier to interpret.

5. Stress vs Anxiety Heatmap

Chart type: heatmap

Purpose:

Recommended code:

table = pd.crosstab(df["anxiety_level"], df["stress_level"])

sns.heatmap(table, cmap="Blues", annot=True, fmt="d")
plt.title("Stress vs Anxiety Count")
plt.xlabel("Stress Level")
plt.ylabel("Anxiety Level")
plt.show()

How to read it:

6. Average Sleep Hours By Depression Label

Chart type: bar chart

Purpose:

Recommended code with labels:

avg_sleep = (
    df.groupby("depression_label")["sleep_hours"]
    .mean()
)

ax = avg_sleep.plot(kind="bar", edgecolor="black")
ax.bar_label(ax.containers[0], fmt="%.2f", padding=3)

plt.title("Average Sleep Hours by Depression")
plt.xlabel("Depression label")
plt.ylabel("Average Sleep Hours")
plt.ylim(0, avg_sleep.max() + 1)
plt.show()

Observed result:

Depression Label Average Sleep Hours
0 6.49
1 4.76

Visualization Best Practices Used

Visualization Limitations