最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

r - Error Fetching Boundaries Using rgeoboundaries - Stack Overflow

programmeradmin1浏览0评论

I'm using the rgeoboundaries package in R to fetch administrative boundaries for Mali and Senegal. Although the package is no longer available on CRAN, I installed it successfully from GitHub using the following commands:

# Install the package from GitHub
remotes::install_github("wmgeolab/rgeoboundaries")

# Load necessary libraries
library(rgeoboundaries)
library(sf)

# Fetch administrative level 0 boundaries
mli_sen <- gb_adm0(c("Mali", "Senegal"), type = "sscgs")

However, I get the following error:

Error: Cannot open "/vsizip//tmp/RtmpDwlCaz/geoBoundaries-MLI-ADM0-all.zip/geoBoundaries-MLI-ADM0_simplified.shp"; The file doesn't seem to exist.

Question:

How can I resolve this to successfully fetch the boundary data?

Any help or guidance would be much appreciated.

I'm using the rgeoboundaries package in R to fetch administrative boundaries for Mali and Senegal. Although the package is no longer available on CRAN, I installed it successfully from GitHub using the following commands:

# Install the package from GitHub
remotes::install_github("wmgeolab/rgeoboundaries")

# Load necessary libraries
library(rgeoboundaries)
library(sf)

# Fetch administrative level 0 boundaries
mli_sen <- gb_adm0(c("Mali", "Senegal"), type = "sscgs")

However, I get the following error:

Error: Cannot open "/vsizip//tmp/RtmpDwlCaz/geoBoundaries-MLI-ADM0-all.zip/geoBoundaries-MLI-ADM0_simplified.shp"; The file doesn't seem to exist.

Question:

How can I resolve this to successfully fetch the boundary data?

Any help or guidance would be much appreciated.

Share Improve this question asked 2 days ago Saïd MaananSaïd Maanan 6877 silver badges19 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

This may be related to this rgeoboundaries GitHub ticket, which has been escalated to GitHub. Apparently the issue resembles a DDoS attack so will hopefully be temporary.

Until the issue is resolved, you could try rnaturalearth and the associated rnaturalearthhires package as an alternative:

install.packages("rnaturalearth")
install.packages("ggplot2")
install.packages("rnaturalearthhires",
                 repos = "https://ropensci.r-universe.dev",
                 type = "source")

library(rnaturalearth)
library(rnaturalearthhires)
library(ggplot2)

# Load states data for Mali and Senegal
mli_sen <- ne_states(c("Mali", "Senegal"))

# Plot
ggplot() +
  geom_sf(data = mli_sen)

发布评论

评论列表(0)

  1. 暂无评论