Shiny tools for management rules
Shiny tools for management rules: interactive applications that aid in conservation strategies for North Atlantic right whales - Published in JOSS (2023)
Science Score: 95.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 9 DOI reference(s) in README and JOSS metadata -
✓Academic publication links
Links to: joss.theoj.org, zenodo.org -
✓Committers with academic emails
2 of 3 committers (66.7%) from academic institutions -
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Scientific Fields
Repository
Basic Info
- Host: GitHub
- Owner: NEFSC
- License: cc0-1.0
- Language: R
- Default Branch: master
- Size: 12.1 MB
Statistics
- Stars: 12
- Watchers: 3
- Forks: 1
- Open Issues: 0
- Releases: 2
Metadata Files
README.md
narwssrwsasapps
Welcome to the North Atlantic Right Whale Sighting Survey (NARWSS) and the Right Whale Sighting Advisory System (RWSAS) apps repository!
The NARWSS 'Aerial Survey Data Processing' tool, and the RWSAS 'Trigger Analysis' tool improve the workflow between data processing and the determination of potential Right Whale Slow Zones. These tools provide a platform to efficiently process survey data to help eliminate sources of human error, integrate currently active management zones, determine if trigger criterion for a new dynamic protection zone have been met, calculate the boundaries of a proposed Slow Zone, and compile reports that are then sent on to managers and other stakeholders. For more information, check out this publication:
Crowe LM, Cole TVN, Foley HJ, Cholewiak DM (2023). Shiny tools for management rules: interactive applications that aid in conservation strategies for North Atlantic right whales. Journal of Open Source Software, 8(88), 5436, https://doi.org/10.21105/joss.05436
The tools described here were developed for scientists at the Northeast Fisheries Science Center (NEFSC) in their role as data stewards to support federal managers at the Greater Atlantic Regional Fisheries Office; however, the data processing and reporting procedure will be of interest to wildlife survey and management teams with similar objectives. Additionally, these publicly available tools provide transparency and reproducibility of the process for declaring dynamic protection zones in the Northeast United States. These tools were written primarily using the R coding language and specifically leverage the 'Shiny' package.
For more info on the suite of apps in this repo, please check out the Wiki as well as this section in this NEFSC Shiny Book.
Getting Started
Make sure your local machine's Posit/R studio version has all of the packages listed in the globallibraries.R script installed, in addition to kableExtra. Opening the globallibraries.R within Posit/R Studio should notify you which you may be missing and what to click to install them.
Additional installations for downloading PDFs
webshot::install_phantomjs()
install.packages('tinytex')
tinytex::install_tinytex()
If you do not get TRUE when you run tinytex:::is_tinytex(), then you probably need to run this: tinytex::install_tinytex(force=TRUE). More info on this process and the TinyTex package can be found here: https://yihui.name/tinytex/. Note the difference between tinytex the R package and TinyTeX the LaTeX distribution. Both commands above are needed.
Troubleshooting PDF downloads
If after doing the installations above you are still having trouble downloading PDFs, there are options to compile the report as an html page. See this section of the wiki. Different computers have different setups related to LaTeX distributions which might be causing the issue.
Running the App
The app can be launched by running
shiny::runGitHub("READ-PSB-LWT-narwss_rwsas_apps", username = "NEFSC", ref = "master")
in your RStudio environment. Click 'Run App' to get started. In the window that pops up, click "Open in Browser".
To run the offline version of the app that emulates the NEFSC server (for NOAA employees running data post-processing), run
shiny::runGitHub("READ-PSB-LWT-narwss_rwsas_apps", username = "NEFSC", ref = "Container")
Example data
To take a spin with processing example aerial survey data and evaluating if sightings trigger SLOW zones, chose/enter the following details (NOTE: to download the report, you will have to host the example data on a local path specific to your machine, and the SLOW zone analysis will then not be available):

