The dataset viewer is not available for this split.
Error code: TooManyColumnsError
Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
NHANES merged participant-level dataset
This is the output of a pipeline that merges the 341 public NHANES tables into one
row per participant per survey cycle. It accompanies the code and documentation in
OpenFIM-Bench, under
pipelines/nhanes-merge/, where the methodology and every judgment call are written up.
The files here are the ones too large for a git repository. Everything smaller (the column dictionary, the participant spine, the training tiers, the synthetic outputs, and the full audit trail) lives in the GitHub repo instead.
Files
| file | rows x columns | what it is |
|---|---|---|
merged_deduped.parquet |
113,386 x 14,066 | The main output. Every single-row NHANES table joined onto the participant spine, each column prefixed with its source table. 401 columns that were confirmed duplicates of another column have been collapsed. Use this one. |
merged.parquet |
113,386 x 14,467 | The same merge before duplicate columns were collapsed, kept as the complete record. |
multi_row/ |
18 files | Tables that hold more than one row per participant per cycle: dietary item logs, supplement logs, physical activity records, audiometry. Not merged into the wide file. Link them back on seqn and year. |
Structure
Every row is one participant in one survey cycle, keyed by seqn and year.
Every other column is named {source_table}_{original_variable}, so the origin of any
value is readable from the column name. NHANES reuses variable names across tables, and
the prefixes are what keep them from colliding during the merge.
Eleven cycles are present: 1999 through 2017 in two year steps, plus 2021. The 2019 to 2020 cycle is absent because CDC could not complete collection during COVID.
Loading
import pandas as pd
# one column set, all participants
df = pd.read_parquet("merged_deduped.parquet",
columns=["seqn", "year", "demo_ridageyr", "ghb_lbxgh"])
Reading all 14,066 columns at once needs a lot of memory. Select the columns you need, or query the file with DuckDB:
import duckdb
duckdb.sql("SELECT seqn, year, ghb_lbxgh FROM 'merged_deduped.parquet' WHERE ghb_lbxgh > 6.5")
The column dictionary in the GitHub repo (data/dictionary.parquet) gives a CDC
description for 99.7% of columns.
Expect sparsity
Most cells are null, and that is correct rather than a defect. Most participants appear in only a small fraction of the 341 source tables, so the median column is populated for under 3% of rows. Only 342 columns are populated for at least half the rows.
Provenance
Built from NHANES public use files, which CDC releases already de-identified. No
limited access NHANES data is involved. The survey tables were fetched from the mirror
maintained by the nhanesdata R package, and the variable metadata from CDC's own
variable list pages.
NHANES data are works of the US federal government and are in the public domain, which is why this is published under CC0.
Known gaps
One source table, rxq_rx (prescription medications), is excluded from everything. Its
hosted parquet file contains a byte sequence that is not valid UTF-8, which breaks any
attempt to read it, so its row shape was never determined. The practical effect is that
the only medication information in this dataset is what participants self reported in
questionnaires.
137 participants from the 1999 cycle appear in a laboratory file but not in that cycle's demographics file. They are kept rather than dropped, and the spine was built from the union of every table's keys specifically so they would not disappear silently. Whether this is a lab only subsample or an upstream data problem is not resolved.
The dictionary has no units and no value coding. Both would require parsing individual CDC codebook pages, one per table per cycle.
Full detail on all of these is in pipelines/nhanes-merge/docs/methodology.md in the
GitHub repository.
- Downloads last month
- 596