Data dictionary

Background

We make use of the datadictionary package here.

This is not a perfect solution. Among other challenges, this package throws many warnings. But we will use it for the time being.

Screening/Demographic data

scr_df <- readr::read_csv(paste0(here::here(), "/data/csv/screening/agg/PLAY-screening-datab-latest.csv"),
                          show_col_types = FALSE)

scr_dd <- datadictionary::create_dictionary(scr_df)
## Warning in character_summary(dataset, column): session_release
## has fewer than 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## participant_gender has fewer than 10 unique values, did you want
## a factor?
## Warning in character_summary(dataset, column):
## participant_ethnicity has fewer than 10 unique values, did you
## want a factor?
## Warning in character_summary(dataset, column): group_name has
## fewer than 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column): context_setting
## has fewer than 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column): context_country
## has fewer than 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## participant_disability has fewer than 10 unique values, did you
## want a factor?
## Warning in character_summary(dataset, column): child_sex has
## fewer than 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## child_bornonduedate has fewer than 10 unique values, did you
## want a factor?
## Warning in character_summary(dataset, column): child_onterm has
## fewer than 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## child_birth_complications has fewer than 10 unique values, did
## you want a factor?
## Warning in character_summary(dataset, column):
## child_hearing_disabilities has fewer than 10 unique values, did
## you want a factor?
## Warning in character_summary(dataset, column):
## child_hearing_disabilities_specify has fewer than 10 unique
## values, did you want a factor?
## Warning in character_summary(dataset, column):
## child_vision_disabilities has fewer than 10 unique values, did
## you want a factor?
## Warning in character_summary(dataset, column):
## child_vision_disabilities_specify has fewer than 10 unique
## values, did you want a factor?
## Warning in character_summary(dataset, column):
## child_major_illnesses_injuries has fewer than 10 unique values,
## did you want a factor?
## Warning in character_summary(dataset, column):
## child_developmentaldelays has fewer than 10 unique values, did
## you want a factor?
## Warning in character_summary(dataset, column):
## child_developmentaldelays_specify has fewer than 10 unique
## values, did you want a factor?
## Warning in character_summary(dataset, column):
## child_sleep_location has fewer than 10 unique values, did you
## want a factor?
## Warning in character_summary(dataset, column): mom_bio has fewer
## than 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column): mom_birth_country
## has fewer than 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column): mom_employment
## has fewer than 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column): mom_jobs_number
## has fewer than 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column): mom_training has
## fewer than 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## language_spoken_mom has fewer than 10 unique values, did you
## want a factor?
## Warning in character_summary(dataset, column):
## language_spoken_child has fewer than 10 unique values, did you
## want a factor?
## Warning in character_summary(dataset, column):
## language_spoken_home has fewer than 10 unique values, did you
## want a factor?
## Warning in character_summary(dataset, column):
## language_spoken_home_other has fewer than 10 unique values, did
## you want a factor?
readr::write_csv(scr_dd, paste0(here::here(), "/data/csv/screening/dd/PLAY-screening-data-dictionary.csv"))

Screening/Demographic data

if (!('home_visit_df' %in% ls())) {
  targets::tar_load(home_visit_df, store=paste0(here::here(), "_targets"))
}
scr_dd <- datadictionary::create_dictionary(home_visit_df)
## Warning in character_summary(dataset, column): child_sex has
## fewer than 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column): age_group has
## fewer than 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column): language_child
## has fewer than 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## language_child.english has fewer than 10 unique values, did you
## want a factor?
## Warning in character_summary(dataset, column):
## language_child.spanish has fewer than 10 unique values, did you
## want a factor?
## Warning in character_summary(dataset, column):
## language_instruction has fewer than 10 unique values, did you
## want a factor?
## Warning in character_summary(dataset, column): acknowledge_site
## has fewer than 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## locomotor_milestones.date_format has fewer than 10 unique
## values, did you want a factor?
## Warning in character_summary(dataset, column):
## health.feeding_nutrition.breastfeed has fewer than 10 unique
## values, did you want a factor?
## Warning in character_summary(dataset, column):
## health.general_health.child_health has fewer than 10 unique
## values, did you want a factor?
## Warning in character_summary(dataset, column):
## health.general_health.child_vaccination has fewer than 10 unique
## values, did you want a factor?
## Warning in character_summary(dataset, column):
## health.general_health.child_medical_specialist has fewer than 10
## unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## health.general_health.child_hearing_tested has fewer than 10
## unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## health.general_health.child_hearing_tested.birthhospital has
## fewer than 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## health.general_health.child_hearing_tested.afterhome has fewer
## than 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## health.general_health.child_hearing_tested.no has fewer than 10
## unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## health.general_health.child_hearing_tested.refused has fewer
## than 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## health.general_health.child_hearing_tested.donotknow has fewer
## than 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## health.general_health.child_vision_tested has fewer than 10
## unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## health.general_health.child_vision_tested.birthhospital has
## fewer than 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## health.general_health.child_vision_tested.afterhome has fewer
## than 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## health.general_health.child_vision_tested.no has fewer than 10
## unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## health.general_health.child_vision_tested.refused has fewer than
## 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## health.general_health.child_vision_tested.donotknow has fewer
## than 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## health.general_health.child_allergies_infections_ill.allergies
## has fewer than 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## health.general_health.child_allergies_infections_ill.ear_infection
## has fewer than 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## health.general_health.child_allergies_infections_ill.asthma has
## fewer than 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## health.general_health.child_allergies_infections_ill.respiratory
## has fewer than 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## health.general_health.child_allergies_infections_ill.gastrointestinal
## has fewer than 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## health.general_health.child_injury_times has fewer than 10
## unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## health.prenatal.prenatal_care has fewer than 10 unique values,
## did you want a factor?
## Warning in character_summary(dataset, column):
## health.smoking.pregnant_smoking has fewer than 10 unique values,
## did you want a factor?
## Warning in character_summary(dataset, column):
## health.smoking.smoking_trimester_1 has fewer than 10 unique
## values, did you want a factor?
## Warning in character_summary(dataset, column):
## health.smoking.smoking_trimester_2 has fewer than 10 unique
## values, did you want a factor?
## Warning in character_summary(dataset, column):
## health.smoking.smoking_trimester_3 has fewer than 10 unique
## values, did you want a factor?
## Warning in character_summary(dataset, column):
## health.smoking.mom_smoking_now has fewer than 10 unique values,
## did you want a factor?
## Warning in character_summary(dataset, column):
## health.smoking.mom_smoking_now_amount has fewer than 10 unique
## values, did you want a factor?
## Warning in character_summary(dataset, column):
## health.smoking.smoking_house has fewer than 10 unique values,
## did you want a factor?
## Warning in character_summary(dataset, column):
## health.smoking.smoking_car has fewer than 10 unique values, did
## you want a factor?
## Warning in character_summary(dataset, column):
## health.drinking.pregnant_drinking has fewer than 10 unique
## values, did you want a factor?
## Warning in character_summary(dataset, column):
## health.drinking.drinking_trimester_1 has fewer than 10 unique
## values, did you want a factor?
## Warning in character_summary(dataset, column):
## health.drinking.drinking_trimester_2 has fewer than 10 unique
## values, did you want a factor?
## Warning in character_summary(dataset, column):
## health.drinking.drinking_trimester_3 has fewer than 10 unique
## values, did you want a factor?
## Warning in character_summary(dataset, column):
## health.phq4.phq4_nervous has fewer than 10 unique values, did
## you want a factor?
## Warning in character_summary(dataset, column):
## health.phq4.phq4_worrying has fewer than 10 unique values, did
## you want a factor?
## Warning in character_summary(dataset, column):
## health.phq4.phq4_littleinterest has fewer than 10 unique values,
## did you want a factor?
## Warning in character_summary(dataset, column):
## health.phq4.phq4_down has fewer than 10 unique values, did you
## want a factor?
## Warning in character_summary(dataset, column):
## rothbart.rothbartquestions.rothbart_unfamiliarperson has fewer
## than 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## rothbart.rothbartquestions.rothbart_troubletask has fewer than
## 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## rothbart.rothbartquestions.rothbart_companyofchild has fewer
## than 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## rothbart.rothbartquestions.rothbart_choiceactivities has fewer
## than 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## rothbart.rothbartquestions.rothbart_quietlysung has fewer than
## 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## rothbart.rothbartquestions.rothbart_playingoutdoors has fewer
## than 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## rothbart.rothbartquestions.rothbart_morethan10 has fewer than 10
## unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## rothbart.rothbartquestions.rothbart_respondingremarks has fewer
## than 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## rothbart.rothbartquestions.rothbart_excitedlovedadults has fewer
## than 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## rothbart.rothbartquestions.rothbart_fiddlehair has fewer than 10
## unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## rothbart.rothbartquestions.rothbart_roughrowdy has fewer than 10
## unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## rothbart.rothbartquestions.rothbart_rockedhugged has fewer than
## 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## rothbart.rothbartquestions.rothbart_involvednewactivity has
## fewer than 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## rothbart.rothbartquestions.rothbart_tirequickly has fewer than
## 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## rothbart.rothbartquestions.rothbart_callattention has fewer than
## 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## rothbart.rothbartquestions.rothbart_tags has fewer than 10
## unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## rothbart.rothbartquestions.rothbart_noisyenvironment has fewer
## than 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## rothbart.rothbartquestions.rothbart_energy has fewer than 10
## unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## rothbart.rothbartquestions.rothbart_vehicles has fewer than 10
## unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## rothbart.rothbartquestions.rothbart_active has fewer than 10
## unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## rothbart.rothbartquestions.rothbart_forbidden has fewer than 10
## unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## rothbart.rothbartquestions.rothbart_sadlytearful has fewer than
## 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## rothbart.rothbartquestions.rothbart_downblue has fewer than 10
## unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## rothbart.rothbartquestions.rothbart_runhouse has fewer than 10
## unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## rothbart.rothbartquestions.rothbart_excitingevent has fewer than
## 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## rothbart.rothbartquestions.rothbart_tempertantrum has fewer than
## 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## rothbart.rothbartquestions.rothbart_waitpatiently has fewer than
## 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## rothbart.rothbartquestions.rothbart_rockedsmile has fewer than
## 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## rothbart.rothbartquestions.rothbart_mold has fewer than 10
## unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## rothbart.rothbartquestions.rothbart_interactadult has fewer than
## 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## rothbart.rothbartquestions.rothbart_careful has fewer than 10
## unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## rothbart.rothbartquestions.rothbart_enternewplace has fewer than
## 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## rothbart.rothbartquestions.rothbart_crymorethan3 has fewer than
## 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## rothbart.rothbartquestions.rothbart_easilysoothed has fewer than
## 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## rothbart.rothbartquestions.rothbart_busyother has fewer than 10
## unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## rothbart.rothbartquestions.rothbart_differentpeople has fewer
## than 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## mediause.home_technology.tv has fewer than 10 unique values, did
## you want a factor?
## Warning in character_summary(dataset, column):
## mediause.home_technology.dvd has fewer than 10 unique values,
## did you want a factor?
## Warning in character_summary(dataset, column):
## mediause.home_technology.computer has fewer than 10 unique
## values, did you want a factor?
## Warning in character_summary(dataset, column):
## mediause.home_technology.ipad has fewer than 10 unique values,
## did you want a factor?
## Warning in character_summary(dataset, column):
## mediause.home_technology.educationalgame has fewer than 10
## unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## mediause.home_technology.videogame has fewer than 10 unique
## values, did you want a factor?
## Warning in character_summary(dataset, column):
## mediause.technology_child_tv has fewer than 10 unique values,
## did you want a factor?
## Warning in character_summary(dataset, column):
## mediause.technology_child_dvd has fewer than 10 unique values,
## did you want a factor?
## Warning in character_summary(dataset, column):
## mediause.technology_child_computer has fewer than 10 unique
## values, did you want a factor?
## Warning in character_summary(dataset, column):
## mediause.technology_child_ipad has fewer than 10 unique values,
## did you want a factor?
## Warning in character_summary(dataset, column):
## mediause.technology_child_educational has fewer than 10 unique
## values, did you want a factor?
## Warning in character_summary(dataset, column):
## mediause.technology_child_videogame has fewer than 10 unique
## values, did you want a factor?
## Warning in character_summary(dataset, column):
## mediause.techuse.meals has fewer than 10 unique values, did you
## want a factor?
## Warning in character_summary(dataset, column):
## mediause.techuse.playtime has fewer than 10 unique values, did
## you want a factor?
## Warning in character_summary(dataset, column):
## mediause.techuse.bedtime has fewer than 10 unique values, did
## you want a factor?
## Warning in character_summary(dataset, column):
## mediause.techuse.transportation has fewer than 10 unique values,
## did you want a factor?
## Warning in character_summary(dataset, column): pets.pets_at_home
## has fewer than 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## pets.pets_indoors_outdoors has fewer than 10 unique values, did
## you want a factor?
## Warning in character_summary(dataset, column):
## division_labor.laundry.laundry_self has fewer than 10 unique
## values, did you want a factor?
## Warning in character_summary(dataset, column):
## division_labor.laundry.laundry_partner has fewer than 10 unique
## values, did you want a factor?
## Warning in character_summary(dataset, column):
## division_labor.laundry.laundry_otherperson has fewer than 10
## unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## division_labor.cleaning.cleaning_self has fewer than 10 unique
## values, did you want a factor?
## Warning in character_summary(dataset, column):
## division_labor.cleaning.cleaning_partner has fewer than 10
## unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## division_labor.cleaning.cleaning_otherperson has fewer than 10
## unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## division_labor.dishwashing.dishes_self has fewer than 10 unique
## values, did you want a factor?
## Warning in character_summary(dataset, column):
## division_labor.dishwashing.dishes_partner has fewer than 10
## unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## division_labor.dishwashing.dishes_otherperson has fewer than 10
## unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## division_labor.cooking.cooking_self has fewer than 10 unique
## values, did you want a factor?
## Warning in character_summary(dataset, column):
## division_labor.cooking.cooking_partner has fewer than 10 unique
## values, did you want a factor?
## Warning in character_summary(dataset, column):
## division_labor.cooking.cooking_otherperson has fewer than 10
## unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## division_labor.feeding.feeding_self has fewer than 10 unique
## values, did you want a factor?
## Warning in character_summary(dataset, column):
## division_labor.feeding.feeding_partner has fewer than 10 unique
## values, did you want a factor?
## Warning in character_summary(dataset, column):
## division_labor.feeding.feeding_otherperson has fewer than 10
## unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## division_labor.droppick.droppick_self has fewer than 10 unique
## values, did you want a factor?
## Warning in character_summary(dataset, column):
## division_labor.droppick.droppick_partner has fewer than 10
## unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## division_labor.droppick.droppick_otherperson has fewer than 10
## unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## division_labor.bed.bed_self has fewer than 10 unique values, did
## you want a factor?
## Warning in character_summary(dataset, column):
## division_labor.bed.bed_partner has fewer than 10 unique values,
## did you want a factor?
## Warning in character_summary(dataset, column):
## division_labor.bed.bed_otherperson has fewer than 10 unique
## values, did you want a factor?
## Warning in character_summary(dataset, column):
## division_labor.disciplining.disciplining_self has fewer than 10
## unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## division_labor.disciplining.disciplining_partner has fewer than
## 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## division_labor.disciplining.disciplining_otherperson has fewer
## than 10 unique values, did you want a factor?
## Warning in character_summary(dataset, column):
## typical_day.typical_behavior has fewer than 10 unique values,
## did you want a factor?
## Warning in character_summary(dataset, column):
## typical_day.typical_activities has fewer than 10 unique values,
## did you want a factor?
## Warning in character_summary(dataset, column):
## typical_day.typical_nightmorning has fewer than 10 unique
## values, did you want a factor?
## Warning in character_summary(dataset, column):
## typical_day.typical_otherthanme has fewer than 10 unique values,
## did you want a factor?
## Warning in character_summary(dataset, column):
## acknowledge_questionnaires has fewer than 10 unique values, did
## you want a factor?
readr::write_csv(scr_dd, paste0(here::here(), "/data/csv/home_visit/dd/PLAY-home-visit-data-dictionary.csv"))