Changelog
Source:NEWS.md
birdscanR (development version)
- Breaking change: birdscanR now requires R >= 4.2.0 (was R >= 4.1.0), because current versions of its dependency ggplot2 no longer support R 4.1.
- New functionality:
filterSpeedFeature37()was added to filter unreasonable speed values created for animals flying through the radar beam for too short a time (#50). - New functionality:
createVPTS()was added to create vpts csv output files in line with the ALOFT standard (#52). - New functionality: the functions
getCollectionTable()andextractDbData()now include an additional optional parametertimeIntervalfor when you want to limit the data being retrieved from the collection table (#49). - New functionality:
getEchoFeatures()now includes an additional optional parameterechoSubsetfor when you want to limit the data being retrieved from theecho_rffeature_maptable to a certain subset of echoes only. In the functionextractDBData(), the default is now to not extract the fullecho_rffeature_maptable anymore, but only for the echoes included in thecollectiontable (which can now be subset based on a time interval). This improves performance for very large databases (commit 78988c5). - New functionality: Added a function to create a list of time ranges that can then be used for plotting (#78).
- New functionality:
createDataPackage()was added to create a standardised MR1 data package of a radar campaign (#44), following the Frictionless Data Package standard, for publication on Zenodo. The package holds the echo, protocol, blind time, sunrise/sunset and site data, with a schema per table (column types, descriptions, units, primary and foreign keys) and package-level metadata (title, owner, licence, embargo, contributors with ORCID and DataCite roles, related identifiers, suggested citation, spatial and temporal coverage, applied filters and provenance). - New functionality:
createDataPackageMetadataTemplate()was added to write a YAML template for the package-level metadata used bycreateDataPackage(). - New functionality:
validateDataPackage()was added to check an MR1 data package, as object or on disk, before publication: package metadata, presence and readability of the resources, required columns, column names and types against the schema, primary and foreign keys, and plausibility of the content (start before stop times, echoes within their measurement period and the temporal coverage, site coordinates). - New functionality:
uploadDataPackageToZenodo()was added to upload a validated MR1 data package as a draft record to Zenodo (or the Zenodo sandbox), with a reserved DOI that is written into the package, and with the Zenodo metadata (creators, contributor roles, licence, embargo, keywords, related identifiers, location, period, BirdScan MR1 community) taken fromdatapackage.json(#59). It requires the suggested packagehttr2. The record is never published by the function. - Improved functionality:
createDataPackageMetadataTemplate()now includes the optional fieldidfor the DOI of the dataset. - New functionality:
uploadDataPackageToZenodo()now creates a draft of a new version of an existing Zenodo record when the data package has the DOI of that record asid(new argumentnewVersion). The files of the previous version are replaced, and its related identifiers (e.g. links to collections) are kept. - New functionality:
addZenodoRelatedIdentifiers()was added to add related identifiers (e.g.IsPartOflinks to collections) to the metadata of a Zenodo record without creating a new version. The edit is published only withpublish = TRUE. - New functionality:
uploadCollectionToZenodo()was added to create a citable collection record on Zenodo, as a draft with a reserved DOI, that groups published records: an owner collection groups the MR1 data packages (campaigns) of one owner, the community collection groups the owner collections. The collection links to the concept DOI of each member (HasPart), holds a member list (members.csv), and adds anIsPartOflink to each member (not published). New versions follow the updated member list.createCollectionMetadataTemplate()writes the YAML template for the collection metadata. - New functionality:
linkCollectionMembers()was added to add (and publish) theIsPartOflinks from the members of a collection to the collection, e.g. after publishing the collection. - New functionality:
readDataPackageFromZenodo()was added to download MR1 data packages from Zenodo and read them as Frictionless Data Packages (#60). It takes DOIs of data packages and/or collections (all members are read), skips records under embargo with a warning, does not download files again that are already present, and stores the Zenodo DOI, version and collections of each package. Several packages are merged by default (merge = TRUE), or returned as a list. - New functionality:
mergeDataPackages()was added to merge MR1 data packages of several campaigns into one, with acampaignIDcolumn in each resource and keys that include the campaign. - New functionality:
citeDataPackages()was added to give the references for the MR1 data packages used, following the citation rule of the BirdScan MR1 community: up to 3 packages are cited themselves, more than 3 through their owner collections, and more than 3 owner collections through the community collection. References are given as text and as BibTeX (toBibtex()). - New functionality:
createDataPackageMetadataTemplate()can now fill in the template with the values derived from the data (new argumentsdbExtractandcountryCode): campaign ID, title, description and owner.checkDataPackageMetadata()was added to check a metadata file (of a data package or a collection) before it is used, and to list all problems at once. - New functionality:
editDataPackageMetadata()was added to fill in (or correct) the metadata of a data package in a form in the web browser, instead of editing the YAML file. The form shows what is still missing or wrong while you type and saves the YAML file. It requires the suggested packageshiny. - Improved functionality:
addZenodoRelatedIdentifiers()withpublish = TRUEnow also publishes an open edit that already has the related identifiers. - Bug fix: on the Zenodo sandbox,
uploadDataPackageToZenodo()wrote the reserved DOI with the prefix of Zenodo (10.5281) into the data package, while the sandbox registers it with its test prefix (10.5072). Reserved sandbox DOIs now get the 10.5072 prefix. - Improved functionality:
createDataPackage()now only includes blind times that overlap a selected measurement period (protocol); before, blind times of protocols that were filtered out (e.g. bypulseTypeSelection) were included withoutprotocolID. - Improved documentation: new vignette ‘Create and publish an MR1 data package’, including how to read, merge and cite data packages from Zenodo (#62).
- Changed sample data: the example manual blind times (
data(manualBlindTimes)) now fall within the period of the sample data extract (Sempach, 24-25 September 2024), so they can be used together in examples. - Simplification: all
getfunctions do not require thedbDriverCharargument (#72). - Improved functionality: For
getEchoFeatures()andextractDbData(),listOfRfFeaturesToExtractcan now also be set to ‘all’ to extract all features (#85). - Improved documentation: README (#66), pkgdown website (#67), styling (#70 and #74), updated ‘Getting Started’ vignette (#77) and additional vignette on extracting specific tables from the ‘Birdscan MR1’ ‘SQL’ database (#80).
- Improved collaboration: Contributing guide, Code of conduct and license (#66), GitHub actions for R CMD check, pkgdown and styler (#67).
- Bug Fix: Connections to postgreSQL servers were not working anymore. Fixed, and made database connection code cleaner by using a separate function
dbConnectBirdscanSQL()and file (commit 337a6be). - Bug Fix:
mergeVisibilityAndManualBlindTimes()warned about overlapping manual blind times whenever more than one manual blind time was given, also when they did not overlap. - Bug Fix: the documentation of
loadManualBlindTimes()suggested writing the example blind times withwrite.csv(), which adds a header row that is then read as a blind time. - Some smaller bug fixes: (#63, commit 41288aa).
birdscanR 0.3.0
CRAN release: 2024-07-05
- New functionality: the function
computeDensity()was added to calculate the density (expressed as #objects / km3). Note that this function only works for Birdscan MR1 database versions >= 1.7.0.4 as the variable feature37.speed is required for the density calculation (#40). - New functionality: the function
getBatClassification()was added to get the data from the MR1 SQL tablesbat_classificationandbat_class_probability. The functionextractDbData()was updated to also extract the bat classification results using the prior function (#36). - New functionality: the function
reclassToBats()was added to change the class of the echoes tobatfor those having a classification probability higher than a specified threshold (#36). - New functionality: the
feature37.speedfrom the new Birdscan software v 1.7 is now also being extracted when calling the functiongetCollectionTable()(#39). - Bug fix: conditional
if (exists("mtrDayNight", envir = environment()))caused bug incomputeMTR()function when variable was already defined in a user script (i.e., outside of the package). This has been fixed (#38).
birdscanR 0.2.0
CRAN release: 2023-10-06
- New functionality: add sample classification into crepuscularMorning, day, crepuscularNight, and night when extracting data.
- New functionality: enable mtr calculation for day, crepuscule, and night instead of merely day/night only (both options available now).
- Bug fixes: small bug fixes in the two plotting functions.
- Bug fix: sunrisesunset information was being deleted for locations at higher latitudes because of the lack of the sunrising or setting. This has been fixed.
- Dependency fix: maptools package is retiring; Moved to suntools package which has the same functionality for twilight calculations (#34).