Redownloaded all OBIS data.
Prepared lab records in correct format.
Prepared code for (see gist):
- combining all records: GBIF (hasGeoSpatialIssue == “false”), OBIS (qc=1,2,3,4,5,6), Reef Life Survey, lab data
- filter duplicates (exact same coordinates)
- filter rounded coordinates
- add environmental data with my experimental sdmpredictors package
- move points without environmental data up to 1 km
- filter points without environmental data
- filter duplicate points within the same 25km² Behrmann equal area grid
Today I learned
- read.csv accepts gzipped file paths
- GeoTiffs don’t support the Mollweide projection which gives strange results when you have an existing QGIS project. Solution is to set the projects projection to the one stored in the GeoTiff.
Good to know
With the R package robis you can download species records with their qc values and the occurrence method has a qc parameter to only download records that pass specific qc flags.
See help(qc) for more information on the different flags.
In case you forgot to filter during the request you can still filter using the filter_qc function in the gist of the day. The code would have been a lot shorter if there where bitwise AND and OR operators for 64-bit integers.