From b1744b28b406e1fa719f9a66de08c01ed0db4864 Mon Sep 17 00:00:00 2001 From: Graeme16161 Date: Sun, 23 Jun 2019 21:35:59 -0400 Subject: [PATCH] added data notes to last 2 pages --- App_Files/Beer_App2.R | 35 ++++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/App_Files/Beer_App2.R b/App_Files/Beer_App2.R index 0cd6cfe..e0f09c3 100644 --- a/App_Files/Beer_App2.R +++ b/App_Files/Beer_App2.R @@ -234,6 +234,11 @@ ui <- dashboardPage( selected = "Blank") + ), + box(width = NULL, + title = "Data Information", + background = "black", + textOutput("brewery_text2") ) ) @@ -316,6 +321,11 @@ ui <- dashboardPage( "Choose Data Subject:", choices = reviewchoices, selected = "Mean ABV") + ), + box(width = NULL, + title = "Data Information", + background = "black", + textOutput("reviews_text") ) ) @@ -364,6 +374,14 @@ server <- function(input, output) { } }) + output$brewery_text2 <-renderText({ + if(input$pop_choice1 == "Number of Breweries"){ + "Number of breweries measures the total number of breweries as licensed by the US Alcohol and Tobacco Tax and Trade Bureau." + }else{ + "Residents per brewery measures the number of state residents (in 1000s) per brewery located in the state." + } + }) + ###productionmap output$prodcutionmapPlot <- renderGvis({ @@ -424,15 +442,15 @@ server <- function(input, output) { }) output$production_text2 <-renderText({ - if(input$production_choices == "Total Beer Production"){ + if(input$production_choice1 == "Total Beer Production"){ "Total beer production measures the beer production (in barrels) that is deemed taxable by the US Alcohol and Tobacco Tax and Trade Bureau. It should be noted that this statistic does not include exported beer, thus only beer destined for the American market is included in the map." - }else if(input$production_choices == "Beer Consumed in Breweries (per person)"){ + }else if(input$production_choice1 == "Beer Consumed in Breweries (per person)"){ "Beer Consumed in Breweries (per person) measures the amount of beer (in 16oz pints) consumed on the premise of a brewery for each resident of the respective state. It should be noted that this statistic does not distinguish between state residents and visitors." - }else if(input$production_choices == "Beer Produced (per person)"){ + }else if(input$production_choice1 == "Beer Produced (per person)"){ "Beer Produced (per person) measures the amount of beer produced (in 16oz pints) AND destined for the American market per resident of the respective state." - }else if(input$production_choices == "Production consumed in Breweries (%)"){ + }else if(input$production_choice1 == "Production consumed in Breweries (%)"){ "Percentage of production consumed in breweries measures the percentage of a state\u0027s total beer production (destined for the American market) that is consumed on a brewery premise." - }else if(input$production_choices == "Production sold in Bottles and Cans (%)"){ + }else if(input$production_choice1 == "Production sold in Bottles and Cans (%)"){ "Percentage of production sold in bottles and cans measure the percentage of a state\u0027s total beer production (destined for the American market) that is sold in bottles and cans." }else{ "Percentage of production sold in kegs measures the percentage of a state\u0027s total beer production (destined for the American market) that is sold in kegs." @@ -527,6 +545,13 @@ server <- function(input, output) { }) + output$reviews_text <-renderText({ + if(input$Subject == "Mean ABV"){ + "Mean ABV measures the average alcohol content of the reviewed beers in a given state. Note that this statistic is very simply calculated using the scraped beer review data. " + }else{ + "Mean rating measures the average overall rating of the reviewed beers in a given state. Note that this statistic is very simply calculated using the scraped beer review data." + } + }) }