gridPresence: v1.5.0. Simulated data set and function: Presence-only data for wild ungulates and red fox in Spain based on hunting yields.
Authors/Creators
Description
gridPresence
- Transform counts to presence
The gridPresence script transform data counts to presence for a vectorial layer by intersecting both layers.
If any of the count features that intersect with the presence features are greater than zero, presence feature will change to 1, otherwise it will remain as 0.
In the script folder it is provided a script ([CountsSimulationAndTransformation](https://github.com/robinilla/gridPresence/blob/main/script/CountsSimulationAndTransformation.R)) which transforms simulated count data into presence-only by using the gridPresence function. For running the script it could be downloaded the EEA 10 x 10 km grid ([available here](https://www.eea.europa.eu/en/datahub/datahubitem-view/3c362237-daa4-45e2-8c16-aaadfb1a003b)), and a 5 x 5 km grid can be generated, as in the example. Nonetheless, any other vector layer can be used instead of the proposed grids.
The below image summarises how the function works.

- R script file
The R script example file is prepared for transforming three years counts to 5 x 5 km grid (line 24), as well as 10 x 10 km grid. The transformation of the 5 x 5 km grid to the 10 x 10 km grid can be found at line 28. The function used for transforming hunting yields data to presence-only (gridPresence) is also provided (lines 46-93). An example of how to run the function for more than a year and for both grid resolutions is given as well (lines 97-105). Both results are given and plotted (lines 109-128). The R script file has been written in R 4.3.3 computing language and utilized the packages tidyverse 2.0.0 and sf 1.0-16.
- References
- R Core Team. R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria (2022).
- Wickham, H. et al. Welcome to the Tidyverse. J Open Source Softw 4, 1686 (2019).
- Pebesma, E. Simple Features for R: Standardized Support for Spatial Vector Data. R J 10, 439–446 (2018).
Files
robinilla/gridPresence-v1.5.0.zip
Files
(1.2 MB)
| Name | Size | Download all |
|---|---|---|
|
md5:7a122d9b79cce56ed21594e98cf252c8
|
1.2 MB | Preview Download |
Additional details
Related works
- Is supplement to
- Software: https://github.com/robinilla/gridPresence/tree/v1.5.0 (URL)
Software
- Repository URL
- https://github.com/robinilla/gridPresence