我如何显示和动画谷歌热图我已经使用过这个代码
swf1 <- read.csv("D:/modilingfinel/swf1.csv",header=TRUE)
head(swf1)
set.seed(20170417)
df <- swf1 df$weight <- sample(1:10, size = nrow(df), replace = T)
google_map(key = "API_Key", data = df) %>% add_heatmap(lon = "Lon", lat =
"Lat",
weight = "weight", option_radius = 0.001, legend = T)
但我没有任何帮助,谢谢
当我尝试运行整个代码时,我得到了这个
swf1 <- read.csv("D:/modilingfinel/swf1.csv",header=TRUE)
head(swf1)
swf1 <- make_bbox(lon = swf1$Lon, lat = swf1$Lat, f = .1)
library(googleway); google_map(key =
"API_KEY") %>% add_markers( data = swf1, lon = "Lon", lat = "Lat")
set.seed(20170417)
swf1 <- swf1
swf1$weight <- sample(1:10, size = nrow(swf1), replace = T)
google_map(key = "API_KEY", data = swf1)%>% add_markers( data = swf1,
lon = "Lon", lat = "Lat") %>%
add_heatmap(data = swf1, lon = "Lon", lat = "Lat", weight = "weight",
option_radius = 0.001, legend = T)