Runs the SQL query of gbif_effort_sql() as a GBIF download (package
rgbif >= 3.8). A GBIF account is needed, and its credentials must be
stored as environment variables, never in your scripts: run
file.edit("~/.Renviron") (or usethis::edit_r_environ()), add the three
lines
and restart R. SQL downloads are marked experimental by GBIF; if your
account is refused, download the target-group species normally and count
records per cell instead. Large extents can take an hour or more. Cite
the DOI written to effort_download_DOI.txt.
Arguments
- sql
Query from
gbif_effort_sql()orgbif_target_group_sql().- path
Folder for the download and the table (re-used: an existing
effort_table.csvis returned without downloading again).- wait
Wait for GBIF to finish (status checked every minute).
Examples
if (FALSE) { # \dontrun{
q <- gbif_effort_sql(c(-32, 75, 34, 82), target = c("Silene acaulis"))
tab <- download_gbif_effort(q, "gbif_effort")
eff <- gbif_effort_rasters(tab, c(-32, 75, 34, 82))
} # }
