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")
Visualize
About
This page shows some simple visualizations of the cleaned aggregate home visit questionnaire data file.
Setup
Load dependencies.
Load saved “latest” data file.
<- readr::read_csv("../data/csv/home_visit/agg/PLAY-non-mcdi-kobo-latest.csv", show_col_types = FALSE) hv
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.
<- hv |>
home_visit_filtered ::filter(!is.na(age_group),
dplyr!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())
Time series
To calculate cumulative visits, we have to add an index variable
<- home_visit_filtered |>
df ::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)) dplyr
|>
df ::filter(!is.na(test_date),
dplyr!is.na(n_visits),
!is.na(site_id)) |>
ggplot() +
aes(test_date, n_visits) +
geom_point()
Language exposure
<- hv |>
df ::mutate(language_child = stringr::str_replace_all(language_child, " ", "_"))
dplyrxtabs(formula = ~ child_sex + language_child, data = df)
language_child
child_sex english english_spanish
female 326 78
male 316 91
The current workflow seems to omit Spanish-only families. This must be investigated further.
MB-CDI
We have temporarily disabled these visualizations while we conform them to a newer workflow.
12-mo-old English speakers
<-
eng_12 ::read_csv(
readrfile.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 |>
eng_12_long ::mutate(bath = case_when(!is.na(bath_1) ~ bath_1,
dplyr!is.na(bath_2) ~ bath_2,
!is.na(bath_3) ~ bath_3,
!is.na(bath_4) ~ bath_4)) |>
::select(-contains("bath_")) |>
dplyr::mutate(choo_choo = case_when(!is.na(choo_choo) ~ choo_choo,
dplyr!is.na(choochoo) ~ choochoo)) |>
::select(-choochoo) |>
dplyr::mutate(I = case_when(!is.na(I) ~ I,
dplyr!is.na(i) ~ i)) |>
::select(-i) |>
dplyr::mutate(mommy = case_when(!is.na(mommy_1) ~ mommy_1,
dplyr!is.na(mommy_2) ~ mommy_2)) |>
::select(-contains("mommy_")) |>
dplyr::mutate(outside = case_when(!is.na(outside_1) ~ outside_1,
dplyr!is.na(outside_2) ~ outside_2)) |>
::select(-contains("outside_")) |>
dplyr::mutate(please = case_when(!is.na(please_1) ~ please_1,
dplyr!is.na(please_2) ~ please_2)) |>
::select(-contains("please_")) |>
dplyr::mutate(telephone = case_when(!is.na(telephone) ~ telephone,
dplyr!is.na(telelphone) ~ telelphone)) |>
::select(-telelphone) |>
dplyr::pivot_longer(cols = !(play_id | site_id | subject_number),
tidyrnames_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
<- eng_12_long |>
word_ct ::filter(!is.na(understands_or_says)) |>
dplyr::filter(understands_or_says == "understands") |>
dplyr::count(word, sort = TRUE)
dplyr
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 ::read_csv(
readrfile.path(here::here(), "data/csv/home_visit/agg/mcdi_english_18_combined.csv"),
col_types = readr::cols(.default = 'c'),
show_col_types = FALSE
)
<- eng_18 |>
word_ct ::mutate(wet = case_when(!is.na(wet_1) ~ wet_1,
dplyr!is.na(wet_2) ~ wet_2)) |>
::select(-contains("wet_")) |>
dplyr::mutate(rain = case_when(!is.na(rain_1) ~ rain_1,
dplyr!is.na(rain_2) ~ rain_2,
!is.na(rain_3) ~ rain_3)) |>
::select(-contains("rain_")) |>
dplyr::mutate(leg = case_when(!is.na(leg_1) ~ leg_1,
dplyr!is.na(leg_2) ~ leg_2)) |>
::rename(candy = candy_1) |>
dplyr::pivot_longer(cols = !(play_id | site_id | subject_number),
tidyrnames_to = "word",
values_to = "says") |>
::filter(!is.na(says)) |>
dplyr::filter(says == TRUE) |>
dplyr::count(word, sort = TRUE)
dplyr
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 ::read_csv(
readrfile.path(here::here(), "data/csv/home_visit/agg/mcdi_english_24_combined.csv"),
col_types = readr::cols(.default = 'c'),
show_col_types = FALSE
)
<- eng_24 |>
word_ct ::pivot_longer(cols = !(play_id | site_id | subject_number),
tidyrnames_to = "word",
values_to = "says") |>
::filter(!is.na(says)) |>
dplyr::filter(says == TRUE) |>
dplyr::count(word, sort = TRUE) dplyr
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).
<- word_ct |>
rare_word_ct ::filter(n < dim(eng_24)[1]*.25)
dplyr#
# 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
<- 4
crawl_mos_min <- 6 walk_mos_min
Anomalous crawling onset
|>
hv ::select(site_id, participant_ID, crawl_mos) |>
dplyr::filter(crawl_mos < crawl_mos_min) |>
dplyr::kable(format = 'html') |>
kableExtra::kable_classic() kableExtra
site_id | participant_ID | crawl_mos |
---|---|---|
CHOPH | 003 | 3.72 |
PRINU | 020 | -5.69 |
Anomalous walking onset (KEA criteria)
|>
hv ::select(site_id, participant_ID, walk_mos_kea) |>
dplyr::filter(walk_mos_kea < walk_mos_min) |>
dplyr::kable(format = 'html') |>
kableExtra::kable_classic() kableExtra
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 ::select(site_id, participant_ID, walk_mos_who) |>
dplyr::filter(walk_mos_who < walk_mos_min) |>
dplyr::kable(format = 'html') |>
kableExtra::kable_classic() kableExtra
site_id | participant_ID | walk_mos_who |
---|---|---|
PRINU | 020 | -3.29 |
Crawl onset
|>
hv ::filter(crawl_mos > crawl_mos_min, !is.na(crawl_mos)) |>
dplyrggplot() +
aes(crawl_mos, fill = child_sex) +
geom_histogram(bins = 12) +
theme(legend.position = "bottom") +
theme(legend.title = element_blank())
Walk onset
|>
hv ::filter(walk_mos_kea > walk_mos_min, !is.na(walk_mos_kea)) |>
dplyrggplot() +
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):
$walk_mos_kea |> fivenum() hv
[1] -2.93 11.70 12.72 14.33 19.00
|>
hv ::filter(walk_mos_who > walk_mos_min, !is.na(walk_mos_who)) |>
dplyrggplot() +
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):
$walk_mos_who |> fivenum() hv
[1] -3.29 11.11 12.13 13.64 25.08
<- hv |>
filtered_walk_mos ::filter(walk_mos_who > walk_mos_min, !is.na(walk_mos_who),
dplyr> walk_mos_min, !is.na(walk_mos_kea))
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
::ggMarginal(
ggExtra
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
<- hv |>
filtered_walk_crawl_mos ::filter(crawl_mos > crawl_mos_min, !is.na(crawl_mos),
dplyr> walk_mos_min, !is.na(walk_mos_kea))
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
::ggMarginal(
ggExtra
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
Health
Feeding
%>%
hv ::select(child_sex, feeding_solidfood_age) |>
dplyr::filter(feeding_solidfood_age < 12) |>
dplyrggplot() +
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())
There are some unlikely values here.
|>
hv ::select(participant_ID,
dplyr|>
feeding_solidfood_age) ::filter(feeding_solidfood_age > 12 | feeding_solidfood_age < 3) %>%
dplyr::kable(format = 'html') knitr
participant_ID | feeding_solidfood_age |
---|---|
996 | 999 |
006 | 990 |
012 | 990 |
031 | 995 |
001 | 0 |
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.
Child health
Overall rating
Recent vaccination
Seen medical specialist
Manual inspection shows some possible identifying information (names) in child_medical_specialist_comments
.
Hearing tested
Vision tested
Illnesses and allergies
<- hv |>
illness_allergy ::select(child_sex, age_group, contains(c("allergies", "ear_infection",
dplyr"asthma",
"respiratory",
"gastrointestinal")))
|>
illness_allergy ::pivot_longer(!c('child_sex', 'age_group'),
tidyrnames_to = "type",
values_to = "response") |>
::filter(!is.na(response)) |>
dplyr::mutate(response = factor(response,
dplyrc("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())
Injuries
Mom health
Smoking & drinking
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
The following may contain identifiable data.
The following may contain identifiable data.
Patient Health Questionnaire (PHQ-4)
<- hv |>
phq4 ::select(child_sex, age_group, contains("phq4_")) |>
dplyr::select(-contains("comments"))
dplyr
names(phq4) <- gsub(pattern = "phq4_", replacement = "", names(phq4))
|>
phq4 ::pivot_longer(!c('child_sex', 'age_group'),
tidyrnames_to = "question",
values_to = "response") |>
::filter(!is.na(response)) |>
dplyr::mutate(response = factor(
dplyr
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())
Rothbart ECBQ
The next section provides visualizations of the Rothbart Early Childhood Behavior Questionnaire (ECBQ) data related to child temperament.
<- hv |>
ecbq ::select(child_sex, age_group, contains("rothbart"))
dplyr
<- ecbq |>
ecbq_complete ::complete() |>
tidyr::select(-comments_rothbart)
dplyr
<- names(ecbq)[stringr::str_detect(names(ecbq_complete),"rothbart_")]
ecbq_vars # Drop comments
<- ecbq_vars[!stringr::str_detect(ecbq_vars, "comments_rothbart")]
ecbq_vars
# Read questions CSV
<- readr::read_csv(file = file.path(here::here(), "data/csv/_meta", "ecbq_questions.csv"), show_col_types = FALSE)
ecbq_qs_all
# Make questions data frame
<- ecbq_qs_all |>
ecbq_qs_df ::mutate(var_name = ecbq_vars) dplyr
Define helper functions.
# Helper function to retrieve long question given short variable name
<- function(this_var= "rothbart_unfamiliarperson", data_dict = ecbq_qs_df) {
retrieve_long_q ::is.string(this_var)
assertthat|>
data_dict filter(var_name == this_var) |>
select(question) |>
as.character()
}
# Helper plot function
<- function(var_lbl = "rothbart_unfamiliarperson", df) {
my_ecbq_plot stopifnot(is.data.frame(df))
stopifnot(is.character(var_lbl))
<- df |> dplyr::select(child_sex, age_group, {{ var_lbl }})
df
<- df |>
df ::filter(!is.na(.data[[var_lbl]])) |>
dplyr::mutate(rating = factor(
dplyr
.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
<- function(var, data) {
return_section <- knitr::knit_expand(text = c("### Responses for: `{this_var}`", "\n"),
chunk_hdr this_var = var)
# Build fig.cap from ground up
<- paste0("fig-dist-", var)
fig_name <- paste0("'Distribution of responses to `", var, "`'")
fig_cap <- paste0("fig.cap = ", fig_cap)
fig_caption
<- paste0("```{r ",
plot_chunk_hdr
fig_name,", echo = FALSE, warning = FALSE, ",
fig_caption,"}")
<- c(plot_chunk_hdr, "print(my_ecbq_plot(var, data))", "```")
plot_chunk
<-
question_long paste0("\n**Q**: '", retrieve_long_q(var), "'", "\n")
::knit_child(
knitrtext = c(chunk_hdr, question_long, plot_chunk),
envir = environment(),
quiet = TRUE
) }
<- names(df)
these_vars
<- invisible(lapply(ecbq_vars, return_section, data = ecbq_complete))
res 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?’
Responses for: rothbart_troubletask
Q: ‘While having trouble completing a task (e.g. building, drawing, dressing), how often did your child get easily irritated?’
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?’
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?’
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?’
Responses for: rothbart_playingoutdoors
Q: ‘While playing outdoors, how often did your child choose to take chances for the fun and excitement of it?’
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?’
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?’
Responses for: rothbart_excitedlovedadults
Q: ‘When told that loved adults would visit, how often did your child get very excited?’
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.?’
Responses for: rothbart_roughrowdy
Q: ‘While playing indoors, how often did your child like rough and rowdy games?’
Responses for: rothbart_rockedhugged
Q: ‘When being gently rocked or hugged, how often did your child seem eager to get away?’
Responses for: rothbart_involvednewactivity
Q: ‘When encountering a new activity, how often did your child get involved immediately?’
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?’
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?’
Responses for: rothbart_noisyenvironment
Q: ‘During everyday activities, how often did your child become bothered by sound while in a noisy environment?’
Responses for: rothbart_energy
Q: ‘During everyday activities, how often did your child seem full of energy, even in the evening?’
Responses for: rothbart_vehicles
Q: ‘While in a public place, how often did your child seem afraid of large, noisy 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?’
Responses for: rothbart_forbidden
Q: ‘When told no, how often did your child stop the forbidden activity?’
Responses for: rothbart_sadlytearful
Q: ‘When told no, how often did your child become sadly tearful?’
Responses for: rothbart_downblue
Q: ‘Following an exciting activity or event, how often did your child seem to feel down or blue?’
Responses for: rothbart_runhouse
Q: ‘When playing indoors, how often did your child run through the house?’
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?’
Responses for: rothbart_tempertantrum
Q: ‘When he/she asked for something and you said no, how often did your child have a temper tantrum?’
Responses for: rothbart_waitpatiently
Q: ‘When asked to wait for a desirable item (such as ice cream), how often did your child wait patiently?’
Responses for: rothbart_rockedsmile
Q: ‘When being gently rocked, how often did your child smile?’
Responses for: rothbart_mold
Q: ‘While being held on your lap, how often did your child mold to your body?’
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?’
Responses for: rothbart_careful
Q: ‘When asked to do so, how often was your child able to be careful with something breakable?’
Responses for: rothbart_enternewplace
Q: ‘When visiting a new place, how often did your child not want to enter?’
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?’
Responses for: rothbart_easilysoothed
Q: ‘When he/she was upset, how often did your child become easily soothed?’
Responses for: rothbart_busyother
Q: ‘When you were busy, how often did your child find another activity to do when asked?’
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?’
Media use
Home technology
Child TV
The following may contain identifiable data.
Child DVD
The following may contain identifiable data.
Child computer
The following may contain identifiable data.
Child iPad
The following may contain identifiable data.
Child educational
The following may contain identifiable data.
Child videogame
The following may contain identifiable data.
TV hrs/day
The following may contain identifiable data.
Moreover, this is a free-text field that requires further processing to be visualized.
Use meals
Use playtime
Use bedtime
Use transportation
Media use comments
The following may contain identifiable data.
Pets
$pets_types_number[!is.na(hv$pets_types_number)] |> head(20) hv
[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 |>
hv_pets ::mutate(dogs = stringr::str_detect(pets_types_number, "[dD]og"),
dplyrcats = stringr::str_detect(pets_types_number, "[cC]at"))
There are some identifiable elements in the comments_pets
field.
Division of Labor
<- c(0:4)
div_labor_levels <- c("Never", "Some of the time", "About half the time", "Most of the time", "All of the time")
div_labor_lbls 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))
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))
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))
div_labor_plot_by_person("laundry", hv)
There may be identifiable elements in the next field, so we do not render it.
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))
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))
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))
div_labor_plot_by_person("cleaning", hv)
There may be identifiable elements in the next field, so we do not render it.
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))
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))
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))
div_labor_plot_by_person("dishes", hv)
There may be identifiable elements in the next field, so we do not render it.
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))
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))
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))
div_labor_plot_by_person("cooking", hv)
There may be identifiable elements in the next field, so we do not render it.
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))
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))
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))
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)
There may be identifiable elements in the next field, so we do not render it.
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))
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))
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))
div_labor_plot_by_person("droppick", hv)
There may be identifiable elements in the next field, so we do not render it.
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))
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))
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))
div_labor_plot_by_person("bed", hv)
There may be identifiable elements in the next field, so we do not render it.
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))
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))
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))
div_labor_plot_by_person("disciplining", hv)
There may be identifiable elements in the next field, so we do not render it.
Comments
There may be identifiable elements in the next field, so we do not render it.
Typical day
The following code will permit visualization of the comments, but the data should be checked for identifiable information before putting it in this document.
The following code will permit visualization of the comments, but the data should be checked for identifiable information before putting it in this document.
The following code will permit visualization of the comments, but the data should be checked for identifiable information before putting it in this document.
The following code will permit visualization of the comments, but the data should be checked for identifiable information before putting it in this document.
Comments
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.