Create spatial point dataframe for sPlot data to intersect with spatial layers. Include the fiels `Location uncertainty` to allow for fuzzy matching. Each plot was intersected with the corresponding layer of environmental (soil, climate) attributes accounting for their location uncertainty (minimum set to 250m). For computing reasons, the maximum location uncertainty was set to 10km. The user should therefore be aware that the variability in climate and soil features estimations may be underestimated for plots with very high location uncertainty.
Create spatial point dataframe for sPlot data to intersect with spatial layers. Include the fields `Location uncertainty` to allow for fuzzy matching. Each plot was intersected with the corresponding layer of environmental (soil, climate) attributes accounting for their location uncertainty (minimum set to 250m). For computing reasons, the maximum location uncertainty was set to 10km. The user should therefore be aware that the variability in climate and soil features estimations may be underestimated for plots with very high location uncertainty.
```{r, eval=F}
header.shp <- header %>%
filter(!is.na(Longitude) | !is.na(Latitude))
...
...
@@ -124,7 +121,16 @@ for(i in 1:19){
}
```
Intersect `header.shp` with each raster of the CHELSA collection.
Performed in EVE HPC cluster using function `A98_PredictorsExtract.R`. Divided in 99 chunks.
Performed in EVE HPC cluster using function `A98_PredictorsExtract.R`. ~~Divided in 99 chunks.~~
```{shell, eval=F}
#make sure to setup the right function (robust.mean\robust.sd) and the correct file type (raster) in submit-A98.sh
Extract elevation for each plot: mean and 2.5, 50, and 97.5 quantiles for a buffer area having a radius equal to the location uncertainty of each plot (but only if location uncertainty < 50 km). DEM derive from package [elevatr](https://cran.r-project.org/web/packages/elevatr/vignettes/introduction_to_elevatr.html#get_raster_elevation_data), which uses the [Terrain Tiles on Amazon Web Services](https://registry.opendata.aws/terrain-tiles/). Resolutions of DEM rasters vary by region. I set a zoom factor z=10, which corresponds to ~ 75-150 m. Sources are: SRTM, data.gov.at in Austria, NRCAN in Canada, SRTM, NED/3DEP 1/3 arcsec, data.gov.uk in United Kingdom, INEGI in Mexico, ArcticDEM in latitudes above 60°, LINZ in New Zealand, Kartverket in Norway, as described [here](https://github.com/tilezen/joerd/blob/master/docs/data-sources.md).
MEMO!! WHAT TO DO WITH LAYER WHEN IS CONSISTENTLY ZERO IN A PLOT? CHANGE TO NA?
WHAT TO DO INSTEAD WHEN LAYER==0 IN A PLOT WHERE LAYER INFO IS OTHERWISE AVAILABLE?
!!! ADD Explanation of fields!!!
**Timestamp:** `r date()`
**Drafted:** Francesco Maria Sabatini
**Revised:**
**version:** 1.0
**Revised:** Helge Bruelheide
**Version:** 1.1
This report documents the construction of the DT table for sPlot 3.0. It is based on dataset sPlot_3.0.2, received on 24/07/2019 from Stephan Hennekens.
Caution: Layer information is not available for each species in each plot. In case of missing information Layer is set to zero.
*Changes in version 1.1* -
1) Added explanation of fields
2) Fixed `taxon_group` of Friesodielsia
```{r results="hide", message=F, warning=F}
knitr::opts_chunk$set(echo = TRUE)
...
...
@@ -173,7 +172,7 @@ DT1 <- DT1 %>%
table(DT1$`Taxon group`, exclude=NULL)
```
Those taxa for which a measuress of Basal Area exists can be safely assumed to belong to vascular plants
Those taxa for which a measures of Basal Area exists can be safely assumed to belong to vascular plants
Fix some errors. There are some plots where all species have zeros in the field `Cover %`. Some of them are marked as p\\a (`Cover code=="x"`), but other not. Consider all this plots as presence\\absence and transform `Cover %` to 1.
!! There are some other plots having layers with all zeros. This should be double-checked, but are not being transformed here !!
The output of the DT table contains `r nrow(DT2)` records, over `r length(unique(DT2$PlotObservationID))` plots. The total number of taxa is `r length(unique(DT2$species_original))` and `r length(unique(DT2$species))`, before and after standardization, respectively. Information on the `Taxon group` is available for `r DT2 %>% filter(taxon_group!="Unknown") %>% distinct(species) %>% nrow()` standardized species.
The output of the DT table contains `r nrow(DT2)` records, over `r length(unique(DT2$PlotObservationID))` plots. The total number of taxa is `r length(unique(DT2$Species_original))` and `r length(unique(DT2$species))`, before and after standardization, respectively. Information on the `Taxon group` is available for `r DT2 %>% filter(Taxon_group!="Unknown") %>% distinct(Species) %>% nrow()` standardized species.