【问题标题】:R - plotMapDomFlows ("flows" package) on Leaflet mapR - 传单地图上的 plotMapDomFlows(“流”包)
【发布时间】:2019-03-21 13:52:21
【问题描述】:

R 中有一个名为“flows”(details here) 的包,它允许您绘制流交互图(通过函数 plotMapDomFlows() 从流的平方矩阵中绘制。这是一个例如,使用包中包含的数据,输出的样子:

# Import data
data(nav)
myflows <- prepflows(mat = nav, i = "i", j = "j", fij = "fij")

# Remove the matrix diagonal
diag(myflows) <- 0

# Select flows that represent at least 20% of the sum of outgoing flows for 
# each urban area.
flowSel1 <- firstflows(mat = myflows/rowSums(myflows)*100, method = "xfirst", 
                       k = 20)


# Select the dominant flows (incoming flows criterion)
flowSel2 <- domflows(mat = myflows, w = colSums(myflows), k = 1)

# Combine selections
flowSel <- myflows * flowSel1 * flowSel2

# Node weights
inflows <- data.frame(id = colnames(myflows), w = colSums(myflows))

# Plot dominant flows map
opar <- par(mar = c(0,0,2,0))
sp::plot(GE, col = "#cceae7", border = NA)
plotMapDomFlows(mat = flowSel, spdf = UA, spdfid = "ID", w = inflows, wid = "id",
                wvar = "w", wcex = 0.05, add = TRUE)

我想使用 R 将这些线和多边形放在传单地图上。

有什么想法吗?

【问题讨论】:

    标签: r leaflet geography gis cartography


    【解决方案1】:

    目前这是不可能的。我们计划很快更新软件包。此功能(线和点导出)可能是更新引入的新功能之一。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-05-21
      • 1970-01-01
      • 1970-01-01
      • 2017-02-08
      • 2021-01-19
      • 1970-01-01
      • 2017-10-02
      相关资源
      最近更新 更多