USEPA / elevatr

An R package for accessing elevation data
Other
204 stars 26 forks source link

work on something to limit requests for mapzen point so as not to routinely exceed limits #4

Closed jhollist closed 7 years ago

tarakc02 commented 7 years ago

If this is still in need of a solution, you might try the ratelimitr package: https://cran.r-project.org/package=ratelimitr -- it has a vignette, but the github README is a good introduction. I put it together while working on a different Mapzen-related package and was able to geocode ~25,000 addresses without hitting the rate limits. I see in #8 that you might be taking a different direction altogether, so wanted to check before doing the work, but I could put together a pull request that rate-limits the httr::GET calls in get_mapzen_elev using ratelimitr.

jhollist commented 7 years ago

@tarakc02 Well this is timely... My Travis builds have been failing due to the rate limits and I'd certainly welcome a more elegant solution than a bunch of hidden sys.sleeps! So a PR would be very much appreciated. The issue in #8 only applies to raster data which, as I now know, is not rate limited.

Thanks again for the offer.

tarakc02 commented 7 years ago

Great! I should have something ready later today.

jhollist commented 7 years ago

That'd be great. I am going to be off for a few days for the holidays, but will be back in T-Th next week. Will get to the PR by then, if not earlier. I am pushing to get this out to CRAN in the next couple of weeks. I do need to get it reviewed internally (I work for the US government) but that shouldn't take too long and will hopefully get started today.