Skip to content

Version on CRAN no longer works #64

@reidhin

Description

@reidhin

The version of this package (rnaturalearth) that is published on CRAN seems to no longer work. Let me illustrate this issue below, and also suggest a solution, if I may.

Issue
Version 0.1.0 of rnaturalearth is published on CRAN. When trying to download datasets using this version of the package, I obtain the following error:

> library(rnaturalearth)
> spdf_world <- ne_download( scale = 110, type = 'countries' )
trying URL 'http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/cultural/ne_110m_admin_0_countries.zip'
Error in utils::download.file(file.path(address), zip_file <- tempfile()) : 
  cannot open URL 'http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/cultural/ne_110m_admin_0_countries.zip'
In addition: Warning message:
  In utils::download.file(file.path(address), zip_file <- tempfile()) :
  cannot open URL 'https://www.naturalearthdata.com/http/www.naturalearthdata.com/download/110m/cultural/ne_110m_admin_0_countries.zip': HTTP status was '404 Not Found'

Indeed, trying the url's from the error message in a webbrowser shows that these urls no longer exist. The correct url in this case would be: https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/cultural/ne_110m_admin_0_countries.zip
Note the "https" in front and the double slash after http: ".com/http//www.naturalearth". It seems as if naturalearth.com no longer supports "http" and only allows "https".

Solution
The development version of rnaturalearth on github has already advanced to version 0.3.0. When installing this version of the package with devtools from github as devtools::install_github("ropensci/rnaturalearth") the error is gone. This version retrieves the datasets from elsewhere.

Suggestion
I think it would be a good idea to update the published version of this package on CRAN with the development version (if that version is sufficiently mature) to avoid the error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions