| fetchNFI | R Documentation |
This function can download and decompress data sets from the Spanish
National Forest Inventory (SNF) stored in .zip files,
whether they are local or remote (URL-based).
fetchNFI(url., dir = tempdir(),
file_ext = c("mdb",
"DBF", "accdb"),
file_name = NULL,
timeOut = timeout(60))
url. |
|
dir |
|
file_ext |
|
file_name |
|
timeOut |
|
The data should be in files with
extensions specified in the file_ext
argument. Use file_name to restrict the
returned files to specific names inside the
decompressed content. It accepts either full
file names or bare stems without extensions.
character. Returns the path to the fetched and decompressed
NFI data (.mdb, .DBF, .accdb, or other extensions requested in
file_ext) stored in a temporary file.
Wilson Lara [aut, cre] (ORCID: <https://orcid.org/0000-0003-3527-1380>), Cristobal Ordonez [aut] (ORCID: <https://orcid.org/0000-0001-5354-3760>), Aitor Vázquez-Veloso [aut] (ORCID: <https://orcid.org/0000-0003-0227-506X>), Felipe Bravo [aut] (ORCID: <https://orcid.org/0000-0001-7348-6695>)
## Process SNF data for Toledo stored locally
# Path to Toledo data file in 'basifoR' package
ifn4p45 <- system.file("Ifn4_Toledo.zip", package="basifoR")
# Decompress SNF data from the specified file path or URL
fetch_ifn4p45 <- fetchNFI(ifn4p45)
print(fetch_ifn4p45)
## French NFI tree table read from the official web resource
## f <- "https://inventaire-forestier.ign.fr/dataifn/data/export_dataifn_2024_en.zip"
## fnfi <- fetchNFI(f, file_ext = "csv", file_name = "ARBRE")
## print(fnfi)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.