This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Base image https://hub.docker.com/u/rocker/ | |
FROM rocker/shiny:latest | |
# system libraries of general use | |
## install debian packages | |
RUN apt-get update -qq && apt-get -y --no-install-recommends install \ | |
libxml2-dev \ | |
libcairo2-dev \ | |
libsqlite3-dev \ | |
libmariadbd-dev \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# This is a Shiny web application. You can run the application by clicking | |
# the 'Run App' button above. | |
# | |
# Find out more about building applications with Shiny here: | |
# | |
# http://shiny.rstudio.com/ | |
# | |
library(shiny) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
reactable(head(testType,4), | |
defaultColDef = colDef( | |
align = "center", | |
minWidth = 50, | |
headerStyle = list(background = "#f7f7f8")), | |
columns=list(Created=colDef(minWidth=80)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
p(style= | |
'font-size:10px; | |
font-weight;bold; | |
color:white; #font color isconfusingy called color | |
text-align:center | |
' | |
) | |
#borders |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
span(style="display: inline-block;vertical-align:top; width: 350px;", | |
sliderInput(inputId = 'selectDate', | |
ticks = TRUE, | |
dragRange = TRUE, | |
label = 'Select Date', | |
min = min(casePC$DoR,na.rm=T), | |
max = max(casePC$DoR,na.rm=T), | |
animate = TRUE,width='500', | |
value = c(Sys.Date()-100, max(casePC$DoR,na.rm=T)-1))), | |
span(style="display: inline-block;vertical-align:top; width: 350px;", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nodes_tot%>% | |
slice_head(n = 50)%>% | |
unite(FirstName,LastName,col='FullName')%>% | |
group_by(Latitude,Longitude)%>% | |
mutate(label=c(FullName))%>% | |
#mutate(label1=list(FullName))%>% | |
mutate(label2=paste(as.vector(label),sep=' ',collapse= '<br>' ))%>% | |
# mutate(label3=paste(label,sep=' ',collapse= ''))%>% | |
# mutate(label4=paste(as.vector(label1),sep=' ',collapse= ''))%>% | |
# mutate(label5=paste(label1,sep=' ',collapse= ''))%>% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cclusters1 <- Cclusters%>% | |
distinct(CaseNumber,ClusterID)%>% | |
group_by(CaseNumber)%>% | |
mutate(wot=all(is.na(ClusterID)))%>% | |
group_by(CaseNumber)%>% | |
summarise(ls=list(ClusterID),wot)%>% | |
mutate(clusters=paste0(ls))%>% | |
mutate(clusters=str_replace_all(clusters,pattern = '\\(',replacement=''))%>% | |
mutate(clusters=str_replace_all(clusters,pattern = '\\)',replacement=''))%>% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
leaflet(geo_lines)%>% | |
addTiles()%>% | |
addPolylines(stroke = 'blue',color = 'black', | |
weight = 1,opacity = 1,fill = 'green', | |
fillOpacity = 1,dashArray = 17) | |
nodes_sub <- igraph::as_data_frame(graph_tot_sub,what='vertices') | |
ed <- igraph::as_data_frame(graph_tot_sub,what='edges') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lgd_shape1$values <- plot$sum_pos[m] | |
#MAP----- | |
labels <- sprintf( | |
"<strong>%s</strong>:<br/>: %g ", | |
lgd_shape1$LGDNAME, plot$sum_pos[m]) %>% | |
lapply(htmltools::HTML) | |
#pal1 <- colorFactor("YlOrRd", domain = lgd_shape1$WARNING) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
code snippet to get sparklines to render on all pages of a datable | |
options = list( | |
fnDrawCallback = htmlwidgets::JS( | |
' | |
function(){options = list( | |
fnDrawCallback = htmlwidgets::JS( | |
function(){ | |
HTMLWidgets.staticRender(); | |
} |
OlderNewer