Import a downloaded file from GBIF.
occ_download_import(x = NULL, key = NULL, path = ".", fill = TRUE, ...) as.download(path = ".", key = NULL) # S3 method for character as.download(path = ".", key = NULL) # S3 method for download as.download(path = ".", key = NULL)
x | The output of a call to |
---|---|
key | A key generated from a request, like that from
|
path | Path to unzip file to. Default: |
fill | (logical) (default: |
... | parameters passed on to |
a tibble (data.frame)
You can provide either x as input, or both key and path. We use
data.table::fread()
internally to read data.
see downloads for an overview of GBIF downloads methods
# NOT RUN { # First, kick off at least 1 download, then wait for the job to be complete # Then use your download keys res <- occ_download_get(key="0000066-140928181241064", overwrite=TRUE) occ_download_import(res) occ_download_get(key="0000066-140928181241064", overwrite = TRUE) %>% occ_download_import # coerce a file path to the right class to feed to occ_download_import # as.download("0000066-140928181241064.zip") # as.download(key = "0000066-140928181241064") # occ_download_import(as.download("0000066-140928181241064.zip")) # download a dump that has a CSV file # res <- occ_download_get(key = "0001369-160509122628363", overwrite=TRUE) # occ_download_import(res) # occ_download_import(key = "0001369-160509122628363") # }