Modified

September 17, 2024

About

This page gathers KoBoToolbox files from the home visit questionnaires.

Setup

Load helper functions and required package dependencies.

Code
fl <-
  list.files(
    file.path(here::here(), "R"),
    "^load|^kobo_|^file_|^screen_|^ecbq_|^health_|^databrary|^home|^make|^export|^post_visit|CONSTANTS",
    full.names = TRUE
  )
purrr::walk(fl, source)

suppressPackageStartupMessages(library(tidyverse))

Data files for each of the language by age-group conditions are stored on KoBoToolbox (KBT).

The data files on KBT are stored in kb_df, a data frame that is generated as one of the workflow targets.

Code
targets::tar_load(kb_df, store=file.path(here::here(), "_targets"))
kb_df
        id              id_string
1   411456 a58ZhjX6M8WXtzLGvBaEaG
2   920365 a6r99tj8RaULvzTM7MuWpi
3   740625 a8HyzdxnVjK53dt4fX3Vup
4  1129568 a9n2DWjJw3ayJmkijsAm7h
5   331453 aae4wz2tpkSnAkea2PAzin
6   363465 abYGMsrMvkGsnA4xm9kqC9
7   363431 acCBJaRqBkSMPYdvaaWCSu
8   334099 ad3NtS6TDPuKTUKCAyCuby
9   363349 aEMERWLYQAdhaMKMt5QkD7
10  307736 aeMJQLo56HWyVHkKX9oaJD
11  334134 agChfbnGHc6fiUdfYUaZ2z
12  346565 aGD5Q64T5zTQtakQaS8x55
13  359546 aGLEqT7eRBhuPgizCQBeqA
14  740631 ahYJ7XRUcit8gbFYwaxnAV
15  361981 aJNWkgeX7c9jEFiNAgJspn
16  738593 aJPU78BR3NfU9rm4LzRVLt
17 1151489 aLqdPLTCZb8jvFkDxcFwzy
18  920339 aLxPNje5yoeZijafFoVz5z
19  738513 aM2ob4BdwFucdjjcUNTwms
20 1136694 aMteoHisncRUStdyZfsjMB
21  275882 anqhvxKtQieo7gc9uPqJ3y
22  740623 aoLcmmN8KWG4N6A3XpUiRT
23  740628 aRJW7SwKsVyZu8b4FighiM
24  363466 asv7tL6CEYjiW2XCkLxhcX
25  411469 aswcEAtxj24u9MfuBmS9AW
26  740630 aThMD6zuEFjtTfptwcpZPg
27  411388 aTyGBYk6HvRXmki9ksb29p
28  740624 aUeYzPfq6WED4dDF28VT9D
29  363381 aWd7wujF5d5HYaYMhT4jBZ
30  740626 awMnFDna5kWR3LXKyGmFMd
31  331848 axYbEbLcJxzUNFbqMVySjJ
32  740629 axyJSgLRDeSk3BHB6cJmYk
33  408149 ayhCy68ZTaDGc7tuGthQpJ
34  740627 aYokcZAjTZ9JCyVXz4R5rh
                                                                     title
1              PLAY Home Questionaires - 12 Bilingual English (2020-03-04)
2                                                 NYU_Pilot DLL-ES_Level_2
3                                        PLAY_HomeQuestionaires_12_English
4                                        Clone of NYU_Pilot DLL-ES_Level_1
5                                    PLAY Home Questionnaires (24 English)
6             PLAY Home Questionnaires - 24 Bilingual English (2020-03-04)
7                       PLAY Home Questionnaires - 12 English (2020-03-04)
8                        PLAY Home Questionnaires (12 Bilingual - English)
9                       PLAY Home Questionnaires - 18 English (2020-03-04)
10                                   PLAY Home Questionnaires (18 English)
11                                PLAY Demographic Questionnaire (Spanish)
12                                                   PLAY Post-Visit Notes
13                                          PLAY Demographic Questionnaire
14                             PLAY_HomeQuestionaires_24_Bilingual_English
15                                                   PLAY Post-Visit Notes
16                                                DLL-ES_Level_2 (English)
17 Clone of Clone of PLAY_HomeQuestionnaires_18_English - NO AUTO METADATA
18                                                NYU_Pilot DLL-ES_Level_1
19                                               DLL-ES_Level_1_2021_07_30
20             Clone of PLAY_HomeQuestionnaires_18_English - NO AUTO TODAY
21                                          PLAY Demographic Questionnaire
22                             PLAY_HomeQuestionaires_12_Bilingual_English
23                                      PLAY_HomeQuestionnaires_18_English
24            PLAY Home Questionnaires - 18 Bilingual English (2020-03-04)
25            PLAY Home Questionnaires - 12 Bilingual Spanish (2020-03-04)
26                             PLAY_HomeQuestionaires_24_Bilingual_Spanish
27            PLAY Home Questionnaires - 18 Bilingual Spanish (2020-03-04)
28                             PLAY_HomeQuestionaires_12_Bilingual_Spanish
29                      PLAY Home Questionnaires - 24 English (2020-03-04)
30                             PLAY_HomeQuestionaires_18_Bilingual_English
31                                   PLAY Home Questionnaires (12 English)
32                                      PLAY_HomeQuestionnaires_24_English
33            PLAY Home Questionnaires - 24 Bilingual Spanish (2020-03-04)
34                             PLAY_HomeQuestionaires_18_Bilingual_Spanish
                                                               description
