VasGBIF 3.5.2
Website
- Added search and dark/light mode toggle to the pkgdown navbar.
- Simplified navbar labels: “Get started” → “Start”, “Reference” → “Functions”, “Articles” → “Manuals”.
- Reorganized reference index:
detect_native_status()andrestore_duplicates()moved under Utilities. - Workflow diagram converted from JPG to PNG.
Documentation
-
Fixed Unicode characters in
set_vouchers()documentation (✓,✗,−) that caused the PDF manual to fail building under LaTeX. - Updated
Distributionsdata source URL fromhttptohttps. - Added
@seealsoreference inWorldLandMapdocumentation. - README: updated codecov and R-CMD-check badge links, added GBIF DOI citation, rephrased performance statement.
- Vignette
Example.Rmd: all code chunks set toeval = FALSEto avoid network-dependent failures duringR CMD check. - Vignette
Application.Rmd: fixed citation format and added missing letsR reference. - Vignette
GetRecords.Rmd: fixed table column alignment. - Reported retention rate updated from ~35% to ~30% across package docs and vignettes.
Testing
- Added testthat snapshot files for
set_threads()andimport_records()error messages. -
Added comprehensive test suite across five core functions (81 new tests, 177 total):
-
set_vouchers()(54 tests): return structure,verbatim_qualityscoring (0–9),geospatial_qualityscoring (0 to -9),moreInformativeRecordcalculation, non-groupable record handling, voucher selection, tie-breaking, coordinate propagation, taxonomic consensus (identified / divergent / unidentified), and final classification (usable / duplicate / unusable). -
get_collections()(26 tests): return structure, key formattaxon|date|lat|lon, precision-controlled coordinate rounding, complete vs. incomplete key counting, precision parameter validation, and eventDate parsing (full dates, dates with time, year-month only). -
restore_duplicates()(26 tests): return structure, restoration of all eight metadata fields (eventDate,year,month,day,identifiedBy,countryCode,stateProvince,locality), integer coercion foryear/month/day,"NA"string treated as missing, skipping of values >10,000 characters, special character stripping, and first-available-duplicate selection. -
detect_native_status()(14 tests): return structure, unknown status for taxa absent fromDistributions, known-native classification (e.g. Rosa canina in Denmark), independent multi-taxon processing, and verification of thefcasepriority logic (location_doubtful > introduced > extinct > native > unknown). -
refine_records()(15 tests): return structure,native_statuscolumn integration, valid coordinate pass-through, zero-coordinate flagging by the"zeros"test, equal lat/lon flagging by"equal", emptytestsparameter behaviour, and exclusion of"unusable"records byrestore_duplicates().
-
VasGBIF 3.5.1
Bug Fixes
-
check_taxon(): fixed merge failure for names containing commas. The TNRS internally converts commas to spaces in submitted scientific names, but the merge key on the package side used the original comma-containing name, causing records to fail to match their TNRS resolution results. A comma-stripped key column (wcvp_searchedName2) is now created for the merge, while the originalwcvp_searchedNameis preserved unchanged. -
refine_records(): removed erroneous pre-filter beforerestore_duplicates(). The callrestore_duplicates(voucher$occ_digital_voucher[VasGBIF_dataset_result != "unusable"])stripped allunusablerecords from the input.
VasGBIF 3.5.0
Major release: package renamed from UltraGBIF to VasGBIF with a substantially simplified pipeline.
Breaking Changes
Package Rename
- The package has been renamed from UltraGBIF to VasGBIF. All function names, class names, and column prefixes have been updated accordingly (e.g.,
UltraGBIF_dataset_result→VasGBIF_dataset_result).
Removed Functions
-
check_collectors()andget_collectors_name()have been removed. The collector-based duplicate detection stage has been replaced by a coordinate- and date-based collection-event key system inget_collections(). -
check_occ_taxon()replaced bycheck_taxon(). -
set_collection_mark()replaced byget_collections(). -
set_digital_voucher()replaced byset_vouchers().
Removed Data
-
occ_import,ref_wcvp_names,seas_ref, andwcvp_distributionsdatasets have been removed from the package. The internal datasetsDistributions,WGSRPD3,WorldLandMap, andEnumOccurrenceIssueremain available.
Function Signature Changes
-
import_records(): parameterGBIF_filerenamed topath;only_PRESERVED_SPECIMENremoved; newremove_tempfileparameter. -
refine_records(): parameterexport_pathremoved (useexport_records()instead);save_pathremoved; return value is now arefinedobject with elementsall_records,CoordinateProblematic, andruntime. -
check_taxon()replacescheck_occ_taxon(): defaultsourceschanged fromc("wcvp", "wfo")to"wcvp"only.
New Functions
-
detect_native_status()detects native status by matching validated coordinates to WGSRPD Level 3 polygons and WCVP distribution data. Classification uses a priority-based scheme: location_doubtful > introduced > extinct > native > unknown. -
export_records()writes refined records to disk as three gzip-compressed CSV files: all usable records, the native subset, and records that failed coordinate validation. -
restore_duplicates()is a new internal helper that fills missing metadata fields (eventDate,year,month,day,identifiedBy,countryCode,stateProvince,locality) in usable voucher records using data from duplicate records sharing the same collection key.
Improvements
-
Simplified pipeline: The workflow has been reduced from 8 modules (with collector checking) to 7 core functions across 4 stages. The collector name standardization stage has been removed entirely; duplicate detection now uses composite keys of
taxon_name|eventDate|latitude|longitudeviaget_collections(). -
refine_records()has been modularised into a three-step internal pipeline:restore_duplicates()→ CoordinateCleaner →detect_native_status(). -
get_collections()builds collection-event keys from resolved taxon names, event dates, and rounded coordinates, with user-controlled spatial precision. -
set_vouchers()implements a refined quality scoring system (metadata completeness + geospatial penalty) and returns avouchersobject. -
restore_duplicates()now restoresmonthanddayin addition to the previously restored fields. -
set_threads()is now exported for normalising thread counts.
Dependency Changes
- Removed
tokenizersfrom Imports (no longer needed after collector module removal). - Added
lubridateto Imports. - Added
@import bit64to NAMESPACE.
Documentation
- All roxygen2 documentation rewritten in Markdown-first style (roxygen2 ≥ 8.0.0).
-
RoxygenNotereplaced byConfig/roxygen2/version: 8.0.0in DESCRIPTION. - Pipeline overview in package documentation and README updated to reflect the seven-function, four-stage workflow.
-
Tutorial_of_UltraGBIF.Rmdvignette replaced byApplication.RmdandExample.Rmd. -
utils::globalVariables()expanded to suppress data.table NSE notes in R CMD check. - Author field de-anonymised with ORCID.
VasGBIF 3.2.8
Improvements
-
Enhanced TNRS error handling: Improved the retry mechanism in
check_occ_taxon()with proper error catching usingtryCatch()instead oftry(). The function now provides informative error messages and gracefully handles network failures when the TNRS API is unreachable. -
Added LazyData compression: Added
LazyDataCompression: gzipto DESCRIPTION to reduce package size and meet CRAN requirements.
Bug Fixes
-
Fixed
check_occ_taxon()retry logic crash: Resolved an issue where TNRS API failures caused the function to hang indefinitely. Changed initialization fromNULLto emptydata.frame()and added proper error handling to ensurenrow()operations work correctly during retry attempts.
Documentation
-
Standardized DOI citation format: Updated all R documentation files to use
\doi{}macro instead of\url{https://doi.org/...}for academic reference formatting acrossVasGBIF-package.R,import_records.R,check_occ_taxon.R,refine_records.R,plot_richness.R, anddata.R. - Updated README.md: Refreshed the README with the new four-stage workflow diagram, updated installation instructions, and refined descriptions of all modules.
-
Complete tutorial restructuring: Rewrote
Tutorial_of_VasGBIF.Rmdfollowing a 4-stage, 8-module structure with academic English, clear organization, and comprehensive workflow explanations. Added summary section for core modules with statistics table explaining data reduction process.
VasGBIF 3.2.7
Major Improvements
Dependency Restructuring
-
Removed dependency on rWCVP and rWCVPdata: VasGBIF now fully relies on the Taxonomic Name Resolution Service (TNRS) for taxonomic name resolution instead of the discontinued rWCVP packages. This critical change enables VasGBIF to meet CRAN submission requirements, as packages published on CRAN may only depend on other CRAN-hosted packages. Users can now install VasGBIF with a single
install.packages("VasGBIF")call. - Streamlined taxonomic databases: The required WCVP databases are now bundled within the package, eliminating external data dependencies and ensuring consistent behavior across installations.
Taxonomic Name Resolution
- Integrated TNRS (Taxonomic Name Resolution Service): Implemented a more mature and widely adopted name correction scheme that fully replaces the original complex scripts. The TNRS queries the World Checklist of Vascular Plants (WCVP) to resolve synonyms, correct misspellings, and standardize plant scientific names.
-
Enhanced taxonomic workflow: The
check_occ_taxon()function now provides detailed TNRS workflow documentation, including the four-step resolution process (Parse → Match → Correct → Select Best Match), making the taxonomic standardization process transparent and understandable for users.
Performance Optimization
-
Vectorized Set Digital Voucher: For the most time-consuming step in the “Set Digital Voucher” stage—the “Process taxonomic information for groupable records” phase—vectorization techniques have been fully leveraged, resulting in a further 40% speedup of the
set_digital_voucher()function. -
Optimized richness calculation: Deeply integrated and optimized the richness calculation and heatmap plotting functionality inspired by
lets.presab.pointsandplot.PresenceAbsencefrom the letsR package (Vilela & Villalobos, 2015). The implementation fully leverages vectorizedterraoperations to avoid explicit looping when filling large presence-absence matrices, achieving nearly a hundredfold speedup over traditional approaches. -
Efficient collection event key generation: Optimized the algorithm for generating collection event keys, reducing computational overhead in the
set_collection_mark()function.
Functionality Enhancements
Refactored collector name standardization: Completely restructured the collector name normalization and collection event mark generation functionality. The new
check_collectors()function simplifies the workflow by usingtokenizers::tokenize_words()for robust word tokenization, replacing the previous complex string splitting logic with multiple parameters.-
New S3 class system: Introduced R’s S3 class system for VasGBIF objects, providing a clearer workflow structure with well-defined return types:
-
VasGBIF_importclass forimport_records()output -
VasGBIF_taxa_checkedclass forcheck_occ_taxon()output -
VasGBIF_collection_keyclass forset_collection_mark()output -
VasGBIF_voucherclass forset_digital_voucher()output -
VasGBIF_refinedclass forrefine_records()output
-
Deleted deprecated ref_dictionary data: Removed the built-in collector name reference dictionary (
ref_dictionary) and related functions, reducing package size and simplifying dependencies.
Bug Fixes
-
Fixed
plot_richness.Rraster value extraction error: Resolved an intermittent error (invalid name(s)) in theterra::values()operation by adding cell ID validation and using direct raster object access instead of the unstable layer name accessor (ras_richness$richness).
Documentation
-
Comprehensive roxygen2 documentation: Systematically optimized and enriched help documentation across all 8 R modules. Every exported function now includes:
- Structured
@descriptionwith workflow explanation using\itemize - Detailed
@paramspecifications with type and default value information - Multi-section
@detailswith\strongsubsection headers - Comprehensive
@returndescriptions - Academic references where applicable
- Structured
-
Package-level documentation: Added complete package-level documentation in
VasGBIF-package.R, providing:- Three-stage workflow overview (Data Acquisition → Duplicate Removal → Refine Records)
- Eight-module function reference with cross-links
- Quick start example code demonstrating the complete workflow
- Performance optimization technical details (C/C++ backend integration, vectorization, SIMD exploitation, memory-efficient design, chunk-based parallelization)
- Numbered reference list for all cited literature
Updated README.md: Refreshed the README with the new four-stage workflow diagram, updated installation instructions, and refined descriptions of all modules.
Unified reference formatting: Standardized all citations across documentation files to use
\enumeratefor numbered reference lists.
Code Quality
- Cleaned code formatting: Removed redundant imports and standardized code style across all R files.
-
Removed deprecated functions: Deleted obsolete functions including
check_occ_name(),prepare_collectors_dictionary(),generate_collection_mark(), andusecores(), replacing them with their more streamlined successors.
