Submitting Author Name: Jeremy Farrell
Submitting Author Github Handle: @jeremylfarrell
Other Package Authors Github handles: (comma separated, delete if none) @github_handle1, @github_handle2
Repository: https://github.com/jeremylfarrell/lakefetch/tree/ropensci-software-review
Version submitted: 0.1.3
Submission type: Standard
Editor: @Pakillo
Reviewers: TBD
Archive: TBD
Version accepted: TBD
Language: en
- Paste the full DESCRIPTION file inside a code block below:
Package: lakefetch
Title: Calculate Fetch and Wave Exposure for Lake Sampling Points
Version: 0.1.3
Authors@R:
person(given = "Jeremy",
family = "Lynch Farrell",
email = "farrej2@rpi.edu",
role = c("aut", "cre"))
Description: Calculates fetch (open water distance) and wave exposure metrics
for lake sampling points. Downloads lake boundaries from 'OpenStreetMap',
calculates directional fetch using a ray-casting approach, and optionally
integrates National Hydrography Dataset ('NHD') data
<https://www.usgs.gov/national-hydrography> for hydrological context
including outlet and inlet locations. Can estimate lake depth from surface
area using empirical relationships, and integrate historical weather data
for cumulative wave energy calculations. Includes an optional interactive
'shiny' application for visualization.
License: MIT + file LICENSE
Encoding: UTF-8
Language: en-US
LazyData: true
Depends: R (>= 4.1.0)
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.3
Imports:
sf (>= 1.0-0),
osmdata (>= 0.2.0),
ggplot2 (>= 3.0.0)
Suggests:
nhdplusTools,
jsonlite,
shiny,
leaflet,
base64enc,
parallel,
knitr,
rmarkdown,
testthat (>= 3.0.0)
Config/testthat/edition: 3
VignetteBuilder: knitr
URL: https://github.com/jeremylfarrell/lakefetch
BugReports: https://github.com/jeremylfarrell/lakefetch/issues
Scope
Data retrieval: lakefetch automates downloading lake boundary polygons from OpenStreetMap via the Overpass API and optionally retrieves historical weather data from the Open-Meteo API.
Geospatial data: this package performs spatial operations on lake polygons (ray-casting, buffering, coordinate transformations) using the sf package to calculate directional fetch distances and classify wave exposure.
Field and lab reproducibility tools: lakefetch provides a standardized, reproducible workflow for calculating fetch from field sampling coordinates, replacing GIS manual measurements with scripted, version-controlled analyses.
- Who is the target audience and what are scientific applications of this package?
lakefetch is designed for aquatic ecologists, limnologists, and environmental scientists who need to quantify wind exposure at sampling locations on lakes. Fetch (the unobstructed distance wind can travel across open water) is a key physical driver controlling wave height, sediment resuspension, nutrient cycling, and littoral habitat structure in lakes. Despite its ecological importance, calculating fetch has historically required manual GIS work or marine-focused tools that do not handle the irregular shorelines and small spatial scales typical of inland lakes.
The target audience includes researchers studying:
Benthic macroinvertebrate community structure and its relationship to wave disturbance
Cyanobacterial bloom dynamics and the role of wind mixing
Littoral sediment grain size sorting driven by wave energy
Nutrient concentrations and their relationship to physical exposure
Any lake sampling study where wind/wave exposure is a potential explanatory variable
The package provides an end-to-end R workflow: loading sampling sites, downloading lake boundaries from OpenStreetMap, calculating directional fetch via ray-casting, classifying sites by exposure, estimating lake depth, and optionally integrating NHD hydrological context and historical weather data for cumulative wave energy estimates.
Four existing R packages calculate fetch or related lake metrics:
-
fetchR (CRAN): Calculates fetch for general water bodies. Requires user-supplied coastline polygons (no automatic download), works with a single polygon at a time (no batch multi-lake processing), and lacks lake-specific integrations (NHD, weather/wave energy).
-
waver (CRAN): Calculates wave energy for coastal/marine sites using a wedge-based fetch algorithm. Designed for marine environments; does not handle the irregular shorelines and small scales of freshwater lakes; no OpenStreetMap integration, batch processing, or NHD context.
-
windfetch (GitHub): Successor to fetchR with improved algorithms. Still focused on coastal environments; no automatic boundary download, multi-lake batch processing, or freshwater-specific features.
-
lakemorpho (CRAN): Calculates lake morphometry metrics including fetch as one of many parameters (shoreline development, max length/width, volume). Single-lake focus; requires user-supplied polygon; no wave energy estimation, weather integration, or exposure classification.
lakefetch differs from all four by focusing specifically on freshwater lakes with: (1) automatic lake boundary download from OpenStreetMap with spatial clustering for geographically spread datasets, (2) batch processing of hundreds of sites across many lakes from a single CSV, (3) empirical depth estimation from lake surface area, (4) NHD integration for US lakes (outlets, inlets, stream order, watershed area, connectivity classification), and (5) historical weather and cumulative wave energy integration via the Open-Meteo API.
- R CMD check failure in pkgcheck: This is a local environment issue on the machine where pkgcheck was run (Windows, Rtools not on PATH). R CMD check passes on all three platforms via GitHub Actions (Ubuntu, macOS, Windows) and on CRAN (the package is published as v0.1.3).
- Cyclomatic complexity >50 in 4 functions:
assign_sites_to_lakes() (64), fetch_app_upload() (60), load_sites() (58), and fetch_app() (53). The two Shiny app functions are inherently complex UI/server definitions. assign_sites_to_lakes() implements a three-pass matching algorithm (direct intersection, buffer tolerance, name-based matching) that is difficult to decompose further without obscuring the logic. load_sites() handles flexible column name detection across many naming conventions, which requires sequential conditional checks.
Technical checks
Confirm each of the following by checking the box.
This package:
Use of Generative AI
Claude (Anthropic) was used as a collaborative development partner throughout the entire lifecycle of this package. All code was directed and reviewed by the package author, who designed the scientific approach, selected the ecological use cases, and validated all outputs. Claude is credited as co-author on all git commits via Co-Authored-By tags.
Publication options
MEE Options
- [x] The package is novel and will be of interest to the broad readership of the journal.
- [x] The manuscript describing the package is no longer than 3000 words.
- [x] You intend to archive the code for the package in a long-term repository which meets the requirements of the journal (see [MEE's Policy on Publishing Code](https://besjournals.onlinelibrary.wiley.com/hub/journal/2041210x/policyonpublishingcode.html))
- (*Scope: Do consider MEE's [Aims and Scope](http://besjournals.onlinelibrary.wiley.com/hub/journal/10.1111/(ISSN)2041-210X/aims-and-scope/read-full-aims-and-scope.html) for your manuscript. We make no guarantee that your manuscript will be within MEE scope.*)
- (*Although not required, we strongly recommend having a full manuscript prepared when you submit here.*)
- (*Please do not submit your package separately to Methods in Ecology and Evolution*)
**Tentative manuscript title**: lakefetch: an R package for calculating fetch and wave exposure metrics for freshwater lake sampling sites
Tentative manuscript description: The manuscript will present lakefetch through four ecological use cases demonstrating fetch as an explanatory variable across different disciplines: (1) benthic macroinvertebrate community ordination at NTL-LTER lakes (biology), (2) cyanobacterial bloom dynamics at Lake Champlain using EPA CYAN satellite data (biology/remote sensing), (3) littoral sediment grain size sorting at NEON lakes (physical science), and (4) nutrient concentrations across National Lakes Assessment (NLA) sites (chemistry). Each case study illustrates a different aspect of the package workflow and demonstrates how fetch integrates into standard ecological analyses.
Code of conduct
Submitting Author Name: Jeremy Farrell
Submitting Author Github Handle: @jeremylfarrell
Other Package Authors Github handles: (comma separated, delete if none) @github_handle1, @github_handle2
Repository: https://github.com/jeremylfarrell/lakefetch/tree/ropensci-software-review
Version submitted: 0.1.3
Submission type: Standard
Editor: @Pakillo
Reviewers: TBD
Archive: TBD
Version accepted: TBD
Language: en
Scope
Please indicate which category or categories from our [package fit policies](https://devguide.ropensci.org/softwarereview_policies.html#package-categories) this package falls under: (Please check an appropriate box below. If you are unsure, we suggest you make a pre-submission inquiry.):
Explain how and why the package falls under these categories (briefly, 1-2 sentences):
Data retrieval: lakefetch automates downloading lake boundary polygons from OpenStreetMap via the Overpass API and optionally retrieves historical weather data from the Open-Meteo API.
Geospatial data: this package performs spatial operations on lake polygons (ray-casting, buffering, coordinate transformations) using the sf package to calculate directional fetch distances and classify wave exposure.
Field and lab reproducibility tools: lakefetch provides a standardized, reproducible workflow for calculating fetch from field sampling coordinates, replacing GIS manual measurements with scripted, version-controlled analyses.
lakefetch is designed for aquatic ecologists, limnologists, and environmental scientists who need to quantify wind exposure at sampling locations on lakes. Fetch (the unobstructed distance wind can travel across open water) is a key physical driver controlling wave height, sediment resuspension, nutrient cycling, and littoral habitat structure in lakes. Despite its ecological importance, calculating fetch has historically required manual GIS work or marine-focused tools that do not handle the irregular shorelines and small spatial scales typical of inland lakes.
The target audience includes researchers studying:
Benthic macroinvertebrate community structure and its relationship to wave disturbance
Cyanobacterial bloom dynamics and the role of wind mixing
Littoral sediment grain size sorting driven by wave energy
Nutrient concentrations and their relationship to physical exposure
Any lake sampling study where wind/wave exposure is a potential explanatory variable
The package provides an end-to-end R workflow: loading sampling sites, downloading lake boundaries from OpenStreetMap, calculating directional fetch via ray-casting, classifying sites by exposure, estimating lake depth, and optionally integrating NHD hydrological context and historical weather data for cumulative wave energy estimates.
Four existing R packages calculate fetch or related lake metrics:
fetchR (CRAN): Calculates fetch for general water bodies. Requires user-supplied coastline polygons (no automatic download), works with a single polygon at a time (no batch multi-lake processing), and lacks lake-specific integrations (NHD, weather/wave energy).
waver (CRAN): Calculates wave energy for coastal/marine sites using a wedge-based fetch algorithm. Designed for marine environments; does not handle the irregular shorelines and small scales of freshwater lakes; no OpenStreetMap integration, batch processing, or NHD context.
windfetch (GitHub): Successor to fetchR with improved algorithms. Still focused on coastal environments; no automatic boundary download, multi-lake batch processing, or freshwater-specific features.
lakemorpho (CRAN): Calculates lake morphometry metrics including fetch as one of many parameters (shoreline development, max length/width, volume). Single-lake focus; requires user-supplied polygon; no wave energy estimation, weather integration, or exposure classification.
lakefetch differs from all four by focusing specifically on freshwater lakes with: (1) automatic lake boundary download from OpenStreetMap with spatial clustering for geographically spread datasets, (2) batch processing of hundreds of sites across many lakes from a single CSV, (3) empirical depth estimation from lake surface area, (4) NHD integration for US lakes (outlets, inlets, stream order, watershed area, connectivity classification), and (5) historical weather and cumulative wave energy integration via the Open-Meteo API.
(If applicable) Does your package comply with our guidance around Ethics, Data Privacy and Human Subjects Research?
NA
If you made a pre-submission inquiry, please paste the link to the corresponding issue, forum post, or other discussion, or
@tagthe editor you contacted.NA
Explain reasons for any
pkgcheckitems which your package is unable to pass.assign_sites_to_lakes()(64),fetch_app_upload()(60),load_sites()(58), andfetch_app()(53). The two Shiny app functions are inherently complex UI/server definitions.assign_sites_to_lakes()implements a three-pass matching algorithm (direct intersection, buffer tolerance, name-based matching) that is difficult to decompose further without obscuring the logic.load_sites()handles flexible column name detection across many naming conventions, which requires sequential conditional checks.Technical checks
Confirm each of the following by checking the box.
This package:
Use of Generative AI
Claude (Anthropic) was used as a collaborative development partner throughout the entire lifecycle of this package. All code was directed and reviewed by the package author, who designed the scientific approach, selected the ecological use cases, and validated all outputs. Claude is credited as co-author on all git commits via
Co-Authored-Bytags.Publication options
MEE Options
- [x] The package is novel and will be of interest to the broad readership of the journal. - [x] The manuscript describing the package is no longer than 3000 words. - [x] You intend to archive the code for the package in a long-term repository which meets the requirements of the journal (see [MEE's Policy on Publishing Code](https://besjournals.onlinelibrary.wiley.com/hub/journal/2041210x/policyonpublishingcode.html)) - (*Scope: Do consider MEE's [Aims and Scope](http://besjournals.onlinelibrary.wiley.com/hub/journal/10.1111/(ISSN)2041-210X/aims-and-scope/read-full-aims-and-scope.html) for your manuscript. We make no guarantee that your manuscript will be within MEE scope.*) - (*Although not required, we strongly recommend having a full manuscript prepared when you submit here.*) - (*Please do not submit your package separately to Methods in Ecology and Evolution*) **Tentative manuscript title**: lakefetch: an R package for calculating fetch and wave exposure metrics for freshwater lake sampling sitesTentative manuscript description: The manuscript will present lakefetch through four ecological use cases demonstrating fetch as an explanatory variable across different disciplines: (1) benthic macroinvertebrate community ordination at NTL-LTER lakes (biology), (2) cyanobacterial bloom dynamics at Lake Champlain using EPA CYAN satellite data (biology/remote sensing), (3) littoral sediment grain size sorting at NEON lakes (physical science), and (4) nutrient concentrations across National Lakes Assessment (NLA) sites (chemistry). Each case study illustrates a different aspect of the package workflow and demonstrates how fetch integrates into standard ecological analyses.
Code of conduct