# Read the study data
data <- read_csv("obesity_habits_data.csv")
# Take a quick look
head(data, 6)
## # A tibble: 6 × 8
## study_variable category overweight_count overweight_percent
## <chr> <chr> <dbl> <dbl>
## 1 hungry never 65 14.1
## 2 hungry yes 25 5.4
## 3 main_diet rice 86 18.7
## 4 main_diet others 4 0.9
## 5 meal_preference vegetarian 6 1.3
## 6 meal_preference non_vegetarian 84 18.3
## # ℹ 4 more variables: non_overweight_count <dbl>, non_overweight_percent <dbl>,
## # chi_square <dbl>, p_value <dbl>
cat("Total habits tested:", length(unique(data$study_variable)))
## Total habits tested: 18
cat("\nTotal people in study:", sum(data$overweight_count[1:2] + data$non_overweight_count[1:2]))
##
## Total people in study: 460