Skip to content

Repository files navigation

NHANES.jl

Stable Dev CI

Access CDC NHANES (National Health and Nutrition Examination Survey) data from Julia. Download survey tables as DataFrames, list what a cycle publishes, read codebooks, translate coded values, and search variables across cycles.

Installation

using Pkg
Pkg.add(url = "https://github.com/PumasAI/NHANES.jl")

Usage

Nothing is exported. download, search, tables and translate are names Base and other packages use too, so reach everything through the module.

import NHANES

demo = NHANES.download("DEMO_J")        # 2017-2018 demographics
NHANES.tables(:Laboratory, 2015)        # laboratory tables for 2015-2016
NHANES.variables("DEMO_J")              # variable names and labels
NHANES.codebook("DEMO_J", :RIAGENDR)    # codes, labels and counts
NHANES.search("blood pressure")         # variables matching a description

Categorical variables are translated to their labels by default and continuous variables are left numeric, which is where this differs from R's nhanesA.

Documentation

The documentation covers downloads, metadata, translation, search, DXA and the historical surveys, along with how survey cycles map onto table names and what to expect coming from nhanesA.

  • Stable documents the most recent tagged release.
  • Dev tracks main.

License

MIT. See LICENSE.

About

Julia package for accessing CDC NHANES (National Health and Nutrition Examination Survey) data

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages