Visualize

Modified

September 25, 2024

About

This page shows some simple visualizations of the cleaned aggregate home visit questionnaire data file.

Setup

Load dependencies.

suppressPackageStartupMessages(library(tidyverse))
suppressPackageStartupMessages(library(wordcloud))
suppressPackageStartupMessages(library(RColorBrewer))

source("../R/mcdi_viz_wordcloud.R")
source("../R/ecbq_plot.R")
source("../R/ecbq_plot_chunk.R")

Load saved “latest” data file.

hv <- readr::read_csv("../data/csv/home_visit/agg/PLAY-non-mcdi-kobo-latest.csv", show_col_types = FALSE)

Child age

Child age in months (age_group) by child_sex.

Note: The child’s exact age in months is part of the Databrary-related data. That is on the work plan.

home_visit_filtered <- hv |>
  dplyr::filter(!is.na(age_group),
                !is.na(child_sex))
xtabs(formula = ~ age_group + child_sex, 
      data = home_visit_filtered)
         child_sex
age_group female male
     12mo    155  133
     18mo    135  156
     24mo    114  118

A total of \(n=\) 811 mother-infant dyads have been tested. This includes training and pilot visits.

home_visit_filtered |>
  ggplot() +
  aes(age_group, fill = child_sex) +
  geom_bar() +
  theme(legend.position = "bottom") +
  theme(legend.title = element_blank())
Figure 10.1: Participants by age group and sex

Time series

To calculate cumulative visits, we have to add an index variable

df <- home_visit_filtered |>
  dplyr::select(test_date, site_id) |>
  dplyr::mutate(test_date = as.Date(test_date)) |>
  dplyr::arrange(test_date) |>
  dplyr::mutate(n_visits = seq_along(test_date))
df |>
  dplyr::filter(!is.na(test_date),
                !is.na(n_visits),
                !is.na(site_id)) |>
  ggplot() +
  aes(test_date, n_visits) +
  geom_point()
Figure 10.2: Cumulative home visits by year

Language exposure

df <- hv |>
  dplyr::mutate(language_child = stringr::str_replace_all(language_child, " ", "_"))
xtabs(formula = ~ child_sex + language_child, data = df)
         language_child
child_sex english english_spanish
   female     326              78
   male       316              91
Note

The current workflow seems to omit Spanish-only families. This must be investigated further.

MB-CDI

Warning

We have temporarily disabled these visualizations while we conform them to a newer workflow.

12-mo-old English speakers

eng_12 <-
  readr::read_csv(
    file.path(here::here(), "data/csv/home_visit/agg/mcdi_english_12_combined.csv"),
    col_types = readr::cols(.default = 'c'),
    show_col_types = FALSE
  )

There are some duplicate columns we must merge.

eng_12_long <- eng_12 |>
  dplyr::mutate(bath = case_when(!is.na(bath_1) ~ bath_1,
                                 !is.na(bath_2) ~ bath_2,
                                 !is.na(bath_3) ~ bath_3,
                                 !is.na(bath_4) ~ bath_4)) |>
  dplyr::select(-contains("bath_")) |>
  dplyr::mutate(choo_choo = case_when(!is.na(choo_choo) ~ choo_choo,
                                      !is.na(choochoo) ~ choochoo)) |>
  dplyr::select(-choochoo) |>
  dplyr::mutate(I = case_when(!is.na(I) ~ I,
                              !is.na(i) ~ i)) |>
  dplyr::select(-i) |>
  dplyr::mutate(mommy = case_when(!is.na(mommy_1) ~ mommy_1,
                                  !is.na(mommy_2) ~ mommy_2)) |>
  dplyr::select(-contains("mommy_")) |>
  dplyr::mutate(outside = case_when(!is.na(outside_1) ~ outside_1,
                                    !is.na(outside_2) ~ outside_2)) |>
  dplyr::select(-contains("outside_")) |>
  dplyr::mutate(please = case_when(!is.na(please_1) ~ please_1,
                                   !is.na(please_2) ~ please_2)) |>
  dplyr::select(-contains("please_")) |>
  dplyr::mutate(telephone = case_when(!is.na(telephone) ~ telephone,
                                      !is.na(telelphone) ~ telelphone)) |>
  dplyr::select(-telelphone) |>
  tidyr::pivot_longer(cols = !(play_id | site_id | subject_number),
                        names_to = "word",
                        values_to = "understands_or_says")

xtabs(~ word + understands_or_says, eng_12_long)
                understands_or_says
word             understands understands_says
  a                        8                0
  airplane                26                0
  allgone                 85               11
  also                     3                0
  animal                  19                0
  apple                    2                0
  arms                    33                0
  away                     8                0
  baabaa                  15               20
  baby                    84                9
  babysitter               3                0
  ball                    89               25
  balloon                 30                7
  banana                   2                0
  bath                   109                7
  be                       1                0
  bear                    24                5
  bed                     58                1
  beepbeep                 0                0
  bellybutton              2                0
  bib                     60                0
  bicycle                 17                1
  big                     22                2
  bird                    32                0
  bite                    46                1
  blanket                 37                1
  blow                    29                0
  book                   101               17
  boots                    5                0
  bottle                  78               36
  box                     26                1
  boy                     14                0
  bread                   19                0
  break                    2                0
  broken                   4                0
  broom                   11                1
  brother                 24                8
  brush                   36                1
  bunny                   34                0
  button                  11                1
  bye                     91               57
  cake                    10                1
  candy                    3                0
  car                     59                7
  cat                     49               17
  cereal                  11                1
  chair                   29                0
  cheese                   1                0
  chicken                 24                1
  choo_choo               12                4
  church                   9                0
  clockwatch              17                1
  close                   47                0
  cockadoodledoo          11                2
  comb                    14                0
  cookie                  18                3
  couch                   32                0
  cow                     29                5
  crib                     3                0
  cry                     42                0
  cup                     59                4
  daddy                   38              110
  dance                   80                0
  dark                     9                0
  diaper                  89                3
  dirty                   26                1
  dish                     3                0
  dog                     66               34
  doll                    26                1
  dont                    62                2
  door                    42                2
  draw                     8                0
  drawer                   2                0
  dress                   13                0
  drum                    31                0
  duck                    33                4
  ears                     0                0
  eat                    109                4
  egg                     45                2
  elephant                35                0
  eye                     37                3
  face                     1                0
  fall                    20                0
  family                  19                0
  fast                    15                0
  feed                    25                0
  finger                  37                0
  finish                  23                4
  firetruck               17                0
  flower                  25                0
  foot                    55                0
  for                      4                0
  frog                    22                0
  girl                    11                0
  give                     1                0
  glass                    2                0
  glasses                 38                2
  go                      46                7
  goodmorning             68                0
  grandma                 73               15
  grandpa                 62               16
  hair                    53                1
  hammer                   4                0
  hand                    56                0
  hat                     30                4
  have                    16                1
  head                    43                0
  help                    37                1
  here                    34                1
  hi                      82               62
  hisher                   8                0
  hit                     29                0
  home                    46                0
  horse                   23                0
  hot                     48                4
  how                      0                0
  hurry                    2                0
  hurt                    24                1
  I                       12                1
  icecream                17                0
  in                      59                2
  juice                    4                0
  jump                    26                0
  keys                    38                0
  kick                    22                1
  kiss                    98                1
  kitchen                 31                0
  kitty                   52               13
  lady                     4                0
  lamp                     6                0
  leg                     21                0
  light                   41                5
  lion                    23                1
  look                    77                1
  man                      2                1
  many                     6                0
  me                      16                2
  meat                    10                0
  medicine                19                0
  meow                    43               13
  milk                    93               12
  mine                    27                0
  mommy                   52               99
  money                    4                0
  monkey                  33                0
  moo                      1                0
  moon                    11                2
  more                    73               20
  mouse                    9                0
  mouth                   53                3
  nap                      3                0
  necklace                10                0
  new                      2                0
  night                   33                3
  nightnight              69                9
  none                    12                0
  nose                    52                3
  now                     13                0
  on                      41                3
  onetwothree             39                1
  open                    69                0
  other                    3                0
  ouch                    48                5
  out                     35                1
  outside                 80                0
  pajamas                 42                0
  pants                   33                1
  paper                   17                0
  party                    8                0
  pattycake               45                0
  pen                     14                0
  penguin                 11                0
  picture                 34                0
  pillow                  25                0
  plant                   16                0
  play                    66                1
  please                  32                2
  pretty                  11                1
  purse                    7                0
  push                    34                0
  put                     61                0
  quackquack              21               14
  radio                    1                0
  rain                    10                0
  refrigerator            25                0
  rock                    12                1
  say                     21                0
  scissors                 1                0
  see                     46                0
  shh                     76               10
  shirt                    3                0
  shoe                    59                2
  sing                    30                0
  sink                    12                0
  sister                  19                2
  sit                     61                0
  sky                     22                0
  sleep                   71                0
  smile                   49                1
  soap                    19                0
  sock                    51                3
  soft                    34                0
  some                     5                0
  spoon                   57                0
  squirrel                18                0
  stairs                  50                0
  stop                     4                0
  store                   13                0
  street                   8                0
  stroller                41                0
  sun                     21                1
  swing                    1                0
  table                   27                0
  take                    27                0
  teddybear               30                3
  telephone               48                0
  television              23                0
  thankyou                56                9
  them                     3                0
  there                   26                1
  this                    22                5
  throw                   52                0
  tickle                  49                2
  tiger                   15                2
  tired                   57                0
  toast                    6                0
  today                    4                0
  tomorrow                 3                0
  tongue                  31                0
  tooth                   29                1
  touch                   48                0
  towel                   26                1
  toy                     83                0
  train                   20                1
  trash                   25                1
  tree                    31                5
  truck                   41                2
  turtle                  17                2
  uh_oh                   69               34
  uhoh                     7                2
  vroom                   19               25
  wait                    50                0
  walk                    65                0
  want                    34                0
  wash                    30                0
  water                   95               13
  where                   57                1
  who                     20                1
  window                  34                0
  woofwoof                51               26
  write                    2                0
  yes                     83               13
  yumyum                  65               19
word_ct <- eng_12_long |>
  dplyr::filter(!is.na(understands_or_says)) |>
  dplyr::filter(understands_or_says == "understands") |>
  dplyr::count(word, sort = TRUE)

xtabs(~ word + understands_or_says, eng_12_long)
                understands_or_says
word             understands understands_says
  a                        8                0
  airplane                26                0
  allgone                 85               11
  also                     3                0
  animal                  19                0
  apple                    2                0
  arms                    33                0
  away                     8                0
  baabaa                  15               20
  baby                    84                9
  babysitter               3                0
  ball                    89               25
  balloon                 30                7
  banana                   2                0
  bath                   109                7
  be                       1                0
  bear                    24                5
  bed                     58                1
  beepbeep                 0                0
  bellybutton              2                0
  bib                     60                0
  bicycle                 17                1
  big                     22                2
  bird                    32                0
  bite                    46                1
  blanket                 37                1
  blow                    29                0
  book                   101               17
  boots                    5                0
  bottle                  78               36
  box                     26                1
  boy                     14                0
  bread                   19                0
  break                    2                0
  broken                   4                0
  broom                   11                1
  brother                 24                8
  brush                   36                1
  bunny                   34                0
  button                  11                1
  bye                     91               57
  cake                    10                1
  candy                    3                0
  car                     59                7
  cat                     49               17
  cereal                  11                1
  chair                   29                0
  cheese                   1                0
  chicken                 24                1
  choo_choo               12                4
  church                   9                0
  clockwatch              17                1
  close                   47                0
  cockadoodledoo          11                2
  comb                    14                0
  cookie                  18                3
  couch                   32                0
  cow                     29                5
  crib                     3                0
  cry                     42                0
  cup                     59                4
  daddy                   38              110
  dance                   80                0
  dark                     9                0
  diaper                  89                3
  dirty                   26                1
  dish                     3                0
  dog                     66               34
  doll                    26                1
  dont                    62                2
  door                    42                2
  draw                     8                0
  drawer                   2                0
  dress                   13                0
  drum                    31                0
  duck                    33                4
  ears                     0                0
  eat                    109                4
  egg                     45                2
  elephant                35                0
  eye                     37                3
  face                     1                0
  fall                    20                0
  family                  19                0
  fast                    15                0
  feed                    25                0
  finger                  37                0
  finish                  23                4
  firetruck               17                0
  flower                  25                0
  foot                    55                0
  for                      4                0
  frog                    22                0
  girl                    11                0
  give                     1                0
  glass                    2                0
  glasses                 38                2
  go                      46                7
  goodmorning             68                0
  grandma                 73               15
  grandpa                 62               16
  hair                    53                1
  hammer                   4                0
  hand                    56                0
  hat                     30                4
  have                    16                1
  head                    43                0
  help                    37                1
  here                    34                1
  hi                      82               62
  hisher                   8                0
  hit                     29                0
  home                    46                0
  horse                   23                0
  hot                     48                4
  how                      0                0
  hurry                    2                0
  hurt                    24                1
  I                       12                1
  icecream                17                0
  in                      59                2
  juice                    4                0
  jump                    26                0
  keys                    38                0
  kick                    22                1
  kiss                    98                1
  kitchen                 31                0
  kitty                   52               13
  lady                     4                0
  lamp                     6                0
  leg                     21                0
  light                   41                5
  lion                    23                1
  look                    77                1
  man                      2                1
  many                     6                0
  me                      16                2
  meat                    10                0
  medicine                19                0
  meow                    43               13
  milk                    93               12
  mine                    27                0
  mommy                   52               99
  money                    4                0
  monkey                  33                0
  moo                      1                0
  moon                    11                2
  more                    73               20
  mouse                    9                0
  mouth                   53                3
  nap                      3                0
  necklace                10                0
  new                      2                0
  night                   33                3
  nightnight              69                9
  none                    12                0
  nose                    52                3
  now                     13                0
  on                      41                3
  onetwothree             39                1
  open                    69                0
  other                    3                0
  ouch                    48                5
  out                     35                1
  outside                 80                0
  pajamas                 42                0
  pants                   33                1
  paper                   17                0
  party                    8                0
  pattycake               45                0
  pen                     14                0
  penguin                 11                0
  picture                 34                0
  pillow                  25                0
  plant                   16                0
  play                    66                1
  please                  32                2
  pretty                  11                1
  purse                    7                0
  push                    34                0
  put                     61                0
  quackquack              21               14
  radio                    1                0
  rain                    10                0
  refrigerator            25                0
  rock                    12                1
  say                     21                0
  scissors                 1                0
  see                     46                0
  shh                     76               10
  shirt                    3                0
  shoe                    59                2
  sing                    30                0
  sink                    12                0
  sister                  19                2
  sit                     61                0
  sky                     22                0
  sleep                   71                0
  smile                   49                1
  soap                    19                0
  sock                    51                3
  soft                    34                0
  some                     5                0
  spoon                   57                0
  squirrel                18                0
  stairs                  50                0
  stop                     4                0
  store                   13                0
  street                   8                0
  stroller                41                0
  sun                     21                1
  swing                    1                0
  table                   27                0
  take                    27                0
  teddybear               30                3
  telephone               48                0
  television              23                0
  thankyou                56                9
  them                     3                0
  there                   26                1
  this                    22                5
  throw                   52                0
  tickle                  49                2
  tiger                   15                2
  tired                   57                0
  toast                    6                0
  today                    4                0
  tomorrow                 3                0
  tongue                  31                0
  tooth                   29                1
  touch                   48                0
  towel                   26                1
  toy                     83                0
  train                   20                1
  trash                   25                1
  tree                    31                5
  truck                   41                2
  turtle                  17                2
  uh_oh                   69               34
  uhoh                     7                2
  vroom                   19               25
  wait                    50                0
  walk                    65                0
  want                    34                0
  wash                    30                0
  water                   95               13
  where                   57                1
  who                     20                1
  window                  34                0
  woofwoof                51               26
  write                    2                0
  yes                     83               13
  yumyum                  65               19
# rcb_color_paired <- RColorBrewer::brewer.pal(12, 'Paired')
# wordcloud::wordcloud(words = word_ct$word, freq = word_ct$n, min.freq = quant_25, colors = rcb_color_paired)

mcdi_viz_wordcloud(word_ct, n_participants = dim(eng_12)[1], quantile = .50)

18-mo-old English speakers

eng_18 <-
  readr::read_csv(
    file.path(here::here(), "data/csv/home_visit/agg/mcdi_english_18_combined.csv"),
    col_types = readr::cols(.default = 'c'),
    show_col_types = FALSE
  )
word_ct <- eng_18 |>
  dplyr::mutate(wet = case_when(!is.na(wet_1) ~ wet_1,
                                !is.na(wet_2) ~ wet_2)) |>
  dplyr::select(-contains("wet_")) |>
  dplyr::mutate(rain = case_when(!is.na(rain_1) ~ rain_1,
                                !is.na(rain_2) ~ rain_2,
                                !is.na(rain_3) ~ rain_3)) |>
  dplyr::select(-contains("rain_")) |>
  dplyr::mutate(leg = case_when(!is.na(leg_1) ~ leg_1,
                                !is.na(leg_2) ~ leg_2)) |>
  dplyr::rename(candy = candy_1) |>
  tidyr::pivot_longer(cols = !(play_id | site_id | subject_number),
                        names_to = "word",
                        values_to = "says") |>
  dplyr::filter(!is.na(says)) |>
  dplyr::filter(says == TRUE) |>
  dplyr::count(word, sort = TRUE)

word_ct
# A tibble: 354 × 2
   word         n
   <chr>    <int>
 1 daddy      136
 2 mommy      133
 3 bye        127
 4 uhoh       122
 5 ball       118
 6 hi         118
 7 no         117
 8 banana     106
 9 woofwoof   106
10 yes        100
# ℹ 344 more rows
#wordcloud::wordcloud(words = word_ct$word, freq = word_ct$n, min.freq = quant_25, colors = rcb_color_paired)
mcdi_viz_wordcloud(word_ct, n_participants = dim(eng_18)[1], quantile = .50)

24-mo-old English speakers

eng_24 <-
  readr::read_csv(
    file.path(here::here(), "data/csv/home_visit/agg/mcdi_english_24_combined.csv"),
    col_types = readr::cols(.default = 'c'),
    show_col_types = FALSE
  )
word_ct <- eng_24 |>
  tidyr::pivot_longer(cols = !(play_id | site_id | subject_number),
                        names_to = "word",
                        values_to = "says") |>
  dplyr::filter(!is.na(says)) |>
  dplyr::filter(says == TRUE) |>
  dplyr::count(word, sort = TRUE)
mcdi_viz_wordcloud(word_ct, n_participants = dim(eng_24)[1], quantile = .50)
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : please could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : rain_1 could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : yucky could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : buttocks could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : telephone could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : bye could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : hair could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : sky could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : where could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : bird could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : up could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : ear could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : eye could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : play could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : rain_2 could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : couch could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : wet_1 could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : brush could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : nightnight could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : big could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : thankyou could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : more could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : icecream could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : drink could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : quackquack could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : egg could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : wash could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : swing could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : box could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : soap could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : sock could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : hot could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : allgone could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : walk could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : yes could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : leg_1 could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : knee could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : diaper could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : foot could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : cookie could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : hug could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : dog could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : bed could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : airplane could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : meow could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : apple could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : truck could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : sun could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : tummy could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : baby could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : paper could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : face could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : woofwoof could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : chair could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : bear could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : tooth could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : plate could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : moon could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : flower could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : grapes could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : bellybutton could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : cracker could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : out could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : cup could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : yumyum could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : mine could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : butterfly could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : tree could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : car could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : pants could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : one could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : door could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : bottle could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : boat could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : head could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : two could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : help could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : open could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : mommy could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : light could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : daddy could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : potty could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : monkey could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : balloon could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : yogurt could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : bathtub could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : ouch could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : shh could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : strawberry could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : orange could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : kiss could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : hi could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : you could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : four could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : horse could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : house could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : park could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : book could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : banana could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : happy could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : duck could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : stairs could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : vroom could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : spoon could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : milk could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : bug could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : towel could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : shoe could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : hat could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : juice could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : letsgo could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : down could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : cat could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : finger could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : pillow could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : this could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : shirt could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : go could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : cold could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : no could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : blanket could not be fit on page. It will not be plotted.
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : here could not be fit on page. It will not be plotted.

Here are some rare words (quantile < 0.20).

rare_word_ct <- word_ct |>
  dplyr::filter(n < dim(eng_24)[1]*.25)
# 
# wordcloud::wordcloud(words = rare_word_ct$word, freq = rare_word_ct$n)
mcdi_viz_wordcloud(rare_word_ct, n_participants = dim(eng_24)[1], quantile = .20)
Warning in wordcloud::wordcloud(words = wd_ct$word, freq = wd_ct$n, min.freq =
my_thresh, : person could not be fit on page. It will not be plotted.

Locomotion

Check for anomalous values

crawl_mos_min <- 4
walk_mos_min <- 6

Anomalous crawling onset

hv |>
  dplyr::select(site_id, participant_ID, crawl_mos) |>
  dplyr::filter(crawl_mos < crawl_mos_min) |>
  kableExtra::kable(format = 'html') |>
  kableExtra::kable_classic()
site_id participant_ID crawl_mos
CHOPH 003 3.72
PRINU 020 -5.69

Anomalous walking onset (KEA criteria)

hv |>
  dplyr::select(site_id, participant_ID, walk_mos_kea) |>
  dplyr::filter(walk_mos_kea < walk_mos_min) |>
  kableExtra::kable(format = 'html') |>
  kableExtra::kable_classic()
site_id participant_ID walk_mos_kea
CSUFL 011 0.76
UMIAM 018 2.76
PRINU 020 -2.93

Anomalous walking onset (WHO criteria)

hv |>
  dplyr::select(site_id, participant_ID, walk_mos_who) |>
  dplyr::filter(walk_mos_who < walk_mos_min) |>
  kableExtra::kable(format = 'html') |>
  kableExtra::kable_classic()
site_id participant_ID walk_mos_who
PRINU 020 -3.29

Crawl onset

hv |>
  dplyr::filter(crawl_mos > crawl_mos_min, !is.na(crawl_mos)) |>
  ggplot() +
  aes(crawl_mos, fill = child_sex) +
  geom_histogram(bins = 12) +
  theme(legend.position = "bottom") +
  theme(legend.title = element_blank())
Figure 10.3: Age of crawling onset (mos) by sex

Walk onset

hv |>
  dplyr::filter(walk_mos_kea > walk_mos_min, !is.na(walk_mos_kea)) |>
  ggplot() +
  aes(walk_mos_kea, fill = child_sex) +
  theme(legend.position="bottom") +
  geom_histogram(bins = 10)

message("Tukey's five number summary (minimum, lower-hinge, median, upper-hinge, maximum): ")
Tukey's five number summary (minimum, lower-hinge, median, upper-hinge, maximum): 
hv$walk_mos_kea |> fivenum()
[1] -2.93 11.70 12.72 14.33 19.00
Figure 10.4: Age (mos) of walking onset (KEA criteria) by sex
hv |>
  dplyr::filter(walk_mos_who > walk_mos_min, !is.na(walk_mos_who)) |>
  ggplot() +
  aes(walk_mos_who, fill = child_sex) +
  geom_histogram(bins=12) +
  theme(legend.position="bottom") +
  theme(legend.title = element_blank())

message("Tukey's five number summary (minimum, lower-hinge, median, upper-hinge, maximum): ")
Tukey's five number summary (minimum, lower-hinge, median, upper-hinge, maximum): 
hv$walk_mos_who |> fivenum()
[1] -3.29 11.11 12.13 13.64 25.08
Figure 10.5: Age (mos) of walking onset (WHO criteria) by sex
filtered_walk_mos <- hv |>
  dplyr::filter(walk_mos_who > walk_mos_min, !is.na(walk_mos_who), 
                walk_mos_kea > walk_mos_min, !is.na(walk_mos_kea)) 

filtered_walk_mos |>
  ggplot() +
  aes(walk_mos_who, walk_mos_kea, color = child_sex) +
  geom_point() +
  geom_smooth(method = "lm") +
  xlim(8, 18) +
  ylim(8, 18) +
  theme(legend.position = "bottom") +
  theme(aspect.ratio = 1) +
  theme(legend.title = element_blank()) -> walk_p

ggExtra::ggMarginal(
  walk_p,
  play_loco,
  walk_mos_who,
  walk_mos_kea,
  type = "density",
  margins = "both",
  groupColour = TRUE,
  groupFill = TRUE
)
`geom_smooth()` using formula = 'y ~ x'
Warning: Removed 9 rows containing non-finite outside the scale range
(`stat_smooth()`).
`geom_smooth()` using formula = 'y ~ x'
Warning: Removed 9 rows containing non-finite outside the scale range
(`stat_smooth()`).
Warning: Removed 9 rows containing missing values or values outside the scale range
(`geom_point()`).
Warning: Removed 1 row containing missing values or values outside the scale range
(`geom_smooth()`).
cor.test(filtered_walk_mos$walk_mos_who, filtered_walk_mos$walk_mos_kea)

    Pearson's product-moment correlation

data:  filtered_walk_mos$walk_mos_who and filtered_walk_mos$walk_mos_kea
t = 53.147, df = 609, p-value < 2.2e-16
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
 0.8918329 0.9201166
sample estimates:
      cor 
0.9069921 
Figure 10.6: Walking onset by WHO vs. KEA criteria
filtered_walk_crawl_mos <- hv |>
  dplyr::filter(crawl_mos > crawl_mos_min, !is.na(crawl_mos), 
                walk_mos_kea > walk_mos_min, !is.na(walk_mos_kea))

filtered_walk_crawl_mos |>
  ggplot() +
  aes(crawl_mos, walk_mos_kea, color = child_sex) +
  geom_point() +
  geom_smooth(method = "lm") +
  theme(legend.position = "bottom") +
  theme(aspect.ratio = 1) +
  theme(legend.title = element_blank()) -> walk_crawl_p

ggExtra::ggMarginal(
  walk_crawl_p,
  filtered_walk_crawl_mos,
  crawl_mos,
  walk_mos_kea,
  type = "density",
  margins = "both",
  groupColour = TRUE,
  groupFill = TRUE
)
`geom_smooth()` using formula = 'y ~ x'
`geom_smooth()` using formula = 'y ~ x'
cor.test(filtered_walk_crawl_mos$crawl_mos, filtered_walk_crawl_mos$walk_mos_kea)

    Pearson's product-moment correlation

data:  filtered_walk_crawl_mos$crawl_mos and filtered_walk_crawl_mos$walk_mos_kea
t = 13.562, df = 581, p-value < 2.2e-16
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
 0.4261284 0.5496800
sample estimates:
     cor 
0.490364 
Figure 10.7: Walking onset vs. Crawling

Health

Feeding

Table 10.1: Breastfeeding by age group
xtabs(formula = ~ age_group + feeding_breastfeed, data = hv)
         feeding_breastfeed
age_group donotknow  no refused yes
     12mo         0  15       0 273
     18mo         1  14       0 276
     24mo         0  10       1 216
hv %>%
  dplyr::select(child_sex, feeding_solidfood_age) |>
  dplyr::filter(feeding_solidfood_age < 12) |>
  ggplot() +
  aes(x = feeding_solidfood_age, color = child_sex, fill = child_sex) +
  geom_histogram(bins = 6) +
  xlab("Introduction of solid foods (mos)") +
  theme(legend.title = element_blank())
Figure 10.8: Age at introduction of solid foods

There are some unlikely values here.

hv |>
  dplyr::select(participant_ID, 
                feeding_solidfood_age) |>
  dplyr::filter(feeding_solidfood_age > 12 | feeding_solidfood_age < 3) %>%
  knitr::kable(format = 'html')
participant_ID feeding_solidfood_age
996 999
006 990
012 990
031 995
001 0
Warning

A preliminary look at feeding_comments shows that there are some names mentioned. So, we do not view them here.

We should consider flagging these in the QA process.

Sleeping position

These data only focus on child_sleeping_position. Other sleeping data are in the screening questionnaire.

Table 10.2: Child sleeping position by age group
xtabs(formula = ~ child_sleeping_position + age_group, data = hv)
                       age_group
child_sleeping_position 12mo 18mo 24mo
           back          265  278  211
           changed         4    3    2
           donotknow       0    1    0
           other           4    1    1
           refused         0    0    1
           side            4    2    6
           sitting         2    0    1
           stomach_down    1    1    2
           stomach_side    8    5    3

Child health

Overall rating

Table 10.3: Parent-report of overall child health
child_health_rating <- hv |>
  # dplyr::select(child_sex, age_group, child_health) |>
  dplyr::filter(!is.na(child_health)) |>
  dplyr::mutate(child_health = factor(child_health,
                                      c("poor",
                                        "fair",
                                        "good",
                                        "verygood",
                                        "excellent",
                                        "donotknow",
                                        "refused"),
                                      ordered = TRUE))

xtabs(formula = ~ child_health + age_group, data = child_health_rating)
            age_group
child_health 12mo 18mo 24mo
   poor         0    0    0
   fair         2    1    1
   good        12   17   15
   verygood    77   67   59
   excellent  197  205  151
   donotknow    0    1    0
   refused      0    0    1

Recent vaccination

Table 10.4
recent_vax <- hv |>
  dplyr::select(child_sex, age_group, child_recent_vaccination) |>
  dplyr::filter(!is.na(child_recent_vaccination))

xtabs(formula = ~ child_recent_vaccination + age_group, data = recent_vax)
                        age_group
child_recent_vaccination 12mo 18mo 24mo
               donotknow    0    2    4
               no         161  199  175
               yes        127   90   48

Seen medical specialist

Table 10.5: Children who have seen a medical specialist
seen_specialist <- hv |>
  dplyr::select(child_sex, age_group, child_medical_specialist) |>
  dplyr::filter(!is.na(child_medical_specialist))

xtabs(formula = ~ child_medical_specialist + age_group, data = seen_specialist)
                        age_group
child_medical_specialist 12mo 18mo 24mo
               donotknow    0    1    2
               no         147  129  101
               refused      0    0    1
               yes        141  161  123
Warning

Manual inspection shows some possible identifying information (names) in child_medical_specialist_comments.

Hearing tested

Table 10.6: Hearing test and context
hearing_tested <- hv |>
  dplyr::select(child_sex, age_group, child_hearing_tested) |>
  dplyr::filter(!is.na(child_hearing_tested))

xtabs(formula = ~ child_hearing_tested + age_group, data = hearing_tested)
                         age_group
child_hearing_tested      12mo 18mo 24mo
  afterhome                  6   16   11
  birthhospital            237  217  156
  birthhospital afterhome   35   46   44
  birthhospital donotknow    1    1    1
  donotknow                  1    5    6
  no                         8    6    8
  refused                    0    0    1

Vision tested

Table 10.7: Vision test and context
vision_tested <- hv |>
  dplyr::select(child_sex, age_group, child_vision_tested) |>
  dplyr::filter(!is.na(child_vision_tested))

xtabs(formula = ~ child_vision_tested + age_group, data = vision_tested)
                         age_group
child_vision_tested       12mo 18mo 24mo
  afterhome                 46   53   47
  afterhome donotknow        0    1    0
  birthhospital             70   76   56
  birthhospital afterhome   25   32   29
  birthhospital donotknow    1    1    1
  donotknow                 37   39   26
  no                       108   87   65
  no donotknow               1    2    2
  refused                    0    0    1

Illnesses and allergies

illness_allergy <- hv |>
  dplyr::select(child_sex, age_group, contains(c("allergies", "ear_infection", 
                                                 "asthma",
                                                 "respiratory",
                                                 "gastrointestinal")))

illness_allergy |>
  tidyr::pivot_longer(!c('child_sex', 'age_group'),
                      names_to = "type",
                      values_to = "response") |>
  dplyr::filter(!is.na(response)) |>
  dplyr::mutate(response = factor(response,
                                  c("no", "yes", "donotknow", "refused"))) |>
  ggplot() +
  aes(x = response, fill = child_sex) +
  geom_bar() +
  facet_grid(cols = vars(type), rows = vars(age_group)) +
  scale_x_discrete(guide = guide_axis(angle = 90)) +
  xlab("") +
  theme(legend.position = "bottom", legend.title = element_blank())
Figure 10.9: Parent reports of child illnesses or allergies.

Injuries

Table 10.8: Child injuries
xtabs(formula = ~ child_injury_times + age_group, data = hv)
                  age_group
child_injury_times 12mo 18mo 24mo
         donotknow    1    2    1
         never      261  251  164
         once        20   31   52
         refused      0    0    1
         threemore    3    0    1
         twice        3    7    8

Mom health

Smoking & drinking

Table 10.9: Smoking or drinking during pregancy
smoking_drinking <- hv |>
  dplyr::select(age_group,
    child_sex,
    contains("smoking"),
    contains("drinking")
  )

xtabs(formula = ~ mom_pregnant_smoking + mom_pregnant_drinking, smoking_drinking)
                    mom_pregnant_drinking
mom_pregnant_smoking donotknow  no refused yes
           donotknow         2   1       0   0
           no                0 665       1 130
           refused           0   0       1   0
           yes               0   1       0   2
xtabs(formula = ~ smoking_house + smoking_car, smoking_drinking)
             smoking_car
smoking_house donotknow  no refused yes
    donotknow         1   1       0   0
    no                1 782       0   3
    refused           0   4       1   0
    yes               0  10       0   3
Warning

The following may contain identifiable data.

Table 10.10
smoking_drinking |>
  dplyr::select(smoking_comments) |>
  dplyr::filter(!is.na(smoking_comments)) |>
  knitr::kable(format = 'html') |>
  kableExtra::kable_classic()
Table 10.11: Smoking currently
xtabs(formula = ~ mom_smoking_now, smoking_drinking)
mom_smoking_now
donotknow        no   refused       yes 
        1       797         4         4 
Table 10.12: Amount if smoking currently
smoking_drinking$mom_smoking_now_amount[!is.na(smoking_drinking$mom_smoking_now_amount)]
[1]  4  3  1 10
Warning

The following may contain identifiable data.

Table 10.13: Drinking comments
smoking_drinking |>
  dplyr::select(mom_drinking_comments) |>
  dplyr::filter(!is.na(mom_drinking_comments)) |>
  knitr::kable(format = 'html') |>
  kableExtra::kable_classic()

Patient Health Questionnaire (PHQ-4)

phq4 <- hv |>
  dplyr::select(child_sex, age_group, contains("phq4_")) |>
  dplyr::select(-contains("comments"))

names(phq4) <- gsub(pattern = "phq4_", replacement = "", names(phq4))

phq4 |>
  tidyr::pivot_longer(!c('child_sex', 'age_group'),
                      names_to = "question",
                      values_to = "response") |>
  dplyr::filter(!is.na(response)) |>
  dplyr::mutate(response = factor(
    response,
    c("notatall", "severaldays", "morethanhalf", "nearly")
  ), ordered = TRUE) |>
  ggplot() +
  aes(x = response, fill = child_sex) +
  geom_bar() +
  facet_grid(cols = vars(question), rows = vars(age_group)) +
  scale_x_discrete(guide = guide_axis(angle = 90)) +
  xlab("") +
  theme(legend.position = "bottom", legend.title = element_blank())
Figure 10.10: PHQ4 responses by age group and child sex

Rothbart ECBQ

The next section provides visualizations of the Rothbart Early Childhood Behavior Questionnaire (ECBQ) data related to child temperament.

ecbq <- hv |>
  dplyr::select(child_sex, age_group, contains("rothbart"))

ecbq_complete <- ecbq |>
  tidyr::complete() |>
  dplyr::select(-comments_rothbart)

ecbq_vars <- names(ecbq)[stringr::str_detect(names(ecbq_complete),"rothbart_")]
# Drop comments
ecbq_vars <- ecbq_vars[!stringr::str_detect(ecbq_vars, "comments_rothbart")]

# Read questions CSV
ecbq_qs_all <- readr::read_csv(file = file.path(here::here(), "data/csv/_meta", "ecbq_questions.csv"), show_col_types = FALSE)

# Make questions data frame
ecbq_qs_df <- ecbq_qs_all |>
  dplyr::mutate(var_name = ecbq_vars)

Define helper functions.

# Helper function to retrieve long question given short variable name
retrieve_long_q <- function(this_var= "rothbart_unfamiliarperson", data_dict = ecbq_qs_df) {
  assertthat::is.string(this_var)
  data_dict |>
    filter(var_name == this_var) |>
    select(question) |>
    as.character()
}

# Helper plot function
my_ecbq_plot <- function(var_lbl = "rothbart_unfamiliarperson", df) {
  stopifnot(is.data.frame(df))
  stopifnot(is.character(var_lbl))
  
  df <- df |> dplyr::select(child_sex, age_group, {{ var_lbl }})
  
  df <- df |>
    dplyr::filter(!is.na(.data[[var_lbl]])) |>
    dplyr::mutate(rating = factor(
      .data[[var_lbl]],
      c(
        "never",
        "veryrarely",
        "lessthanhalf",
        "abouthalf",
        "morethanhalf",
        "almostalways",
        "always"
      ),
      ordered = TRUE
    ))
  
  ggplot(df) +
    aes(x = rating, fill = child_sex) +
    geom_bar() +
    facet_grid(cols = vars(age_group), rows = vars(child_sex)) +
    # https://stackoverflow.com/questions/1330989/rotating-and-spacing-axis-labels-in-ggplot2
    scale_x_discrete(guide = guide_axis(angle = 90)) +
    theme(legend.position = "none") +
    ggtitle(paste0("Ratings of '", {{var_lbl}}, "'")) +
    xlab("")
}

# Helper chunk function
return_section <- function(var, data) {
  chunk_hdr <- knitr::knit_expand(text = c("### Responses for: `{this_var}`", "\n"),
                                  this_var = var)
  
  # Build fig.cap from ground up
  fig_name <- paste0("fig-dist-", var)
  fig_cap <- paste0("'Distribution of responses to `", var, "`'")
  fig_caption <- paste0("fig.cap = ", fig_cap)
  
  plot_chunk_hdr <- paste0("```{r ",
                           fig_name,
                           ", echo = FALSE, warning = FALSE, ",
                           fig_caption,
                           "}")
  
  plot_chunk <- c(plot_chunk_hdr, "print(my_ecbq_plot(var, data))", "```")
  
  question_long <-
    paste0("\n**Q**: '", retrieve_long_q(var), "'", "\n")
  
  knitr::knit_child(
    text = c(chunk_hdr, question_long, plot_chunk),
    envir = environment(),
    quiet = TRUE
  )
}
these_vars <- names(df)

res <- invisible(lapply(ecbq_vars, return_section, data = ecbq_complete))
cat(unlist(res), sep = "\n")

Responses for: rothbart_unfamiliarperson

Q: ‘When approached by an unfamiliar person in a public space (for example, the grocery store), how often did your child cling to a parent?’

Figure 10.11: Distribution of responses to rothbart_unfamiliarperson

Responses for: rothbart_troubletask

Q: ‘While having trouble completing a task (e.g. building, drawing, dressing), how often did your child get easily irritated?’

Figure 10.12: Distribution of responses to rothbart_troubletask

Responses for: rothbart_companyofchild

Q: ‘When a familiar child came to your home, how often did your child seek out the company of the child?’

Figure 10.13: Distribution of responses to rothbart_companyofchild

Responses for: rothbart_choiceactivities

Q: ‘When offered a choice of activities, how often did your child decide what to do very quickly and go for it?’

Figure 10.14: Distribution of responses to rothbart_choiceactivities

Responses for: rothbart_quietlysung

Q: ‘During daily or evening quiet time with you and your child, how often did your child enjoy just being quietly sung to?’

Figure 10.15: Distribution of responses to rothbart_quietlysung

Responses for: rothbart_playingoutdoors

Q: ‘While playing outdoors, how often did your child choose to take chances for the fun and excitement of it?’

Figure 10.16: Distribution of responses to rothbart_playingoutdoors

Responses for: rothbart_morethan10

Q: ‘While engaged in play with his/her favorite toy, how often did your child play for more than 10 minutes?’

Figure 10.17: Distribution of responses to rothbart_morethan10

Responses for: rothbart_respondingremarks

Q: ‘While engaged in play with his/her favorite toy, how often did your child continue to play while at the same time responding to your remarks or questions?’

Figure 10.18: Distribution of responses to rothbart_respondingremarks

Responses for: rothbart_excitedlovedadults

Q: ‘When told that loved adults would visit, how often did your child get very excited?’

Figure 10.19: Distribution of responses to rothbart_excitedlovedadults

Responses for: rothbart_fiddlehair

Q: ‘During quiet activities, such as reading a story, how often did your child fiddle with his/her hair, clothing, etc.?’

Figure 10.20: Distribution of responses to rothbart_fiddlehair

Responses for: rothbart_roughrowdy

Q: ‘While playing indoors, how often did your child like rough and rowdy games?’

Figure 10.21: Distribution of responses to rothbart_roughrowdy

Responses for: rothbart_rockedhugged

Q: ‘When being gently rocked or hugged, how often did your child seem eager to get away?’

Figure 10.22: Distribution of responses to rothbart_rockedhugged

Responses for: rothbart_involvednewactivity

Q: ‘When encountering a new activity, how often did your child get involved immediately?’

Figure 10.23: Distribution of responses to rothbart_involvednewactivity

Responses for: rothbart_tirequickly

Q: ‘When engaged in an activity requiring attention, such as building with blocks, how often did your child tire of the activity relatively quickly?’

Figure 10.24: Distribution of responses to rothbart_tirequickly

Responses for: rothbart_callattention

Q: ‘During everyday activities, how often did your child pay attention to you right away when you called to him/her?’

Figure 10.25: Distribution of responses to rothbart_callattention

Responses for: rothbart_tags

Q: ‘During everyday activities, how often did your child seem to be irritated by tags in his/her clothes?’

Figure 10.26: Distribution of responses to rothbart_tags

Responses for: rothbart_noisyenvironment

Q: ‘During everyday activities, how often did your child become bothered by sound while in a noisy environment?’

Figure 10.27: Distribution of responses to rothbart_noisyenvironment

Responses for: rothbart_energy

Q: ‘During everyday activities, how often did your child seem full of energy, even in the evening?’

Figure 10.28: Distribution of responses to rothbart_energy

Responses for: rothbart_vehicles

Q: ‘While in a public place, how often did your child seem afraid of large, noisy vehicles?’

Figure 10.29: Distribution of responses to rothbart_vehicles

Responses for: rothbart_active

Q: ‘When playing outdoors with other children, how often did your child seem to be one of the most active children?’

Figure 10.30: Distribution of responses to rothbart_active

Responses for: rothbart_forbidden

Q: ‘When told no, how often did your child stop the forbidden activity?’

Figure 10.31: Distribution of responses to rothbart_forbidden

Responses for: rothbart_sadlytearful

Q: ‘When told no, how often did your child become sadly tearful?’

Figure 10.32: Distribution of responses to rothbart_sadlytearful

Responses for: rothbart_downblue

Q: ‘Following an exciting activity or event, how often did your child seem to feel down or blue?’

Figure 10.33: Distribution of responses to rothbart_downblue

Responses for: rothbart_runhouse

Q: ‘When playing indoors, how often did your child run through the house?’

Figure 10.34: Distribution of responses to rothbart_runhouse

Responses for: rothbart_excitingevent

Q: ‘Before an exciting event (such as receiving a new toy), how often did your child get very excited about getting it?’

Figure 10.35: Distribution of responses to rothbart_excitingevent

Responses for: rothbart_tempertantrum

Q: ‘When he/she asked for something and you said no, how often did your child have a temper tantrum?’

Figure 10.36: Distribution of responses to rothbart_tempertantrum

Responses for: rothbart_waitpatiently

Q: ‘When asked to wait for a desirable item (such as ice cream), how often did your child wait patiently?’

Figure 10.37: Distribution of responses to rothbart_waitpatiently

Responses for: rothbart_rockedsmile

Q: ‘When being gently rocked, how often did your child smile?’

Figure 10.38: Distribution of responses to rothbart_rockedsmile

Responses for: rothbart_mold

Q: ‘While being held on your lap, how often did your child mold to your body?’

Figure 10.39: Distribution of responses to rothbart_mold

Responses for: rothbart_interactadult

Q: ‘When a familiar adult, such as a relative or a friend, visited your home, how often did your child want to interact with the adult?’

Figure 10.40: Distribution of responses to rothbart_interactadult

Responses for: rothbart_careful

Q: ‘When asked to do so, how often was your child able to be careful with something breakable?’

Figure 10.41: Distribution of responses to rothbart_careful

Responses for: rothbart_enternewplace

Q: ‘When visiting a new place, how often did your child not want to enter?’

Figure 10.42: Distribution of responses to rothbart_enternewplace

Responses for: rothbart_crymorethan3

Q: ‘When he/she was upset, how often did your child cry for more than 3 minutes, even when being comforted?’

Figure 10.43: Distribution of responses to rothbart_crymorethan3

Responses for: rothbart_easilysoothed

Q: ‘When he/she was upset, how often did your child become easily soothed?’

Figure 10.44: Distribution of responses to rothbart_easilysoothed

Responses for: rothbart_busyother

Q: ‘When you were busy, how often did your child find another activity to do when asked?’

Figure 10.45: Distribution of responses to rothbart_busyother

Responses for: rothbart_differentpeople

Q: ‘When around large gatherings of familiar adults or children, how often did your child enjoy playing with a number of different people?’

Figure 10.46: Distribution of responses to rothbart_differentpeople

Comments

Warning

Manual inspection shows that the comments field has some names. We omit printing the comments here until we can be assured that there is no identifiying information in the comments.

ecbq |>
  dplyr::select(comments_rothbart) |>
  dplyr::filter(!is.na(comments_rothbart)) |>
  kableExtra::kable(format = 'html') |>
  kableExtra::kable_classic()

Media use

Home technology

Table 10.14: Use of TV at home
xtabs(formula = ~ mediause.home_technology.tv, hv)
mediause.home_technology.tv
FALSE  TRUE 
   24   779 
Table 10.15: Use of DVD at home
xtabs(formula = ~ mediause.home_technology.dvd, hv)
mediause.home_technology.dvd
FALSE  TRUE 
  529   274 
Table 10.16: Use of computer at home
xtabs(formula = ~ mediause.home_technology.computer, hv)
mediause.home_technology.computer
FALSE  TRUE 
   31   772 
Table 10.17: Use of iPad/tablet at home
xtabs(formula = ~ mediause.home_technology.ipad, hv)
mediause.home_technology.ipad
FALSE  TRUE 
  210   593 
Table 10.18: Use of educational games at home
xtabs(formula = ~ mediause.home_technology.educationalgame, hv)
mediause.home_technology.educationalgame
FALSE  TRUE 
  620   183 
Table 10.19: Use of video games at home
xtabs(formula = ~ mediause.home_technology.videogame, hv)
mediause.home_technology.videogame
FALSE  TRUE 
  330   473 

Child TV

Table 10.20: Use of TV by child
xtabs(formula = ~ mediause_technology_child_tv, hv)
mediause_technology_child_tv
 no yes 
113 664 
Warning

The following may contain identifiable data.

Table 10.21
hv |>
  dplyr::select(mediause_tv_how) |>
  dplyr::filter(!is.na(mediause_tv_how)) |>
  kableExtra::kable(format = 'html') |>
  kableExtra::kable_classic()

Child DVD

Table 10.22: Use of DVD by child
xtabs(formula = ~ mediause_technology_child_dvd, hv)
mediause_technology_child_dvd
 no yes 
234  40 
Warning

The following may contain identifiable data.

Table 10.23
hv |>
  dplyr::select(mediause_dvd_how) |>
  dplyr::filter(!is.na(mediause_dvd_how)) |>
  kableExtra::kable(format = 'html') |>
  kableExtra::kable_classic()

Child computer

Table 10.24: Use of computer by child
xtabs(formula = ~ mediause_technology_child_computer, hv)
mediause_technology_child_computer
 no yes 
551 220 
Warning

The following may contain identifiable data.

Table 10.25
hv |>
  dplyr::select(mediause_computer_how) |>
  dplyr::filter(!is.na(mediause_computer_how)) |>
  kableExtra::kable(format = 'html') |>
  kableExtra::kable_classic()

Child iPad

Table 10.26: Use of iPad/tablet by child
xtabs(formula = ~ mediause_technology_child_ipad, hv)
mediause_technology_child_ipad
 no yes 
328 265 
Warning

The following may contain identifiable data.

Table 10.27
hv |>
  dplyr::select(mediause_ipad_how) |>
  dplyr::filter(!is.na(mediause_ipad_how)) |>
  kableExtra::kable(format = 'html') |>
  kableExtra::kable_classic()

Child educational

Table 10.28: Use of educational games by child
xtabs(formula = ~ mediause_technology_child_educational, hv)
mediause_technology_child_educational
 no yes 
 54 129 
Warning

The following may contain identifiable data.

Table 10.29
hv |>
  dplyr::select(mediause_educational_how) |>
  dplyr::filter(!is.na(mediause_educational_how)) |>
  kableExtra::kable(format = 'html') |>
  kableExtra::kable_classic()

Child videogame

Table 10.30: Use of video games by child
xtabs(formula = ~ mediause_technology_child_videogame, hv)
mediause_technology_child_videogame
 no yes 
406  67 
Warning

The following may contain identifiable data.

Table 10.31
hv |>
  dplyr::select(mediause_videogame_how) |>
  dplyr::filter(!is.na(mediause_videogame_how)) |>
  kableExtra::kable(format = 'html') |>
  kableExtra::kable_classic()

TV hrs/day

Warning

The following may contain identifiable data.

Moreover, this is a free-text field that requires further processing to be visualized.

Table 10.32
hv |>
  dplyr::select(mediause_tv_hrs_per_day) |>
  dplyr::filter(!is.na(mediause_tv_hrs_per_day)) |>
  kableExtra::kable(format = 'html') |>
  kableExtra::kable_classic()

Use meals

Table 10.33: Use of technology at meals
xtabs(formula = ~ mediause_techuse_meals, hv)
mediause_techuse_meals
       likely       neutral   neverdothis notverylikely    verylikely 
          128           102           132           384            57 

Use playtime

Table 10.34: Use of technology at playtime
xtabs(formula = ~ mediause_techuse_playtime, hv)
mediause_techuse_playtime
       likely       neutral   neverdothis notverylikely    verylikely 
          269           247            23           217            47 

Use bedtime

Table 10.35: Use of technology at bedtime
xtabs(formula = ~ mediause_techuse_bedtime, hv)
mediause_techuse_bedtime
       likely       neutral   neverdothis notverylikely    verylikely 
           50            48           440           234            28 

Use transportation

Table 10.36: Use of technology during transportation
xtabs(formula = ~ mediause_techuse_transportation, hv)
mediause_techuse_transportation
       likely       neutral   neverdothis notverylikely    verylikely 
          112            75           358           222            33 

Media use comments

Warning

The following may contain identifiable data.

Table 10.37
hv |>
  dplyr::select(mediause_comments) |>
  dplyr::filter(!is.na(mediause_comments)) |>
  kableExtra::kable(format = 'html') |>
  kableExtra::kable_classic()

Pets

Table 10.38: Pets at home
xtabs(formula = ~ pets_at_home, hv)
pets_at_home
 no yes 
290 514 
hv$pets_types_number[!is.na(hv$pets_types_number)] |> head(20)
 [1] "1 dog"                                                                                                    
 [2] "1 cat"                                                                                                    
 [3] "1 Turtle"                                                                                                 
 [4] "2 dogs"                                                                                                   
 [5] "2 dogs"                                                                                                   
 [6] "2 pugs and 2 fish"                                                                                        
 [7] "1 cat"                                                                                                    
 [8] "2 Dogs"                                                                                                   
 [9] "1 dog"                                                                                                    
[10] "3 cats"                                                                                                   
[11] "2 Cats, 1 bearded dragon, 1 snake, 1 tarantula and 1 frog - (just had a fish but it recently passed away)"
[12] "2 cats"                                                                                                   
[13] "7 rabbits"                                                                                                
[14] "2 cats"                                                                                                   
[15] "1 dog"                                                                                                    
[16] "3 dogs"                                                                                                   
[17] "1 dog, 1 cat"                                                                                             
[18] "2 dogs"                                                                                                   
[19] "1 dog, 1 cat"                                                                                             
[20] "1 cat"                                                                                                    

These data need further cleaning to be visualized properly.

hv_pets <- hv |>
  dplyr::mutate(dogs = stringr::str_detect(pets_types_number, "[dD]og"),
                cats = stringr::str_detect(pets_types_number, "[cC]at"))
Table 10.39: Dogs and/or cats
xtabs(formula = ~ dogs + cats, hv_pets)
       cats
dogs    FALSE TRUE
  FALSE    20  141
  TRUE    270   82
Table 10.40: Pets indoors or out
xtabs(formula = ~ pets_indoors_outdoors, hv)
pets_indoors_outdoors
 indoors outdoors 
     484       28 
Warning

There are some identifiable elements in the comments_pets field.

Table 10.41
hv |>
  dplyr::select(comments_pets) |>
  dplyr::filter(!is.na(comments_pets)) |>
  knitr::kable(format = 'html') |>
  kableExtra::kable_classic()

Division of Labor

div_labor_levels <- c(0:4)
div_labor_lbls <- c("Never", "Some of the time", "About half the time", "Most of the time", "All of the time")
source("../R/div_labor_plot.R")

Laundry

div_labor_plot("laundry_self", hv)
# hv |>
#   dplyr::mutate(
#     laundry_self = factor(
#       laundry_self,
#       levels = div_labor_levels,
#       labels = div_labor_lbls,
#       ordered = TRUE
#     )
#   ) |>
#   ggplot() +
#   aes(x = laundry_self, color = child_sex, fill = child_sex) +
#   geom_bar() +
#   facet_grid(cols = vars(age_group), rows = vars(child_sex)) +
#   theme(legend.title = element_blank(),
#         legend.position = "none") +
#   theme(axis.text.x = element_text(angle = 90))
Figure 10.47: Laundry self
div_labor_plot("laundry_partner", hv)
# hv |>
#   dplyr::mutate(
#     laundry_partner = factor(
#       laundry_partner,
#       levels = div_labor_levels,
#       labels = div_labor_lbls,
#       ordered = TRUE
#     )
#   ) |>
#   ggplot() +
#   aes(x = laundry_partner, color = child_sex, fill = child_sex) +
#   geom_bar() +
#   facet_grid(cols = vars(age_group), rows = vars(child_sex)) +
#   theme(legend.title = element_blank(),
#         legend.position = "none") +
#   theme(axis.text.x = element_text(angle = 90))
Figure 10.48: Laundry partner
div_labor_plot("laundry_otherperson", hv)
# hv |>
#   dplyr::mutate(
#     laundry_otherperson = factor(
#       laundry_otherperson,
#       levels = div_labor_levels,
#       labels = div_labor_lbls,
#       ordered = TRUE
#     )
#   ) |>
#   ggplot() +
#   aes(x = laundry_otherperson, color = child_sex, fill = child_sex) +
#   geom_bar() +
#   facet_grid(cols = vars(age_group), rows = vars(child_sex)) +
#   theme(legend.title = element_blank(),
#         legend.position = "none") +
#   theme(axis.text.x = element_text(angle = 90))
Figure 10.49: Laundry other person
div_labor_plot_by_person("laundry", hv)
Figure 10.50
Warning

There may be identifiable elements in the next field, so we do not render it.

Table 10.42
hv |>
  dplyr::select(labor_laundry_otherperson) |>
  dplyr::filter(!is.na(labor_laundry_otherperson)) |>
  kableExtra::kable(format = 'html') |>
    kableExtra::kable_classic()

Cleaning

div_labor_plot("cleaning_self", hv)
# hv |>
#   dplyr::mutate(
#     cleaning_self = factor(
#       cleaning_self,
#       levels = div_labor_levels,
#       labels = div_labor_lbls,
#       ordered = TRUE
#     )
#   ) |>
#   ggplot() +
#   aes(x = cleaning_self, color = child_sex, fill = child_sex) +
#   geom_bar() +
#   facet_grid(cols = vars(age_group), rows = vars(child_sex)) +
#   theme(legend.title = element_blank(),
#         legend.position = "none") +
#   theme(axis.text.x = element_text(angle = 90))
Figure 10.51: Cleaning self
div_labor_plot("cleaning_partner", hv)
# hv |>
#   dplyr::mutate(
#     cleaning_partner = factor(
#       cleaning_partner,
#       levels = div_labor_levels,
#       labels = div_labor_lbls,
#       ordered = TRUE
#     )
#   ) |>
#   ggplot() +
#   aes(x = cleaning_partner, color = child_sex, fill = child_sex) +
#   geom_bar() +
#   facet_grid(cols = vars(age_group), rows = vars(child_sex)) +
#   theme(legend.title = element_blank(),
#         legend.position = "none") +
#   theme(axis.text.x = element_text(angle = 90))
Figure 10.52: Cleaning partner
div_labor_plot("cleaning_otherperson", hv)
# hv |>
#   dplyr::mutate(
#     cleaning_otherperson = factor(
#       cleaning_otherperson,
#       levels = div_labor_levels,
#       labels = div_labor_lbls,
#       ordered = TRUE
#     )
#   ) |>
#   ggplot() +
#   aes(x = cleaning_otherperson, color = child_sex, fill = child_sex) +
#   geom_bar() +
#   facet_grid(cols = vars(age_group), rows = vars(child_sex)) +
#   theme(legend.title = element_blank(),
#         legend.position = "none") +
#   theme(axis.text.x = element_text(angle = 90))
Figure 10.53: Cleaning other person
div_labor_plot_by_person("cleaning", hv)
Figure 10.54
Warning

There may be identifiable elements in the next field, so we do not render it.

Table 10.43
hv |>
  dplyr::select(labor_cleaning_otherperson) |>
  dplyr::filter(!is.na(labor_cleaning_otherperson)) |>
  kableExtra::kable(format = 'html') |>
    kableExtra::kable_classic()

Dishes

div_labor_plot("dishes_self", hv)

# hv |>
#   dplyr::mutate(
#     dishes_self = factor(
#       dishes_self,
#       levels = div_labor_levels,
#       labels = div_labor_lbls,
#       ordered = TRUE
#     )
#   ) |>
#   ggplot() +
#   aes(x = dishes_self, color = child_sex, fill = child_sex) +
#   geom_bar() +
#   facet_grid(cols = vars(age_group), rows = vars(child_sex)) +
#   theme(legend.title = element_blank(),
#         legend.position = "none") +
#   theme(axis.text.x = element_text(angle = 90))
Figure 10.55: Dishes self
div_labor_plot("dishes_partner", hv)
# hv |>
#   dplyr::mutate(
#     dishes_partner = factor(
#       dishes_partner,
#       levels = div_labor_levels,
#       labels = div_labor_lbls,
#       ordered = TRUE
#     )
#   ) |>
#   ggplot() +
#   aes(x = dishes_partner, color = child_sex, fill = child_sex) +
#   geom_bar() +
#   facet_grid(cols = vars(age_group), rows = vars(child_sex)) +
#   theme(legend.title = element_blank(),
#         legend.position = "none") +
#   theme(axis.text.x = element_text(angle = 90))
Figure 10.56: Dishes partner
div_labor_plot("dishes_otherperson", hv)
# hv |>
#   dplyr::mutate(
#     dishes_otherperson = factor(
#       dishes_otherperson,
#       levels = div_labor_levels,
#       labels = div_labor_lbls,
#       ordered = TRUE
#     )
#   ) |>
#   ggplot() +
#   aes(x = dishes_otherperson, color = child_sex, fill = child_sex) +
#   geom_bar() +
#   facet_grid(cols = vars(age_group), rows = vars(child_sex)) +
#   theme(legend.title = element_blank(),
#         legend.position = "none") +
#   theme(axis.text.x = element_text(angle = 90))
Figure 10.57: Dishes other person
div_labor_plot_by_person("dishes", hv)
Figure 10.58
Warning

There may be identifiable elements in the next field, so we do not render it.

Table 10.44
hv |>
  dplyr::select(labor_dishes_otherperson) |>
  dplyr::filter(!is.na(labor_dishes_otherperson)) |>
  kableExtra::kable(format = 'html') |>
    kableExtra::kable_classic()

Cooking

div_labor_plot("cooking_self", hv)
# hv |>
#   dplyr::mutate(
#     cooking_self = factor(
#       cooking_self,
#       levels = div_labor_levels,
#       labels = div_labor_lbls,
#       ordered = TRUE
#     )
#   ) |>
#   ggplot() +
#   aes(x = cooking_self, color = child_sex, fill = child_sex) +
#   geom_bar() +
#   facet_grid(cols = vars(age_group), rows = vars(child_sex)) +
#   theme(legend.title = element_blank(),
#         legend.position = "none") +
#   theme(axis.text.x = element_text(angle = 90))
Figure 10.59: Cooking self
div_labor_plot("cooking_partner", hv)
# hv |>
#   dplyr::mutate(
#     cooking_partner = factor(
#       cooking_partner,
#       levels = div_labor_levels,
#       labels = div_labor_lbls,
#       ordered = TRUE
#     )
#   ) |>
#   ggplot() +
#   aes(x = cooking_partner, color = child_sex, fill = child_sex) +
#   geom_bar() +
#   facet_grid(cols = vars(age_group), rows = vars(child_sex)) +
#   theme(legend.title = element_blank(),
#         legend.position = "none") +
#   theme(axis.text.x = element_text(angle = 90))
Figure 10.60: Cooking partner
div_labor_plot("cooking_otherperson", hv)
# hv |>
#   dplyr::mutate(
#     cooking_otherperson = factor(
#       cooking_otherperson,
#       levels = div_labor_levels,
#       labels = div_labor_lbls,
#       ordered = TRUE
#     )
#   ) |>
#   ggplot() +
#   aes(x = cooking_otherperson, color = child_sex, fill = child_sex) +
#   geom_bar() +
#   facet_grid(cols = vars(age_group), rows = vars(child_sex)) +
#   theme(legend.title = element_blank(),
#         legend.position = "none") +
#   theme(axis.text.x = element_text(angle = 90))
Figure 10.61: Cooking other person
div_labor_plot_by_person("cooking", hv)
Figure 10.62
Warning

There may be identifiable elements in the next field, so we do not render it.

Table 10.45
hv |>
  dplyr::select(labor_cooking_otherperson) |>
  dplyr::filter(!is.na(labor_cooking_otherperson)) |>
  kableExtra::kable(format = 'html') |>
    kableExtra::kable_classic()

Feeding

div_labor_plot("feeding_self", hv)

# hv |>
#   dplyr::mutate(
#     feeding_self = factor(
#       feeding_self,
#       levels = div_labor_levels,
#       labels = div_labor_lbls,
#       ordered = TRUE
#     )
#   ) |>
#   ggplot() +
#   aes(x = feeding_self, color = child_sex, fill = child_sex) +
#   geom_bar() +
#   facet_grid(cols = vars(age_group), rows = vars(child_sex)) +
#   theme(legend.title = element_blank(),
#         legend.position = "none") +
#   theme(axis.text.x = element_text(angle = 90))
Figure 10.63: Feeding self
div_labor_plot("feeding_partner", hv)
# hv |>
#   dplyr::mutate(
#     feeding_partner = factor(
#       feeding_partner,
#       levels = div_labor_levels,
#       labels = div_labor_lbls,
#       ordered = TRUE
#     )
#   ) |>
#   ggplot() +
#   aes(x = feeding_partner, color = child_sex, fill = child_sex) +
#   geom_bar() +
#   facet_grid(cols = vars(age_group), rows = vars(child_sex)) +
#   theme(legend.title = element_blank(),
#         legend.position = "none") +
#   theme(axis.text.x = element_text(angle = 90))
Figure 10.64: Feeding partner
div_labor_plot("feeding_otherperson", hv)

# hv |>
#   dplyr::mutate(
#     feeding_otherperson = factor(
#       feeding_otherperson,
#       levels = div_labor_levels,
#       labels = div_labor_lbls,
#       ordered = TRUE
#     )
#   ) |>
#   ggplot() +
#   aes(x = feeding_otherperson, color = child_sex, fill = child_sex) +
#   geom_bar() +
#   facet_grid(cols = vars(age_group), rows = vars(child_sex)) +
#   theme(legend.title = element_blank(),
#         legend.position = "none") +
#   theme(axis.text.x = element_text(angle = 90))
Figure 10.65: Feeding other person
Warning

The call to div_labor_plot_by_person() fails with “feeding” because that string is found in other non-division-of-labor variables.

div_labor_plot_by_person("feeding", hv)
Warning

There may be identifiable elements in the next field, so we do not render it.

Table 10.46
hv |>
  dplyr::select(labor_feeding_otherperson) |>
  dplyr::filter(!is.na(labor_feeding_otherperson)) |>
  kableExtra::kable(format = 'html') |>
    kableExtra::kable_classic()

Drop-off/pick-up

div_labor_plot("droppick_self", hv)

# hv |>
#   dplyr::mutate(
#     droppick_self = factor(
#       droppick_self,
#       levels = div_labor_levels,
#       labels = div_labor_lbls,
#       ordered = TRUE
#     )
#   ) |>
#   ggplot() +
#   aes(x = droppick_self, color = child_sex, fill = child_sex) +
#   geom_bar() +
#   facet_grid(cols = vars(age_group), rows = vars(child_sex)) +
#   theme(legend.title = element_blank(),
#         legend.position = "none") +
#   theme(axis.text.x = element_text(angle = 90))
Figure 10.66: Drop-off/pick-up self
div_labor_plot("droppick_partner", hv)

# hv |>
#   dplyr::mutate(
#     droppick_partner = factor(
#       droppick_partner,
#       levels = div_labor_levels,
#       labels = div_labor_lbls,
#       ordered = TRUE
#     )
#   ) |>
#   ggplot() +
#   aes(x = droppick_partner, color = child_sex, fill = child_sex) +
#   geom_bar() +
#   facet_grid(cols = vars(age_group), rows = vars(child_sex)) +
#   theme(legend.title = element_blank(),
#         legend.position = "none") +
#   theme(axis.text.x = element_text(angle = 90))
Figure 10.67: Drop-off/pick-up partner
div_labor_plot("droppick_otherperson", hv)
# hv |>
#   dplyr::mutate(
#     droppick_otherperson = factor(
#       droppick_otherperson,
#       levels = div_labor_levels,
#       labels = div_labor_lbls,
#       ordered = TRUE
#     )
#   ) |>
#   ggplot() +
#   aes(x = droppick_otherperson, color = child_sex, fill = child_sex) +
#   geom_bar() +
#   facet_grid(cols = vars(age_group), rows = vars(child_sex)) +
#   theme(legend.title = element_blank(),
#         legend.position = "none") +
#   theme(axis.text.x = element_text(angle = 90))
Figure 10.68: Drop-off/pick-up other person
div_labor_plot_by_person("droppick", hv)
Figure 10.69
Warning

There may be identifiable elements in the next field, so we do not render it.

Table 10.47
div_labor_plot("dishes_self", hv)hv |>
  dplyr::select(labor_feeding_otherperson) |>
  dplyr::filter(!is.na(labor_feeding_otherperson)) |>
  kableExtra::kable(format = 'html') |>
    kableExtra::kable_classic()

Bedtime

div_labor_plot("bed_self", hv)
# hv |>
#   dplyr::mutate(
#     bed_self = factor(
#       bed_self,
#       levels = div_labor_levels,
#       labels = div_labor_lbls,
#       ordered = TRUE
#     )
#   ) |>
#   ggplot() +
#   aes(x = bed_self, color = child_sex, fill = child_sex) +
#   geom_bar() +
#   facet_grid(cols = vars(age_group), rows = vars(child_sex)) +
#   theme(legend.title = element_blank(),
#         legend.position = "none") +
#   theme(axis.text.x = element_text(angle = 90))
Figure 10.70: Bed self
div_labor_plot("bed_partner", hv)
# hv |>
#   dplyr::mutate(
#     bed_partner = factor(
#       bed_partner,
#       levels = div_labor_levels,
#       labels = div_labor_lbls,
#       ordered = TRUE
#     )
#   ) |>
#   ggplot() +
#   aes(x = bed_partner, color = child_sex, fill = child_sex) +
#   geom_bar() +
#   facet_grid(cols = vars(age_group)) +
#   theme(legend.title = element_blank(),
#         legend.position = "none") +
#   theme(axis.text.x = element_text(angle = 90))
Figure 10.71: Bed partner
div_labor_plot("bed_otherperson", hv)
# hv |>
#   dplyr::mutate(
#     bed_otherperson = factor(
#       bed_otherperson,
#       levels = div_labor_levels,
#       labels = div_labor_lbls,
#       ordered = TRUE
#     )
#   ) |>
#   ggplot() +
#   aes(x = bed_partner, color = child_sex, fill = child_sex) +
#   geom_bar() +
#   facet_grid(cols = vars(age_group), rows = vars(child_sex)) +
#   theme(legend.title = element_blank(),
#         legend.position = "none") +
#   theme(axis.text.x = element_text(angle = 90))
Figure 10.72: Bed other person
div_labor_plot_by_person("bed", hv)
Figure 10.73
Warning

There may be identifiable elements in the next field, so we do not render it.

Table 10.48
hv |>
  dplyr::select(labor_bed_otherperson) |>
  dplyr::filter(!is.na(labor_bed_otherperson)) |>
  kableExtra::kable(format = 'html') |>
    kableExtra::kable_classic()

Disciplining

div_labor_plot("disciplining_self", hv)
# hv |>
#   dplyr::mutate(
#     disciplining_self = factor(
#       disciplining_self,
#       levels = div_labor_levels,
#       labels = div_labor_lbls,
#       ordered = TRUE
#     )
#   ) |>
#   ggplot() +
#   aes(x = disciplining_self, color = child_sex, fill = child_sex) +
#   geom_bar() +
#   facet_grid(cols = vars(age_group), rows = vars(child_sex)) +
#   theme(legend.title = element_blank(),
#         legend.position = "none") +
#   theme(axis.text.x = element_text(angle = 90))
Figure 10.74: Disciplining self
div_labor_plot("disciplining_partner", hv)
# hv |>
#   dplyr::mutate(
#     disciplining_partner = factor(
#       disciplining_partner,
#       levels = div_labor_levels,
#       labels = div_labor_lbls,
#       ordered = TRUE
#     )
#   ) |>
#   ggplot() +
#   aes(x = disciplining_partner, color = child_sex, fill = child_sex) +
#   geom_bar() +
#   facet_grid(cols = vars(age_group), rows = vars(child_sex)) +
#   theme(legend.title = element_blank(),
#         legend.position = "none") +
#   theme(axis.text.x = element_text(angle = 90))
Figure 10.75: Disciplining partner
div_labor_plot("disciplining_otherperson", hv)
# hv |>
#   dplyr::mutate(
#     disciplining_otherperson = factor(
#       disciplining_otherperson,
#       levels = div_labor_levels,
#       labels = div_labor_lbls,
#       ordered = TRUE
#     )
#   ) |>
#   ggplot() +
#   aes(x = disciplining_otherperson, color = child_sex, fill = child_sex) +
#   geom_bar() +
#   facet_grid(cols = vars(age_group), rows = vars(child_sex)) +
#   theme(legend.title = element_blank(),
#         legend.position = "none") +
#   theme(axis.text.x = element_text(angle = 90))
Figure 10.76: Disciplining other person
div_labor_plot_by_person("disciplining", hv)
Figure 10.77
Warning

There may be identifiable elements in the next field, so we do not render it.

Table 10.49: Disciplining other person
hv |>
  dplyr::select(labor_disciplining_otherperson) |>
  dplyr::filter(!is.na(labor_disciplining_otherperson)) |>
  kableExtra::kable(format = 'html') |>
    kableExtra::kable_classic()

Comments

Warning

There may be identifiable elements in the next field, so we do not render it.

Table 10.50
hv |>
  dplyr::select(comments_division_labor) |>
  dplyr::filter(!is.na(comments_division_labor)) |>
  kableExtra::kable(format = 'html') |>
    kableExtra::kable_classic()

Typical day

Table 10.51: Typical behavior
xtabs(formula = ~ typical_behavior, hv)
typical_behavior
 no yes 
 92 709 
Warning

The following code will permit visualization of the comments, but the data should be checked for identifiable information before putting it in this document.

Table 10.52
hv |>
  dplyr::select(typical_behavior_specifics) |>
  dplyr::filter(!is.na(typical_behavior_specifics)) |>
  knitr::kable(format = 'html') |>
  kableExtra::kable_classic()
Table 10.53: Typical activities
xtabs(formula = ~ typical_activities, hv)
typical_activities
 no yes 
128 676 
Warning

The following code will permit visualization of the comments, but the data should be checked for identifiable information before putting it in this document.

Table 10.54
hv |>
  dplyr::select(typical_activities_specifics) |>
  dplyr::filter(!is.na(typical_activities_specifics)) |>
  knitr::kable(format = 'html') |>
  kableExtra::kable_classic()
Table 10.55: Typical night and morning
xtabs(formula = ~ typical_nightmorning, hv)
typical_nightmorning
 no yes 
193 609 
Warning

The following code will permit visualization of the comments, but the data should be checked for identifiable information before putting it in this document.

Table 10.56
hv |>
  dplyr::select(typical_nightmorning_specifics) |>
  dplyr::filter(!is.na(typical_nightmorning_specifics)) |>
  knitr::kable(format = 'html') |>
  kableExtra::kable_classic()
Table 10.57: Typical other than me
xtabs(formula = ~ typical_otherthanme, hv)
typical_otherthanme
 no yes 
104 700 
Warning

The following code will permit visualization of the comments, but the data should be checked for identifiable information before putting it in this document.

Table 10.58
hv |>
  dplyr::select(typical_otherthanme_specifics) |>
  dplyr::filter(!is.na(typical_otherthanme_specifics)) |>
  knitr::kable(format = 'html') |>
  kableExtra::kable_classic()