Skip to content

Commit

Permalink
publish dashbaord'
Browse files Browse the repository at this point in the history
  • Loading branch information
JosiahParry committed Dec 5, 2023
1 parent 30484e5 commit ae25450
Show file tree
Hide file tree
Showing 93 changed files with 3,382 additions and 356 deletions.

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions _freeze/site_libs/jquery-3.6.0/jquery.min.js

Large diffs are not rendered by default.

19 changes: 6 additions & 13 deletions location-services/tutorials/shiny-dash/app.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ library(plotly)
library(bsicons)
library(ggplot2)
library(leaflet)
library(thematic)

theme_set(theme_minimal())
# open the feature server
crash_server <- arc_open("https://services.arcgis.com/UnTXoPXBYERF0OH6/arcgis/rest/services/Vehicle_Pedestrian_Incidents/FeatureServer")

Expand All @@ -19,13 +19,15 @@ hotspots <- get_layer(crash_server, 2)
inci_sf <- arc_select(incidents)
hs_sf <- arc_select(hotspots)

# count the number of incidents by year
annual_counts <- inci_sf |>
st_drop_geometry() |>
mutate(year = lubridate::year(Incident_Date)) |>
group_by(year) |>
count() |>
ungroup()

# make annual incidents plot
gg_annual <- ggplot(annual_counts, aes(year, n)) +
geom_line() +
geom_point(size = 3) +
Expand All @@ -34,21 +36,12 @@ gg_annual <- ggplot(annual_counts, aes(year, n)) +
y = "Incidents"
)

# count incidents by speed
speed_counts <- inci_sf |>
st_drop_geometry() |>
count(Posted_Speed) |>
filter(!is.na(Posted_Speed))


# Plotting ----------------------------------------------------------------
# ensure theme is set
thematic_on()
theme_set(theme_minimal())
auto_config_set(auto_config(priority = "bslib"))
theme <- bs_theme(bootswatch = "darkly")
bs_global_set(theme)


gg_speed <- ggplot(speed_counts, aes(Posted_Speed, n)) +
geom_col() +
labs(
Expand Down Expand Up @@ -180,9 +173,9 @@ dash_content <- layout_columns(
)

ui <- page_fillable(
theme = bs_theme(bootswatch = "darkly"),
dash_content
)

ui
# save to files
# htmltools::save_html(ui, "location-services/tutorials/shiny-dash/html/index.html")
htmltools::save_html(ui, "location-services/tutorials/shiny-dash/html/index.html")
26 changes: 13 additions & 13 deletions location-services/tutorials/shiny-dash/html/index.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,21 +1,124 @@
@font-face {
font-family: 'Lato';
font-family: 'Open Sans';
font-style: italic;
font-weight: 300;
font-stretch: normal;
font-display: swap;
src: url(fonts/memQYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWq8tWZ0Pw86hd0Rk5hkaVQ.woff) format('woff');
}
@font-face {
font-family: 'Open Sans';
font-style: italic;
font-weight: 400;
font-stretch: normal;
font-display: swap;
src: url(fonts/memQYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWq8tWZ0Pw86hd0Rk8ZkaVQ.woff) format('woff');
}
@font-face {
font-family: 'Open Sans';
font-style: italic;
font-weight: 500;
font-stretch: normal;
font-display: swap;
src: url(fonts/memQYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWq8tWZ0Pw86hd0Rk_RkaVQ.woff) format('woff');
}
@font-face {
font-family: 'Open Sans';
font-style: italic;
font-weight: 600;
font-stretch: normal;
font-display: swap;
src: url(fonts/memQYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWq8tWZ0Pw86hd0RkxhjaVQ.woff) format('woff');
}
@font-face {
font-family: 'Open Sans';
font-style: italic;
font-weight: 700;
font-stretch: normal;
font-display: swap;
src: url(fonts/memQYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWq8tWZ0Pw86hd0RkyFjaVQ.woff) format('woff');
}
@font-face {
font-family: 'Open Sans';
font-style: italic;
font-weight: 800;
font-stretch: normal;
font-display: swap;
src: url(fonts/S6u8w4BMUTPHjxswWA.woff) format('woff');
src: url(fonts/memQYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWq8tWZ0Pw86hd0Rk0ZjaVQ.woff) format('woff');
}
@font-face {
font-family: 'Lato';
font-family: 'Open Sans';
font-style: normal;
font-weight: 300;
font-stretch: normal;
font-display: swap;
src: url(fonts/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsiH0C4k.woff) format('woff');
}
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
font-stretch: normal;
font-display: swap;
src: url(fonts/S6uyw4BMUTPHvxo.woff) format('woff');
src: url(fonts/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0C4k.woff) format('woff');
}
@font-face {
font-family: 'Lato';
font-family: 'Open Sans';
font-style: normal;
font-weight: 500;
font-stretch: normal;
font-display: swap;
src: url(fonts/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjr0C4k.woff) format('woff');
}
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 600;
font-stretch: normal;
font-display: swap;
src: url(fonts/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsgH1y4k.woff) format('woff');
}
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 700;
font-stretch: normal;
font-display: swap;
src: url(fonts/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsg-1y4k.woff) format('woff');
}
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 800;
font-stretch: normal;
font-display: swap;
src: url(fonts/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgshZ1y4k.woff) format('woff');
}
@font-face {
font-family: 'Source Code Pro';
font-style: italic;
font-weight: 400;
font-display: swap;
src: url(fonts/HI_jiYsKILxRpg3hIP6sJ7fM7PqlOPHYvDP_W9O7GQTTbI1rSg.woff) format('woff');
}
@font-face {
font-family: 'Source Code Pro';
font-style: italic;
font-weight: 600;
font-display: swap;
src: url(fonts/HI_jiYsKILxRpg3hIP6sJ7fM7PqlOPHYvDP_W9O7GQTTsoprSg.woff) format('woff');
}
@font-face {
font-family: 'Source Code Pro';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(fonts/HI_diYsKILxRpg3hIP6sJ7fM7PqPMcMnZFqUwX28DMyQhM0.woff) format('woff');
}
@font-face {
font-family: 'Source Code Pro';
font-style: normal;
font-weight: 600;
font-display: swap;
src: url(fonts/S6u9w4BMUTPHh6UVeww.woff) format('woff');
src: url(fonts/HI_diYsKILxRpg3hIP6sJ7fM7PqPMcMnZFqUwX28DBKXhM0.woff) format('woff');
}

This file was deleted.

Large diffs are not rendered by default.

Loading

0 comments on commit ae25450

Please sign in to comment.