made markers larger in dynamic map
This commit is contained in:
parent
0c5bd3444a
commit
6fdfaf6b4e
File diff suppressed because one or more lines are too long
@ -187,12 +187,11 @@ wisconsin_crash_map <-
|
|||||||
WI_schools$DISTRICT, " School District</br>",
|
WI_schools$DISTRICT, " School District</br>",
|
||||||
WI_schools$SCHOOLTYPE), htmltools::HTML),
|
WI_schools$SCHOOLTYPE), htmltools::HTML),
|
||||||
group = "Schools") %>%
|
group = "Schools") %>%
|
||||||
groupOptions(group = "Schools", zoomLevels = 13:20) %>%
|
|
||||||
addCircleMarkers(data = Pedestrian_Crash_Data,
|
addCircleMarkers(data = Pedestrian_Crash_Data,
|
||||||
lng=Pedestrian_Crash_Data$longitude,
|
lng=Pedestrian_Crash_Data$longitude,
|
||||||
lat=Pedestrian_Crash_Data$latitude,
|
lat=Pedestrian_Crash_Data$latitude,
|
||||||
fillColor=injury_severity_pal(Pedestrian_Crash_Data$PedestrianInjurySeverity),
|
fillColor=injury_severity_pal(Pedestrian_Crash_Data$PedestrianInjurySeverity),
|
||||||
radius=3,
|
radius=4,
|
||||||
stroke=TRUE,
|
stroke=TRUE,
|
||||||
color = "black",
|
color = "black",
|
||||||
weight = 1,
|
weight = 1,
|
||||||
@ -202,7 +201,6 @@ wisconsin_crash_map <-
|
|||||||
"pedestrian age: ", Pedestrian_Crash_Data$PedestrianAge), htmltools::HTML),
|
"pedestrian age: ", Pedestrian_Crash_Data$PedestrianAge), htmltools::HTML),
|
||||||
group = "Crash Points") %>%
|
group = "Crash Points") %>%
|
||||||
addLegend(position = "bottomleft", labels = injury_severity$InjSevName, colors = injury_severity$color, group = "Crash Points", title = "Injury Severity") %>%
|
addLegend(position = "bottomleft", labels = injury_severity$InjSevName, colors = injury_severity$color, group = "Crash Points", title = "Injury Severity") %>%
|
||||||
groupOptions(group = "Crash Points", zoomLevels = 10:20) %>%
|
|
||||||
addCircleMarkers(data = County_Crash_geom,
|
addCircleMarkers(data = County_Crash_geom,
|
||||||
lng=County_Crash_geom$longitude,
|
lng=County_Crash_geom$longitude,
|
||||||
lat=County_Crash_geom$latitude,
|
lat=County_Crash_geom$latitude,
|
||||||
@ -225,6 +223,8 @@ wisconsin_crash_map <-
|
|||||||
group = "Counties") %>%
|
group = "Counties") %>%
|
||||||
addLegend(position = "bottomleft", pal = county_pal, values = County_Crash_geom$CrashesPerPopulation, group = "Counties", title = "Circle size = county population<br><br>Color = Crashes/year</br>(normalized per 100k residents)") %>%
|
addLegend(position = "bottomleft", pal = county_pal, values = County_Crash_geom$CrashesPerPopulation, group = "Counties", title = "Circle size = county population<br><br>Color = Crashes/year</br>(normalized per 100k residents)") %>%
|
||||||
# addLegendSize(position = "bottomright", color = "black", shape = "circle", values = County_Crash_geom$value, group = "Counties", title = "Total crashes") %>%
|
# addLegendSize(position = "bottomright", color = "black", shape = "circle", values = County_Crash_geom$value, group = "Counties", title = "Total crashes") %>%
|
||||||
|
groupOptions(group = "Schools", zoomLevels = 13:20) %>%
|
||||||
|
groupOptions(group = "Crash Points", zoomLevels = 10:20) %>%
|
||||||
groupOptions(group ="Counties", zoomLevels = 1:9)
|
groupOptions(group ="Counties", zoomLevels = 1:9)
|
||||||
|
|
||||||
saveWidget(wisconsin_crash_map, file = "figures/dynamic_crash_maps/wisconsin_crash_map.html", selfcontained = TRUE)
|
saveWidget(wisconsin_crash_map, file = "figures/dynamic_crash_maps/wisconsin_crash_map.html", selfcontained = TRUE)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user