bcgov / bcmaps

An R package of map layers for British Columbia
http://bcgov.github.io/bcmaps/
Apache License 2.0
73 stars 17 forks source link

Use bcdata as backend for relevant layers #47

Closed stephhazlitt closed 4 years ago

stephhazlitt commented 5 years ago

Is it worth thinking about the future use cases of bcmaps versus bcdata? For map layers available with bcdata should users use that package to ensure always grabbing the most up-to-date versions (without any tinkering with bcmapsdata)? Perhaps bcmaps becomes the home for open layers from the 🇨🇦 open data catalogue, maps not available via WMS/WFS, and a set of helper functions (e.g. bc_neighbours())? Thoughts @ateucher @boshek?

boshek commented 5 years ago

I think this is a good idea to at least evaluate where we might have duplication. I wonder if to avoid breaking any old code, we could simply use bcdata on the backend for any layers that we didn't want to include? Here is a list that we could use to ID those that aren't likely to change. We could check those that

stephhazlitt commented 5 years ago

I totally agree we do not want to break code. I am also thinking of how we might help/promote users to update code using bcdata when appropriate. Was thinking a deprecated WARNING with some bread crumbs to lead ppl to bcdata might be one approach for those layers where bcdata is the obvious new kid on the block?

boshek commented 5 years ago

This seems like a great approach. Once bcdata is on CRAN, this seems viable.

stephhazlitt commented 4 years ago

Some thoughts on how to implement this if caching in bcdata is not available, and considering the challenge of no resource date-stamp:

• use bcdata as the back-end for the catalogue layers and implement caching of downloaded layer in bcmaps • rather than checking for new versions of downloaded data, provide the user with date of initial download and length of time that has passed Hey - it has been awhile since you pulled this data layer, maybe consider refreshing? • for watercourses*() and bc_bound_hres() layers, house them in the bcmaps() package (assuming size is reasonable?) and set-up an issue open action for letting package maintainers know that new versions have been released in the The Canadian Open Data Portal. MVP of this here.

boshek commented 4 years ago

What I have just realized is that we can very readily leverage the downloading capabilities build by @ateucher here: https://github.com/bcgov/bcmaps/blob/master/R/download_data.R

ateucher commented 4 years ago

I kind of forgot about that! Maybe doing the caching in bcmaps is the answer, as caching in bcdata is more complicated due to the querying...

boshek commented 4 years ago

WIP #60