-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.R
95 lines (81 loc) · 2.5 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
# cs 424 - proj 3
# Fatima Qarni, Emmanuel Martinez
library(shiny)
library(shinydashboard)
library(ggplot2)
library(lubridate)
library(DT)
library(jpeg)
library(grid)
library(leaflet)
library(scales)
library(shinyjs)
source('Tables.R')
source('heatMap.R')
# Define UI for application that draws a histogram
ui <- dashboardPage(
dashboardHeader(title = "CS 424 - Project 3 - Fatima & Manny",
tags$li(
actionLink("openInfo", label = " Project Info", icon = icon("info")),
class = "dropdown"
)),
dashboardSidebar(sidebarMenu(
br(),
br(),
br(),
br(),
br(),
br(),
br(),
br(),
br(),
br(),
br(),
br(),
br(),
br(),
br(),
br(),
br(),
br(),
menuItem("Heat Map",
icon = icon("th"),
tabName = "heatMap"),
menuItem(
"Tables",
icon = icon("th"),
tabName = "Tables"
)
)),
dynamicBody <- dashboardBody(tabItems(
tabItem(tabName = "heatMap",
heatMap(id="heatMap")),
tabItem(tabName = "Tables",
Tables(id = "Tables"))
)),
body <- dashboardBody(useShinyjs(),
dynamicBody)
)
# Define server logic required to draw a histogram
server <- function(input, output) {
callModule(heatMapServer, id = "heatMap")
callModule(TablesServer, id = "Tables")
observeEvent(input$openInfo, {
showModal(modalDialog(
title = "Fatima Qarni & Emmanuel Martinez",
p(
"Libraries used for visualization: shiny, shinydashboard, ggplot2, lubridate, DT, jpeg, grid, leaflet, scales, dplyr, RColorBrewer, shinyjs, AotClient, tidyverse, darksky. \n
AoT data comes from: https://aot-file-browser.plenar.io/data-sets/chicago-complete
AoT API: https://github.com/UrbanCCD-UChicago/aot-client-r
Dark Sky API: https://github.com/hrbrmstr/darksky
References: https://gis.stackexchange.com/questions/133625/checking-if-points-fall-within-polygon-shapefile
https://gis.stackexchange.com/questions/137621/join-spatial-point-data-to-polygons-in-r
https://rstudio-pubs-static.s3.amazonaws.com/212793_f130ecc723da4ed98680d6d3d5c4aff9.html
http://ryanruthart.com/using-r-to-perform-a-spatial-join-and-aggregate-data/
https://franciscorequena.com/blog/how-to-make-an-interactive-map-of-usa-with-r-and-leaflet/"
)
))
})
}
# Run the application
shinyApp(ui = ui, server = server)