Skip to contents

A lightweight three-table relational dataset extracted from a dietary recall survey. Contains 100 unique observations with corresponding food details and ingredient groups.

Usage

data(dietrecall_example)

Format

A list with three tibbles:

maintable

100 rows × 9 columns. Columns:

survey_id

Unique identifier for each recall survey

household_id

Identifier for the household

survey_date

Date of the recall survey

recall_number

Recall round number

county

County of the household

subcounty

Subcounty of the household

ward

Ward of the household

cu

Community unit

mothers_age_in_years

Age of the mother in years

food_details

Tibble with repeated observations of food items linked by survey_id

food_ingredients_group

Tibble with grouped food ingredients linked by survey_id

Details

This dataset preserves relational integrity across the three tables. The survey_id column in maintable serves as a foreign key in food_details and food_ingredients_group.

Examples

data("dietrecall_example")
str(dietrecall_example$maintable)
#> tibble [50 × 9] (S3: tbl_df/tbl/data.frame)
#>  $ survey_id           : chr [1:50] "0111251492-161123" "0111251492-241023" "0111323284-291023" "0111333496-161123" ...
#>  $ household_id        : chr [1:50] "0111251492" "0111251492" "0111323284" "0111333496" ...
#>  $ survey_date         : POSIXct[1:50], format: "2023-11-16" "2023-10-24" ...
#>  $ recall_number       : chr [1:50] "Repeat recall" "First recall" "First recall" "Repeat recall" ...
#>  $ county              : chr [1:50] "NAIROBI" "NAIROBI" "NAIROBI" "NAIROBI" ...
#>  $ subcounty           : chr [1:50] "MAKADARA" "MAKADARA" "MAKADARA" "MAKADARA" ...
#>  $ ward                : chr [1:50] "VIWANDANI" "VIWANDANI" "VIWANDANI" "VIWANDANI" ...
#>  $ cu                  : chr [1:50] "UCHUMI" "UCHUMI" "PARADISE TUI" "DAIMA" ...
#>  $ mothers_age_in_years: num [1:50] 30 30 36 35 35 27 27 34 30 30 ...
head(dietrecall_example$food_details)
#> # A tibble: 6 × 16
#>   survey_id         food_details_rowid food_item_selected food_preparation_place
#>   <chr>                          <dbl> <chr>              <chr>                 
#> 1 0111251492-161123                  1 Orange             Outside Home          
#> 2 0111251492-161123                  2 Managu/spinach/te… Home                  
#> 3 0111251492-161123                  3 Ugali              Home                  
#> 4 0111251492-161123                  4 Kales              Home                  
#> 5 0111251492-161123                  5 Ugali              Home                  
#> 6 0111251492-161123                  6 Bread              Outside Home          
#> # ℹ 12 more variables: ready_to_eat <dbl>, desc_of_food <chr>,
#> #   dish_foodgroup <chr>, food_consumption_place <chr>,
#> #   food_cooking_method <chr>, food_cooking_method_other <lgl>,
#> #   amt_of_food_cooked <dbl>, unit_amt_of_food_cooked <chr>,
#> #   qty_food_consumed <dbl>, unit_qty_food_consumed <chr>,
#> #   food_item_price_prop_consumed <dbl>, rowuuid <chr>
head(dietrecall_example$food_ingredients_group)
#> # A tibble: 6 × 14
#>   survey_id        food_details_rowid food_ingredients_gro…¹ ingredient_position
#>   <chr>                         <dbl>                  <dbl>               <dbl>
#> 1 0111251492-1611…                  2                      1                   7
#> 2 0111251492-1611…                  2                      2                   6
#> 3 0111251492-1611…                  2                      3                   5
#> 4 0111251492-1611…                  2                      4                   4
#> 5 0111251492-1611…                  2                      5                   3
#> 6 0111251492-1611…                  2                      6                   2
#> # ℹ abbreviated name: ¹​food_ingredients_group_rowid
#> # ℹ 10 more variables: food_ingredients_used <chr>,
#> #   food_ingredients_used_other <lgl>, food_ingredients_foodgroup <chr>,
#> #   food_ingredients_source <chr>, food_ingredients_source_other <chr>,
#> #   food_ingredient_amt <dbl>, food_ingredient_unit <chr>,
#> #   food_ingredient_price_prop_used <dbl>, food_ingredient_addn_point <dbl>,
#> #   rowuuid <chr>