diego-ellis-soto
commited on
Commit
·
0fc1f65
1
Parent(s):
d028225
Locally working
Browse files- R/setup.R +18 -1
- app.R +57 -12
- rsconnect/shinyapps.io/diego-ellis-soto/RSF_Biodiversity_Access.dcf +1 -1
- www/UC Berkeley_logo.png +0 -0
- www/UC_Berkeley_logo.png +0 -0
R/setup.R
CHANGED
@@ -1,10 +1,27 @@
|
|
1 |
# setup
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
# ------------------------------------------------
|
4 |
# 1) API Keys
|
5 |
# ------------------------------------------------
|
6 |
mapbox_token <- "pk.eyJ1Ijoia3dhbGtlcnRjdSIsImEiOiJjbHc3NmI0cDMxYzhyMmt0OXBiYnltMjVtIn0.Thtu6WqIhOfin6AykskM2g"
|
7 |
-
mb_access_token(mapbox_token, install = FALSE)
|
8 |
|
9 |
# ------------------------------------------------
|
10 |
# 2) Load Data
|
|
|
1 |
# setup
|
2 |
+
require(shinyjs)
|
3 |
+
library(shiny)
|
4 |
+
library(shinydashboard)
|
5 |
+
library(leaflet)
|
6 |
+
library(mapboxapi)
|
7 |
+
library(tidyverse)
|
8 |
+
library(tidycensus)
|
9 |
+
library(sf)
|
10 |
+
library(DT)
|
11 |
+
library(RColorBrewer)
|
12 |
+
library(terra)
|
13 |
+
library(data.table)
|
14 |
+
library(mapview)
|
15 |
+
library(sjPlot)
|
16 |
+
library(sjlabelled)
|
17 |
+
library(bslib)
|
18 |
+
library(shinycssloaders)
|
19 |
|
20 |
# ------------------------------------------------
|
21 |
# 1) API Keys
|
22 |
# ------------------------------------------------
|
23 |
mapbox_token <- "pk.eyJ1Ijoia3dhbGtlcnRjdSIsImEiOiJjbHc3NmI0cDMxYzhyMmt0OXBiYnltMjVtIn0.Thtu6WqIhOfin6AykskM2g"
|
24 |
+
# mb_access_token(mapbox_token, install = FALSE)
|
25 |
|
26 |
# ------------------------------------------------
|
27 |
# 2) Load Data
|
app.R
CHANGED
@@ -56,7 +56,20 @@ ui <- dashboardPage(
|
|
56 |
# Loading message
|
57 |
div(id = "loading", style = "display:none; font-size: 20px; color: red;", "Calculating..."),
|
58 |
|
59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
# fluidPage(
|
61 |
# # Application title
|
62 |
# # titlePanel("Test app"),
|
@@ -65,17 +78,17 @@ ui <- dashboardPage(
|
|
65 |
# ),
|
66 |
|
67 |
#
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
),
|
79 |
# fluidPage(
|
80 |
# box(
|
81 |
# tags$img(height = 100, width = 100,src = "Rlogo.png"),
|
@@ -292,6 +305,38 @@ server <- function(input, output, session) {
|
|
292 |
|
293 |
chosen_point <- reactiveVal(NULL)
|
294 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
295 |
# ------------------------------------------------
|
296 |
# Leaflet Base + Hide Overlays
|
297 |
# ------------------------------------------------
|
|
|
56 |
# Loading message
|
57 |
div(id = "loading", style = "display:none; font-size: 20px; color: red;", "Calculating..."),
|
58 |
|
59 |
+
fluidRow(
|
60 |
+
column(
|
61 |
+
width = 2,
|
62 |
+
imageOutput("uc_berkeley_logo")
|
63 |
+
),
|
64 |
+
column(
|
65 |
+
width = 4,
|
66 |
+
imageOutput("california_academy_logo")
|
67 |
+
),
|
68 |
+
column(
|
69 |
+
width = 6,
|
70 |
+
imageOutput("reimagining_sf_logo")
|
71 |
+
)
|
72 |
+
),
|
73 |
# fluidPage(
|
74 |
# # Application title
|
75 |
# # titlePanel("Test app"),
|
|
|
78 |
# ),
|
79 |
|
80 |
#
|
81 |
+
# fluidRow(
|
82 |
+
# column(
|
83 |
+
# width = 12, align = "center",
|
84 |
+
# tags$img(src = "UC_Berkeley_logo.png",
|
85 |
+
# height = "200px", style = "margin:10px;", alt = "UC Berkeley Logo"),
|
86 |
+
# tags$img(src = "California_academy_logo.png",
|
87 |
+
# height = "200px", style = "margin:10px;", alt = "California Academy Logo"),
|
88 |
+
# tags$img(src = "Reimagining_San_Francisco.png",
|
89 |
+
# height = "200px", style = "margin:10px;", alt = "Reimagining San Francisco Logo")
|
90 |
+
# )
|
91 |
+
# ),
|
92 |
# fluidPage(
|
93 |
# box(
|
94 |
# tags$img(height = 100, width = 100,src = "Rlogo.png"),
|
|
|
305 |
|
306 |
chosen_point <- reactiveVal(NULL)
|
307 |
|
308 |
+
# ------------------------------------------------
|
309 |
+
# Render logos
|
310 |
+
# ------------------------------------------------
|
311 |
+
|
312 |
+
output$uc_berkeley_logo <- renderImage({
|
313 |
+
list(
|
314 |
+
src = file.path("www", "UC_Berkeley_logo.png"),
|
315 |
+
width = "80%",
|
316 |
+
height = "55%",
|
317 |
+
alt = "UC Berkeley Logo"
|
318 |
+
)
|
319 |
+
}, deleteFile = FALSE)
|
320 |
+
|
321 |
+
output$california_academy_logo <- renderImage({
|
322 |
+
list(
|
323 |
+
src = file.path("www", "California_academy_logo.png"),
|
324 |
+
width = "80%",
|
325 |
+
height = "55%",
|
326 |
+
alt = "California Academy Logo"
|
327 |
+
)
|
328 |
+
}, deleteFile = FALSE)
|
329 |
+
|
330 |
+
output$reimagining_sf_logo <- renderImage({
|
331 |
+
list(
|
332 |
+
src = file.path("www", "Reimagining_San_Francisco.png"),
|
333 |
+
width = "80%",
|
334 |
+
height = "55%",
|
335 |
+
alt = "Reimagining San Francisco Logo"
|
336 |
+
)
|
337 |
+
}, deleteFile = FALSE)
|
338 |
+
|
339 |
+
|
340 |
# ------------------------------------------------
|
341 |
# Leaflet Base + Hide Overlays
|
342 |
# ------------------------------------------------
|
rsconnect/shinyapps.io/diego-ellis-soto/RSF_Biodiversity_Access.dcf
CHANGED
@@ -5,7 +5,7 @@ account: diego-ellis-soto
|
|
5 |
server: shinyapps.io
|
6 |
hostUrl: https://api.shinyapps.io/v1
|
7 |
appId: 13693040
|
8 |
-
bundleId:
|
9 |
url: https://diego-ellis-soto.shinyapps.io/RSF_Biodiversity_Access/
|
10 |
version: 1
|
11 |
asMultiple: FALSE
|
|
|
5 |
server: shinyapps.io
|
6 |
hostUrl: https://api.shinyapps.io/v1
|
7 |
appId: 13693040
|
8 |
+
bundleId: 9634358
|
9 |
url: https://diego-ellis-soto.shinyapps.io/RSF_Biodiversity_Access/
|
10 |
version: 1
|
11 |
asMultiple: FALSE
|
www/UC Berkeley_logo.png
DELETED
Binary file (33.5 kB)
|
|
www/UC_Berkeley_logo.png
ADDED
![]() |