Adding spatial data to the package.

The initial step is to create an issue. Select the option “New Data Submission Request”. Follow the guidelines in the template.

All pull requests will be reviewed by a team member

For collaborators

To process issues flagged as “New Data Submission Request” and add them to the NEFSCspatial package you will need to clone the repository, create a branch, then a pull request.

  • Clone the repo
  • Set up a new, version controlled, git project in Rstudio
  • Create a new branch (in Rstudio) with the name “data_request_xx” where xx is the issue number
  • Use one of the supplied functions in the data-raw folder to convert the shapefile (.shp) file into the required format. If the spatial data is not a shapefile then you will need to include processing scripts.
  • Create documentation for this data set and save it in the R folder. Documentation should consist of a single file with the extension .R with a file name data_shapefilename.R, where shapefilename is the name of the rda object.
  • Include an entry in the pkgdown/_pkgdown.yml file under the heading Spatial data
  • Commit your files
  • Create a pull request documenting what you have included
  • Link the issue to the pull request under the Development section of the pull request
  • Assign 2 reviewers to your pull request. These must be team members

For non collaborators

If you do not have access to contribute to the repository you can either wait for a team memeber to contact you regarding your data request or you can create a pull request. If you choose to create a pull request you will need to fork the repository, create a branch, then a pull request.

  • Fork the repository to your account
  • Clone the forked repo
  • Set up a new, version controlled, git project in Rstudio
  • Create a new branch (in Rstudio) with the name “data_request_xx” where xx is the issue number
  • Use one of the supplied functions in the data-raw folder to convert your shapefile (.shp) file into the required format. If the spatial data is not a shapefile then you will need to include processing scripts.
  • Create documentation for this data set and save it in the R folder. Documentation should consist of a single file with the extension .R with a file name data_shapefilename.R, where shapefilename is the name of the rda object.
  • Include an entry in the pkgdown/_pkgdown.yml file under the heading Spatial data
  • Commit your files
  • Create a pull request documenting what you have included
  • Link the issue to the pull request under the Development section of the pull request
  • Assign 2 reviewers to your pull request. These must be team members

Supplied functions

  • create_sf_data_from_shp - To convert a shapefile you have stored locally on your machine to sf
  • create_sf_data_from_url - Downloads a zip file from a website (containing shapefile(s)) and converts to sf
  • create_sf_data_from_ftp - Downloads shapefile(s) from a public ftp site and converts to sf