There are several scenarios available to explore with different example survey days:
- 210226: Visual sightings that fall within a Seasonal Management Area. One flight day, includes option to load previously editted eff/sig file.
- 210407: Visual sightings that trigger a new SLOW Zone. One flight day, includes option to load previously editted eff/sig file.
- 210409: Visual sightings that extend two active and overlapping SLOW Zones. Two flight day, no editted eff/sig file.
- 210512: Visual sightings that fall within active SLOW Zones, but trigger no further action. One flight day, includes option to load previously editted eff/sig file.
Script Structure
``` app.R Starting App file that defines the dashboard for all apps in this repo scripts/ global_libraries.R Required libraries creds.R* Allowable credentials defined for accessing the Shiny app on the network server
NARWSSapp.R App file for the North Atlantic Right Whale Sighting Survey (NARWSS)vAerial Survey Processing App NARWSSui.R User interface for the NARWSS Aerial Survey Processing App NARWSSserver.R Server code for NARWSS Aerial Survey Processing App
Triggerapp.R App file for the Trigger Analysis App Triggerui.R User interface for the Trigger Analysis App Trigger_server.R Server code for the Trigger Analysis App
szoneapp.R App file for the Slow Zone viewer App szoneui.R User interface for the Slow Zone viewer App szone_server.R Server code for the Slow Zone viewer App
photoapp.R App file for the Photo Position Finder App photoui.R User interface for the Photo Position Finder App photo_server.R Server code for the Photo Position Finder App
-- Files called by the server for the NARWSS Aerial Survey Processing App, Trigger Analysis App, and the Slow Zone viewer App -- reactive.R Reactive values passed between different actions sma.R Determines active Seasonal Management Areas based on the date oracleaccess.R* Credentials for accessing Oracle database active_slowzone.R Determines active Slow Zones based on the date action & slowzone.R Procedure for determining action codes and triggered Slow Zones for right whale detections
-- Files called by the server for the NARWSS Aerial Survey Processing App --
download_content.R Content passed to download handler for flight report
FlightReport.Rmd Template flight report
-- Files called by the server for the NARWSS Aerial Survey Processing App and the Trigger Analysis App --
inputsas.R Detections formatted and uploaded to the Sighting Advisory System
inputslowzone.R Triggered Slow Zone data formatted and uploaded to the database
slowzoneReport.Rmd Template for Slow Zone report
slowzoneLetter.Rmd Template for Slow Zone letter. Conditionally cycles through slowzone_let#.Rmd if more than one Slow Zone is triggered from one flight or on one day
-- Files called by the server for the Trigger Analysis App -- Acoustic_datapull.R* Queries right whale acoustic detections based on selected date
*not managed on GitHub ```
Script Flow Chart

Contributions
In the NEFSC Shiny Book, you can find the point of contact for questions regarding this repository. In addition, problems can be reported, suggestions can be submitted, and questions can be asked via this repository's issue tab.
For substantial suggestions/changes, please first open the discussion by submitting an issue.
This project, and everyone participating in it, is governed by this Code of Conduct. By participating, you are expected to uphold this code.
This repository is a scientific product and is not official communication of the National Oceanic and Atmospheric Administration, or the United States Department of Commerce. All NOAA GitHub project code is provided on an ‘as is’ basis and the user assumes responsibility for its use. Any claims against the Department of Commerce or Department of Commerce bureaus stemming from the use of this GitHub project will be governed by all applicable Federal law. Any reference to specific commercial products, processes, or services by service mark, trademark, manufacturer, or otherwise, does not constitute or imply their endorsement, recommendation or favoring by the Department of Commerce. The Department of Commerce seal and logo, or the seal and logo of a DOC bureau, shall not be used in any manner to imply endorsement of any commercial product or activity by DOC or the United States Government.
Owner
- Name: Northeast Fisheries Science Center
- Login: NEFSC
- Kind: organization
- Email: nmfs.nec.github.owners@noaa.gov
- Location: United States of America
- Repositories: 20
- Profile: https://github.com/NEFSC
NEFSC's Repositories
JOSS Publication
Shiny tools for management rules: interactive applications that aid in conservation strategies for North Atlantic right whales
Authors
Integrated Statistics under contract to the Northeast Fisheries Science Center, National Marine Fisheries Service, National Oceanic and Atmospheric Administration, USA
Northeast Fisheries Science Center, National Marine Fisheries Service, National Oceanic and Atmospheric Administration, USA
Integrated Statistics under contract to the Northeast Fisheries Science Center, National Marine Fisheries Service, National Oceanic and Atmospheric Administration, USA
Northeast Fisheries Science Center, National Marine Fisheries Service, National Oceanic and Atmospheric Administration, USA
Tags
right whales trigger analysis conservation managementGitHub Events
Total
- Watch event: 1
- Member event: 2
- Push event: 8
Last Year
- Watch event: 1
- Member event: 2
- Push event: 8
Committers
Last synced: 5 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| LEEYUHC | l****e@n****v | 644 |
| Heather Foley | h****y@n****v | 62 |
| leeyuhc | 3****c | 2 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 24
- Total pull requests: 3
- Average time to close issues: 12 months
- Average time to close pull requests: 10 minutes
- Total issue authors: 3
- Total pull request authors: 1
- Average comments per issue: 0.63
- Average comments per pull request: 0.33
- Merged pull requests: 2
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- leahcrowe (22)
- ELaBrecque-MMC (1)
- TanyaS08 (1)
Pull Request Authors
- leahcrowe (3)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- actions/checkout v2 composite
- gitleaks/gitleaks-action v1.6.0 composite