diff --git a/.DS_Store b/.DS_Store index e744be5..1d11b82 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/NEWS.md b/NEWS.md index f9d6d87..eda72fb 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,14 +2,16 @@ ## Major changes -* `wildRtrax` now honours WildTrax report structures. See more here. +* `wildRtrax` now honours new WildTrax report structures. Future changes will incorporate standardized naming in syncing functions. * Replaced geospatial functionalities from `rgdal`, `rgeos` and `maptools` with `sf`, `sp` and `terra` packages. Added functionality with the `suntools` package. Users should re-download the package by October 2023 in-line with the former package retirement: https://geocompx.org/post/2023/rgdal-retirement/. ## Minor changes -* Tweaks to [Acoustic data wrangling](https://abbiodiversity.github.io/wildRtrax/articles/acoustic-data-wrangling.html). +* Tweaks to [Acoustic data wrangling](https://abbiodiversity.github.io/wildRtrax/articles/acoustic-data-wrangling.html) for (#16) * Addition of geospatial assets. Users should be warned package size is now ~40 MB. -* Moved TMTT predictions from csv to .RDS. +* Moved TMTT predictions from csv to .RDS file. +* Work flow repairs to `wt_get_species()` and `wt_tidy_species()` (#21) +* Replaced `utils::read.csv()` to `readr::read_csv()` in `wt_download_report()` (#20) # wildRtrax 1.0.1 diff --git a/R/acoustic-pre-processing.R b/R/acoustic-pre-processing.R index 3c1a2be..5c5feec 100644 --- a/R/acoustic-pre-processing.R +++ b/R/acoustic-pre-processing.R @@ -351,10 +351,11 @@ wt_run_ap <- function(x = NULL, fp_col = file_path, audio_dir = NULL, output_dir # Track progress of run # progressr::with_progress({ # p <- progressr::progressor(steps = nrow(files)) - files <- files %>% + files <- files %>>% + "Starting AP run - this may take a while depending on your machine..." %>>% tibble::as_tibble() %>% dplyr::rename("file_path" = 1) %>% - furrr::future_map(.x = .$file_path, .f = ~ system2(path_to_ap, sprintf('audio2csv "%s" "Towsey.Acoustic.yml" "%s" "-p"', .x, output_dir)), furrr_options(seed = T)) + furrr::future_map(.x = .$file_path, .f = ~ suppressMessages(system2(path_to_ap, sprintf('audio2csv "%s" "Towsey.Acoustic.yml" "%s" "-p"', .x, output_dir)), furrr_options(seed = T))) # }) return(message('Done!')) @@ -401,7 +402,7 @@ wt_glean_ap <- function(x = NULL, input_dir, purpose = c("quality","abiotic","bi if (dir.exists(input_dir)) { ind <- fs::dir_ls(input_dir, regexp = "*.Indices.csv", recurse = T) %>% - map_dfr( ~ read_csv(., progress = F)) %>% + map_dfr( ~ read_csv(., show_col_types = F)) %>% relocate(c(FileName, ResultMinute)) %>% select(-c(ResultStartSeconds, SegmentDurationSeconds,RankOrder,ZeroSignal)) %>% pivot_longer(!c(FileName, ResultMinute), @@ -757,9 +758,8 @@ wt_make_aru_tasks <- function(input, output=NULL, task_method = c("1SPM","1SPT", } } -#' Upload hits from a Wildlife Acoustics classifier +#' Convert Kaleidoscope output to tags #' -#' @section `wt_kaleidoscope_tags` #' #' @description `wt_kaleidoscope_tags` Takes the classifier output from Wildlife Acoustics Kaleidoscope and converts them into a WildTrax tag template for upload #' @@ -845,7 +845,7 @@ wt_kaleidoscope_tags <- function (input, output, tz, freq_bump = T) { } -#' Takes the classifier output from Wildlife Acoustics Songscope and converts them into a WildTrax tag template for upload +#' Convert Songscope output to tags #' #' @param input Character; The path to the input csv #' @param output Character; Path where the output file will be stored @@ -859,13 +859,6 @@ wt_kaleidoscope_tags <- function (input, output, tz, freq_bump = T) { #' @import dplyr tidyr readr pipeR stringr lubridate tibble #' @export #' -#' @examples -#' \dontrun{ -#' wt_songscope_tags(input = input.csv, output = tags.csv, -#' species_code, = "CONI", method = "1SPT", -#' vocalization_type = "Call", task_length = 180) -#' } -#' #' @return A csv formatted as a WildTrax tag template wt_songscope_tags <- function (input, output = c("env","csv"), diff --git a/R/wildRtrax.R b/R/wildRtrax.R index d861dd3..9c6cd03 100644 --- a/R/wildRtrax.R +++ b/R/wildRtrax.R @@ -40,4 +40,4 @@ utils::globalVariables(c("%>>%", ".", "name", "size_Mb", "file_path", "file_ext" "tag_spectrogram_url", "task_method", "wt_spp_table","<<-","clip_type","output_filename","image_date_time", - "unlist", "PC", "sens")) + "unlist", "PC", "sens","organizationId","organizationName")) diff --git a/README.md b/README.md index 30b4fcd..032b223 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ ## Installation -You can install version 1.0 of `wildRtrax` directly from this repository with: +You can install version 1.1.0 of `wildRtrax` directly from this repository with: ``` r # install.packages("remotes") @@ -35,12 +35,12 @@ The development version of the package will be periodically merged and will be r All functions begin with a `wt_*` prefix. Column names and metadata align with the WildTrax infrastructure. The goal is to follow the work flow of pre-processing, linking with WildTrax, download and analysis. Some functions are built specifically for ARUs :sound:, cameras :camera: or point counts :bird:, while others are used for all sensors. :bat: denotes ultrasonic functionalities. - Pre-process acoustic data - - `wt_audio_scanner()` :sound: + - `wt_audio_scanner()` :sound: :bat: - `wt_run_ap()` :sound: - `wt_glean_ap()` :sound: - `wt_signal_level()` :sound: - - `wt_chop()` :sound: - - `wt_make_aru_tasks()` :sound: + - `wt_chop()` :sound: :bat: + - `wt_make_aru_tasks()` :sound: :bat: - `wt_songscope_tags()` :sound: - `wt_kaleidoscope_tags()` :sound: :bat: - Download data from WildTrax @@ -49,7 +49,7 @@ All functions begin with a `wt_*` prefix. Column names and metadata align with t - `wt_download_report()` :camera: :sound: :bird: :bat: - Available reports: `main, project, location, recording, image_set, image, tag, point_count, megadetector, megaclassifer, birdnet` - `wt_get_species()` :camera: :sound: :bird: :bat: - - `wt_download_tags()` :sound: + - `wt_download_tags()` :sound: :bat: - Analyze data - `wt_summarise_cam()` :camera: - `wt_ind_detect()` :camera: @@ -57,7 +57,7 @@ All functions begin with a `wt_*` prefix. Column names and metadata align with t - `wt_location_distances()` :sound: :camera: :bird: :bat: - `wt_tidy_species()` :sound: :camera: :bird: :bat: - `wt_replace_tmtt()` :sound: - - `wt_make_wide()` :sound: :camera: :bird: :bat: + - `wt_make_wide()` :sound: :bird: :bat: - `wt_format_occupancy()` :sound: :bird: - `wt_qpad_offsets()` :sound: :bird: @@ -68,12 +68,11 @@ To report bugs, request additional features, or get help using the package, plea ## Contributors -* `wildRtrax` is authored and created by [Alexander G. MacPhail](https://github.com/agmacpha), created and maintained by [Marcus Becker](https://github.com/mabecker89) and created by [Dr. Elly Knight](https://github.com/ecknight). The [Alberta Biodiversity Monitoring Institute](http://https://abmi.ca/home.html) provides ongoing support, development and funding for the package. -* Many thanks to [Dr. Richard Hedley](https://richardwhedley.wordpress.com/) for providing the basis for the `wt_wac_info()` internal function for *wac* file support +* `wildRtrax` is authored, created and maintained by [Alexander G. MacPhail](https://github.com/agmacpha) and [Marcus Becker](https://github.com/mabecker89), with significant contributions from [Dr. Elly Knight](https://github.com/ecknight) and [Dr. Richard Hedley](https://richardwhedley.wordpress.com/). We encourage ongoing contributions and collaborations to improve the package into the future. The [Alberta Biodiversity Monitoring Institute](https://abmi.ca) provides ongoing support, development and funding. ## License -This R package is licensed under [MIT license](https://github.com/ABbiodiversity/wildRtrax/blob/master/LICENSE)Β© 2023 Marcus Becker, Alex MacPhail, Elly Knight and the [Alberta Biodiversity Monitoring Institute](http://https://abmi.ca/home.html). +This R package is licensed under [MIT license](https://github.com/ABbiodiversity/wildRtrax/blob/master/LICENSE)Β© 2023 Marcus Becker, Alex MacPhail, Elly Knight and the [Alberta Biodiversity Monitoring Institute](https://abmi.ca). ## Code of Conduct diff --git a/_pkgdown.yml b/_pkgdown.yml index befbab8..d1569ae 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -41,6 +41,7 @@ reference: - wildRtrax news: releases: + - text: wildRtrax 1.1.0 - text: wildRtrax 1.0.1 - text: wildRtrax 1.0.0 - text: wildRtrax 0.1.0 diff --git a/docs/404.html b/docs/404.html index ca6879e..77be2ce 100644 --- a/docs/404.html +++ b/docs/404.html @@ -31,7 +31,7 @@ wildRtrax - 1.0.1 + 1.1.0