-
Notifications
You must be signed in to change notification settings - Fork 17
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 #132 from jrdnbradford/master
Add function to retrieve taxonomy version and GitHub Action to verify version
- Loading branch information
Showing
18 changed files
with
29,133 additions
and
69 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
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
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,31 @@ | ||
#' eBird Taxonomy Version | ||
#' | ||
#' Returns a data.frame of available version numbers of the eBird taxonomy | ||
#' | ||
#' @param key optional eBird API key. You can obtain one from https://ebird.org/api/keygen. | ||
#' We strongly recommend storing it in your \code{.Renviron} file as an | ||
#' environment variable called \code{EBIRD_KEY} to avoid having to constantly | ||
#' supply the key, and to avoid accidentally sharing it publicly. | ||
#' @param ... Curl options passed on to \code{\link[httr]{GET}} | ||
#' | ||
#' @return data.frame containing the collected information: | ||
#' @return "authorityVer": Character of version. | ||
#' @return "latest": Boolean indicating whether `authorityVer` is the latest taxonomy version | ||
#' | ||
#' @export | ||
#' | ||
#' @examples \dontrun{ | ||
#' ebirdtaxonomyversion() | ||
#' } | ||
#' @author Jordan Bradford \email{[email protected]} | ||
#' @references \url{http://ebird.org/} | ||
ebirdtaxonomyversion <- function(key = NULL, ...) { | ||
args <- list(fmt = 'json') | ||
|
||
# Allow not using a key for this function | ||
if (is.null(key) && !nzchar(Sys.getenv("EBIRD_KEY"))) { | ||
key <- "" | ||
} | ||
|
||
ebird_GET(paste0(ebase(), 'ref/taxonomy/versions'), args, key = key, ...) | ||
} |
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 |
---|---|---|
|
@@ -87,4 +87,3 @@ ebird_GET <- function(url, args, key = NULL, ...){ | |
} | ||
} | ||
} | ||
|
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
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.