Skip to content

Commit

Permalink
Merge pull request #572 from TheRensselaerIDEA/#569
Browse files Browse the repository at this point in the history
  • Loading branch information
olyerickson committed Dec 3, 2019
2 parents 85d9c28 + 5fd4dd8 commit 76bbdc5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 28 deletions.
28 changes: 11 additions & 17 deletions app.R
Expand Up @@ -383,7 +383,6 @@ ui <- fluidPage(
fluidRow(
class = "page3_col3_top",
tags$br(),
tags$br(),
tags$p(htmlOutput("determinant_text")),
tags$h5(htmlOutput("determinant_corr")),
tags$h5(htmlOutput("determinant_dir")),
Expand All @@ -393,12 +392,6 @@ ui <- fluidPage(
fluidRow(
class = "page3_col3_bot",
tags$div(
class = "col1_bot_title",
uiOutput("textSDGeo")
),
leafletOutput("determinants_plot5"),
tags$div(

tags$div(
class = "prompt_text",
uiOutput("textCountyPrompt")
Expand All @@ -411,8 +404,9 @@ ui <- fluidPage(
# tags$br(),
# tags$br(),
uiOutput("county_desc")
)
),

leafletOutput("determinants_plot5")
) # End of inner Column 3 bottom

) # End of Column 3
Expand Down Expand Up @@ -1441,20 +1435,20 @@ server <- function(input, output, session) {
dr.00.02 <- county.data.00.02$death_rate
dr.15.17 <- county.data.15.17$death_rate

dr.change.text <- paste0("The ", tolower(input$death_cause),
dr.change.text <- paste0("For ", county.data.15.17$county_name, " County, the ", tolower(input$death_cause),
" mortality rate has remained relatively constant since 2002 at ",
round(dr.15.17, 2),
"per 100k people")

if (dr.00.02 > dr.15.17) {
dr.change.text <- paste0("The ", tolower(input$death_cause),
dr.change.text <- paste0("For ", county.data.15.17$county_name, " County, the ", tolower(input$death_cause),
" mortality rate fell by ",
round((dr.00.02 - dr.15.17) / dr.00.02 * 100, 2),
"% from 2002 to 2017 from ",
round(dr.00.02, 2), " to ", round(dr.15.17, 2))
}
if (dr.00.02 < dr.15.17) {
dr.change.text <- paste0("The ", tolower(input$death_cause),
dr.change.text <- paste0("For ", county.data.15.17$county_name, " County, the ", tolower(input$death_cause),
" mortality rate rose by ",
round((dr.15.17 - dr.00.02) / dr.00.02 * 100, 2),
"% from 2002 to 2017 from ",
Expand All @@ -1463,11 +1457,11 @@ server <- function(input, output, session) {

return(
tagList(
tags$h5(paste0(
county.data.15.17$county_name, ", ", county.data.15.17$state_abbr,
" is a ", tolower(county.data.15.17$urban_2013), " area with a population of ",
formatC(pop.15.17, format="d", big.mark=","))
),
# tags$h5(paste0(
# county.data.15.17$county_name, ", ", county.data.15.17$state_abbr,
# " is a ", tolower(county.data.15.17$urban_2013), " area with a population of ",
# formatC(pop.15.17, format="d", big.mark=","))
# ),
# tags$h5(pop.change.text),
# TODO: Add determinant change!
tags$h5(dr.change.text)
Expand Down Expand Up @@ -2290,7 +2284,7 @@ server <- function(input, output, session) {
else {
tagList(
tags$h3(
style = "padding-right: 20px; padding-left: 20px",
style = "margin-top: 0; padding-right: 20px; padding-left: 20px",
paste0("Select a ", input$state_choice," county below or by clicking the map:")
),
NULL
Expand Down
19 changes: 8 additions & 11 deletions www/custom_no_scroll.css
Expand Up @@ -113,15 +113,13 @@

.title {
float: left;
max-width: 400px;

height: auto;
padding-top: 2vh;
padding-bottom: 2vh;
padding-left: 2vw;
overflow: none;
font-weight: 800;
display:inline;
height: auto;
padding-top: 2vh;
padding-bottom: 2vh;
padding-left: 2vw;
overflow: none;
font-weight: 800;
display:inline;
}

.title h1 {
Expand Down Expand Up @@ -545,8 +543,7 @@ ul{

.nav_container{
position: relative;
width: 60vw;
max-width: 660px;
width: 65vw;
text-align: left;
padding-top: 10px;
float: right;
Expand Down

0 comments on commit 76bbdc5

Please sign in to comment.