Skip to content

Commit

Permalink
Merge pull request #28 from unhcr-americas/11-as-dev-i-would-like-to-…
Browse files Browse the repository at this point in the history
…wireframe-the-ui-in-order-to-give-preview-and-create-engagement

rev
  • Loading branch information
Edouard-Legoupil authored Sep 27, 2023
2 parents 341f90c + 7bb4bd5 commit d8144a7
Show file tree
Hide file tree
Showing 10 changed files with 4,458 additions and 398 deletions.
17 changes: 10 additions & 7 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,33 @@ Authors@R: c(
person("Edouard", "Legoupil", , "[email protected]", role = c("aut", "cre")),
person("Cervan", "Girard", , "[email protected]", role = "aut")
)
Description: The package offers a series of utilities to help field practionners
designing their annual survey cycle.
Description: The package offers a series of utilities to help field
practionners designing their annual survey cycle.
License: MIT + file LICENSE
Imports:
config (>= 0.3.1),
dplyr,
shinydashboard,
countrycode,
dplyr,
glue,
golem (>= 0.4.0),
magrittr,
purrr,
R6,
readxl,
refugees,
shiny (>= 1.7.3),
shinydashboard,
tidyverse,
unhcrshiny
Suggests:
knitr,
prettydoc,
rmarkdown,
spelling,
testthat (>= 3.0.0)
Remotes:
edouard-legoupil/unhcrshiny
VignetteBuilder:
knitr
Remotes:
edouard-legoupil/unhcrshiny
Config/testthat/edition: 3
Encoding: UTF-8
Language: en-US
Expand Down
10 changes: 5 additions & 5 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# Generated by roxygen2: do not edit by hand

export("%>%")
export(Referential)
export(run_app)
import(dplyr)
import(golem)
import(refugees)
import(shiny)
import(shinydashboard)
import(tidyverse)
importFrom(R6,R6Class)
importFrom(dashboardthemes,shinyDashboardThemeDIY)
importFrom(dplyr,contains)
importFrom(dplyr,filter)
importFrom(dplyr,select)
Expand All @@ -16,12 +18,10 @@ importFrom(golem,add_resource_path)
importFrom(golem,bundle_resources)
importFrom(golem,favicon)
importFrom(golem,with_golem_options)
importFrom(magrittr,"%>%")
importFrom(purrr,map)
importFrom(purrr,map2)
importFrom(purrr,set_names)
importFrom(readxl,excel_sheets)
importFrom(readxl,read_xlsx)
importFrom(shiny,NS)
importFrom(shiny,shinyApp)
importFrom(shiny,tagList)
importFrom(unhcrshiny,theme_shinydashboard_unhcr)
38 changes: 37 additions & 1 deletion R/app_server.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,45 @@
#' @noRd
#' @keywords internal
app_server <- function(input, output, session) {

## load the refrential

## add a reactive value object to pass by elements between objects
AppReactiveValue <- reactiveValues()
AppReactiveValue <- reactiveValues(
title = "Title for your data collection project",
year = "2023",
abstract="Provide an abstract for the data collection activities",
country = "PAN",
coverage = "yes",
survey = readxl::read_xlsx(system.file("SurveyDesigner_Referential.xlsx",
package = "surveyDesigner"),
sheet = "survey"),
choices = readxl::read_xlsx(system.file("SurveyDesigner_Referential.xlsx",
package = "surveyDesigner"),
sheet = "choices"),
indicator = readxl::read_xlsx(system.file("SurveyDesigner_Referential.xlsx",
package = "surveyDesigner"),
sheet = "indicator"),
indicator_survey = readxl::read_xlsx(system.file("SurveyDesigner_Referential.xlsx",
package = "surveyDesigner"),
sheet = "indicator_survey"),
indicator_choices = readxl::read_xlsx(system.file("SurveyDesigner_Referential.xlsx",
package = "surveyDesigner"),
sheet = "indicator_choices"),
indicator_population = readxl::read_xlsx(system.file("SurveyDesigner_Referential.xlsx",
package = "surveyDesigner"),
sheet = "indicator_population"),
indicator_disaggregation = readxl::read_xlsx(system.file("SurveyDesigner_Referential.xlsx",
package = "surveyDesigner"),
sheet = "indicator_disaggregation") ,

## get list of indicator topic





)
# pins::board_register() # connect to pin board if needed
callModule(mod_home_server, "home_ui_1")
callModule(mod_context_server, "context_ui_1", AppReactiveValue)
Expand Down
44 changes: 22 additions & 22 deletions R/mod_content.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ mod_content_ui <- function(id) {
fluidRow(
# Valid statuses are: primary, success, info, warning, danger.
column(
6,
12,
box(title = " Filters on Topics",
width = NULL,
collapsible = FALSE,
Expand Down Expand Up @@ -111,27 +111,27 @@ mod_content_ui <- function(id) {
"Information" ))
)
),
column(
6,
box(title = " Filters on Framework",
width = NULL,
status = "warning",
tags$div(title="Standard Indicators",
checkboxGroupInput(inputId = ns("Disaggregation"),
label = " Tick to filter ",
choices = list("UNHCR Compass / RBM"="RBM",
"UN Stat Commission / EGRISS"="EGRISS",
"Sustainable Development Goal / SDG"="SDG",
"Global Compact on Refugee / GCR"="GCR",
"Humanitarian Sphere Standards"="Sphere",
"Post Distribution & Assistance Monitoring"="PDM",
"Assistance Targeting / Excellence Hub"="targeting",
"Framework on Durable Solutions /IASC "="Durable",
"Protection Mainstreaming / ECHO "="Durable",
"Composite Indicator / Index"="Index"
) ) )
)
)
# column(
# 6,
# box(title = " Filters on Framework",
# width = NULL,
# status = "warning",
# tags$div(title="Standard Indicators",
# checkboxGroupInput(inputId = ns("Disaggregation"),
# label = " Tick to filter ",
# choices = list("UNHCR Compass / RBM"="RBM",
# "UN Stat Commission / EGRISS"="EGRISS",
# "Sustainable Development Goal / SDG"="SDG",
# "Global Compact on Refugee / GCR"="GCR",
# "Humanitarian Sphere Standards"="Sphere",
# "Post Distribution & Assistance Monitoring"="PDM",
# "Assistance Targeting / Excellence Hub"="targeting",
# "Framework on Durable Solutions /IASC "="Durable",
# "Protection Mainstreaming / ECHO "="Durable",
# "Composite Indicator / Index"="Index"
# ) ) )
# )
# )
)


Expand Down
Loading

0 comments on commit d8144a7

Please sign in to comment.