diego-ellis-soto commited on
Commit
9efdc08
·
1 Parent(s): ea5f4e5

Ready to push

Browse files
California_academy_logo.png DELETED
Binary file (18.5 kB)
 
Reimagining_San_Francisco.png DELETED
Binary file (760 kB)
 
UC Berkeley_logo.png DELETED
Binary file (33.5 kB)
 
app_shinydashboards.R → app.R RENAMED
@@ -15,14 +15,14 @@ library(sf)
15
  library(DT)
16
  library(RColorBrewer)
17
  library(terra)
18
- library(data.table) # for fread
19
- library(mapview) # for mapview objects
20
- library(sjPlot) # for plotting lm model coefficients
21
- library(sjlabelled) # optional if needed for sjPlot
22
  library(bslib)
23
  library(shinycssloaders)
24
 
25
- source('R/setup.R') # Ensure this script loads necessary data objects
26
 
27
  # Define your Mapbox token securely
28
  mapbox_token <- "pk.eyJ1Ijoia3dhbGtlcnRjdSIsImEiOiJjbHc3NmI0cDMxYzhyMmt0OXBiYnltMjVtIn0.Thtu6WqIhOfin6AykskM2g"
@@ -39,7 +39,9 @@ theme <- bs_theme(
39
  # UI
40
  ui <- dashboardPage(
41
  skin = "green", # shinydashboard skin color
42
- dashboardHeader(title = "SF Biodiversity Access Tool"),
 
 
43
  dashboardSidebar(
44
  sidebarMenu(
45
  menuItem("Isochrone Explorer", tabName = "isochrone", icon = icon("map-marker-alt")),
@@ -50,10 +52,21 @@ ui <- dashboardPage(
50
  ),
51
  dashboardBody(
52
  theme = theme, # Apply the custom theme
53
- useShinyjs(), # Initialize shinyjs
54
  # Loading message
55
  div(id = "loading", style = "display:none; font-size: 20px; color: red;", "Calculating..."),
56
-
 
 
 
 
 
 
 
 
 
 
 
57
  # Tab Items
58
  tabItems(
59
  # Isochrone Explorer Tab
@@ -777,7 +790,7 @@ server <- function(input, output, session) {
777
  "Bird Species" = "Bird_Species",
778
  "Mammal Species" = "Mammal_Species",
779
  "Plant Species" = "Plant_Species",
780
- "Greenspace (m²)" = "Greenspace_m2",
781
  "Greenspace (%)" = "Greenspace_percent"
782
  ),
783
  options = list(pageLength = 10, autoWidth = TRUE),
 
15
  library(DT)
16
  library(RColorBrewer)
17
  library(terra)
18
+ library(data.table)
19
+ library(mapview)
20
+ library(sjPlot)
21
+ library(sjlabelled)
22
  library(bslib)
23
  library(shinycssloaders)
24
 
25
+ source('R/setup.R') # Load necessary data (annotated gbif, annotated cbg, ndvi)
26
 
27
  # Define your Mapbox token securely
28
  mapbox_token <- "pk.eyJ1Ijoia3dhbGtlcnRjdSIsImEiOiJjbHc3NmI0cDMxYzhyMmt0OXBiYnltMjVtIn0.Thtu6WqIhOfin6AykskM2g"
 
39
  # UI
40
  ui <- dashboardPage(
41
  skin = "green", # shinydashboard skin color
42
+ dashboardHeader(title = "SF Biodiversity Access Tool"
43
+ ),
44
+
45
  dashboardSidebar(
46
  sidebarMenu(
47
  menuItem("Isochrone Explorer", tabName = "isochrone", icon = icon("map-marker-alt")),
 
52
  ),
53
  dashboardBody(
54
  theme = theme, # Apply the custom theme
55
+ useShinyjs(),
56
  # Loading message
57
  div(id = "loading", style = "display:none; font-size: 20px; color: red;", "Calculating..."),
58
+ fluidRow(
59
+ column(
60
+ width = 12, align = "center",
61
+ tags$img(src = "www/UC_Berkeley_logo.png",
62
+ height = "200px", style = "margin:10px;", alt = "UC Berkeley Logo"),
63
+ tags$img(src = "www/California_academy_logo.png",
64
+ height = "200px", style = "margin:10px;", alt = "California Academy Logo"),
65
+ tags$img(src = "www/Reimagining_San_Francisco.png",
66
+ height = "200px", style = "margin:10px;", alt = "Reimagining San Francisco Logo")
67
+ )
68
+ ),
69
+
70
  # Tab Items
71
  tabItems(
72
  # Isochrone Explorer Tab
 
790
  "Bird Species" = "Bird_Species",
791
  "Mammal Species" = "Mammal_Species",
792
  "Plant Species" = "Plant_Species",
793
+ # "Greenspace (m²)" = "Greenspace_m2",
794
  "Greenspace (%)" = "Greenspace_percent"
795
  ),
796
  options = list(pageLength = 10, autoWidth = TRUE),