-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #236 from AtlasOfLivingAustralia/dev
Dev
- Loading branch information
Showing
98 changed files
with
4,020 additions
and
3,405 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,4 @@ docs/* | |
/doc/ | ||
/Meta/ | ||
docs | ||
SECRETS.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#' Collect a set of expert distributions | ||
#' | ||
#' Not exported yet as taxonomic queries are not yet optimized | ||
#' @param request optional `data_request` object: generated by a call to | ||
#' [galah_call()]. | ||
#' @param identify `data.frame`: generated by a call to | ||
#' [galah_identify()]. | ||
#' @param filter `data.frame`: generated by a call to | ||
#' [galah_filter()] | ||
#' @return An object of classes `sf`, `tbl`, `tbl_df` and `data.frame` | ||
#' (aka a Simple feature collection) of distribution maps, with one column per | ||
#' map, and spatial data stored in the `geometry` column. | ||
#' @examples | ||
#' | ||
#' x <- show_all(distributions) |> | ||
#' slice_head(n = 4) | ||
#' | ||
#' y <- galah_call() |> | ||
#' filter(id == x$id) |> | ||
#' atlas_distributions() | ||
#' ggplot() + | ||
#' geom_sf(data = ozmap_country) + | ||
#' geom_sf(data = st_as_sf(x)) | ||
#' @noRd | ||
#' @keywords Internal | ||
atlas_distributions <- function(request = NULL, | ||
filter = NULL, | ||
identify = NULL){ | ||
args <- as.list(environment()) # capture supplied arguments | ||
.query <- check_atlas_inputs(args) # convert to `data_request` object | ||
.query$type <- "distributions" | ||
collect(.query) | ||
# NOTE: | ||
# taxonomic queries *only* work for lsid's that specifically referenced; | ||
# i.e. it acts more like `filter()` than `identify()` | ||
# it could be made to act in a more 'taxonomic' way by calling `atlas_species()` first | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.