PhytoFit
Used to display satellite chlorophyll concentration, and calculate statistics and model phytoplankton blooms for regions within custom polygons.
https://github.com/BIO-RSG/PhytoFit
Category: Biosphere
Sub Category: Marine Life and Fishery
Last synced: about 14 hours ago
JSON representation
Repository metadata
Shiny app for viewing satellite chla and modelling phytoplankton blooms
- Host: GitHub
- URL: https://github.com/BIO-RSG/PhytoFit
- Owner: BIO-RSG
- License: mit
- Created: 2020-07-05T12:16:52.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2026-02-27T17:11:35.000Z (27 days ago)
- Last Synced: 2026-03-05T23:00:58.889Z (21 days ago)
- Language: HTML
- Homepage:
- Size: 256 MB
- Stars: 8
- Watchers: 3
- Forks: 1
- Open Issues: 1
- Releases: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
README.md
PhytoFit
This app can be used to display satellite chlorophyll concentration, and calculate statistics and model phytoplankton blooms for regions within custom polygons. See below for example in screen capture.
Public host: https://cioosatlantic.ca/phytofit/
How to cite
In publications, please include acknowledgements to NASA OBPG for the satellite data and the BIO remote sensing group for the application, and use this citation in the references:
Stephanie Clay, Chantelle Layton, & Emmanuel Devred. (2021). BIO-RSG/PhytoFit: First release (v1.0.0). Zenodo. https://doi.org/10.5281/zenodo.4770754
BibTeX format:
@misc{clay21,
author = {Clay, Stephanie and Layton, Chantelle and Devred, Emmanuel},
title = "PhytoFit",
howpublished = "\url{https://github.com/BIO-RSG/PhytoFit}",
year = 2021
}
Prerequisites
-
Install the latest versions of R and RStudio.
-
Install the necessary packages:
install.packages(c("fst", "shiny", "shinyWidgets", "shinyjs", "shinybusy", "leaflet", "leafpm", "quantreg", "minpack.lm", "sp", "ggplot2", "ggpp", "dplyr", "tidyr", "terra", "stringr", "RCurl", "sf", "fs"))
- Restart R after the packages have been installed.
Getting started
- Download this repository one of two ways:
-
Option 1: Code --> Download ZIP
-
Option 2: Using git (this will make it easier to download updates in the future, by simply using the
git pullcommand): Open git bash terminal, navigate to the folder where you want to download the repository, and type:git clone https://github.com/BIO-RSG/PhytoFit.git
- Open the PhytoFit repository in RStudio:
- File --> Open Project --> Navigate to the PhytoFit folder and open "PhytoFit.Rproj"
- Download the datasets of your choice:
- Open
00_download_new_datasets.Rfrom the PhytoFit folder. Set ask_user=FALSE to download all available datasets, or ask_user=TRUE to ask before downloading each one. Alternatively, you can run the script from the command line like:Rscript [script directory]/00_download_new_datasets.R 'false', filling in the [script directory] with the location where you stored the script. 'false' is the ask_user argument, set to 'true' for prompts.
- To update existing datasets:
- Similar to the download script in step 3, open
00_update_datasets.Rand set the ask_user argument, or run from the command line (e.g.Rscript [script directory]/00_update_datasets.R 'false'. This will update the datasets you have already downloaded with the most recent copies (and download any years of data missing from your local directory).
WARNINGS:
- Data files will be downloaded to
data/[region]/subfolders of the PhytoFit repository - Do NOT move them from there or the app will not be able to read them. - If possible, please keep the data files if you intend to use them in the future, rather than re-downloading them later, to avoid excessive traffic on the ftp server.
- Any data that is < 3 months old is "Near Real Time" (NRT) quality. NRT data is replaced with "Science quality" data after it becomes available, following the 3-month lag. More info here.
Running
Open app.R within RStudio, and click "Run app"
Authors
- Chantelle Layton - Initial concept, preliminary design, coding, and algorithm development/improvements
- Stephanie Clay - Final app design and modifications, feature addition, new datasets, maintenance, and algorithm improvements
- Emmanuel Devred - Scientific support, algorithm development/improvements, review and feature recommendations
Acknowledgments
- Andrea Hilborn for many valuable suggestions
Tips and recommendations
-
Selecting the region from the drop-down menu before loading data:
If your area of interest is contained within one of the smaller regions (e.g. Bay of Fundy or Gulf of Saint Lawrence), choose this in the "Region" drop-down menu to get the satellite/variable selections available for that region.
Recommended satellite sensor and chl-a models:- Atlantic: OC-CCI v6.0 POLY4 chl-a
- Gulf of Saint Lawrence, 4km: OC-CCI v6.0 POLY4 chl-a (IMPORTANT: This is a different version of POLY4 than the Atlantic, trained with data from the GoSL only. To use the GoSL-POLY4 instead of the Atlantic-POLY4, you must select "Gulf of Saint Lawrence (4km)" from the region drop-down menu).
Note that the "Gulf of Saint Lawrence, 1km" option in the region drop-down menu is an out-of-date product that was used in a single study, and should no longer be used. - Bay of Fundy (BoF): OC-CCI v6.0 OCxSPM-cor chl-a
-
Selecting a temporal composite length:
If you're concerned about low data coverage, you can use 4- or 8-day average composites, but you risk missing short-lived peaks in chl-a concentration. Typically we use daily data. -
Custom polygons:
- Ensure your polygon overlaps at least several pixels. Chl-a can be highly variable over small spatial scales and outliers or erroneous pixels (particularly near the coast) could have a more negative effect on the results in polygons with fewer pixels. If your area of interest is very small, consider expanding your polygon to take an average of the surrounding area.
- If your region of interest it too close to the coast, it might not overlap any valid data pixels. Pixels near the coast should also be used with caution as they can be affected by land runoff or shallow water where the bottom is visible and interferes with the reflected light detected by the satellite.
-
csv table of statistics:
The columns with "_log10" suffixes are the calculations performed on the log10-transformed data (i.e. chl-a pixel values are logged, the statistics are calculated, then the result is transformed back to linear space). Since chl-a is lognormally distributed, we recommend that you use these statistics - e.g. if you want a time series of daily average chl-a within the polygon, use the "mean_log10" column.
Links
User guide (In progress)
Chl-a model performance evaluation
References and data sources
Using the raw (binned) data (This is a quick tutorial explaining how the raw satellite chlorophyll data used in PhytoFit can be read into R and manipulated for other purposes)
Code updates affecting the algorithms (Summary of updates that affected the way the bloom metrics are calculated)
Owner metadata
- Name: SOPhyE (Satellite Ocean Colour and Phytoplankton Ecology Group)
- Login: BIO-RSG
- Email:
- Kind: organization
- Description: Remote Sensing Group at the Bedford Institute of Oceanography for DFO Canada
- Website: https://bio-rsg.github.io/
- Location: Canada
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/68566074?v=4
- Repositories: 7
- Last ynced at: 2024-04-23T11:36:32.833Z
- Profile URL: https://github.com/BIO-RSG
GitHub Events
Total
- Pull request event: 1
- Fork event: 1
- Watch event: 1
- Push event: 16
Last Year
- Pull request event: 1
- Fork event: 1
- Watch event: 1
- Push event: 4
Committers metadata
Last synced: 3 days ago
Total Commits: 406
Total Committers: 8
Avg Commits per committer: 50.75
Development Distribution Score (DDS): 0.333
Commits in past year: 29
Committers in past year: 3
Avg Commits per committer in past year: 9.667
Development Distribution Score (DDS) in past year: 0.31
| Name | Commits | |
|---|---|---|
| Clay | S****y@d****a | 271 |
| claysa | c****h@h****m | 99 |
| Default Seadas User | s****r@l****t | 12 |
| Jeff Cullis | j****s@d****a | 9 |
| David Fishman | d****h@g****m | 8 |
| Scott Bruce | s****e@m****a | 3 |
| Andrea Hilborn | a****n@g****m | 2 |
| Clay | C****A@E****a | 2 |
Committer domains:
- ent.dfo-mpo.ca: 1
- mi.mun.ca: 1
- dal.ca: 1
- dfo-mpo.gc.ca: 1
Issue and Pull Request metadata
Last synced: about 1 month ago
Total issues: 1
Total pull requests: 6
Average time to close issues: 14 days
Average time to close pull requests: 2 days
Total issue authors: 1
Total pull request authors: 4
Average comments per issue: 0.0
Average comments per pull request: 0.0
Merged pull request: 5
Bot issues: 0
Bot pull requests: 0
Past year issues: 0
Past year pull requests: 0
Past year average time to close issues: N/A
Past year average time to close pull requests: N/A
Past year issue authors: 0
Past year pull request authors: 0
Past year average comments per issue: 0
Past year average comments per pull request: 0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- jeffcullis (1)
Top Pull Request Authors
- sjbruce (4)
- schckngs (2)
- claysa (1)
- jeffcullis (1)
- davjfish (1)
Top Issue Labels
Top Pull Request Labels
Package metadata
- Total packages: 2
- Total downloads: unknown
- Total dependent packages: 0 (may contain duplicates)
- Total dependent repositories: 0 (may contain duplicates)
- Total versions: 2
proxy.golang.org: github.com/BIO-RSG/PhytoFit
- Homepage:
- Documentation: https://pkg.go.dev/github.com/BIO-RSG/PhytoFit#section-documentation
- Licenses: mit
- Latest release: v1.0.0 (published almost 5 years ago)
- Last Synced: 2026-03-24T07:00:56.643Z (3 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent packages count: 5.401%
- Average: 5.583%
- Dependent repos count: 5.764%
proxy.golang.org: github.com/bio-rsg/phytofit
- Homepage:
- Documentation: https://pkg.go.dev/github.com/bio-rsg/phytofit#section-documentation
- Licenses: mit
- Latest release: v1.0.0 (published almost 5 years ago)
- Last Synced: 2026-03-24T07:00:56.813Z (3 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent packages count: 5.401%
- Average: 5.583%
- Dependent repos count: 5.764%
Dependencies
- rocker/shiny latest build
- cioosatlantic/phytofit latest
Score: -Infinity