Polyphenol Estimator
This start guide shows you how to take your ASA24 or NHANES dietary data and estimate polyphenol intake using 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.
Prerequisite: R and R Studio Installed
In order to run Polyphenol Estimator, you need access to both R and R Studio. If you have not already downloaded these two programs, this 6-minute video from Alex The Analyst will walk you through the download process as well give you a brief introduction of the user interface.Let’s Get Started!
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 more information about expected outputs for estimate_polyphenols and calculate_DII at the following link: Polyphenol Estimator Output Information
Reports: A reader-friendly way to view scripts
- 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. Users may find report generation helpful to keep a record of which scripts were used as the tool periodically will be updated.
Want to test NHANES data instead?
Polyphenol Estimator can also be run on WWEIA, NHANES data. To get users started, we have provided data prepration instructions to process dietary data from the two dietary interviews in NHANES 2021-2023.
-
Open “preparing_diet_data_NHANES.Rmd” which is located in the directory shown below. The script can also be previewed on the tutorial without opening R Studio - “Tutorial, Preparing Diet Data - NHANES diet recalls”
polyphenol_estimator-main/ ├── R/ │ ├── scripts/ │ └── preparing_diet_data_NHANES.Rmd - Return to run_pipeline.R and within
estimate_polyphenols, updatediet_input_filewith the NHANES diet output file name. - In
estimate_polyphenols, change type to “NHANES” - Run the script.