Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
9038825
ignore other folder
andybeet Jun 6, 2023
f88f7c1
add new badge in readme for R-CMD-check.yml
andybeet Jun 6, 2023
01db2b6
update R depends to 3.5.0
andybeet Jun 6, 2023
b3cefec
making teammembers vignette a rcognized vignette
andybeet Jun 6, 2023
a5ddb3b
only fail RCMD workflow on errors, not warnings
andybeet Jun 6, 2023
3f8962a
try this to supress errors
andybeet Jun 7, 2023
a13d6cc
added data file
andybeet Apr 4, 2024
637fef5
added scallop documentation
andybeet Apr 4, 2024
6aa89bb
update pkgdown yml to add scallop entry
andybeet Apr 4, 2024
a4cb6f5
remove descriptor fields
andybeet Apr 4, 2024
5da29e0
new rd after description fileds were removed
andybeet Apr 4, 2024
c8e3fcf
Review / accept scallop restricted areas addition
jmhatch Apr 30, 2024
3f17fc9
Merge pull request #57 from NEFSC/data_request_56
andybeet May 1, 2024
ab41d97
Merge branch 'main' of https://github.com/NEFSC/NEFSC-Spatial into dev
andybeet Jul 3, 2025
434f7b7
updated rcmd check yml
andybeet Jul 3, 2025
80b0c78
ignore other folder and reformat DESCRIPTION
andybeet Jul 3, 2025
260eb52
merge conflict resolved
andybeet Jul 3, 2025
c7fb738
update favicons
andybeet Jul 3, 2025
a464fee
remove master from workflow. using main
andybeet Jul 3, 2025
50c1399
update pkgdown to bootstrap 5
andybeet Jul 3, 2025
53de93c
accessibility fig.alt
andybeet Jul 3, 2025
e94219f
fixed accessibility issues
andybeet Jul 3, 2025
e3c496d
add compression type to DESCRIPTION
andybeet Jul 3, 2025
e8af660
change compression to bzip2
andybeet Jul 3, 2025
e78af04
only crash workflow on errors
andybeet Jul 3, 2025
d0b560a
typo fix
andybeet Jul 3, 2025
0f43c30
Merge pull request #42 from NEFSC/check_cmd
andybeet Jul 3, 2025
4be6594
Add NEWS.md
andybeet Jul 3, 2025
74733ff
add functions to pull shapefiles from ArcGIS
andybeet Jul 7, 2025
f2d7861
add functions to pkgdown site
andybeet Jul 7, 2025
ea12253
added examples to the r functions
andybeet Jul 7, 2025
14a4a9c
add mdeb vignette
andybeet Jul 8, 2025
9e24097
Modify R functions and function names, as well as documentation
jmhatch Jul 8, 2025
3b0788c
add gt to suggests
andybeet Jul 8, 2025
c4910d3
Changes to docs
jmhatch Jul 8, 2025
79c8904
Merge branch 'andy_mdebdb' of https://github.com/andybeet/NEFSCspatia…
jmhatch Jul 8, 2025
94aad6f
update vignette
andybeet Jul 8, 2025
7569c07
Merge branch 'andy_mdebdb' of https://github.com/NEFSC/NEFSC-Spatial …
andybeet Jul 8, 2025
bab7f91
reverted get back to using named arguments rather than url. edited ot…
andybeet Jul 8, 2025
8328ba4
function name change typo
andybeet Jul 8, 2025
e6e2953
Deprecate survey strata data
jmhatch Jul 3, 2025
88e2706
Update Roxygen and Imports lifecycle
jmhatch Jul 3, 2025
d7badbb
Add R pkg documentation for lifecylce deprecation
jmhatch Jul 10, 2025
a0ad580
reimplemented joshs code changes
andybeet Jul 10, 2025
aa4c7e9
Issue deprecation warning on pkg attachment and add R pkg documentation
jmhatch Jul 10, 2025
96a3a9b
example broke after name change. fixed
andybeet Jul 10, 2025
41fa5ca
same namechange fix for vignette
andybeet Jul 10, 2025
352a339
Add note to data docs to include MDEB links
jmhatch Jul 10, 2025
3e43e5b
Include MDEB links in onAttach msg
jmhatch Jul 10, 2025
3ce5f5a
Update onAttach msg
jmhatch Jul 10, 2025
f7310d7
Delete pkgdown/leaflet_maps/* folder
jmhatch Jul 10, 2025
800699a
Delete vignettes/articles/* for leaflet maps
jmhatch Jul 10, 2025
c7b407b
Delete maps from _pkgdown.yml; Also revert back to Bootstrap 3
jmhatch Jul 10, 2025
f6ba9d0
Delete R code to make leaflet maps
jmhatch Jul 10, 2025
d621a29
Update pkgdown GH action so it doesn't create leaflet maps
jmhatch Jul 10, 2025
d26dcf0
Merge pull request #70 from NEFSC/warn_strata
andybeet Jul 11, 2025
bf9554d
Merge pull request #71 from NEFSC/del_maps
andybeet Jul 11, 2025
ef880a5
moved mdeb functions from R folder to data-raw for use in workflow
andybeet Jul 31, 2025
b608c84
added function to pull all shapefiles and add as sf objects to packag…
andybeet Jul 31, 2025
e931b48
update namespace
andybeet Jul 31, 2025
8e1fff4
new air formatting
andybeet Jul 31, 2025
b6398c5
remove functions from package
andybeet Jul 31, 2025
e639d8d
merge dev into feature
andybeet Jul 31, 2025
6c331d5
updated mdeb vignette. moved other vignettes to same location
andybeet Jul 31, 2025
f9aa184
add bones of a workflow to pull mdeb data
andybeet Jul 31, 2025
2b39c1e
update pkgdown to align with reorganization
andybeet Jul 31, 2025
83523ca
MDEB data sets
andybeet Aug 4, 2025
f0834e1
remove sourced file in data-raw that isnt needed
andybeet Aug 4, 2025
a138b16
Automate data docs for mdeb datasets
jmhatch Aug 5, 2025
0d44962
edited links to repo in DESCRIPTION
andybeet Aug 12, 2025
5cbf20d
add find datasets directly in code chunk. cant source from data-raw i…
andybeet Aug 12, 2025
5dad7fe
disable workflow to pull MDEB. Wait for a couple of months for deprec…
andybeet Aug 15, 2025
cdbeec8
air formatted change
andybeet Aug 18, 2025
a1b5b60
add massachusetts inshore survey strata + documentation
andybeet Aug 18, 2025
56795e8
update shapefile removing fields used only internally at DMF
andybeet Aug 18, 2025
3403ab8
Merge pull request #75 from NEFSC/mass_inshore
andybeet Aug 19, 2025
cd57b8a
Merge pull request #66 from NEFSC/andy_mdebdb
andybeet Aug 19, 2025
0cfa86a
Updating data docs so that Features has consistent dimensions, nrow x…
jmhatch Aug 19, 2025
bf6f27a
Re-named to match dataset names
jmhatch Aug 19, 2025
96938dc
Delete data, no corresponding .R file
jmhatch Aug 19, 2025
3344e3f
The magic
jmhatch Aug 19, 2025
cd7ce7e
Merge pull request #76 from NEFSC/same_dim
andybeet Aug 19, 2025
626d383
rds associated with dim changes
andybeet Aug 19, 2025
ba47f9c
updated getting startd to include data set not being deprecated
andybeet Aug 19, 2025
4d0fc6f
add alt text to read me logo
andybeet Aug 19, 2025
4295b8d
updated to bootstrap 5
andybeet Aug 19, 2025
1a70eff
switched order of devs
andybeet Aug 19, 2025
22fc346
updated rd files to include examples
andybeet Aug 19, 2025
c3bb3fe
added ggplot2 to suggests for vignette
andybeet Aug 19, 2025
87d4588
bug fix in doc
andybeet Aug 19, 2025
5e498d9
Fixed example in doc
jmhatch Aug 20, 2025
f78e64d
Added periods to Description or Details
jmhatch Aug 20, 2025
3d38d0b
Re-built documentation
jmhatch Aug 20, 2025
39ed158
Merge branch 'doc_cleanup' of https://github.com/andybeet/NEFSCspatia…
jmhatch Aug 20, 2025
011c857
Revert back to Bootstrap 3 for now
jmhatch Aug 20, 2025
84c6ba8
Merge pull request #77 from NEFSC/doc_cleanup
andybeet Aug 21, 2025
5fe7c45
updated NEWS.md
andybeet Aug 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@
^\.Rproj.user$
^docs$
^pkgdown$
^\.github$
other
^vignettes/articles$

1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
52 changes: 52 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:

name: R-CMD-check.yaml

permissions: read-all

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
error-on: '"error"'
10 changes: 2 additions & 8 deletions .github/workflows/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- main
- master

jobs:
pkgdown:
Expand Down Expand Up @@ -40,15 +39,10 @@ jobs:
run: |
install.packages(c("pkgdown", "yaml"), type = "binary")
shell: Rscript {0}

- name: Install package
run: R CMD INSTALL .

- name: Create leaflet maps
run: |
source("./data-raw/create_leaflet_maps.R", echo = TRUE)
shell: Rscript {0}


- name: Deploy package
run: |
git config --local user.email "actions@github.com"
Expand Down
121 changes: 121 additions & 0 deletions .github/workflows/update_mdeb_data.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
name: pull data from MDEB data hub

on:
push:
branches:
- main2
pull_request:
branches:
- main2
#schedule:
# uses UTC/GMT time (+ 5 hrs)
## put on HOLD temporarily
#- cron: "0 17 * * 3" # Every Wednesday at 1200 hrs = 1700 UTC


jobs:

build:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GH_RELEASE }}
R_REMOTES_NO_ERRORS_FROM_WARNINGS: false

steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: set up pandoc
uses: r-lib/actions/setup-pandoc@v2

- name: Install command line packages
run: |
sudo apt update
sudo apt-get install libcurl4-openssl-dev libgit2-dev
# sudo apt-get install libgdal-dev libcurl4-gnutls-dev libgit2-dev libudunits2-dev libharfbuzz-dev libfribidi-dev
shell: bash

- name: Set up R
uses: r-lib/actions/setup-r@v2
with:
r-version: '4.2.0'

- name: Install packages
run: |
install.packages(c("remotes","jsonlite", "dplyr", "httr2", "here", "sf","rmarkdown"))
remotes::install_github("NEFSC/NEFSC-Spatial")
shell: Rscript {0}

- name: Pull MDEB data and save to repo
run: |
options(timeout = 60 * 60 * 6)
source(here::here("data-raw/get_mdeb_for_package.R"))
get_mdeb_for_package()
shell: Rscript {0}

- name: Make Comparisons for commit
# check for new data added or data omitted. Not concerned with data fixes
# update NEWS.md, DESCRIPTION with version/notes
# increments package version in description
run: |
options(timeout = 60 * 60 * 6)
source(here::here("data-raw/compare_data.r"))
source(here::here("data-raw/update_description.R"))
source(here::here("data-raw/update_news.R"))
diffs <- compare_data()
version <- update_description(diffs, digit=3)
update_news(version, diffs)
rmarkdown::render(here::here("data-raw/sendAsEmail.Rmd"),
params = diffs)

saveRDS(version,here::here("data-raw/version.rds"))
shell: Rscript {0}

- name: render readme.rmd
run: |
options(timeout = 60 * 60 * 6)
rmarkdown::render(here::here("README.Rmd"))
shell: Rscript {0}

# Send email indicating if anything has changed
# - name: Send email
# uses: dawidd6/action-send-mail@v3
#
# with:
# server_address: smtp.gmail.com
# server_port: 465
#
# username: ${{ secrets.MAIL_USERNAME }}
# password: ${{ secrets.MAIL_PASSWORD }}
#
# subject: Github Actions job result
# to: andrew.beet@noaa.gov
#
# from: NEFSCspatial GitHub
#
# #body: file://${{github.workspace}}/data-raw/datapull.txt
#
# html_body: file://${{github.workspace}}/data-raw/sendAsEmail.html
#
# #attachments: ./data-raw/sendAsEmail.html
#
# - name: commit data files
# run: |
# git config user.name github-actions
# git config user.email github-actions@github.com
# git add data/*
# git add README.md
# git add NEWS.md
# git add DESCRIPTION
# git commit -m "automated mdeb pull from update_mdeb_data yml"
# git push
#
# - name: create gh-release
# run: |
# version <- readRDS(here::here("data-raw/version.rds"))
# if(!is.null(version)){
# usethis::use_github_release(publish = TRUE)
# }
# shell: Rscript {0}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
# exclude folders
data-raw/temp
inst/doc
other
# docs folder, generated by local pkgdown build
docs
23 changes: 15 additions & 8 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
Package: NEFSCspatial
Title: Spatial data package
Version: 0.0.1
Authors@R: c(person("Andy", "Beet", , "andrew.beet@noaa.gov", role = c("aut", "cre")), person("Kimberly", "Bastille", , "kimberly.bastille@noaa.gov", role = "aut"), person("Joshua", "Hatch", , "joshua.hatch@noaa.gov", role = "aut"))
URL: https://github.com/NEFSC/NEFSC-Spatial
Title: Spatial data package for regions in the northeast atlantic
Version: 0.1.0
Authors@R: c(person("Andy", "Beet", email = "andrew.beet@noaa.gov", role = c("aut", "cre"), comment = c(ORCID = "0000-0001-8270-7090")),
person("Joshua", "Hatch", email = "joshua.hatch@noaa.gov", role = "aut"),
person("Kimberly", "Bastille", email = "kimberly.bastille@noaa.gov", role = "aut"))
URL: https://github.com/NEFSC/NEFSC-Spatial/, https://nefsc.github.io/NEFSC-Spatial/
BugReports: https://github.com/NEFSC/NEFSC-Spatial/issues
Description: Provides spatial data as sf objects
Description: Provides spatial data as sf or raster objects for the Northeast Fisheries Science Center
License: file LICENSE
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
RoxygenNote: 7.3.2
Depends:
R (>= 3.5.0)
R (>= 4.0)
Imports:
lifecycle,
sf
Suggests:
curl,
Expand All @@ -26,6 +29,10 @@ Suggests:
hexSticker,
ggimage,
dplyr,
leaflet
ggplot2,
jsonlite,
httr2,
gt
LazyData: true
LazyDataCompression: bzip2
VignetteBuilder: knitr
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# Generated by roxygen2: do not edit by hand

importFrom(lifecycle,deprecated)
38 changes: 38 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# NEFSCspatial 0.1.0

## Data set additions/removals

- Data sets from [MDEB](Marine Development GIS Data Hub) data hub (Marine Development GIS Data Hub)
- Scallop restricted areas
- Massachusetts inshore survey strata
- Deprecation warnings for data sets due to be replaced by MDEB data
- Added bzip2 data set compression

## Minor fixes

- Removed leaflet documentation
- Standardized data set documentation with added examples


# NEFSCspatial 0.0.1

Initial release of sf objects

- BTS_Strata
- EcoMon_Strata
- epu_sf
- final_mass_inshore_stat
- GillnetClosureAreas_20211021
- Great_South_Channel_Restricted_Trap_Pot_Area
- Herring_Management_Areas
- LMA1_Restricted_Area_FR
- NAFO_Divisions_2021_line_enclosed
- NAFO_Divisions_2021_line_not_enclosed
- NAFO_Divisions_2021_poly_clipped
- NAFO_Divisions_2021_poly_not_clipped
- Neus_atlantis
- Scallop_Rotational_Areas_20230411
- Shellfish_Strata
- Shrimp_Strata
- Statistical_Areas_2010
- Statistical_Areas_2010_withNames
7 changes: 7 additions & 0 deletions R/NEFSCspatial-package.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#' @keywords internal
"_PACKAGE"

## usethis namespace: start
#' @importFrom lifecycle deprecated
## usethis namespace: end
NULL
28 changes: 28 additions & 0 deletions R/data-coastspan_strata.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#' Cooperative Atlantic States Shark Pupping and Nursery Survey
#'
#' @description An \code{sf} object containing spatial data for the Cooperative Atlantic States Shark Pupping and Nursery Survey.
#'
#' @format An \code{sf} object:
#' \describe{
#' \item{Geometry type}{POLYGON}
#' \item{Dimension}{XY}
#' \item{Bounding box}{xmin: -81.6 ymin: 27.1 xmax: -74.9 ymax: 39.2}
#' \item{Projected CRS}{WGS 84}
#' \item{Features}{7 x 5}
#' \item{Metadata}{See source}
#' }
#'
#' @docType data
#' @name coastspan_strata
#' @usage data('coastspan_strata')
#' @keywords {datasets}
#' @source {https://mdeb-nefsc-noaa.hub.arcgis.com/}
#' @examples
#' \dontrun{
#' # Load the dataset
#' data(coastspan_strata)
#'
#' # Plot the geometry
#' plot(sf::st_geometry(coastspan_strata))
#' }
NULL
28 changes: 28 additions & 0 deletions R/data-csbll_stations.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#' Coastal Shark Bottom Longline Survey
#'
#' @description An \code{sf} object containing spatial data for the Coastal Shark Bottom Longline Survey. Sampling stations for the Coastal Shark Bottom Longline Survey.
#'
#' @format An \code{sf} object:
#' \describe{
#' \item{Geometry type}{POINT}
#' \item{Dimension}{NA}
#' \item{Bounding box}{xmin: -81.6 ymin: 24.5 xmax: -74.5 ymax: 38.4}
#' \item{Projected CRS}{WGS 84}
#' \item{Features}{87 x 6}
#' \item{Metadata}{See source}
#' }
#'
#' @docType data
#' @name csbll_stations
#' @usage data('csbll_stations')
#' @keywords {datasets}
#' @source {https://mdeb-nefsc-noaa.hub.arcgis.com/}
#' @examples
#' \dontrun{
#' # Load the dataset
#' data(csbll_stations)
#'
#' # Plot the geometry
#' plot(sf::st_geometry(csbll_stations))
#' }
NULL
28 changes: 28 additions & 0 deletions R/data-csbll_strata.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#' Coastal Shark Bottom Longline Survey
#'
#' @description An \code{sf} object containing spatial data for the Coastal Shark Bottom Longline Survey. Scientific survey strata for the Coastal Shark Bottom Longline Survey.
#'
#' @format An \code{sf} object:
#' \describe{
#' \item{Geometry type}{MULTIPOLYGON}
#' \item{Dimension}{XY}
#' \item{Bounding box}{xmin: -81.7 ymin: 24.4 xmax: -74.4 ymax: 38.5}
#' \item{Projected CRS}{WGS 84}
#' \item{Features}{1 x 5}
#' \item{Metadata}{See source}
#' }
#'
#' @docType data
#' @name csbll_strata
#' @usage data('csbll_strata')
#' @keywords {datasets}
#' @source {https://mdeb-nefsc-noaa.hub.arcgis.com/}
#' @examples
#' \dontrun{
#' # Load the dataset
#' data(csbll_strata)
#'
#' # Plot the geometry
#' plot(sf::st_geometry(csbll_strata))
#' }
NULL
Loading
Loading