Polyphenol Estimator
This start guide shows you how to take your ASA24 or NHANES dietary data and estimate polyphenol intake using the FooDB and calculate the dietary inflammatory index (Shivapppa et al. 2013). Example ASA24 data, borrowed from the DietDiveR Repository, is provided for you to test. Check out the example file here to see the input structure required for Polyphenol Estimator.
1. Download the entire repository directly here then unzip the folder.
The repository contains files and scripts used in the tutorial.
2. Open ‘run_pipeline.R’ in RStudio.

3. Update diet_input_file path if not using the demo ASA24 data.

4. Run the scripts.
In our usage case of ASA24 data, we have specified that the input is ASA24 data and that we would not like a report of what happens in each step. After you’ve run estimate_polyphenols, you can also run calculate_DII. Calculation of DII is optional. The function automatically detects whether you’ve run ASA24 or NHANES data, you only need to specify if you would like to see what happens in each script.
5. Check out the resulting files in your output directory!
Find a list of expected outputs below:
Reports: See What's in Each Script
- If you opt to generate md or html reports, then a readable report of each script used will be placed into your reports folder. You can preview the latest reports generated by navigating to pages under "Polyphenol Estimator" and "DII Calculation" in your sidebar. Report generation may be helpful to keep a record of which scripts were used as the tool periodically will be updated.
Want to test NHANES data instead?
estimate_polyphenols can also be run on NHANES WWEIA data. To generate NHANES WWEIA data, follow the instructions in “Preparing Diet Data - NHANES diet recalls”. When you’ve finished:
- Come back to run_pipeline.R and update
diet_input_filewith the NHANES output file name. - In
estimate_polyphenols, change type to “NHANES” - Run the script.