Disclaimer: The purpose of the Open Case Studies project is to demonstrate the use of various data science methods, tools, and software in the context of messy, real-world data. A given case study does not cover all aspects of the research process, is not claiming to be the most appropriate way to analyze a given data set, and should not be used in the context of making policy decisions without external consultation from scientific experts.

This work is licensed under the Creative Commons Attribution-NonCommercial 3.0 (CC BY-NC 3.0) United States License.

To cite this case study please use:

Wright, Carrie and Meng, Qier and Jager, Leah and Taub, Margaret and Hicks, Stephanie. (2020). https://github.com/opencasestudies/ocs-bp-diet. Exploring global patterns of dietary behaviors associated with health risk (Version v1.0.0).

To access the GitHub Repository with the data for this case study see here: https://github.com/opencasestudies/ocs-bp-diet.

You may also access and download the data using our OCSdata package. To learn more about this package including examples, see this link. Here is how you would install this package:

install.packages("OCSdata")

This case study is part of a series of public health case studies for the Bloomberg American Health Initiative.


The total reading time for this case study is calculated via koRpus and shown below:

Reading Time Method
99 minutes koRpus

Readability Score:

A readability index estimates the reading difficulty level of a particular text. Flesch-Kincaid, FORCAST, and SMOG are three common readability indices that were calculated for this case study via koRpus. These indices provide an estimation of the minimum reading level required to comprehend this case study by grade and age.

Text language: en 
index grade age
Flesch-Kincaid 10 15
FORCAST 10 15
SMOG 12 17

Please help us by filling out our survey.

Motivation


An article recently published in The Lancet evaluated global dietary trends and the relationship of dietary factors with mortality and fertility.

GBD 2017 Diet Collaborators. Health effects of dietary risks in 195 countries, 1990–2017: a systematic analysis for the Global Burden of Disease Study 2017. The Lancet 393, 1958–1972 (2019).

This article evaluated food consumption patterns in 195 countries for 15 different dietary risk factors that have probable associations with non-communicable disease (NCD). For example, over-consumption of sodium is associated with high blood pressure. These consumption levels were then used to estimate levels of mortality and morbidity due to NCD, as well as disability-adjusted life-years (DALYs) attributable to sub-optimal consumption of foods related to these dietary risk factors. The authors found that:

“High intake of sodium …, low intake of whole grains …, and low intake of fruits … were the leading dietary risk factors for deaths and DALYs globally and in many countries.”

This figure from the paper’s supplementary materials shows the ranking of the 15 dietary risk factors based on the estimated number of attributable deaths. Here, the numbers and colors of the little squares imply rankings of the risk factors (rows) by regions (columns). The color red indicates risk factors that are associated with larger number of attributable deaths. The column on the right is the overall global data. As you can see here, the top 3 risk factors are often issues for many different regions of the world.

This case study will evaluate the data reported in this article to explore regional, age, and gender specific differences in dietary consumption patterns around the world in 2017.

Main Questions


Our main questions are:

  1. What are the global trends for potentially harmful diets?
  2. How do males and females compare?
  3. How do different age groups compare for these dietary factors?
  4. How do different countries compare? In particular, how does the US compare to other countries in terms of diet trends?

Learning Objectives


In this case study, we will walk you through importing data from PDF files and CSV files, cleaning data, wrangling data, comparing data, joining data, visualizing data, and comparing two or more groups using well-established and commonly used packages, including stringr, tidyr, dplyr, purrr, and ggplot2. We will especially focus on using packages and functions from the Tidyverse. The tidyverse is a library of packages created by RStudio. While some students may be familiar with previous R programming packages, these packages make data science in R especially legible and intuitive.

The skills, methods, and concepts that students will be familiar with by the end of this case study are:

Data Science Learning Objectives:

  1. Importing/extracting data from PDF (dplyr, stringr)
  2. How to reshape data by pivoting between “long” and “wide” formats (tidyr)
  3. Perform functions on all columns of a tibble (purrr)
  4. Data cleaning with regular expressions (stringr)
  5. Specific data value reassignment
  6. Separate data within a column into multiple columns (tidyr)
  7. Methods to Compare data (dplyr)
  8. Combining data from two sources (dplyr)
  9. Make interactive plots (ggiraph)
  10. Make a zoom facet for plot (ggforce)
  11. Combine plots together (cowplot)

Statistical Learning Objectives:

  1. Understanding of how the t-test and the ANOVA are specialized regressions
  2. Basic understanding of the utility of a regression analysis
  3. How to implement a linear regression analysis in R
  4. How to interpret regression coefficients
  5. Awareness of t-test assumptions
  6. Awareness of linear regression assumptions
  7. How to use Q-Q plots to check for normality
  8. Difference between fixed effects and random effects
  9. How to perform paired t-test
  10. How to perform a linear mixed effects regression