diego-ellis-soto
commited on
Commit
·
d028225
1
Parent(s):
9efdc08
Cleaning up README
Browse files
README.md
CHANGED
@@ -1,18 +1,31 @@
|
|
1 |
# SF_biodiv_access_shiny
|
2 |
|
|
|
|
|
3 |
The aim of this Shiny app is to provide decision support for the Reimagining San Francisco Initiative
|
4 |
|
5 |
-
This Shiny App takes
|
|
|
|
|
|
|
|
|
|
|
6 |
The background then allows to identify biodiversity around a calculted isochrome as well as socio-economic and environmental variables
|
|
|
7 |
It further calculates a summary table of the GBIF data located within the isochrome
|
8 |
|
9 |
# Next steps: Optimize preanno of sf gbif and cbg
|
10 |
|
11 |
Add Imp Surf, Walking Scores, SVI to cbg_sf
|
12 |
|
|
|
|
|
|
|
|
|
13 |
# Public transport ddata
|
14 |
|
15 |
Calculate accessability matrix for SF
|
16 |
|
|
|
17 |
# Show difference on the day
|
18 |
|
|
|
1 |
# SF_biodiv_access_shiny
|
2 |
|
3 |
+
App.R runs both the ui and server side of the add and loads necessary objects in R/setup.R. Shiny App working locally, but errors when pushing to ShinyApps.io.
|
4 |
+
|
5 |
The aim of this Shiny app is to provide decision support for the Reimagining San Francisco Initiative
|
6 |
|
7 |
+
This Shiny App takes:
|
8 |
+
|
9 |
+
Long/Lat on a mac by a users click OR typing of adress using geocoder.
|
10 |
+
|
11 |
+
Select a travel time and transportation code to calculate isochromes
|
12 |
+
|
13 |
The background then allows to identify biodiversity around a calculted isochrome as well as socio-economic and environmental variables
|
14 |
+
|
15 |
It further calculates a summary table of the GBIF data located within the isochrome
|
16 |
|
17 |
# Next steps: Optimize preanno of sf gbif and cbg
|
18 |
|
19 |
Add Imp Surf, Walking Scores, SVI to cbg_sf
|
20 |
|
21 |
+
Add community grass root partner orgs locations
|
22 |
+
|
23 |
+
Get images to work
|
24 |
+
|
25 |
# Public transport ddata
|
26 |
|
27 |
Calculate accessability matrix for SF
|
28 |
|
29 |
+
|
30 |
# Show difference on the day
|
31 |
|
app.R
CHANGED
@@ -55,17 +55,33 @@ ui <- dashboardPage(
|
|
55 |
useShinyjs(),
|
56 |
# Loading message
|
57 |
div(id = "loading", style = "display:none; font-size: 20px; color: red;", "Calculating..."),
|
58 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
column(
|
60 |
width = 12, align = "center",
|
61 |
-
tags$img(src = "
|
62 |
height = "200px", style = "margin:10px;", alt = "UC Berkeley Logo"),
|
63 |
-
tags$img(src = "
|
64 |
height = "200px", style = "margin:10px;", alt = "California Academy Logo"),
|
65 |
-
tags$img(src = "
|
66 |
height = "200px", style = "margin:10px;", alt = "Reimagining San Francisco Logo")
|
67 |
)
|
68 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
|
70 |
# Tab Items
|
71 |
tabItems(
|
@@ -993,6 +1009,8 @@ server <- function(input, output, session) {
|
|
993 |
)
|
994 |
})
|
995 |
|
|
|
|
|
996 |
# ------------------------------------------------
|
997 |
# [Optional: Linear Model Plot (Commented Out)]
|
998 |
# ------------------------------------------------
|
@@ -1015,7 +1033,55 @@ server <- function(input, output, session) {
|
|
1015 |
# p <- plot_model(fit, show.values = TRUE, value.offset = .3, title = "LM Coefficients: n_species ~ n_observations + median_inc + ndvi_mean")
|
1016 |
# print(p)
|
1017 |
# })
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1018 |
}
|
1019 |
|
|
|
|
|
1020 |
# Run the Shiny app
|
1021 |
shinyApp(ui, server)
|
|
|
|
|
|
|
|
|
|
55 |
useShinyjs(),
|
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"),
|
63 |
+
# # to render images in the www folder
|
64 |
+
# box(uiOutput("houz"), width = 3)
|
65 |
+
# ),
|
66 |
+
|
67 |
+
#
|
68 |
+
fluidPage(
|
69 |
column(
|
70 |
width = 12, align = "center",
|
71 |
+
tags$img(src = "UC_Berkeley_logo.png",
|
72 |
height = "200px", style = "margin:10px;", alt = "UC Berkeley Logo"),
|
73 |
+
tags$img(src = "California_academy_logo.png",
|
74 |
height = "200px", style = "margin:10px;", alt = "California Academy Logo"),
|
75 |
+
tags$img(src = "Reimagining_San_Francisco.png",
|
76 |
height = "200px", style = "margin:10px;", alt = "Reimagining San Francisco Logo")
|
77 |
)
|
78 |
),
|
79 |
+
# fluidPage(
|
80 |
+
# box(
|
81 |
+
# tags$img(height = 100, width = 100,src = "Rlogo.png"),
|
82 |
+
# imageOutput('image_logos')
|
83 |
+
# )
|
84 |
+
# ),
|
85 |
|
86 |
# Tab Items
|
87 |
tabItems(
|
|
|
1009 |
)
|
1010 |
})
|
1011 |
|
1012 |
+
|
1013 |
+
|
1014 |
# ------------------------------------------------
|
1015 |
# [Optional: Linear Model Plot (Commented Out)]
|
1016 |
# ------------------------------------------------
|
|
|
1033 |
# p <- plot_model(fit, show.values = TRUE, value.offset = .3, title = "LM Coefficients: n_species ~ n_observations + median_inc + ndvi_mean")
|
1034 |
# print(p)
|
1035 |
# })
|
1036 |
+
|
1037 |
+
|
1038 |
+
#
|
1039 |
+
# # Add Images:
|
1040 |
+
# df_img = data.frame(id = c(1:3), img_path=c('California_academy_logo.png', 'Reimagining_San_Francisco.png', 'UC Berkeley_logo.png'))
|
1041 |
+
# n <- nrow(df_img)
|
1042 |
+
#
|
1043 |
+
# n <- nrow(df_img)
|
1044 |
+
#
|
1045 |
+
# observe({
|
1046 |
+
# for (i in 1:n)
|
1047 |
+
# {
|
1048 |
+
# print(i)
|
1049 |
+
# local({
|
1050 |
+
# my_i <- i
|
1051 |
+
# imagename = paste0("img", my_i)
|
1052 |
+
# print(imagename)
|
1053 |
+
# output[[imagename]] <-
|
1054 |
+
# renderImage({
|
1055 |
+
# list(src = file.path('www', df_img$img_path[my_i]),
|
1056 |
+
# width = "100%", height = "55%",
|
1057 |
+
# alt = "Image failed to render")
|
1058 |
+
# }, deleteFile = FALSE)
|
1059 |
+
# })
|
1060 |
+
# }
|
1061 |
+
# })
|
1062 |
+
#
|
1063 |
+
#
|
1064 |
+
# output$houz <- renderUI({
|
1065 |
+
#
|
1066 |
+
# image_output_list <-
|
1067 |
+
# lapply(1:n,
|
1068 |
+
# function(i)
|
1069 |
+
# {
|
1070 |
+
# imagename = paste0("img", i)
|
1071 |
+
# imageOutput(imagename)
|
1072 |
+
# })
|
1073 |
+
#
|
1074 |
+
# do.call(tagList, image_output_list)
|
1075 |
+
# })
|
1076 |
+
|
1077 |
+
|
1078 |
}
|
1079 |
|
1080 |
+
|
1081 |
+
|
1082 |
# Run the Shiny app
|
1083 |
shinyApp(ui, server)
|
1084 |
+
|
1085 |
+
#
|
1086 |
+
|
1087 |
+
|