Skip to content
Snippets Groups Projects
Commit 2ffb0e74 authored by Francesco Sabatini's avatar Francesco Sabatini
Browse files

Created table to summarize plots without coordinates

parent 7605d333
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,7 @@ always_allow_html: yes
**Revised:** Stephan Hennekens
**Version:** 1.1
This report checks for consistency of the dataset used for constructing sPlot 3.0.
This report checks for consistency of the dataset used for constructing sPlot 3.0.
*Changes to v1.1* - Added check to species data. Created To Do list.
```{r results="hide", message=F, warning=F}
......@@ -37,6 +37,7 @@ library(ggforce)
library(xlsx)
```
# Check Header file
```{r}
#Import sPlot data
header <- readr::read_delim("../sPlot_data_export/sPlot_data_header.csv",
......@@ -70,15 +71,6 @@ header.fix <- header %>%
write_csv(header.fix, path = "../sPlot_data_export/sPlot_data_header_fix1.csv")
```
Other known problems still to be fixed:
1) Import field 'Plants Recorded' into header (SH) - create dictionary of possible factors (FMS)
2) Import field 'Herbs identified' into header (SH)
3) Formations - Assign zeros to columns (Forest, Grassland, Shrubland, Wetland, Sparse), when at least one 1 is present (FMS)
4) Link to EUNIS cross-link table, and assign Faber-Langedon Formation (FMS)
5) Assign plot elevation using external sources (FMS)
Reimport with parse
```{r}
......@@ -143,8 +135,32 @@ knitr::kable(problems(header) %>%
full_width = F, position = "center")
```
Plots without coordinates (by dataset)
```{r}
knitr::kable(header %>%
dplyr::select(PlotObservationID, `TV2 relevé number`, Dataset, Longitude, Latitude) %>%
filter(is.na(Longitude) | is.na(Latitude)) %>%
group_by(Dataset) %>%
summarize(n()),
caption="Number of plots without coordinates per dataset") %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed", "responsive"),
full_width = F, position = "center")
```
Other known problems still to be fixed:
1) Import field 'Plants Recorded' into header (SH) - create dictionary of possible factors (FMS)
2) Import field 'Herbs identified' into header (SH)
3) Formations - Assign zeros to columns (Forest, Grassland, Shrubland, Wetland, Sparse), when at least one 1 is present (FMS)
4) Link to EUNIS cross-link table, and assign Faber-Langedon Formation (FMS)
5) Assign plot elevation using external sources (FMS)
Check DT table
# Check DT table
```{r}
DT0 <- readr::read_delim("../sPlot_data_export/sPlot_data_species.csv",
delim="\t",
......@@ -231,7 +247,7 @@ knitr::kable(table(header$Dataset), caption="Plots per dataset") %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed", "responsive"), full_width = F, position = "center")
```
Check geographic coordinates and print summary for each dataset
# Check geographic coordinates
```{r, message=F, eval=T, cache=T}
countries <- map_data("world")
ggworld <- ggplot(countries, aes(x=long, y=lat, group = group)) +
......@@ -261,7 +277,6 @@ for(d in levels(header$Dataset)){
```
```{r, cache=T, warning=F}
not_all_na <- function(x) {!all(is.na(x))}
for(dd in 1:nlevels(header$Dataset)){
d <- levels(header$Dataset)[dd]
datasel <- header %>%
......@@ -274,7 +289,7 @@ for(dd in 1:nlevels(header$Dataset)){
```
Other observed problems:
# Other observed problems:
Some plots in the Hungary dataset have a altitude >5000 m (!)
```{r, eval=F, echo=F}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment