-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapp.R
101 lines (70 loc) · 3.01 KB
/
app.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
library(shiny, quietly = TRUE, warn.conflicts = FALSE)
library(sqldf, quietly = TRUE, warn.conflicts = FALSE)
library(dplyr, quietly = TRUE, warn.conflicts = FALSE)
library(tidyr, quietly = TRUE, warn.conflicts = FALSE)
library(stringr, quietly = TRUE, warn.conflicts = FALSE)
library(ggplot2, quietly = TRUE, warn.conflicts = FALSE)
library(RSQLite, quietly = TRUE, warn.conflicts = FALSE)
library(shinyjs, quietly = TRUE, warn.conflicts = FALSE)
library(shinyBS, quietly = TRUE, warn.conflicts = FALSE)
# Get Databases...maybe make lazy
db <- dbConnect(SQLite(), dbname="Database/Ingredients.sqlite")
Grains <- dbReadTable(db, "Grains")
Grains <- Grains[order(Grains$Ingredients),]
Extracts <- dbReadTable(db, "Extracts")
Adjuncts <- dbReadTable(db, "Adjuncts")
Grists <- rbind(Grains,Extracts,Adjuncts)
Hops <- dbReadTable(db, "Hops")
Spices <- dbReadTable(db, "Spices")
Yeast <- dbReadTable(db, "Yeast")
Styles <- dbReadTable(db, "Styles")
db <- dbConnect(SQLite(), dbname="Database/BKBrewHouse.sqlite")
GravityVersusTemp <- dbReadTable(db, "GravityCorrectionChart")
closeAllConnections()
source("Helper_Functions/helpers.R", local = TRUE)
source("Home/homeUI.R", local = TRUE)
source("Home/homeServer.R", local = TRUE)
source("Fermentables/FermentablesUI.R", local = TRUE)
source("Fermentables/FermentablesServer.R", local = TRUE)
source("Water/WaterUI.R", local = TRUE)
source("Water/WaterServer.R", local = TRUE)
source("Hops/HopsUI.R", local = TRUE)
source("Hops/HopsServer.R", local = TRUE)
source("Mash/MashUI.R", local = TRUE)
source("Mash/StepMash/StepMashUI.R", local = TRUE)
# source("Mash/SingleDecoction/SingleDecoctionUI.R", local = TRUE)
source("Mash/MashServer.R", local = TRUE)
source("Mash/StepMash/StepMashServer.R", local = TRUE)
# source("Mash/SingleDecoction/SingleDecoctionServer.R", local = TRUE)
source("Yeast/YeastUI.R", local = TRUE)
source("Yeast/YeastServer.R", local = TRUE)
source("Chemistry/ChemistryUI.R", local = TRUE)
source("Chemistry/ChemistryServer.R", local = TRUE)
source("Fermentation/FermentationUI.R", local = TRUE)
source("Fermentation/FermentationServer.R", local = TRUE)
ui <- tagList(
useShinyjs(),
navbarPage(title="BK Brewculator",
homeUI(),
fermentablesUI(),
hopsUI(),
waterUI(),
# #tabPanel("Water"),
mashUI(),
yeastUI(),
chemistryUI(),
fermentationUI()
)
)
server <- function(input, output){
homeServer(input, output)
fermentablesServer(input, output)
hopsServer(input, output)
waterServer(input, output)
mashServer(input, output)
yeastServer(input, output)
chemistryServer(input, output)
fermentationServer(input, output)
}
#runApp(shinyApp(ui = ui, server = server), launch.browser = TRUE)
shinyApp(ui = ui, server = server)