Occurence data
In this first module we will see where to find occurrence data (if you don’t have your own), how to download them. Furthermore we will focus of cleaning and validation procedures in order to have a suitable dataset to be use in module 2.
Clean the dataset
Often datasets downloaded need to be checked for errors that might create some fatal errors in our analysis or produce wrong results. The most common problem are zeros and missing data in the coordinates. Another problem are the duplicated coordinates. So the first step is to clean the dataset We start removing specimens with missing coordinates:
> krameri<-krameri[!is.na(krameri$lat),]
Because duplicated records (i.e. multiple records with identical coordinates) may introduce a bias in the analysis, we exclude the duplicated records and check for the number or record still present:
> xy<-cbind(krameri$lon,krameri$lat)
> dup<-duplicated(xy)
> krameri<-krameri[!dup,]
> dim(krameri)
[1] 2309 3
We started with 8078 records and after the cleaning procedure we have 2039 records.