library(flexdashboard) library(rAmCharts) library(manipulateWidget) library(DT) library(fbAntares) library(shiny)
vizModelReal <- function(data, combi, hour, dayType, xlim, ylim) { # column(12, combineWidgets( ncol = 2, list = lapply(1:nrow(combi), function(X) { graphFlowBased2D(data, ctry1 = combi[X, 1], ctry2 = combi[X, 2], hour = hour, dayType = dayType, xlim = xlim, ylim = ylim, export = F) }), width = "100%", height = "100%" ) # ) # plotFB(dayType = 1, hour = 1:4,country1 = country1, country2 = country2, # fb_opts = fb_opts, areaName = "cwe_at", xlim = xlim, ylim = ylim) }
data_error <- dta[idDayType == dayType, .SD, .SDcols = c("idDayType", "Period", "error1", "error2")]
data_render <- copy(data_error) setnames(data_render, c("error1", "error2"), c("Inf error", "Sup error")) knitr::kable(data_render)
combineWidgets( plot(amHist(x = data_error$error1, main = "Inf error", export = F, xlab = "Inf error")), plot(amHist(x = data_error$error2, main = "Sup error", export = F, xlab = "Sup error")) )
data <- dta[Period == 1] hour <- 1
valueBox(paste0(round(data$error1, 1) , "%"), icon = "ion-ios-minus")
valueBox(paste0(round(data$error2, 1) , "%"), icon = "ion-ios-plus")
vizModelReal(data, combi, hour, dayType, xlim = xlim, ylim = ylim)
data <- dta[Period == 2] hour <- 2
valueBox(paste0(round(data$error1, 1) , "%"), icon = "ion-ios-minus")
valueBox(paste0(round(data$error2, 1) , "%"), icon = "ion-ios-plus")
vizModelReal(data, combi, hour, dayType, xlim = xlim, ylim = ylim)
data <- dta[Period == 3] hour <- 3
valueBox(paste0(round(data$error1, 1) , "%"), icon = "ion-ios-minus")
valueBox(paste0(round(data$error2, 1) , "%"), icon = "ion-ios-plus")
vizModelReal(data, combi, hour, dayType, xlim = xlim, ylim = ylim)
data <- dta[Period == 4] hour <- 4
valueBox(paste0(round(data$error1, 1) , "%"), icon = "ion-ios-minus")
valueBox(paste0(round(data$error2, 1) , "%"), icon = "ion-ios-plus")
vizModelReal(data, combi, hour, dayType, xlim = xlim, ylim = ylim)
data <- dta[Period == 5] hour <- 5
valueBox(paste0(round(data$error1, 1) , "%"), icon = "ion-ios-minus")
valueBox(paste0(round(data$error2, 1) , "%"), icon = "ion-ios-plus")
vizModelReal(data, combi, hour, dayType, xlim = xlim, ylim = ylim)
data <- dta[Period == 6] hour <- 6
valueBox(paste0(round(data$error1, 1) , "%"), icon = "ion-ios-minus")
valueBox(paste0(round(data$error2, 1) , "%"), icon = "ion-ios-plus")
vizModelReal(data, combi, hour, dayType, xlim = xlim, ylim = ylim)
data <- dta[Period == 7] hour <- 7
valueBox(paste0(round(data$error1, 1) , "%"), icon = "ion-ios-minus")
valueBox(paste0(round(data$error2, 1) , "%"), icon = "ion-ios-plus")
vizModelReal(data, combi, hour, dayType, xlim = xlim, ylim = ylim)
data <- dta[Period == 8] hour <- 8
valueBox(paste0(round(data$error1, 1) , "%"), icon = "ion-ios-minus")
valueBox(paste0(round(data$error2, 1) , "%"), icon = "ion-ios-plus")
vizModelReal(data, combi, hour, dayType, xlim = xlim, ylim = ylim)
data <- dta[Period == 9] hour <- 9
valueBox(paste0(round(data$error1, 1) , "%"), icon = "ion-ios-minus")
valueBox(paste0(round(data$error2, 1) , "%"), icon = "ion-ios-plus")
vizModelReal(data, combi, hour, dayType, xlim = xlim, ylim = ylim)
data <- dta[Period == 10] hour <- 10
valueBox(paste0(round(data$error1, 1) , "%"), icon = "ion-ios-minus")
valueBox(paste0(round(data$error2, 1) , "%"), icon = "ion-ios-plus")
vizModelReal(data, combi, hour, dayType, xlim = xlim, ylim = ylim)
data <- dta[Period == 11] hour <- 11
valueBox(paste0(round(data$error1, 1) , "%"), icon = "ion-ios-minus")
valueBox(paste0(round(data$error2, 1) , "%"), icon = "ion-ios-plus")
vizModelReal(data, combi, hour, dayType, xlim = xlim, ylim = ylim)
data <- dta[Period == 12] hour <- 12
valueBox(paste0(round(data$error1, 1) , "%"), icon = "ion-ios-minus")
valueBox(paste0(round(data$error2, 1) , "%"), icon = "ion-ios-plus")
vizModelReal(data, combi, hour, dayType, xlim = xlim, ylim = ylim)
data <- dta[Period == 13] hour <- 13
valueBox(paste0(round(data$error1, 1) , "%"), icon = "ion-ios-minus")
valueBox(paste0(round(data$error2, 1) , "%"), icon = "ion-ios-plus")
vizModelReal(data, combi, hour, dayType, xlim = xlim, ylim = ylim)
data <- dta[Period == 14] hour <- 14
valueBox(paste0(round(data$error1, 1) , "%"), icon = "ion-ios-minus")
valueBox(paste0(round(data$error2, 1) , "%"), icon = "ion-ios-plus")
vizModelReal(data, combi, hour, dayType, xlim = xlim, ylim = ylim)
data <- dta[Period == 15] hour <- 15
valueBox(paste0(round(data$error1, 1) , "%"), icon = "ion-ios-minus")
valueBox(paste0(round(data$error2, 1) , "%"), icon = "ion-ios-plus")
vizModelReal(data, combi, hour, dayType, xlim = xlim, ylim = ylim)
data <- dta[Period == 16] hour <- 16
valueBox(paste0(round(data$error1, 1) , "%"), icon = "ion-ios-minus")
valueBox(paste0(round(data$error2, 1) , "%"), icon = "ion-ios-plus")
vizModelReal(data, combi, hour, dayType, xlim = xlim, ylim = ylim)
data <- dta[Period == 17] hour <- 17
valueBox(paste0(round(data$error1, 1) , "%"), icon = "ion-ios-minus")
valueBox(paste0(round(data$error2, 1) , "%"), icon = "ion-ios-plus")
vizModelReal(data, combi, hour, dayType, xlim = xlim, ylim = ylim)
data <- dta[Period == 18] hour <- 18
valueBox(paste0(round(data$error1, 1) , "%"), icon = "ion-ios-minus")
valueBox(paste0(round(data$error2, 1) , "%"), icon = "ion-ios-plus")
vizModelReal(data, combi, hour, dayType, xlim = xlim, ylim = ylim)
data <- dta[Period == 19] hour <- 19
valueBox(paste0(round(data$error1, 1) , "%"), icon = "ion-ios-minus")
valueBox(paste0(round(data$error2, 1) , "%"), icon = "ion-ios-plus")
vizModelReal(data, combi, hour, dayType, xlim = xlim, ylim = ylim)
data <- dta[Period == 20] hour <- 20
valueBox(paste0(round(data$error1, 1) , "%"), icon = "ion-ios-minus")
valueBox(paste0(round(data$error2, 1) , "%"), icon = "ion-ios-plus")
vizModelReal(data, combi, hour, dayType, xlim = xlim, ylim = ylim)
data <- dta[Period == 21] hour <- 21
valueBox(paste0(round(data$error1, 1) , "%"), icon = "ion-ios-minus")
valueBox(paste0(round(data$error2, 1) , "%"), icon = "ion-ios-plus")
vizModelReal(data, combi, hour, dayType, xlim = xlim, ylim = ylim)
data <- dta[Period == 22] hour <- 22
valueBox(paste0(round(data$error1, 1) , "%"), icon = "ion-ios-minus")
valueBox(paste0(round(data$error2, 1) , "%"), icon = "ion-ios-plus")
vizModelReal(data, combi, hour, dayType, xlim = xlim, ylim = ylim)
data <- dta[Period == 23] hour <- 23
valueBox(paste0(round(data$error1, 1) , "%"), icon = "ion-ios-minus")
valueBox(paste0(round(data$error2, 1) , "%"), icon = "ion-ios-plus")
vizModelReal(data, combi, hour, dayType, xlim = xlim, ylim = ylim)
data <- dta[Period == 24] hour <- 24
valueBox(paste0(round(data$error1, 1) , "%"), icon = "ion-ios-minus")
valueBox(paste0(round(data$error2, 1) , "%"), icon = "ion-ios-plus")
vizModelReal(data, combi, hour, dayType, xlim = xlim, ylim = ylim)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.