Skip to content

Commit

Permalink
Changed survey link and added to all tabs (#49)
Browse files Browse the repository at this point in the history
* Changed survey link and added to all tabs

* Changed position of survey link on other tabs

* Added school name to school to school tab

* Joined together lines on number of similar schools and number of suppressed schools

* Made survey link same size as other tabs on front page and put full stop after number of similar schools

* Changed suppressed values message

* Minor change to wording

* Reverted back to 2 lines
  • Loading branch information
isi-avbulimen authored and adamrobinson361 committed Nov 13, 2017
1 parent cfcb909 commit b7e8922
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 10 deletions.
11 changes: 7 additions & 4 deletions server.R
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,9 @@ shinyServer(function(input, output, session) {

#text saying the number of suppressed schools
output$t1_suppressed_schools <- renderText({
paste("Number of schools with suppressed values or that did not provide a value is",
sum(is.na(matched_schools()[[input$t1_measures]])))
paste(sum(is.na(matched_schools()[[input$t1_measures]])), "have suppressed or unsubmitted values and are excluded from the chart.")
})



#text saying value of selected measure for selected school
output$t1_school_ID_value <- renderText({
req(input$t1_School_ID, input$t1_measures)
Expand Down Expand Up @@ -293,6 +291,11 @@ shinyServer(function(input, output, session) {
)
})

#text saying the name of selected school
output$t2_school_name <- renderText({
paste("School:", t1_selected_ID()$`School Name`)
})

#Create reactive dataset for Selected ID tab 2
t2_selected_ID <- reactive({
filter(Data, ID == input$t1_School_ID) %>%
Expand Down
21 changes: 15 additions & 6 deletions ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ shinyUI(
width = 195
),
br(),
h4("If you would like to provide feedback on your experience using the tool,
please fill in our survey",
a("here.", href = "http://www.smartsurvey.co.uk/s/ZAVEJ/", target="_blank"))
h4(strong("This is a new service – your",
a("feedback", href = "http://www.smartsurvey.co.uk/s/ZAVEJ/", target="_blank"),
"will help us to improve it."))
),
position = "right"
)
Expand All @@ -116,6 +116,9 @@ shinyUI(

div(id = "t1_content",
h2("Comparison of Measures to Similar Schools"),
h4(strong("This is a new service – your",
a("feedback", href = "http://www.smartsurvey.co.uk/s/ZAVEJ/", target="_blank"),
"will help us to improve it."), align = "right"),
sidebarLayout(
sidebarPanel(
id = "t1_sidebar",
Expand Down Expand Up @@ -148,14 +151,13 @@ shinyUI(
strong(textOutput("t1_school_name")),
br(),
#text saying the number of schools in the comparison
textOutput("t1_selected_schools")),
textOutput("t1_selected_schools"),
textOutput("t1_suppressed_schools")),


#radio buttons to choose density plot or histogram
column(3, radioButtons("plot_type", "Plot type", c("density", "histogram"), inline = TRUE))
),
#text saying the number of suppressed schools
textOutput("t1_suppressed_schools"),
br(),
em("If number of schools in the comparison falls below 15, it
may be more useful to look at the histogram"),
Expand Down Expand Up @@ -203,6 +205,9 @@ shinyUI(
"School to School",
div(id = "t2_content",
h2("School to School Comparison of Measures"),
h4(strong("This is a new service – your",
a("feedback", href = "http://www.smartsurvey.co.uk/s/ZAVEJ/", target="_blank"),
"will help us to improve it."), align = "right"),
sidebarLayout(
sidebarPanel(
id = "t2_sidebar",
Expand All @@ -225,6 +230,10 @@ shinyUI(
downloadButton("t2_report", "Generate report"))
),
mainPanel(
br(),
#text saying the name of selected school
strong(textOutput("t2_school_name")),
br(),
plotOutput("t2_chart") %>%
withSpinner(color = "grey", type = 5, size = getOption("spinner.size", default = 0.4)),
br(),
Expand Down

0 comments on commit b7e8922

Please sign in to comment.