ropensci / rnaturalearth

An R package to hold and facilitate interaction with natural earth map data :earth_africa:
http://ropensci.github.io/rnaturalearth/
Other
217 stars 23 forks source link

ne_download() not working properly #11

Closed Mavromatika closed 8 years ago

Mavromatika commented 8 years ago

Hi, I discovered this package in Hadley Wickham's book, and I think it's very useful. I've been playing with it a bit since yesterday, and it turns out that ne_download() can't download everything that's listed in the help page. I have tried airports, ports, railroads and they won't work (I get a 404 or a timeout error). The command I used is : ne_download(category="cultural", type="airports")

It works fine for populated places though. Any idea why ?

andysouth commented 8 years ago

Thankyou for the useful feedback.

The issue is because Natural Earth data aren't available for those at the default scale of 110. Changing to this should work for you : ne_download(category="cultural", type="airports",scale=50) ne_download(category="cultural", type="airports",scale="medium")

?ne_download shows a table of data availability at the different scales, but I'll try to add a warning if you try one that's not available.

Mavromatika commented 8 years ago

Thank you for your answer. I confirm that it works. Editing the help file would be good indeed, as the error one gets isn't very informative.

andysouth commented 8 years ago

Thanks @Mavromatika. I've added a check and warning message. Can you check this works for you ? If so I'll then close the issue. Andy

Mavromatika commented 8 years ago

Is this the message ? In check_data_exist(scale = scale, category = category, type = type) : your combination of type, category, scale seem not to exist in the list of Natural Earth data so you may get a download fail message. Check ?ne_download or http://www.naturalearthdata.com/features/ to see data availability.

andysouth commented 8 years ago

Yes. Do you find that helpful? Would you suggest anything else?

On 3 Aug 2016 8:21 pm, "Mavromatika" notifications@github.com wrote:

Is this the message ? In check_data_exist(scale = scale, category = category, type = type) : your combination of type, category, scale seem not to exist in the list of Natural Earth data so you may get a download fail message. Check ?ne_download or http://www.naturalearthdata.com/features/ to see data availability.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ropenscilabs/rnaturalearth/issues/11#issuecomment-237343175, or mute the thread https://github.com/notifications/unsubscribe-auth/AC5tRagoXGvqSQWiqL-sLBZxRSDxbIW-ks5qcOomgaJpZM4JajUN .

Mavromatika commented 8 years ago

No, I think that should do. Thank you very much for your help !