装饰元素

在 R 中使用 leaflet 构建交互式地图

Rich Majerus

Vice President of Strategy & Planning, Queens University of Charlotte

高校搜索

ca_public <- ipeds %>%
    filter(sector_label == "Public", state == "CA")

ca_public %>% leaflet() %>% addProviderTiles("Esri") %>% addCircleMarkers(radius = 2, label = ~htmlEscape(name), color = ~pal(sector_label), group = "Public") %>%
addSearchFeatures(targetGroups = 'Public', options = searchFeaturesOptions(zoom = 10))
在 R 中使用 leaflet 构建交互式地图
# search for markers
 addSearchFeatures(
         targetGroups = 'Public')

addSearchFeatures() 1

addSearchFeatures(options =
 searchFeaturesOptions(zoom = 10),
 targetGroups = 'Public')

addSearchFeatures() 2

在 R 中使用 leaflet 构建交互式地图

高校聚类

ipeds  %>% 
  leaflet() %>% 
      addTiles() %>% 
      addCircleMarkers(radius = 2, 
                       color = ~pal(sector_label),
                       clusterOptions = markerClusterOptions())

聚类标记 1

在 R 中使用 leaflet 构建交互式地图

高校聚类

聚类标记 2

在 R 中使用 leaflet 构建交互式地图

¡Vamos a practicar!

在 R 中使用 leaflet 构建交互式地图

Preparing Video For Download...