diff --git a/README.md b/README.md index 3734547..f770c22 100644 --- a/README.md +++ b/README.md @@ -6,69 +6,37 @@ [![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental) +`{surveyDesigner}` is a shinyApp to parse a master referential of questions and indicators to generate a contextualized series of [xlsform](http://xlsform.org) questionnaires. -`{surveyDesigner}` is a shinyApp to parse a master XlsForm to generate a contextualized questionnaire. -The app is build using [`{golem}` framework](https://thinkr-open.github.io/golem) and following the tutorial: [Engineering Production-Grade Shiny Apps](https://engineering-shiny.org//). +For the end-user, aka the Survey Coordinator at Operation level, the application is expected to: -Read more on the rationale for this app in the [vignette](https://unhcr-americas.github.io/surveyDesigner/docs/articles/surveyDesigner.html) + 1. Enforce a questionnaire design process that __starts from a selection of indicators__ that needs to be measured and pre-select automatically all the required standardized survey modules and questions in order to measure them. Not only this ensure that standards are actually used, but it will also minimize the risk of questionnaire design mistakes: "_collect what you need, use what you collect_" + + 2. Ease the __contextualization process__ from the global referential to the actual implementation in each country (i.e translating and adjusting the labels as per the specific context) and facilitate the feedback loop so that if the same ad-hoc questions are used in multiple context, they can be considered for inclusion in the global referential + + 3. Support the usage of [mixed-mode (CAPI/CATI?CAWI)](https://www.youtube.com/watch?v=qRmy2OAnyWc) and multiple data collection waves to collect the final dataset within an __annual survey data collection cycle__, all of this allowing both to promote survey integration and to maximize the financial resources invested in those activities -## Installation +Overall, this will contribute over time to the creation of [standardized survey-based indicators](https://egrisstats.org/resource/data-disaggregation-of-sdg-indicators-by-forced-displacement/) for comparative data analysis across countries and contexts. -You can install the development version from [GitHub](https://github.com/Thinkr-open/golem) with: +Read more on the rationale for this app in the [vignette](https://unhcr-americas.github.io/surveyDesigner/docs/articles/surveyDesigner.html) or go through the [wiki](https://github.com/unhcr-americas/surveyDesigner/wiki) to go through the technical specifications -``` r -# install.packages("remotes") -remotes::install_github("unhcr-americas/surveyDesigner") -``` ## Run the app -This script allows you to display the app -``` r -# Run the application -surveyDesigner::run_app() -``` +The app is still under development - the prototype is accessible here: https://rstudio.unhcr.org/Survey_Designer/ -## Update the app -This script allows you to quickly rebuild and display the app +To run it locally, use ``` r -# Detach all loaded packages and clean your environment -golem::detach_all_attached() - -# rm(list=ls(all.names = TRUE)) - -# Document and reload your package -golem::document_and_reload() - +# install.packages("remotes") +remotes::install_github("unhcr-americas/surveyDesigner") # Run the application surveyDesigner::run_app() ``` +## For developpers - -## Update the package documentation - -This script allows to update the package documentation - -``` r -devtools::document() - -devtools::check(document = FALSE) - -pkgdown::build_site() -``` - -## As dev : - -Please use template commit and MR : - -``` r -project_path <- "path_to_surveyDesigner" -gert::git_config_set(repo = project_path, name = "commit.template", value = ".github/template_commit") -``` - -## Code of Conduct +The app is build using [`{golem}` framework](https://thinkr-open.github.io/golem) and following the tutorial: [Engineering Production-Grade Shiny Apps](https://engineering-shiny.org//). Please note that the surveyDesigner project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms. diff --git a/docs/404.html b/docs/404.html index 5826594..b8e9bba 100644 --- a/docs/404.html +++ b/docs/404.html @@ -52,7 +52,7 @@ diff --git a/docs/CODE_OF_CONDUCT.html b/docs/CODE_OF_CONDUCT.html index 0bc2f20..5e3bbad 100644 --- a/docs/CODE_OF_CONDUCT.html +++ b/docs/CODE_OF_CONDUCT.html @@ -35,7 +35,7 @@
  • diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index 5095fb9..68f68d8 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -35,7 +35,7 @@
  • diff --git a/docs/LICENSE.html b/docs/LICENSE.html index cd3c7f1..fc19b0c 100644 --- a/docs/LICENSE.html +++ b/docs/LICENSE.html @@ -35,7 +35,7 @@
  • diff --git a/docs/articles/class-r6-for-the-referencial.html b/docs/articles/class-r6-for-the-referencial.html index ab794be..684d623 100644 --- a/docs/articles/class-r6-for-the-referencial.html +++ b/docs/articles/class-r6-for-the-referencial.html @@ -55,6 +55,9 @@
  • Class R6 for the referencial
  • +
  • + Mon module home +
  • diff --git a/docs/articles/class-r6-for-the-referential.html b/docs/articles/class-r6-for-the-referential.html new file mode 100644 index 0000000..6526435 --- /dev/null +++ b/docs/articles/class-r6-for-the-referential.html @@ -0,0 +1,192 @@ + + + + + + + +Class R6 for the referential • surveyDesigner + + + + + + + + + + + + +
    +
    + + + + +
    +
    + + + + +
    +library(surveyDesigner)
    + +
    +

    r6_referential +

    +

    The filtering of the referential should take in account the +order/sequence of questions and modules.

    +

    A specific method is implemented to separate our file with begin and +end group

    +
    +ref <- Referential$new(
    +  path = system.file("SurveyDesigner_Referential.xlsx", package = "surveyDesigner") 
    +)
    +#> New names:
    +#> result is store in `by_groups` sub-element
    +#>  `` -> `...14`
    +
    +head(ref$data$survey)
    +#> # A tibble: 6 × 33
    +#>   referential_id   type   name  label hint  required required_message constraint
    +#>   <chr>            <chr>  <chr> <chr> <chr> <chr>    <lgl>            <chr>     
    +#> 1 household_survey start  start NA    NA    NA       NA               NA        
    +#> 2 household_survey end    end   NA    NA    NA       NA               NA        
    +#> 3 household_survey calcu… star… NA    NA    NA       NA               NA        
    +#> 4 household_survey calcu… end_t NA    NA    NA       NA               NA        
    +#> 5 household_survey calcu… time… Time… NA    NA       NA               NA        
    +#> 6 household_survey calcu… time… Time… NA    NA       NA               NA        
    +#> # ℹ 25 more variables: constraint_message <chr>, relevant <chr>,
    +#> #   appearance <chr>, calculation <chr>, trigger <lgl>, parameters <lgl>,
    +#> #   repeat_count <chr>, default <lgl>, read_only <lgl>, choice_filter <chr>,
    +#> #   `media::image` <lgl>, `$given_name` <chr>, contextualize <lgl>,
    +#> #   contextualize_instruction <lgl>, block <lgl>, block_sequence <lgl>,
    +#> #   sequence <lgl>, mode <chr>, check <lgl>, accuracy <lgl>, chapter <lgl>,
    +#> #   subchapter <lgl>, labelReport <lgl>, hintReport <lgl>, keyword <lgl>
    +
    +# Example by groups
    +ref$by_groups$group_intro
    +#> $data
    +#> # A tibble: 6 × 33
    +#>   referential_id   type   name  label hint  required required_message constraint
    +#>   <chr>            <chr>  <chr> <chr> <chr> <chr>    <lgl>            <chr>     
    +#> 1 household_survey date   inte… Plea… NA    false    NA               NA        
    +#> 2 household_survey selec… Bure… Plea… Read… true     NA               NA        
    +#> 3 household_survey selec… Coun… Plea… Read… true     NA               NA        
    +#> 4 household_survey calcu… coun… NA    NA    false    NA               NA        
    +#> 5 household_survey geopo… geop… Reco… NA    false    NA               NA        
    +#> 6 household_survey selec… pop_… Plea… Read… true     NA               NA        
    +#> # ℹ 25 more variables: constraint_message <chr>, relevant <chr>,
    +#> #   appearance <chr>, calculation <chr>, trigger <lgl>, parameters <lgl>,
    +#> #   repeat_count <chr>, default <lgl>, read_only <lgl>, choice_filter <chr>,
    +#> #   `media::image` <lgl>, `$given_name` <chr>, contextualize <lgl>,
    +#> #   contextualize_instruction <lgl>, block <lgl>, block_sequence <lgl>,
    +#> #   sequence <lgl>, mode <chr>, check <lgl>, accuracy <lgl>, chapter <lgl>,
    +#> #   subchapter <lgl>, labelReport <lgl>, hintReport <lgl>, keyword <lgl>
    +#> 
    +#> $information
    +#> # A tibble: 2 × 33
    +#>   referential_id   type   name  label hint  required required_message constraint
    +#>   <chr>            <chr>  <chr> <chr> <chr> <chr>    <lgl>            <chr>     
    +#> 1 household_survey begin… grou… Inte… NA    false    NA               NA        
    +#> 2 household_survey end_g… NA    NA    NA    NA       NA               NA        
    +#> # ℹ 25 more variables: constraint_message <chr>, relevant <chr>,
    +#> #   appearance <chr>, calculation <chr>, trigger <lgl>, parameters <lgl>,
    +#> #   repeat_count <chr>, default <lgl>, read_only <lgl>, choice_filter <chr>,
    +#> #   `media::image` <lgl>, `$given_name` <chr>, contextualize <lgl>,
    +#> #   contextualize_instruction <lgl>, block <lgl>, block_sequence <lgl>,
    +#> #   sequence <lgl>, mode <chr>, check <lgl>, accuracy <lgl>, chapter <lgl>,
    +#> #   subchapter <lgl>, labelReport <lgl>, hintReport <lgl>, keyword <lgl>
    +
    +
    +

    Utils for referential manipulation +

    +
    +
    + + + +
    + + + +
    + +
    +

    +

    Site built with pkgdown 2.0.7.

    +
    + +
    +
    + + + + + + + + diff --git a/docs/articles/index.html b/docs/articles/index.html index 39ac7de..594ec9c 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -35,7 +35,7 @@
  • @@ -57,7 +57,7 @@

    Articles

    All vignettes

    -
    Class R6 for the referencial
    +
    Class R6 for the referential
    surveyDesigner
    diff --git a/docs/articles/surveyDesigner.html b/docs/articles/surveyDesigner.html index 05ae8e9..9881553 100644 --- a/docs/articles/surveyDesigner.html +++ b/docs/articles/surveyDesigner.html @@ -53,7 +53,7 @@
  • diff --git a/docs/authors.html b/docs/authors.html index ed1a3f8..43c3766 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -35,7 +35,7 @@
  • diff --git a/docs/index.html b/docs/index.html index 2ae5b38..46903f3 100644 --- a/docs/index.html +++ b/docs/index.html @@ -53,7 +53,7 @@
  • @@ -78,63 +78,30 @@ -

    {surveyDesigner} is a shinyApp to parse a master XlsForm to generate a contextualized questionnaire.

    -

    The app is build using {golem} framework and following the tutorial: Engineering Production-Grade Shiny Apps.

    -

    Read more on the rationale for this app in the vignette

    +

    {surveyDesigner} is a shinyApp to parse a master referential of questions and indicators to generate a contextualized series of xlsform questionnaires.

    +

    For the end-user, aka the Survey Coordinator at Operation level, the application is expected to:

    +
      +
    1. Enforce a questionnaire design process that starts from a selection of indicators that needs to be measured and pre-select automatically all the required standardized survey modules and questions in order to measure them. Not only this ensure that standards are actually used, but it will also minimize the risk of questionnaire design mistakes: “collect what you need, use what you collect

    2. +
    3. Ease the contextualization process from the global referential to the actual implementation in each country (i.e translating and adjusting the labels as per the specific context) and facilitate the feedback loop so that if the same ad-hoc questions are used in multiple context, they can be considered for inclusion in the global referential

    4. +
    5. Support the usage of mixed-mode (CAPI/CATI?CAWI) and multiple data collection waves to collect the final dataset within an annual survey data collection cycle, all of this allowing both to promote survey integration and to maximize the financial resources invested in those activities

    6. +
    +

    Overall, this will contribute over time to the creation of standardized survey-based indicators for comparative data analysis across countries and contexts.

    +

    Read more on the rationale for this app in the vignette or go through the wiki to go through the technical specifications

    -

    Installation +

    Run the app

    -

    You can install the development version from GitHub with:

    +

    The app is still under development - the prototype is accessible here: https://rstudio.unhcr.org/Survey_Designer/

    +

    To run it locally, use

     # install.packages("remotes")
    -remotes::install_github("unhcr-americas/surveyDesigner")
    -
    -
    -

    Run the app -

    -

    This script allows you to display the app

    -
    -# Run the application
    -surveyDesigner::run_app()
    -
    -
    -

    Update the app -

    -

    This script allows you to quickly rebuild and display the app

    -
    -# Detach all loaded packages and clean your environment
    -golem::detach_all_attached()
    -
    -# rm(list=ls(all.names = TRUE))
    -
    -# Document and reload your package
    -golem::document_and_reload()
    -
    +remotes::install_github("unhcr-americas/surveyDesigner")
     # Run the application
     surveyDesigner::run_app()
    -

    Update the package documentation -

    -

    This script allows to update the package documentation

    -
    -devtools::document()
    -
    -devtools::check(document = FALSE)
    -
    -pkgdown::build_site()
    -
    -
    -

    As dev : -

    -

    Please use template commit and MR :

    -
    -project_path <- "path_to_surveyDesigner"
    -gert::git_config_set(repo = project_path, name = "commit.template", value = ".github/template_commit")
    -
    -
    -

    Code of Conduct +

    For developpers

    +

    The app is build using {golem} framework and following the tutorial: Engineering Production-Grade Shiny Apps.

    Please note that the surveyDesigner project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

    diff --git a/docs/news/index.html b/docs/news/index.html index 8496806..f938659 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -35,7 +35,7 @@
  • diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index dd9e94f..8006c3e 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -2,7 +2,7 @@ pandoc: 2.19.2 pkgdown: 2.0.7 pkgdown_sha: ~ articles: - class-r6-for-the-referencial: class-r6-for-the-referencial.html + class-r6-for-the-referential: class-r6-for-the-referential.html surveyDesigner: surveyDesigner.html -last_built: 2023-04-05T11:55Z +last_built: 2023-04-26T17:55Z diff --git a/docs/pull_request_template.html b/docs/pull_request_template.html index bc826bf..51b90e7 100644 --- a/docs/pull_request_template.html +++ b/docs/pull_request_template.html @@ -35,7 +35,7 @@
  • @@ -54,35 +54,35 @@

    NA

    -