Skip to content

Commit

Permalink
#66 add section to docs for searchbyterm and pkg level man file warni…
Browse files Browse the repository at this point in the history
…ng about no results

fix #67 URLdecode url before printing url so users can more easily determine if the query they sent is what they expect
bump version
  • Loading branch information
sckott committed Oct 10, 2019
1 parent 119674d commit bef0702
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Description: Retrieve, map and summarize data from the 'VertNet.org'
parameters, including 'taxonomic' names, places, and dates. In addition,
there is an interface for conducting spatially delimited searches, and
another for requesting large 'datasets' via email.
Version: 0.7.3.9100
Version: 0.7.3.9310
Authors@R: c(
person("Scott", "Chamberlain",
role = c("aut", "cre"),
Expand Down
9 changes: 9 additions & 0 deletions R/rvertnet-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@
#'
#' \code{vertsearch(taxon = "aves", state = "california")}
#'
#' @section No results?:
#'
#' It's possible to get no results when requesting data from VertNet,
#' then run the same function again 10 seconds later, and you do get a result.
#' I'm not sure why this is, something having to do with Vertnet's
#' infrastucture that I'm not aware of. Point is, if you are sure
#' you haven't made any mistakes with the parameters, etc., then
#' simply run the function call again.
#'
#' @importFrom jsonlite fromJSON toJSON
#' @importFrom dplyr bind_rows tbl_df
#' @importFrom ggplot2 ggplot position_jitter aes geom_polygon
Expand Down
10 changes: 10 additions & 0 deletions R/searchbyterm.R
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,15 @@
#' - coordinateuncertaintyinmeters (character) Coordinate uncertainty
#' in meters (numeric) or range of uncertainty values designated by
#' comparison operators "<", ">", "<=", or ">="
#'
#' @section No results?:
#'
#' It's possible to get no results with a call to `searchbyterm()`,
#' then run it again 10 seconds later, and you do get a result.
#' I'm not sure why this is, something having to do with Vertnet's
#' infrastucture that I'm not aware of. Point is, if you are sure
#' you haven't made any mistakes with the parameters, etc., then
#' simply run the function call again.
#'
#' @return A list with two slots:
#'
Expand All @@ -174,6 +183,7 @@
#'
#' @references
#' https://github.com/VertNet/webapp/wiki/The-API-search-function
#'
#' @details `searchbyterm()` builds a query from input parameters
#' based on Darwin Core (dwc) terms (for the full list of terms, see
#' https://code.google.com/p/darwincore/wiki/DarwinCoreTerms).
Expand Down
2 changes: 1 addition & 1 deletion R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ vert_GET <- function(fxn="searchbyterm", args, limit = 1000, messages = TRUE,
res <- get_terms()
df <- df[ , names(df) %in% res ]
}
mssg(messages, paste("\nLast Query URL: \"", tt$url, "\"", sep = ""))
mssg(messages, paste("\nLast Query URL: \"", URLdecode(tt$url), "\"", sep = ""))
mssg(messages, paste("\nMatching records:", NROW(df), "returned,", avail, "available", sep = " "))
list(meta = make_meta(out), data = tbl_df(df))
}
Expand Down
11 changes: 11 additions & 0 deletions man/rvertnet-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions man/searchbyterm.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bef0702

Please sign in to comment.