Skip to content

Reduce Package Size #1

Description

@ratnanil

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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