1            PLAY Home Questionaires - 12 Bilingual (English) (2020-03-04)
2                                                 NYU_Pilot DLL-ES_Level_2
3                             PLAY_HomeQuestionaires_12_English-2021-07-29
4                                        Clone of NYU_Pilot DLL-ES_Level_1
5                                    PLAY Home Questionnaires (24 English)
6             PLAY Home Questionnaires - 24 Bilingual English (2019-11-20)
7                       PLAY Home Questionnaires - 12 English (2019-11-20)
8                        PLAY Home Questionnaires (12 Bilingual - English)
9                       PLAY Home Questionnaires - 18 English (2018-11-20)
10                                   PLAY Home Questionnaires (18 English)
11                                PLAY Demographic Questionnaire (Spanish)
12                                              PLAY Cleanup Checklists v2
13                                           New Demographic Questionnaire
14                  PLAY_HomeQuestionaires_24_Bilingual_English-2021-07-30
15                                      PLAY Post-Visit Notes (2019-11-18)
16                                          DLL-ES_Level_2_KBTB_2021_07_28
17 Clone of Clone of PLAY_HomeQuestionnaires_18_English - NO AUTO METADATA
18                                                NYU_Pilot DLL-ES_Level_1
19                                               DLL-ES_Level_1_2021_07_28
20                             Clone of PLAY_HomeQuestionnaires_18_English
21                                                PLAY Phone Questionnaire
22                  PLAY_HomeQuestionaires_12_Bilingual_English-2021-07-29
23                           PLAY_HomeQuestionnaires_18_English-2021-07-29
24            PLAY Home Questionnaires - 18 Bilingual English (2019-11-20)
25            PLAY Home Questionnaires - 12 Bilingual Spanish (2020-03-04)
26                  PLAY_HomeQuestionaires_24_Bilingual_Spanish-2021-07-30
27            PLAY Home Questionnaires - 18 Bilingual Spanish (2020-03-04)
28                  PLAY_HomeQuestionaires_12_Bilingual_Spanish-2021-07-29
29                      PLAY Home Questionnaires - 24 English (2019-11-20)
30                  PLAY_HomeQuestionaires_18_Bilingual_English-2021-07-29
31                                   PLAY Home Questionnaires (12 English)
32                           PLAY_HomeQuestionnaires_24_English-2021-07-30
33            PLAY Home Questionnaires - 24 Bilingual Spanish (2020-02-27)
34                  PLAY_HomeQuestionaires_18_Bilingual_Spanish-2021-07-29
                                              url
1   https://kc.kobotoolbox.org/api/v1/data/411456
2   https://kc.kobotoolbox.org/api/v1/data/920365
3   https://kc.kobotoolbox.org/api/v1/data/740625
4  https://kc.kobotoolbox.org/api/v1/data/1129568
5   https://kc.kobotoolbox.org/api/v1/data/331453
6   https://kc.kobotoolbox.org/api/v1/data/363465
7   https://kc.kobotoolbox.org/api/v1/data/363431
8   https://kc.kobotoolbox.org/api/v1/data/334099
9   https://kc.kobotoolbox.org/api/v1/data/363349
10  https://kc.kobotoolbox.org/api/v1/data/307736
11  https://kc.kobotoolbox.org/api/v1/data/334134
12  https://kc.kobotoolbox.org/api/v1/data/346565
13  https://kc.kobotoolbox.org/api/v1/data/359546
14  https://kc.kobotoolbox.org/api/v1/data/740631
15  https://kc.kobotoolbox.org/api/v1/data/361981
16  https://kc.kobotoolbox.org/api/v1/data/738593
17 https://kc.kobotoolbox.org/api/v1/data/1151489
18  https://kc.kobotoolbox.org/api/v1/data/920339
19  https://kc.kobotoolbox.org/api/v1/data/738513
20 https://kc.kobotoolbox.org/api/v1/data/1136694
21  https://kc.kobotoolbox.org/api/v1/data/275882
22  https://kc.kobotoolbox.org/api/v1/data/740623
23  https://kc.kobotoolbox.org/api/v1/data/740628
24  https://kc.kobotoolbox.org/api/v1/data/363466
25  https://kc.kobotoolbox.org/api/v1/data/411469
26  https://kc.kobotoolbox.org/api/v1/data/740630
27  https://kc.kobotoolbox.org/api/v1/data/411388
28  https://kc.kobotoolbox.org/api/v1/data/740624
29  https://kc.kobotoolbox.org/api/v1/data/363381
30  https://kc.kobotoolbox.org/api/v1/data/740626
31  https://kc.kobotoolbox.org/api/v1/data/331848
32  https://kc.kobotoolbox.org/api/v1/data/740629
33  https://kc.kobotoolbox.org/api/v1/data/408149
34  https://kc.kobotoolbox.org/api/v1/data/740627
                                                              form_url
1  https://kf.kobotoolbox.org/api/v2/assets/a58ZhjX6M8WXtzLGvBaEaG.xls
2  https://kf.kobotoolbox.org/api/v2/assets/a6r99tj8RaULvzTM7MuWpi.xls
3  https://kf.kobotoolbox.org/api/v2/assets/a8HyzdxnVjK53dt4fX3Vup.xls
4  https://kf.kobotoolbox.org/api/v2/assets/a9n2DWjJw3ayJmkijsAm7h.xls
5  https://kf.kobotoolbox.org/api/v2/assets/aae4wz2tpkSnAkea2PAzin.xls
6  https://kf.kobotoolbox.org/api/v2/assets/abYGMsrMvkGsnA4xm9kqC9.xls
7  https://kf.kobotoolbox.org/api/v2/assets/acCBJaRqBkSMPYdvaaWCSu.xls
8  https://kf.kobotoolbox.org/api/v2/assets/ad3NtS6TDPuKTUKCAyCuby.xls
9  https://kf.kobotoolbox.org/api/v2/assets/aEMERWLYQAdhaMKMt5QkD7.xls
10 https://kf.kobotoolbox.org/api/v2/assets/aeMJQLo56HWyVHkKX9oaJD.xls
11 https://kf.kobotoolbox.org/api/v2/assets/agChfbnGHc6fiUdfYUaZ2z.xls
12 https://kf.kobotoolbox.org/api/v2/assets/aGD5Q64T5zTQtakQaS8x55.xls
13 https://kf.kobotoolbox.org/api/v2/assets/aGLEqT7eRBhuPgizCQBeqA.xls
14 https://kf.kobotoolbox.org/api/v2/assets/ahYJ7XRUcit8gbFYwaxnAV.xls
15 https://kf.kobotoolbox.org/api/v2/assets/aJNWkgeX7c9jEFiNAgJspn.xls
16 https://kf.kobotoolbox.org/api/v2/assets/aJPU78BR3NfU9rm4LzRVLt.xls
17 https://kf.kobotoolbox.org/api/v2/assets/aLqdPLTCZb8jvFkDxcFwzy.xls
18 https://kf.kobotoolbox.org/api/v2/assets/aLxPNje5yoeZijafFoVz5z.xls
19 https://kf.kobotoolbox.org/api/v2/assets/aM2ob4BdwFucdjjcUNTwms.xls
20 https://kf.kobotoolbox.org/api/v2/assets/aMteoHisncRUStdyZfsjMB.xls
21 https://kf.kobotoolbox.org/api/v2/assets/anqhvxKtQieo7gc9uPqJ3y.xls
22 https://kf.kobotoolbox.org/api/v2/assets/aoLcmmN8KWG4N6A3XpUiRT.xls
23 https://kf.kobotoolbox.org/api/v2/assets/aRJW7SwKsVyZu8b4FighiM.xls
24 https://kf.kobotoolbox.org/api/v2/assets/asv7tL6CEYjiW2XCkLxhcX.xls
25 https://kf.kobotoolbox.org/api/v2/assets/aswcEAtxj24u9MfuBmS9AW.xls
26 https://kf.kobotoolbox.org/api/v2/assets/aThMD6zuEFjtTfptwcpZPg.xls
27 https://kf.kobotoolbox.org/api/v2/assets/aTyGBYk6HvRXmki9ksb29p.xls
28 https://kf.kobotoolbox.org/api/v2/assets/aUeYzPfq6WED4dDF28VT9D.xls
29 https://kf.kobotoolbox.org/api/v2/assets/aWd7wujF5d5HYaYMhT4jBZ.xls
30 https://kf.kobotoolbox.org/api/v2/assets/awMnFDna5kWR3LXKyGmFMd.xls
31 https://kf.kobotoolbox.org/api/v2/assets/axYbEbLcJxzUNFbqMVySjJ.xls
32 https://kf.kobotoolbox.org/api/v2/assets/axyJSgLRDeSk3BHB6cJmYk.xls
33 https://kf.kobotoolbox.org/api/v2/assets/ayhCy68ZTaDGc7tuGthQpJ.xls
34 https://kf.kobotoolbox.org/api/v2/assets/aYokcZAjTZ9JCyVXz4R5rh.xls

Download data

List data forms specific to the home visit by filtering the files with names that contain “Home”.

Code
kb_home_df <- kobo_list_data_filtered(kb_df, "Home")
kb_home_df
        id              id_string
1   411456 a58ZhjX6M8WXtzLGvBaEaG
2   740625 a8HyzdxnVjK53dt4fX3Vup
3   331453 aae4wz2tpkSnAkea2PAzin
4   363465 abYGMsrMvkGsnA4xm9kqC9
5   363431 acCBJaRqBkSMPYdvaaWCSu
6   334099 ad3NtS6TDPuKTUKCAyCuby
7   363349 aEMERWLYQAdhaMKMt5QkD7
8   307736 aeMJQLo56HWyVHkKX9oaJD
9   740631 ahYJ7XRUcit8gbFYwaxnAV
10 1151489 aLqdPLTCZb8jvFkDxcFwzy
11 1136694 aMteoHisncRUStdyZfsjMB
12  740623 aoLcmmN8KWG4N6A3XpUiRT
13  740628 aRJW7SwKsVyZu8b4FighiM
14  363466 asv7tL6CEYjiW2XCkLxhcX
15  411469 aswcEAtxj24u9MfuBmS9AW
16  740630 aThMD6zuEFjtTfptwcpZPg
17  411388 aTyGBYk6HvRXmki9ksb29p
18  740624 aUeYzPfq6WED4dDF28VT9D
19  363381 aWd7wujF5d5HYaYMhT4jBZ
20  740626 awMnFDna5kWR3LXKyGmFMd
21  331848 axYbEbLcJxzUNFbqMVySjJ
22  740629 axyJSgLRDeSk3BHB6cJmYk
23  408149 ayhCy68ZTaDGc7tuGthQpJ
24  740627 aYokcZAjTZ9JCyVXz4R5rh
                                                                     title
1              PLAY Home Questionaires - 12 Bilingual English (2020-03-04)
2                                        PLAY_HomeQuestionaires_12_English
3                                    PLAY Home Questionnaires (24 English)
4             PLAY Home Questionnaires - 24 Bilingual English (2020-03-04)
5                       PLAY Home Questionnaires - 12 English (2020-03-04)
6                        PLAY Home Questionnaires (12 Bilingual - English)
7                       PLAY Home Questionnaires - 18 English (2020-03-04)
8                                    PLAY Home Questionnaires (18 English)
9                              PLAY_HomeQuestionaires_24_Bilingual_English
10 Clone of Clone of PLAY_HomeQuestionnaires_18_English - NO AUTO METADATA
11             Clone of PLAY_HomeQuestionnaires_18_English - NO AUTO TODAY
12                             PLAY_HomeQuestionaires_12_Bilingual_English
13                                      PLAY_HomeQuestionnaires_18_English
14            PLAY Home Questionnaires - 18 Bilingual English (2020-03-04)
15            PLAY Home Questionnaires - 12 Bilingual Spanish (2020-03-04)
16                             PLAY_HomeQuestionaires_24_Bilingual_Spanish
17            PLAY Home Questionnaires - 18 Bilingual Spanish (2020-03-04)
18                             PLAY_HomeQuestionaires_12_Bilingual_Spanish
19                      PLAY Home Questionnaires - 24 English (2020-03-04)
20                             PLAY_HomeQuestionaires_18_Bilingual_English
21                                   PLAY Home Questionnaires (12 English)
22                                      PLAY_HomeQuestionnaires_24_English
23            PLAY Home Questionnaires - 24 Bilingual Spanish (2020-03-04)
24                             PLAY_HomeQuestionaires_18_Bilingual_Spanish
                                                               description
1            PLAY Home Questionaires - 12 Bilingual (English) (2020-03-04)
2                             PLAY_HomeQuestionaires_12_English-2021-07-29
3                                    PLAY Home Questionnaires (24 English)
4             PLAY Home Questionnaires - 24 Bilingual English (2019-11-20)
5                       PLAY Home Questionnaires - 12 English (2019-11-20)
6                        PLAY Home Questionnaires (12 Bilingual - English)
7                       PLAY Home Questionnaires - 18 English (2018-11-20)
8                                    PLAY Home Questionnaires (18 English)
9                   PLAY_HomeQuestionaires_24_Bilingual_English-2021-07-30
10 Clone of Clone of PLAY_HomeQuestionnaires_18_English - NO AUTO METADATA
11                             Clone of PLAY_HomeQuestionnaires_18_English
12                  PLAY_HomeQuestionaires_12_Bilingual_English-2021-07-29
13                           PLAY_HomeQuestionnaires_18_English-2021-07-29
14            PLAY Home Questionnaires - 18 Bilingual English (2019-11-20)
15            PLAY Home Questionnaires - 12 Bilingual Spanish (2020-03-04)
16                  PLAY_HomeQuestionaires_24_Bilingual_Spanish-2021-07-30
17            PLAY Home Questionnaires - 18 Bilingual Spanish (2020-03-04)
18                  PLAY_HomeQuestionaires_12_Bilingual_Spanish-2021-07-29
19                      PLAY Home Questionnaires - 24 English (2019-11-20)
20                  PLAY_HomeQuestionaires_18_Bilingual_English-2021-07-29
21                                   PLAY Home Questionnaires (12 English)
22                           PLAY_HomeQuestionnaires_24_English-2021-07-30
23            PLAY Home Questionnaires - 24 Bilingual Spanish (2020-02-27)
24                  PLAY_HomeQuestionaires_18_Bilingual_Spanish-2021-07-29
                                              url
1   https://kc.kobotoolbox.org/api/v1/data/411456
2   https://kc.kobotoolbox.org/api/v1/data/740625
3   https://kc.kobotoolbox.org/api/v1/data/331453
4   https://kc.kobotoolbox.org/api/v1/data/363465
5   https://kc.kobotoolbox.org/api/v1/data/363431
6   https://kc.kobotoolbox.org/api/v1/data/334099
7   https://kc.kobotoolbox.org/api/v1/data/363349
8   https://kc.kobotoolbox.org/api/v1/data/307736
9   https://kc.kobotoolbox.org/api/v1/data/740631
10 https://kc.kobotoolbox.org/api/v1/data/1151489
11 https://kc.kobotoolbox.org/api/v1/data/1136694
12  https://kc.kobotoolbox.org/api/v1/data/740623
13  https://kc.kobotoolbox.org/api/v1/data/740628
14  https://kc.kobotoolbox.org/api/v1/data/363466
15  https://kc.kobotoolbox.org/api/v1/data/411469
16  https://kc.kobotoolbox.org/api/v1/data/740630
17  https://kc.kobotoolbox.org/api/v1/data/411388
18  https://kc.kobotoolbox.org/api/v1/data/740624
19  https://kc.kobotoolbox.org/api/v1/data/363381
20  https://kc.kobotoolbox.org/api/v1/data/740626
21  https://kc.kobotoolbox.org/api/v1/data/331848
22  https://kc.kobotoolbox.org/api/v1/data/740629
23  https://kc.kobotoolbox.org/api/v1/data/408149
24  https://kc.kobotoolbox.org/api/v1/data/740627
                                                              form_url
1  https://kf.kobotoolbox.org/api/v2/assets/a58ZhjX6M8WXtzLGvBaEaG.xls
2  https://kf.kobotoolbox.org/api/v2/assets/a8HyzdxnVjK53dt4fX3Vup.xls
3  https://kf.kobotoolbox.org/api/v2/assets/aae4wz2tpkSnAkea2PAzin.xls
4  https://kf.kobotoolbox.org/api/v2/assets/abYGMsrMvkGsnA4xm9kqC9.xls
5  https://kf.kobotoolbox.org/api/v2/assets/acCBJaRqBkSMPYdvaaWCSu.xls
6  https://kf.kobotoolbox.org/api/v2/assets/ad3NtS6TDPuKTUKCAyCuby.xls
7  https://kf.kobotoolbox.org/api/v2/assets/aEMERWLYQAdhaMKMt5QkD7.xls
8  https://kf.kobotoolbox.org/api/v2/assets/aeMJQLo56HWyVHkKX9oaJD.xls
9  https://kf.kobotoolbox.org/api/v2/assets/ahYJ7XRUcit8gbFYwaxnAV.xls
10 https://kf.kobotoolbox.org/api/v2/assets/aLqdPLTCZb8jvFkDxcFwzy.xls
11 https://kf.kobotoolbox.org/api/v2/assets/aMteoHisncRUStdyZfsjMB.xls
12 https://kf.kobotoolbox.org/api/v2/assets/aoLcmmN8KWG4N6A3XpUiRT.xls
13 https://kf.kobotoolbox.org/api/v2/assets/aRJW7SwKsVyZu8b4FighiM.xls
14 https://kf.kobotoolbox.org/api/v2/assets/asv7tL6CEYjiW2XCkLxhcX.xls
15 https://kf.kobotoolbox.org/api/v2/assets/aswcEAtxj24u9MfuBmS9AW.xls
16 https://kf.kobotoolbox.org/api/v2/assets/aThMD6zuEFjtTfptwcpZPg.xls
17 https://kf.kobotoolbox.org/api/v2/assets/aTyGBYk6HvRXmki9ksb29p.xls
18 https://kf.kobotoolbox.org/api/v2/assets/aUeYzPfq6WED4dDF28VT9D.xls
19 https://kf.kobotoolbox.org/api/v2/assets/aWd7wujF5d5HYaYMhT4jBZ.xls
20 https://kf.kobotoolbox.org/api/v2/assets/awMnFDna5kWR3LXKyGmFMd.xls
21 https://kf.kobotoolbox.org/api/v2/assets/axYbEbLcJxzUNFbqMVySjJ.xls
22 https://kf.kobotoolbox.org/api/v2/assets/axyJSgLRDeSk3BHB6cJmYk.xls
23 https://kf.kobotoolbox.org/api/v2/assets/ayhCy68ZTaDGc7tuGthQpJ.xls
24 https://kf.kobotoolbox.org/api/v2/assets/aYokcZAjTZ9JCyVXz4R5rh.xls

There are n= {r dim(kb_home_df)[1]} separate data files.

Retrieve and save files

We save the answer files in data/xlsx/home_visit/raw/ans and the question files in data/xlsx/home_visit/raw/qs. To extract the answer data only, we would set save_form = FALSE.

Note

This process seems inefficient. Most of the time most of the files do not change. But, it ensures that if there are any upstream changes to the raw KoBoToolbox data forms that those get propagated to our local copies.

Code
kobo_retrieve_save_many_xlsx(
  kb_home_df,
  save_dir = file.path(here::here(), "data/xlsx/home_visit/raw"),
  save_form = TRUE
)
Retrieving 24 files from KoBoToolbox site.
Retrieving questionnaire responses...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/ans/411456_PLAY_Home_Questionaires_-_12_Bilingual_English_2020-03-04.xlsx`
Retrieving questions...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/qs/411456_PLAY_Home_Questionaires_-_12_Bilingual_English_2020-03-04-forms.xlsx`
Retrieving questionnaire responses...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/ans/740625_PLAY_HomeQuestionaires_12_English.xlsx`
Retrieving questions...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/qs/740625_PLAY_HomeQuestionaires_12_English-forms.xlsx`
KoBo files: ■■■                                8% |  ETA: 50s
Retrieving questionnaire responses...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/ans/331453_PLAY_Home_Questionnaires_24_English.xlsx`
Retrieving questions...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/qs/331453_PLAY_Home_Questionnaires_24_English-forms.xlsx`
KoBo files: ■■■■■                             12% |  ETA: 38s
Retrieving questionnaire responses...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/ans/363465_PLAY_Home_Questionnaires_-_24_Bilingual_English_2020-03-04.xlsx`
Retrieving questions...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/qs/363465_PLAY_Home_Questionnaires_-_24_Bilingual_English_2020-03-04-forms.xlsx`
Retrieving questionnaire responses...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/ans/363431_PLAY_Home_Questionnaires_-_12_English_2020-03-04.xlsx`
Retrieving questions...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/qs/363431_PLAY_Home_Questionnaires_-_12_English_2020-03-04-forms.xlsx`
Retrieving questionnaire responses...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/ans/334099_PLAY_Home_Questionnaires_12_Bilingual_-_English.xlsx`
Retrieving questions...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/qs/334099_PLAY_Home_Questionnaires_12_Bilingual_-_English-forms.xlsx`
KoBo files: ■■■■■■■■■                         25% |  ETA: 28s
Retrieving questionnaire responses...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/ans/363349_PLAY_Home_Questionnaires_-_18_English_2020-03-04.xlsx`
Retrieving questions...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/qs/363349_PLAY_Home_Questionnaires_-_18_English_2020-03-04-forms.xlsx`
Retrieving questionnaire responses...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/ans/307736_PLAY_Home_Questionnaires_18_English.xlsx`
Retrieving questions...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/qs/307736_PLAY_Home_Questionnaires_18_English-forms.xlsx`
KoBo files: ■■■■■■■■■■■                       33% |  ETA: 23s
Retrieving questionnaire responses...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/ans/740631_PLAY_HomeQuestionaires_24_Bilingual_English.xlsx`
Retrieving questions...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/qs/740631_PLAY_HomeQuestionaires_24_Bilingual_English-forms.xlsx`
Retrieving questionnaire responses...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/ans/1151489_Clone_of_Clone_of_PLAY_HomeQuestionnaires_18_English_-_NO_AUTO_METADATA.xlsx`
Retrieving questions...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/qs/1151489_Clone_of_Clone_of_PLAY_HomeQuestionnaires_18_English_-_NO_AUTO_METADATA-forms.xlsx`
Retrieving questionnaire responses...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/ans/1136694_Clone_of_PLAY_HomeQuestionnaires_18_English_-_NO_AUTO_TODAY.xlsx`
Retrieving questions...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/qs/1136694_Clone_of_PLAY_HomeQuestionnaires_18_English_-_NO_AUTO_TODAY-forms.xlsx`
KoBo files: ■■■■■■■■■■■■■■■                   46% |  ETA: 18s
Retrieving questionnaire responses...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/ans/740623_PLAY_HomeQuestionaires_12_Bilingual_English.xlsx`
Retrieving questions...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/qs/740623_PLAY_HomeQuestionaires_12_Bilingual_English-forms.xlsx`
Retrieving questionnaire responses...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/ans/740628_PLAY_HomeQuestionnaires_18_English.xlsx`
Retrieving questions...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/qs/740628_PLAY_HomeQuestionnaires_18_English-forms.xlsx`
KoBo files: ■■■■■■■■■■■■■■■■■                 54% |  ETA: 16s
Retrieving questionnaire responses...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/ans/363466_PLAY_Home_Questionnaires_-_18_Bilingual_English_2020-03-04.xlsx`
Retrieving questions...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/qs/363466_PLAY_Home_Questionnaires_-_18_Bilingual_English_2020-03-04-forms.xlsx`
Retrieving questionnaire responses...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/ans/411469_PLAY_Home_Questionnaires_-_12_Bilingual_Spanish_2020-03-04.xlsx`
Retrieving questions...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/qs/411469_PLAY_Home_Questionnaires_-_12_Bilingual_Spanish_2020-03-04-forms.xlsx`
KoBo files: ■■■■■■■■■■■■■■■■■■■■              62% |  ETA: 13s
Retrieving questionnaire responses...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/ans/740630_PLAY_HomeQuestionaires_24_Bilingual_Spanish.xlsx`
Retrieving questions...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/qs/740630_PLAY_HomeQuestionaires_24_Bilingual_Spanish-forms.xlsx`
Retrieving questionnaire responses...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/ans/411388_PLAY_Home_Questionnaires_-_18_Bilingual_Spanish_2020-03-04.xlsx`
Retrieving questions...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/qs/411388_PLAY_Home_Questionnaires_-_18_Bilingual_Spanish_2020-03-04-forms.xlsx`
KoBo files: ■■■■■■■■■■■■■■■■■■■■■■            71% |  ETA: 10s
Retrieving questionnaire responses...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/ans/740624_PLAY_HomeQuestionaires_12_Bilingual_Spanish.xlsx`
Retrieving questions...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/qs/740624_PLAY_HomeQuestionaires_12_Bilingual_Spanish-forms.xlsx`
Retrieving questionnaire responses...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/ans/363381_PLAY_Home_Questionnaires_-_24_English_2020-03-04.xlsx`
Retrieving questions...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/qs/363381_PLAY_Home_Questionnaires_-_24_English_2020-03-04-forms.xlsx`
Retrieving questionnaire responses...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/ans/740626_PLAY_HomeQuestionaires_18_Bilingual_English.xlsx`
Retrieving questions...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/qs/740626_PLAY_HomeQuestionaires_18_Bilingual_English-forms.xlsx`
KoBo files: ■■■■■■■■■■■■■■■■■■■■■■■■■■        83% |  ETA:  5s
Retrieving questionnaire responses...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/ans/331848_PLAY_Home_Questionnaires_12_English.xlsx`
Retrieving questions...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/qs/331848_PLAY_Home_Questionnaires_12_English-forms.xlsx`
Retrieving questionnaire responses...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/ans/740629_PLAY_HomeQuestionnaires_24_English.xlsx`
Retrieving questions...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/qs/740629_PLAY_HomeQuestionnaires_24_English-forms.xlsx`
KoBo files: ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■     92% |  ETA:  3s
Retrieving questionnaire responses...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/ans/408149_PLAY_Home_Questionnaires_-_24_Bilingual_Spanish_2020-03-04.xlsx`
Retrieving questions...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/qs/408149_PLAY_Home_Questionnaires_-_24_Bilingual_Spanish_2020-03-04-forms.xlsx`
Retrieving questionnaire responses...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/ans/740627_PLAY_HomeQuestionaires_18_Bilingual_Spanish.xlsx`
Retrieving questions...
Saved `/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/raw/qs/740627_PLAY_HomeQuestionaires_18_Bilingual_Spanish-forms.xlsx`
[[1]]
NULL

[[2]]
NULL

[[3]]
NULL

[[4]]
NULL

[[5]]
NULL

[[6]]
NULL

[[7]]
NULL

[[8]]
NULL

[[9]]
NULL

[[10]]
NULL

[[11]]
NULL

[[12]]
NULL

[[13]]
NULL

[[14]]
NULL

[[15]]
NULL

[[16]]
NULL

[[17]]
NULL

[[18]]
NULL

[[19]]
NULL

[[20]]
NULL

[[21]]
NULL

[[22]]
NULL

[[23]]
NULL

[[24]]
NULL

Normalize file names

Some of the form names are inconsistent, so we normalize them to fit the following pattern:

<form_id>_PLAY_HomeQuestionnaires_<age_group>_<lang_group>.xlsx

Code
rename_home_xlsx(
  fl = list.files(
    file.path(here::here(), "data/xlsx/home_visit/raw/ans"),
    "\\.xlsx$",
    full.names = TRUE
  ),
  out_dir = file.path(here::here(), "data/xlsx/home_visit/std_name")
)
 [1] "/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/std_name/1136694_PLAY_HomeQuestionnares_18_english.xlsx"         
 [2] "/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/std_name/1151489_PLAY_HomeQuestionnares_18_english.xlsx"         
 [3] "/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/std_name/307736_PLAY_HomeQuestionnares_18_english.xlsx"          
 [4] "/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/std_name/331453_PLAY_HomeQuestionnares_24_english.xlsx"          
 [5] "/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/std_name/331848_PLAY_HomeQuestionnares_12_english.xlsx"          
 [6] "/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/std_name/334099_PLAY_HomeQuestionnares_12_bilingual_english.xlsx"
 [7] "/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/std_name/363349_PLAY_HomeQuestionnares_18_english.xlsx"          
 [8] "/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/std_name/363381_PLAY_HomeQuestionnares_24_english.xlsx"          
 [9] "/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/std_name/363431_PLAY_HomeQuestionnares_12_english.xlsx"          
[10] "/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/std_name/363465_PLAY_HomeQuestionnares_24_bilingual_english.xlsx"
[11] "/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/std_name/363466_PLAY_HomeQuestionnares_18_bilingual_english.xlsx"
[12] "/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/std_name/408149_PLAY_HomeQuestionnares_24_bilingual_spanish.xlsx"
[13] "/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/std_name/411388_PLAY_HomeQuestionnares_18_bilingual_spanish.xlsx"
[14] "/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/std_name/411456_PLAY_HomeQuestionnares_12_bilingual_english.xlsx"
[15] "/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/std_name/411469_PLAY_HomeQuestionnares_12_bilingual_spanish.xlsx"
[16] "/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/std_name/740623_PLAY_HomeQuestionnares_12_bilingual_english.xlsx"
[17] "/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/std_name/740624_PLAY_HomeQuestionnares_12_bilingual_spanish.xlsx"
[18] "/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/std_name/740625_PLAY_HomeQuestionnares_12_english.xlsx"          
[19] "/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/std_name/740626_PLAY_HomeQuestionnares_18_bilingual_english.xlsx"
[20] "/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/std_name/740627_PLAY_HomeQuestionnares_18_bilingual_spanish.xlsx"
[21] "/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/std_name/740628_PLAY_HomeQuestionnares_18_english.xlsx"          
[22] "/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/std_name/740629_PLAY_HomeQuestionnares_24_english.xlsx"          
[23] "/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/std_name/740630_PLAY_HomeQuestionnares_24_bilingual_spanish.xlsx"
[24] "/Users/rog1/rrr/KoBoToolbox/data/xlsx/home_visit/std_name/740631_PLAY_HomeQuestionnares_24_bilingual_english.xlsx"

Save renamed xlsx as csv

We save the (answer) CSVs in data/csv/home_visit/raw.

Code
file_load_xlsx_save_many_csv(
  in_dir = file.path(here::here(), "data/xlsx/home_visit/std_name"),
  out_dir = file.path(here::here(), "data/csv/home_visit/raw"),
  filter_str = ".*"
)
 [1] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/raw/1136694_PLAY_HomeQuestionnares_18_english.csv"         
 [2] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/raw/1151489_PLAY_HomeQuestionnares_18_english.csv"         
 [3] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/raw/307736_PLAY_HomeQuestionnares_18_english.csv"          
 [4] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/raw/331453_PLAY_HomeQuestionnares_24_english.csv"          
 [5] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/raw/331848_PLAY_HomeQuestionnares_12_english.csv"          
 [6] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/raw/334099_PLAY_HomeQuestionnares_12_bilingual_english.csv"
 [7] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/raw/363349_PLAY_HomeQuestionnares_18_english.csv"          
 [8] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/raw/363381_PLAY_HomeQuestionnares_24_english.csv"          
 [9] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/raw/363431_PLAY_HomeQuestionnares_12_english.csv"          
[10] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/raw/363465_PLAY_HomeQuestionnares_24_bilingual_english.csv"
[11] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/raw/363466_PLAY_HomeQuestionnares_18_bilingual_english.csv"
[12] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/raw/408149_PLAY_HomeQuestionnares_24_bilingual_spanish.csv"
[13] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/raw/411388_PLAY_HomeQuestionnares_18_bilingual_spanish.csv"
[14] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/raw/411456_PLAY_HomeQuestionnares_12_bilingual_english.csv"
[15] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/raw/411469_PLAY_HomeQuestionnares_12_bilingual_spanish.csv"
[16] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/raw/740623_PLAY_HomeQuestionnares_12_bilingual_english.csv"
[17] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/raw/740624_PLAY_HomeQuestionnares_12_bilingual_spanish.csv"
[18] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/raw/740625_PLAY_HomeQuestionnares_12_english.csv"          
[19] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/raw/740626_PLAY_HomeQuestionnares_18_bilingual_english.csv"
[20] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/raw/740627_PLAY_HomeQuestionnares_18_bilingual_spanish.csv"
[21] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/raw/740628_PLAY_HomeQuestionnares_18_english.csv"          
[22] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/raw/740629_PLAY_HomeQuestionnares_24_english.csv"          
[23] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/raw/740630_PLAY_HomeQuestionnares_24_bilingual_spanish.csv"
[24] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/raw/740631_PLAY_HomeQuestionnares_24_bilingual_english.csv"

Split MB-CDI from non

Next we import a CSV for a given form year, age group, and language group, and create two new CSV files: one with the MB-CDI data and one with all of the other survey questions.

By default, the document presumes that we want to convert all of the CSV files

Extract the ‘non-mbcdi’ questions first and add ‘non_mbcdi’ to the filename.

Code
file_split_non_mbcdi_csvs(
  fl = list.files(
    file.path(here::here(), "data/csv/home_visit/raw"),
    "\\.csv$",
    full.names = TRUE
  ),
  out_dir = file.path(here::here(), "data/csv/home_visit/non_mbcdi/raw")
)
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/1136694_non_mbcdi_18_english.csv
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/1151489_non_mbcdi_18_english.csv
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/307736_non_mbcdi_18_english.csv
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/331453_non_mbcdi_24_english.csv
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/331848_non_mbcdi_12_english.csv
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/334099_non_mbcdi_12_bilingual_english.csv
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/363349_non_mbcdi_18_english.csv
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/363381_non_mbcdi_24_english.csv
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/363431_non_mbcdi_12_english.csv
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/363465_non_mbcdi_24_bilingual_english.csv
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/363466_non_mbcdi_18_bilingual_english.csv
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/408149_non_mbcdi_24_bilingual_spanish.csv
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/411388_non_mbcdi_18_bilingual_spanish.csv
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/411456_non_mbcdi_12_bilingual_english.csv
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/411469_non_mbcdi_12_bilingual_spanish.csv
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/740623_non_mbcdi_12_bilingual_english.csv
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/740624_non_mbcdi_12_bilingual_spanish.csv
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/740625_non_mbcdi_12_english.csv
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/740626_non_mbcdi_18_bilingual_english.csv
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/740627_non_mbcdi_18_bilingual_spanish.csv
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/740628_non_mbcdi_18_english.csv
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/740629_non_mbcdi_24_english.csv
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/740630_non_mbcdi_24_bilingual_spanish.csv
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/740631_non_mbcdi_24_bilingual_english.csv
 [1] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/1136694_non_mbcdi_18_english.csv"         
 [2] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/1151489_non_mbcdi_18_english.csv"         
 [3] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/307736_non_mbcdi_18_english.csv"          
 [4] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/331453_non_mbcdi_24_english.csv"          
 [5] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/331848_non_mbcdi_12_english.csv"          
 [6] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/334099_non_mbcdi_12_bilingual_english.csv"
 [7] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/363349_non_mbcdi_18_english.csv"          
 [8] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/363381_non_mbcdi_24_english.csv"          
 [9] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/363431_non_mbcdi_12_english.csv"          
[10] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/363465_non_mbcdi_24_bilingual_english.csv"
[11] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/363466_non_mbcdi_18_bilingual_english.csv"
[12] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/408149_non_mbcdi_24_bilingual_spanish.csv"
[13] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/411388_non_mbcdi_18_bilingual_spanish.csv"
[14] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/411456_non_mbcdi_12_bilingual_english.csv"
[15] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/411469_non_mbcdi_12_bilingual_spanish.csv"
[16] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/740623_non_mbcdi_12_bilingual_english.csv"
[17] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/740624_non_mbcdi_12_bilingual_spanish.csv"
[18] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/740625_non_mbcdi_12_english.csv"          
[19] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/740626_non_mbcdi_18_bilingual_english.csv"
[20] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/740627_non_mbcdi_18_bilingual_spanish.csv"
[21] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/740628_non_mbcdi_18_english.csv"          
[22] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/740629_non_mbcdi_24_english.csv"          
[23] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/740630_non_mbcdi_24_bilingual_spanish.csv"
[24] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/non_mbcdi/raw/740631_non_mbcdi_24_bilingual_english.csv"

Creating a separate MBCDI CSV relies on a very similar function file_split_mbcdi_csvs.

Code
file_split_mbcdi_csvs(
  fl = list.files(
    file.path(here::here(), "data/csv/home_visit/raw"),
    "\\.csv$",
    full.names = TRUE
  ),
  out_dir = file.path(here::here(), "data/csv/home_visit/mbcdi")
)
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/1136694_mbcdi_18_english.csv
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/1151489_mbcdi_18_english.csv
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/307736_mbcdi_18_english.csv
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/331453_mbcdi_24_english.csv
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/331848_mbcdi_12_english.csv
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/334099_mbcdi_12_bilingual_english.csv
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/363349_mbcdi_18_english.csv
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/363381_mbcdi_24_english.csv
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/363431_mbcdi_12_english.csv
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/363465_mbcdi_24_bilingual_english.csv
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/363466_mbcdi_18_bilingual_english.csv
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/408149_mbcdi_24_bilingual_spanish.csv
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/411388_mbcdi_18_bilingual_spanish.csv
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/411456_mbcdi_12_bilingual_english.csv
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/411469_mbcdi_12_bilingual_spanish.csv
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/740623_mbcdi_12_bilingual_english.csv
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/740624_mbcdi_12_bilingual_spanish.csv
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/740625_mbcdi_12_english.csv
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/740626_mbcdi_18_bilingual_english.csv
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/740627_mbcdi_18_bilingual_spanish.csv
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/740628_mbcdi_18_english.csv
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/740629_mbcdi_24_english.csv
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/740630_mbcdi_24_bilingual_spanish.csv
Saved /Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/740631_mbcdi_24_bilingual_english.csv
 [1] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/1136694_mbcdi_18_english.csv"         
 [2] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/1151489_mbcdi_18_english.csv"         
 [3] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/307736_mbcdi_18_english.csv"          
 [4] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/331453_mbcdi_24_english.csv"          
 [5] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/331848_mbcdi_12_english.csv"          
 [6] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/334099_mbcdi_12_bilingual_english.csv"
 [7] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/363349_mbcdi_18_english.csv"          
 [8] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/363381_mbcdi_24_english.csv"          
 [9] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/363431_mbcdi_12_english.csv"          
[10] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/363465_mbcdi_24_bilingual_english.csv"
[11] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/363466_mbcdi_18_bilingual_english.csv"
[12] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/408149_mbcdi_24_bilingual_spanish.csv"
[13] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/411388_mbcdi_18_bilingual_spanish.csv"
[14] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/411456_mbcdi_12_bilingual_english.csv"
[15] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/411469_mbcdi_12_bilingual_spanish.csv"
[16] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/740623_mbcdi_12_bilingual_english.csv"
[17] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/740624_mbcdi_12_bilingual_spanish.csv"
[18] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/740625_mbcdi_12_english.csv"          
[19] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/740626_mbcdi_18_bilingual_english.csv"
[20] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/740627_mbcdi_18_bilingual_spanish.csv"
[21] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/740628_mbcdi_18_english.csv"          
[22] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/740629_mbcdi_24_english.csv"          
[23] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/740630_mbcdi_24_bilingual_spanish.csv"
[24] "/Users/rog1/rrr/KoBoToolbox/data/csv/home_visit/mbcdi/740631_mbcdi_24_bilingual_english.csv"