Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
sql
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

NHANES Explorer

Supporting data for "When the Government Counts Calories" from the OCR Journal #0002.

men vs women

Requirements

  • Python / PIP
  • xport: pip install xport
  • Node / NPM
  • Postgres (create a database called nhanes)

Process data

npm install

# Scrape and convert data
# ./process.sh [YEAR-PAIR] [FILENAME]
./process.sh 2011-2012 DR1IFF_G

# Insert non-unique tables
# ./insert.sh [FILENAME] [USE_PKEY?]
./insert.sh DR1IFF_G false

# (if the data is unique, leave off the last variable)
./insert.sh OCQ_G

# Food labels are different
node insert_food.js processed/DRXFCD_G.labels.csv processed/DRXFCD_G.csv

Visualization server

Use a static site serving tool on journal, e.g.:

cd journal
python -m http.server 8000

Requires editing journal/app/app.js to see different visualizations.

About

Analysis of NHANES data

Resources

Releases

No releases published

Packages

No packages published