{ "@context": "https://schema.org", "@type": "SoftwareApplication", "name": "eSTZwritR", "alternateName": "easy rider", "applicationCategory": "Scientific Software", "operatingSystem": "Windows, macOS, Linux", "softwareVersion": "0.1.1", "description": "R package for applying standardized file naming, directory structure, and mapping conventions to empirical Seed Transfer Zones (eSTZs) in the United States to streamline data sharing among natural resource professionals.", "url": "https://sagesteppe.github.io/eSTZwritR/", "downloadUrl": "https://github.com/sagesteppe/eSTZwritR", "codeRepository": "https://github.com/sagesteppe/eSTZwritR", "author": [ { "@type": "Person", "name": "Brianna Wieferich" }, { "@type": "Person", "name": "Reed Benkendorf", "url": "https://github.com/sagesteppe" } ], "programmingLanguage": "R", "keywords": [ "seed transfer zones", "eSTZ", "empirical seed zones", "native plant restoration", "germplasm", "seed collection", "ecological genetics", "restoration ecology", "spatial data", "R package", "data standards" ], "inLanguage": "en-US", "citation": { "@type": "ScholarlyArticle", "name": "Empirical seed transfer zones require conventions for data sharing to increase their utilization by practitioners", "author": [ {"@type": "Person", "name": "Brianna Wieferich"}, {"@type": "Person", "name": "Reed Benkendorf"} ], "datePublished": "??", "publisher": "??", "url": "https://github.com/sagesteppe/EmpiricalSeedZones/blob/main/manuscript/Empirical-seed-transfer-zones-require-conventions-for-data-sharing-to-increase-their-utilization-by-practitioners.pdf" }, "offers": { "@type": "Offer", "price": "0", "priceCurrency": "USD" }, "sameAs": [ "https://doi.org/10.5281/zenodo.14641975" ] }

Skip to contents

This function helps determine which Interior Regions coincide with the majority of an empirical seed transfer zone and should be used for naming the file.

Usage

regionCoding(x, n, regions)

Arguments

x

an empirical STZ as vector data.

n

a sample size for determining which interior regions cover the most area of the stz defaults to 1000, sizes above a couple thousand seem gratuitous.

regions

an sf object of regions to use the names of. If not provided the function will read in a default set. Note that the sf object must have a column named 'REG_ABB' containing the region abbreviations.

Value

a list with a vector and a dataframe. The vector lists this component of the filename, at most two interior regions separated by a '-'. The dataframe contains a count of the number of randomly drawn points which intersect interior regions. For areas with near ties we recommend increasing the sample size argument, n which is paseed to to st:sample.

Examples

acth7 <- sf::st_read(file.path(
  system.file(package="eSTZwritR"), "extdata", 'ACTH7.gpkg')
)
#> Reading layer `ACTH7' from data source 
#>   `/home/runner/work/_temp/Library/eSTZwritR/extdata/ACTH7.gpkg' 
#>   using driver `GPKG'
#> Simple feature collection with 4967 features and 4 fields
#> Geometry type: MULTIPOLYGON
#> Dimension:     XY
#> Bounding box:  xmin: -121.5447 ymin: 36.53208 xmax: -111.0114 ymax: 46.35708
#> Geodetic CRS:  WGS 84

rc <- regionCoding(acth7)
#> although coordinates are longitude/latitude, st_sample assumes that they are
#> planar
rc$SuggestedName # name suggestions
#> [1] "CGB-CPN"
rc$RegionsCovered # number of random points in each DOI region
#>   REG_ABB   n
#> 1     CGB 436
#> 2     CPN 431
#> 3     UCB 132