Persistfolio

FREE DATASET · PUBLIC HEALTH SURVEY · NO ACCOUNT NEEDED

U.S. High School Students: Mental Health, Social Media, Sleep & Grades

Every one of the 20,103 questionnaires from the 2023 CDC national Youth Risk Behavior Survey of U.S. students in grades 9–12, in one research-ready CSV: how often students use social media, how often their mental health was not good, how much they sleep on school nights and the grades they report — with the survey weights and design variables needed for correct population estimates.

Chart: survey-weighted share of U.S. high school students reporting mostly A's, by social media frequency (none, less than daily, daily, several times a day, hourly or more), shown separately for students sleeping 5 hours or less, 6–7 hours and 8 hours or more on school nights, with 95% confidence intervals; 12,516 students answered all three questions. Source: CDC, 2023 national YRBS.

Source: CDC, 2023 national Youth Risk Behavior Survey. The original YRBS data and documentation are available free of charge from CDC.

Use of CDC data, and any link to CDC, ATSDR or HHS websites, does not imply endorsement by CDC, ATSDR, HHS or the United States Government of Persistfolio, this dataset or its conclusions.

Free download

Complete data, not a sample. One ZIP with the CSV (20,103 rows × 35 columns, 2.3 MB), data dictionary, question-overlap table, methodology, quality report, provenance, licence and the executed notebook.

Download the dataset (.zip, 0.6 MB)
student-health-yrbs2023-r1.zip · 626,338 bytes · SHA-256 14f0f8b01d8ff827465db8ce1f32a3541c99b157bd27b2d7d5154c47c941fb80

Release student-health-yrbs2023-r1. Every file inside carries a checksum in the archive’s SHA256SUMS.txt; the archive checksum is also in SHA256SUMS.txt.

20,103
questionnaires, one row each
12,516
students with social media, sleep and an A–F grade
11,602
students with social media and mental health answers
16 / 89
sampling strata / primary sampling units
87/87
QA checks passed on the finished CSV

The four headline measures

MeasureCDC questionValid answersWhat it is
Social media frequency
q80_social_media_frequency
Q80: How often do you use social media?15,203How often students use social media, from “I do not use social media” to “More than once an hour”. Frequency, not time spent.
Poor mental health frequency
q84_poor_mental_health_frequency
Q84: During the past 30 days, how often was your mental health not good?15,705How often mental health was not good in the past 30 days (stress, anxiety and depression, as CDC words it). A self-report, not a diagnosis.
School-night sleep
q85_school_night_sleep_hours
Q85: On an average school night, how many hours of sleep do you get?17,441Hours of sleep on an average school night, from 4 or less to 10 or more.
Self-reported grades
q87_self_reported_grades
Q87: During the past 12 months, how would you describe your grades in school?15,694 (A–F)Mostly A’s to mostly F’s (codes 1–5), with “None of these grades”, “Not sure” and no answer kept separate. Not school records.

AI use, time spent on social media and clinical diagnoses are not measured by these questions and are not in this edition.

How many students answered each combination

Social media + mental health11,602
Social media + grades (A–F)13,793
Sleep + grades (A–F)13,937
Social media + sleep + grades (A–F)12,516
All four measures, with an A–F grade10,206

All 15 combinations are in QUESTION_OVERLAP.csv.

Use the survey weights — the file reproduces CDC’s published figure

CDC reports that 77.0% (95% CI 73.5%–80.1%) of high school students used social media at least several times a day in 2023 (MMWR). Using survey_weight, stratum and psu, this file gives 76.9704% (95% CI 73.5068%–80.1037%), which rounds to CDC’s figures. A simple unweighted count gives 78.09% — not a population estimate. The methodology documents the Taylor-linearization variance and logit-transformed interval used.

Research notebook

The executed notebook asks: among students reporting similar amounts of school-night sleep, how does the distribution of self-reported grades vary with social media frequency? It reproduces the CDC benchmark first, then shows survey-weighted grade distributions with unweighted group sizes and design-based 95% intervals for the 12,516 eligible students, and a second example on social media and mental health (11,602 students). Within each sleep group, students using social media about hourly or more report mostly A’s less often than those using it several times a day; at lower frequencies the pattern is not consistent. All results are associations between self-reports, not effects.

Open the notebook (.ipynb)

Columns

Every column keeps CDC’s original response codes and states its CDC variable. Empty cell = no answer. Codes, labels and question wording are in the data dictionary.

GroupColumnCDC variable
Identifierrecord_numberPersistfolio record number
Survey designsurvey_weightWEIGHT
stratumSTRATUM
psuPSU
Headline measuresq80_social_media_frequencyQ80
q80_social_media_frequency_labelQ80
q84_poor_mental_health_frequencyQ84
q84_poor_mental_health_frequency_labelQ84
q85_school_night_sleep_hoursQ85
q85_school_night_sleep_hours_labelQ85
q87_self_reported_gradesQ87
q87_self_reported_grades_labelQ87
CDC indicatorsqn80_social_media_several_times_a_day_or_moreQN80
qn84_poor_mental_health_most_of_the_time_or_alwaysQN84
qn85_sleep_8_or_more_hoursQN85
qn87_grades_mostly_a_or_bQN87
Demographicsq1_ageQ1
q2_sexQ2
q3_grade_levelQ3
q4_hispanic_or_latinoQ4
q5_race_selectedQ5
race_ethnicityRACEETH
Physical activityq76_days_active_60_minutesQ76
q77_pe_class_daysQ77
q78_sports_teamsQ78
q97_muscle_strengthening_daysQ97
Dietary behaviorq75_breakfast_daysQ75
q69_fruit_frequencyQ69
q70_green_salad_frequencyQ70
q74_soda_frequencyQ74
q96_plain_water_frequencyQ96
Bullyingq24_bullied_at_schoolQ24
q25_electronically_bulliedQ25
School connectednessq103_feel_close_to_people_at_schoolQ103
Housing instabilityq86_usual_sleeping_placeQ86

Coverage and limitations

  • Self-reported and cross-sectional. One questionnaire at one time; associations do not show cause and effect.
  • Students in school. Nationally representative of public and private school students in grades 9–12 who were present; the overall response rate was 35.4%. Weights adjust for nonresponse and oversampling but cannot remove every bias.
  • A focused selection. 35 columns, not the full questionnaire. The complete file is free from CDC.
  • Grades are self-reported; “None of these grades” and “Not sure” are kept apart from A–F and from blanks.
  • One-time dated release. It will not be changed in place, and no update is scheduled or promised.

Documentation

Quick start in Python, from the unzipped folder:

import pandas as pd

# Keep CDC codes as text so an empty cell (no answer) stays distinct from every code.
df = pd.read_csv("data/student_health_yrbs2023.csv", dtype=str, keep_default_na=False)
grades_a_to_f = df[df.q87_self_reported_grades.isin(list("12345"))]
# Population estimates need survey_weight, with stratum and psu for standard errors.

Quality checks and reproducibility

  • Source file verified by size and SHA-256 before parsing; field positions and labels read from CDC’s own input and formats programs.
  • PASS: 87 of 87 checks on the finished CSV — the agreed respondent counts and the weighted CDC benchmark, CDC’s printed codebook frequencies and weighted percentages for every included variable, CDC’s indicator and race/ethnicity definitions, and an independent re-read of the raw file. Re-run on the CSV inside the archive after packaging.
  • Repeated full builds produced a byte-identical ZIP archive. The packaged notebook re-runs against the CSV extracted from the archive, and its per-cell text outputs match the packaged copy (charts are not compared byte for byte). No certification is claimed.

Licence and citation

Persistfolio’s original work — the documentation, data dictionary descriptions, column names and selection, overlap table, notebook and build code — is licensed under CC BY 4.0. CDC’s survey data, codes and question wording are a U.S. Government work in the public domain in the United States; Persistfolio claims no rights in them. CDC’s reuse conditions are met in the package’s source notice.

Suggested citation: “Persistfolio (2026). U.S. High School Students: Mental Health, Social Media, Sleep & Grades, release student-health-yrbs2023-r1. CC BY 4.0. Source data: Centers for Disease Control and Prevention, 2023 national Youth Risk Behavior Survey.” Provided as is, without warranty.

Browse all Persistfolio datasets