Skip to content

Commit

Permalink
added country names
Browse files Browse the repository at this point in the history
nemeth committed Feb 10, 2021
1 parent f72dc15 commit 43263ac
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions app.R
Original file line number Diff line number Diff line change
@@ -494,6 +494,7 @@ conditionalPanel(condition="input.viewlength2 == 'Multi-year'",
conditionalPanel(
condition="input.extracountry == true",
div(
HTML('<hr style="width=60%;background-color:#66A0C4;height:1px;border-radius:2px;margin: 0px 15px 5px 15px;">'),
style = "position:relative;padding: 5px 10px 5px 0px;",
plotOutput("extracountryfigure",height = "400px",
click = "plot_click2",
@@ -1394,7 +1395,9 @@ if (input$extracountry == TRUE){
geom_line(data=data[CountryCode==input$country2 & Year==input$targetyear2 & Sex %in% input$sexchoice],aes_string(x="Week",y=input$variable, color=shQuote("Target year")), size=1.2)+
geom_line(data=compareline2[Sex %in% input$sexchoice], aes_string(x="Week",y=input$variable, color=shQuote("Reference level")), size=1.2)+
theme(legend.position = "bottom")+
theme(strip.background = element_blank(),strip.text.x = element_text(color="white"))
theme(strip.background = element_blank(),strip.text.x = element_text(color="white"))+
ggtitle(paste(names(countrychoices)[countrychoices == input$country2]))+
theme(plot.title = element_text(hjust = 0.5))

dataset$h = h

@@ -1408,7 +1411,10 @@ if (input$extracountry == TRUE){

g = g + geom_ribbon(data=ribbon[Sex %in% input$sexchoice],aes(x=Week,ymin= yminvalue, ymax = ymaxvalue, fill=type,group=group))+
geom_line(data=data[CountryCode==input$country & Year==input$targetyear & Sex %in% input$sexchoice],aes_string(x="Week",y=input$variable, color=shQuote("Target year")), size=1.2)+
geom_line(data=compareline[Sex %in% input$sexchoice], aes_string(x="Week",y=input$variable, color=shQuote("Reference level")), size=1.2)
geom_line(data=compareline[Sex %in% input$sexchoice], aes_string(x="Week",y=input$variable, color=shQuote("Reference level")), size=1.2)+
ggtitle(paste(names(countrychoices)[countrychoices == input$country]))+
theme(plot.title = element_text(hjust = 0.5))




0 comments on commit 43263ac

Please sign in to comment.