Commit d5d6c8fa authored by Stephanie Wegscheidl's avatar Stephanie Wegscheidl

interview fixes

parent d248a6f6
...@@ -213,6 +213,7 @@ server <- function(input, output, session) { ...@@ -213,6 +213,7 @@ server <- function(input, output, session) {
V2=as.numeric(coconut.df[[input[[yplotname]]]])), V2=as.numeric(coconut.df[[input[[yplotname]]]])),
.Names=c("V1","V2"), row.names=c(NA,10L), class = "data.frame") .Names=c("V1","V2"), row.names=c(NA,10L), class = "data.frame")
# New Bar-Plot # New Bar-Plot
print(as.numeric(data$V1))
array_plots <<-arrangeGrob(array_plots, barplot(data$V2,data$V1, array_plots <<-arrangeGrob(array_plots, barplot(data$V2,data$V1,
ylab=input[[yplotname]], ylab=input[[yplotname]],
xlab=input[[xplotname]], xlab=input[[xplotname]],
...@@ -364,7 +365,7 @@ server <- function(input, output, session) { ...@@ -364,7 +365,7 @@ server <- function(input, output, session) {
V2=as.numeric(coconut.df[[input[[yplotname]]]])), V2=as.numeric(coconut.df[[input[[yplotname]]]])),
.Names=c("V1","V2"), row.names=c(NA,10L), class = "data.frame") .Names=c("V1","V2"), row.names=c(NA,10L), class = "data.frame")
#new scatterplot #new scatterplot
plot(data$V1,data$V2, type="p", ylab=input[[yplotname]], xlab=input[[xplotname]]) plot(data$V1,data$V2, type="p", ylab=input[[yplotname]], xlab=input[[xplotname]], pch=16)
}) })
}) #Local end }) #Local end
...@@ -400,10 +401,12 @@ server <- function(input, output, session) { ...@@ -400,10 +401,12 @@ server <- function(input, output, session) {
local({ local({
output[[plotname]] <- renderPlot({ output[[plotname]] <- renderPlot({
#handling data #handling data
data<- structure(list(V1=as.numeric(coconut.df[[input[[xplotname]]]])), data<- structure(list(V1=as.numeric(coconut.df[[input[[xplotname]]]])),
.Names=c("V1"), row.names=c(NA,10L), class = "data.frame") .Names=c("V1"), row.names=c(NA,10L), class = "data.frame")
#new Boxplot #new Boxplot
boxplot(data$V1, type="box", xlab=input[[xplotname]]) boxplot(data$V1, type="box", xlab=input[[xplotname]])
...@@ -461,13 +464,17 @@ server <- function(input, output, session) { ...@@ -461,13 +464,17 @@ server <- function(input, output, session) {
lables = c('<2', '<5', '<7', '<10') lables = c('<2', '<5', '<7', '<10')
) )
#color encoding data #color encoding data
colorGrad <- colorFactor('RdYlGn', colorData)
colorGrad <- colorFactor('Blues', colorData)
#colorGrad <- colorFactor('RdYlGn', colorData)
#new map #new map
m <<- leaflet() m <<- leaflet()
x=1 x=1
m <<- addTiles(m) m <<- addTiles(m)
m<<-addCircleMarkers(m,lng=as.numeric(coconut.df$gps.longitude), lat=as.numeric(coconut.df$gps.latitude), radius = data, color = colorGrad(colorData)) #addPolylines does not work m<<-addCircleMarkers(m,lng=as.numeric(coconut.df$gps.longitude), lat=as.numeric(coconut.df$gps.latitude), radius = data, color = colorGrad(colorData), fillOpacity = 1 ) #addPolylines does not work
m<<-addLegend(m, 'bottomright', pal=colorGrad, values=colorData, title=' ',opacity=1) m<<-addLegend(m, 'bottomright', pal=colorGrad, values=colorData, title=' ',opacity=1)
m m
......
...@@ -14,7 +14,7 @@ ui <- dashboardPage( ...@@ -14,7 +14,7 @@ ui <- dashboardPage(
id="tabs", id="tabs",
menuItem("Upload", tabName = "upload", icon =icon("upload")), menuItem("Upload", tabName = "upload", icon =icon("upload")),
menuItem("Data", tabName = "data", icon =icon("list")), menuItem("Data", tabName = "data", icon =icon("list")),
menuItem("Views", tabName = "views", icon = icon("cog")), menuItem("Dashboard", tabName = "views", icon = icon("bar-chart-o")),
# menuItem("Dashboard", tabName = "dashboard", icon = icon("dashboard")), # menuItem("Dashboard", tabName = "dashboard", icon = icon("dashboard")),
menuItem("Help", tabName = "help", icon = icon("book")) menuItem("Help", tabName = "help", icon = icon("book"))
) )
...@@ -49,17 +49,12 @@ ui <- dashboardPage( ...@@ -49,17 +49,12 @@ ui <- dashboardPage(
tabItem(tabName = "data", tabItem(tabName = "data",
h2("Look into the CoConUT Data:"), h2("Look into the CoConUT Data:"),
h4("Last Loaded CoConUT Data: "), h3(textOutput("lastLoadedNut")),
textOutput("lastLoadedNut"),
dataTableOutput("nut"), dataTableOutput("nut"),
h2("Look into the CoCoQuest Data:"), h2("Look into the CoCoQuest Data:"),
h4("Last Loaded CoCoQuest Data: "), h3(textOutput("lastLoadedQuest")),
textOutput("lastLoadedQuest"),
#h4("Starttime: "),
#textOutput("totalStarttime"),
dataTableOutput("quest"), dataTableOutput("quest"),
actionButton("viewSite", "go to Views") actionButton("viewSite", "go to Dashboard")
), ),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment