diff --git a/app.R b/app.R index 86a41f3..cd481e7 100644 --- a/app.R +++ b/app.R @@ -444,8 +444,9 @@ tags$p(style="text-align:center;margin-bottom:0px;", fluidRow(align="center", HTML('

Short-term Mortality Fluctuations

'), HTML('The most recent update is: ', paste(lastupdate), '
'), - HTML("The project's website: Human Mortality Database ",as.character(icon("globe", class="contacticon")),"www.mortality.org", as.character(icon("envelope-o", class="contacticon"))," hmd@mortality.org"), - HTML("

Data for 2020 is preliminary and for the last 1-3 available weeks may be incomplete."), + HTML("The project's website: Human Mortality Database ",as.character(icon("globe", class="contacticon")),"www.mortality.org", as.character(icon("envelope-o", class="contacticon"))," hmd@mortality.org
"), + HTML(" UX/UI and public GitHub repository ", '', as.character(icon("github", class="social")), '', " by László Németh
"), + HTML(" Data for the last available weeks is preliminary and may be incomplete, please refer to the country-specific metadata for details.", '', as.character(icon("file-pdf-o", class="social")),''), HTML('


') ), @@ -1164,6 +1165,9 @@ server=function(input,output,session){ countrychoices= countrylist dataset$countrychoices = countrychoices ### ribbon + if (length(subdata[Sex=="m"]$Week)==1) {ribbon=subdata} else { + + ribbon = rbindlist(by(subdata,subdata$Sex, function(x){ @@ -1177,6 +1181,7 @@ server=function(input,output,session){ } )) + } ribbon$type=ifelse(ribbon$diff>=0,"Excess mortality","Mortality deficit") ribbon$group=rleid(ribbon$type) @@ -1190,6 +1195,7 @@ server=function(input,output,session){ if (input$extracountry == TRUE){ ### ribbon + if (length(subdata2[Sex=="m"]$Week)==1) {ribbon2=subdata2} else { ribbon2 = rbindlist(by(subdata2,subdata2$Sex, function(x){ @@ -1203,6 +1209,7 @@ server=function(input,output,session){ } )) + } ribbon2$type=ifelse(ribbon2$diff>=0,"Excess mortality","Mortality deficit") ribbon2$group=rleid(ribbon2$type)