-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ne_download URL strange/wrong #29
Comments
Is the link www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_admin_0_countries.zip works in your browser? |
The command works from R for me and as @Nowosad points out should work in browser too. |
Actually it does, so it can't be a firewall or some other problem, I guess. So I have no idea ? I must investigate further. It fails with a clean install of 3.6.0 as well with the same message. |
The code saves the downloaded file to a temporary location, might be worth checking that this works for you : |
Try this to check connection from R: |
TRUE write.csv(data.frame(), tempfile()) Furthermore other urls work i.e: yields: downloading using http instead of https of this URL works as well. |
UPDATE: So I can specify global options for the
yields
Should I close the issue? |
Thanks Richard, Good work finding a solution. Leave it open for now while I ask twitter if it's wise to set that option in the package. |
so if |
So the error appears both in Rstudio console and R console. I looked at the method definition on R3.5.3 (windows) and it seems to default to "wininet" if auto:
|
Having the same issue on Linux, R version 4.0.3 with options("download.file.method")
ne_download(scale = 10, type = 'rivers_lake_centerlines', category = 'physical', destdir = destdir, load = FALSE)
and
Any ideas ho to solve this yet? |
Same issue here |
Same issue with Windows 10 rnaturalearth 0.1.0. and r 4.3
|
I believe is related to the 'http' being used, instead of 'https' in the
Edit: I changed that in the function and it's still not working. Can it be something related to firewall? |
It appears to be a new issue on the website. If you go directly to the website and browse, you get a link the same as in the R package (though https:// vs http://). If you click on the link it invokes an Thus, the |
This should be fixed now. |
I just ran into this error with R 4.0.2, rnaturalearth 0.1.0 (543e3cb) current version in the repository), Windows 10 urban_areas <- rnaturalearth::ne_download(scale = 'large', type = 'urban_areas', returnclass = 'sf')
#> Warning in utils::download.file(file.path(address), zip_file <- tempfile()):
#> InternetOpenUrl failed: 'The server name or address could not be resolved'
#> Error in utils::download.file(file.path(address), zip_file <- tempfile()): cannot open URL 'http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_urban_areas.zip' Created on 2021-09-24 by the reprex package (v2.0.0) Session infosessioninfo::session_info()
#> - Session info ---------------------------------------------------------------
#> setting value
#> version R version 4.0.2 (2020-06-22)
#> os Windows 10 x64
#> system x86_64, mingw32
#> ui RTerm
#> language (EN)
#> collate English_United States.1252
#> ctype English_United States.1252
#> tz America/Phoenix
#> date 2021-09-24
#>
#> - Packages -------------------------------------------------------------------
#> package * version date lib source
#> assertthat 0.2.1 2019-03-21 [1] CRAN (R 4.0.2)
#> backports 1.2.1 2020-12-09 [1] CRAN (R 4.0.3)
#> class 7.3-17 2020-04-26 [2] CRAN (R 4.0.2)
#> classInt 0.4-3 2020-04-07 [1] CRAN (R 4.0.2)
#> cli 2.3.1 2021-02-23 [1] CRAN (R 4.0.4)
#> crayon 1.4.1 2021-02-08 [1] CRAN (R 4.0.2)
#> DBI 1.1.1 2021-01-15 [1] CRAN (R 4.0.3)
#> digest 0.6.27 2020-10-24 [1] CRAN (R 4.0.3)
#> dplyr 1.0.4 2021-02-02 [1] CRAN (R 4.0.3)
#> e1071 1.7-6 2021-03-18 [1] CRAN (R 4.0.4)
#> ellipsis 0.3.1 2020-05-15 [1] CRAN (R 4.0.2)
#> evaluate 0.14 2019-05-28 [1] CRAN (R 4.0.2)
#> fansi 0.4.2 2021-01-15 [1] CRAN (R 4.0.3)
#> fs 1.5.0 2020-07-31 [1] CRAN (R 4.0.3)
#> generics 0.1.0 2020-10-31 [1] CRAN (R 4.0.3)
#> glue 1.4.2 2020-08-27 [1] CRAN (R 4.0.2)
#> highr 0.8 2019-03-20 [1] CRAN (R 4.0.2)
#> htmltools 0.5.1.1 2021-01-22 [1] CRAN (R 4.0.3)
#> KernSmooth 2.23-17 2020-04-26 [2] CRAN (R 4.0.2)
#> knitr 1.31 2021-01-27 [1] CRAN (R 4.0.3)
#> lattice 0.20-41 2020-04-02 [2] CRAN (R 4.0.2)
#> lifecycle 1.0.0 2021-02-15 [1] CRAN (R 4.0.4)
#> magrittr 2.0.1 2020-11-17 [1] CRAN (R 4.0.3)
#> pillar 1.5.1 2021-03-05 [1] CRAN (R 4.0.4)
#> pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.0.2)
#> proxy 0.4-25 2021-03-05 [1] CRAN (R 4.0.4)
#> purrr 0.3.4 2020-04-17 [1] CRAN (R 4.0.2)
#> R6 2.5.0 2020-10-28 [1] CRAN (R 4.0.3)
#> Rcpp 1.0.7 2021-07-07 [1] CRAN (R 4.0.5)
#> reprex 2.0.0 2021-04-02 [1] CRAN (R 4.0.5)
#> rlang 0.4.10 2020-12-30 [1] CRAN (R 4.0.3)
#> rmarkdown 2.7 2021-02-19 [1] CRAN (R 4.0.4)
#> rnaturalearth 0.1.0 2017-03-21 [1] CRAN (R 4.0.5)
#> sessioninfo 1.1.1 2018-11-05 [1] CRAN (R 4.0.2)
#> sf 0.9-7 2021-01-06 [1] CRAN (R 4.0.4)
#> sp 1.4-5 2021-01-10 [1] CRAN (R 4.0.3)
#> stringi 1.5.3 2020-09-09 [1] CRAN (R 4.0.3)
#> stringr 1.4.0 2019-02-10 [1] CRAN (R 4.0.2)
#> styler 1.3.2 2020-02-23 [1] CRAN (R 4.0.2)
#> tibble 3.1.0 2021-02-25 [1] CRAN (R 4.0.4)
#> tidyselect 1.1.0 2020-05-11 [1] CRAN (R 4.0.2)
#> units 0.7-1 2021-03-16 [1] CRAN (R 4.0.4)
#> utf8 1.2.1 2021-03-12 [1] CRAN (R 4.0.5)
#> vctrs 0.3.6 2020-12-17 [1] CRAN (R 4.0.3)
#> withr 2.4.1 2021-01-26 [1] CRAN (R 4.0.3)
#> xfun 0.20 2021-01-06 [1] CRAN (R 4.0.3)
#> yaml 2.2.1 2020-02-01 [1] CRAN (R 4.0.2)
#>
#> [1] C:/Users/David/Documents/lib/R
#> [2] C:/Program Files/R/R-4.0.2/library |
There's a GIST showing where to find the files on S3. |
@nvkelso should the package be updated to use the new urls? Or are the currently used URLs expected to come back online? |
For CI and build systems you should switch to the direct S3 URLs as AWS sponsors now via their public data program.
… On Sep 29, 2021, at 10:23, David LeBauer ***@***.***> wrote:
@nvkelso should the package be updated to use the new urls? Or are the currently used URLs expected to come back online?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Encountering the same bug and I believe there is still an issue with the URLs on the website. I am able to manually download from the website, but this could be related to the onclick event mentioned earlier in the thread. This code: Returns:
Further when I try to download directly using the following code (which works on other files):
I get a similar error:
|
I suspect this was during a rare maintenance window on the Natural Earth server. 500s are server errors. Downloading that link works for me today. If you switch over to the S3 URLs than that is much less likely to affect you. |
This issue has come up for me today, after years of using this package without issues. Both on Windows and Linux, have posted the Windows session information below.
If I try to use the ne_download function for any file (and even using the defaults) I get the following errors:
|
I'm not sure if &/or why this changed, but note the In any event, please switch over to the S3 links. |
I did note that - I can switch over to using the S3 links, that's no problem, I was just wondering whether the functions in the package would be updated to reflect these changes as they offer a more convenient/streamlined way of downloading and using the data for my use-case. Thank you! |
More than 3 years past and this bug still exists:
|
At some point, you should update packages... |
rnaturalearth::ne_download(scale = "medium", type = "urban_areas", category = "cultural", returnclass = "sf")
#> Simple feature collection with 2143 features and 4 fields
#> Geometry type: POLYGON
#> Dimension: XY
#> Bounding box: xmin: -157.984 ymin: -46.26844 xmax: 174.97 ymax: 69.35127
#> Geodetic CRS: WGS 84
#> # A tibble: 2,143 × 5
#> scalerank featurecla area_sqkm min_zoom geometry
#> <dbl> <chr> <dbl> <dbl> <POLYGON [°]>
#> 1 3 Urban area 1003. 3.7 ((-121.3788 38.39169, -121.3788 38.3…
#> 2 5 Urban area 165. 5 ((-122.8139 38.506, -122.8139 38.506…
#> 3 5 Urban area 90.6 5 ((-122.1707 38.08574, -122.1707 38.0…
#> 4 2 Urban area 2538. 3.6 ((-122.4463 37.57833, -122.4463 37.5…
#> 5 5 Urban area 514. 5 ((-121.2264 37.88368, -121.2264 37.8…
#> 6 5 Urban area 131. 5 ((-122.5233 38.02747, -122.5233 38.0…
#> 7 5 Urban area 258. 5 ((-121.7905 37.7324, -121.7905 37.73…
#> 8 5 Urban area 322. 5 ((-120.9724 37.75669, -120.9724 37.7…
#> 9 4 Urban area 401. 4 ((-119.7376 36.88969, -119.7376 36.8…
#> 10 6 Urban area 98.6 6 ((-121.6897 36.74055, -121.6897 36.7…
#> # … with 2,133 more rows Created on 2023-01-30 with reprex v2.0.2 |
So after clean install using the latest "rnaturalearth" on Windows 7 (R 3.5.3):
The URL seems strange to me:
http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_admin_0_countries.zip
Command that I ran:
countries10 <- ne_download(scale = 10, type = 'countries', category = 'cultural', returnclass = "sf")
The text was updated successfully, but these errors were encountered: