diff --git a/.gitignore b/.gitignore index a6f743f..823cfc1 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,7 @@ .Rhistory .RData .Ruserdata -my_notes + execute_internal_data.R docs diff --git a/NAMESPACE b/NAMESPACE index 2001aca..68c6b26 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -11,7 +11,6 @@ export(fd_inventory_spain) export(fd_landcover_copernicus) export(fd_landcover_esri) export(fd_pathogens_defid2) -importFrom(dplyr,"%>%") importFrom(rlang,.data) importFrom(stats,na.omit) importFrom(stringi,stri_trans_general) diff --git a/NEWS.md b/NEWS.md index 3e44f75..13ad333 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,19 +1,35 @@ - # Development version +## New features + +- `fd_allometry_tallo()`: new function to retrieve data from the TALLO database (thanks to @i-c-grant in #1). + +- `fd_pathogens_defid2()`: + + - It has now `quiet` argument, which defaults to `TRUE`. + +- `metadata_forestdata`: + + - List of chorological species updated + + - New list containing metadata of possible options for `fd_pathogens_defid2()`. + +- `fd_landcover_esri()`: now includes land cover data for 2023. + ## Enhancements -* `fd_inventory_spain()` now checks if metadata exists before downloading it. +- Properly name land cover instead of land use to `fd_landcover_copernicus()` and `fd_landcover_esri()` in their documentation. -* Properly name land cover instead of land use to `fd_landcover_copernicus()` and `fd_landcover_esri()` in their documentation. +- `fd_forest_eutrees4f()`: now gives an error with a better message when `distrib == "nat" & period != 2005` -* Improve documentation, fix mistake in urls to other functions. +- Improve documentation, fix mistakes in urls to other functions, add unit tests for all functions, correct wrong `fd_forest_extent_glad()` reference ## Bugs -* `fd_inventory_spain()` was returning metadata with the same name always. Now it will be different depending on the dataset that we download. +- `fd_forest_chorological()`: fixes #5. Species *Cedrus atlantica* and *Phoenix theophrasti* are eliminated from the metadata since they have no range data. *Chamaerops humilis* is now well spelled. The function now retrieve an error message when data is not available (fixes #5). +- `fd_inventory_spain()` was returning metadata with the same name always. Now it will be different depending on the dataset that we download, and it will be checked if it exists before downloading it (according to #3). # Version 0.1.0 -* Initial release. +- Initial release. diff --git a/R/sysdata.rda b/R/sysdata.rda index cb4d213..2bb0e43 100644 Binary files a/R/sysdata.rda and b/R/sysdata.rda differ diff --git a/data/metadata_forestdata.rda b/data/metadata_forestdata.rda index a6997f7..970d38b 100644 Binary files a/data/metadata_forestdata.rda and b/data/metadata_forestdata.rda differ diff --git a/man/fd_inventory_spain.Rd b/man/fd_inventory_spain.Rd index 5ef5a82..a32a216 100644 --- a/man/fd_inventory_spain.Rd +++ b/man/fd_inventory_spain.Rd @@ -40,10 +40,10 @@ In the future a function to process the data will be added. } \examples{ \donttest{ -# Download MFE50 for the province of Lugo -lugo_ifn4_lst <- fd_inventory_spain("Lugo") +# Download MFE50 for Canary Islands +canarias_ifn4_lst <- fd_inventory_spain("Canarias") -lugo_ifn3_gis_lst <- fd_inventory_spain("Lugo", ifn = 3, database = "gis") +canarias_ifn3_gis_lst <- fd_inventory_spain("Canarias", ifn = 3, database = "gis") } } \references{ diff --git a/man/fd_pathogens_defid2.Rd b/man/fd_pathogens_defid2.Rd index f94b829..3dc560e 100644 --- a/man/fd_pathogens_defid2.Rd +++ b/man/fd_pathogens_defid2.Rd @@ -9,7 +9,8 @@ fd_pathogens_defid2( host = "all", symptoms = "all", country = "all", - geometry = "polygon" + geometry = "polygon", + quiet = TRUE ) } \arguments{ @@ -27,6 +28,9 @@ default '\code{all}' retrieves every tree} \item{geometry}{a string with '\code{polygon}' to retrieve polygon data, or '\code{point}' to retrieve point data} + +\item{quiet}{if \code{TRUE} (the default), suppress status messages, and +the progress bar} } \value{ \code{sf} object with \code{MULTIPOLYGON} or \code{POINT} geometry @@ -39,10 +43,14 @@ Data may be freely used for research, study, or teaching, but be cited appropriately (see references below). + This function will download the DEFID2 database to the temporary directory once per session. After it's downloaded, the queries to the database are faster than the first time. +Note that 99.6% of the observations correspond to _Picea abies_. +Also, 99.3% of the observations are in Czechia. + The data comprises over 650,000 georeferenced records, which can be retrieved as points or polygons, representing insects and diseases that occurred between 1963 and 2021 in European Forests.