Skip to content
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

Reduce Package Size #1

Open
ratnanil opened this issue Jan 4, 2019 · 2 comments
Open

Reduce Package Size #1

ratnanil opened this issue Jan 4, 2019 · 2 comments

Comments

@ratnanil
Copy link
Contributor

ratnanil commented Jan 4, 2019

I had asked @mfherman (from nycgeo) whether he was planning to publish his package on CRAN at some point. And if yes, how he would deal with the package limit of 5MB. Here is his extensive answer:

  1. Hadley says that it is possible to argue for an exception to the 5MB limit for data packages that will not change often. See the CRAN Notes section at the end of this chapter:
    http://r-pkgs.had.co.nz/data.html
  2. Reduce the resolution of the sf files so that they are less than 5MB. (This may not be an option for your rasters.)
  3. Host the files outside of CRAN and require a separate download of the data to use the package. The CRAN version has the R code and documentation, but the spatial files live in a separate package/repository. This is the approach of the USAboundaries package:
    https://lincolnmullen.com/software/usaboundaries/
  4. If the spatial files are available for download via API, use the package to generate API calls for the user to download the files locally. This is the approach of the tigris package for US Census boundaries:
    https://github.com/walkerke/tigris
@mfherman
Copy link

mfherman commented Jan 5, 2019

If you end up submitting to CRAN before I do, please let me know how it goes!

@ratnanil
Copy link
Contributor Author

ratnanil commented Jan 7, 2019

Will do! But you are way ahead of me with your package, so I guess it's going to be the other way round.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants