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.

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)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.
The four headline measures
| Measure | CDC question | Valid answers | What it is |
|---|---|---|---|
Social media frequencyq80_social_media_frequency | Q80: How often do you use social media? | 15,203 | How 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 frequencyq84_poor_mental_health_frequency | Q84: During the past 30 days, how often was your mental health not good? | 15,705 | How 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 sleepq85_school_night_sleep_hours | Q85: On an average school night, how many hours of sleep do you get? | 17,441 | Hours of sleep on an average school night, from 4 or less to 10 or more. |
Self-reported gradesq87_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 health | 11,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 grade | 10,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.
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.
| Group | Column | CDC variable |
|---|---|---|
| Identifier | record_number | Persistfolio record number |
| Survey design | survey_weight | WEIGHT |
stratum | STRATUM | |
psu | PSU | |
| Headline measures | q80_social_media_frequency | Q80 |
q80_social_media_frequency_label | Q80 | |
q84_poor_mental_health_frequency | Q84 | |
q84_poor_mental_health_frequency_label | Q84 | |
q85_school_night_sleep_hours | Q85 | |
q85_school_night_sleep_hours_label | Q85 | |
q87_self_reported_grades | Q87 | |
q87_self_reported_grades_label | Q87 | |
| CDC indicators | qn80_social_media_several_times_a_day_or_more | QN80 |
qn84_poor_mental_health_most_of_the_time_or_always | QN84 | |
qn85_sleep_8_or_more_hours | QN85 | |
qn87_grades_mostly_a_or_b | QN87 | |
| Demographics | q1_age | Q1 |
q2_sex | Q2 | |
q3_grade_level | Q3 | |
q4_hispanic_or_latino | Q4 | |
q5_race_selected | Q5 | |
race_ethnicity | RACEETH | |
| Physical activity | q76_days_active_60_minutes | Q76 |
q77_pe_class_days | Q77 | |
q78_sports_teams | Q78 | |
q97_muscle_strengthening_days | Q97 | |
| Dietary behavior | q75_breakfast_days | Q75 |
q69_fruit_frequency | Q69 | |
q70_green_salad_frequency | Q70 | |
q74_soda_frequency | Q74 | |
q96_plain_water_frequency | Q96 | |
| Bullying | q24_bullied_at_school | Q24 |
q25_electronically_bullied | Q25 | |
| School connectedness | q103_feel_close_to_people_at_school | Q103 |
| Housing instability | q86_usual_sleeping_place | Q86 |
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
- README.md · Overview, measures, overlap, quick start, licence
- DATA_DICTIONARY.csv · Every column with its CDC variable, question, codes and labels
- QUESTION_OVERLAP.csv · Respondents per combination of the four headline measures
- METHODOLOGY.md · Parsing, column selection, survey design and variance method
- QUALITY_REPORT.md · Acceptance tests and QA results on the finished CSV
- PROVENANCE.md · Source files, hashes and build
- student_health_research.ipynb · Executed research notebook
- LICENSE.md · CC BY 4.0 for Persistfolio's work; CDC data public domain
- SOURCE_NOTICE.md · CDC attribution, free-source statement, non-endorsement
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.
