This notebook shows how to fetch absence data for Hippocampus erectus.
Load packages:
library(robis)
library(dplyr)
library(ggplot2)
Fetch absence data including MeasurementOrFact:
df <- occurrence("Hippocampus erectus", absence = TRUE, mof = TRUE)
Extract measurements from the occurrence records:
mof <- measurements(df, fields = c("id", "eventDate", "decimalLongitude", "decimalLatitude"))
head(data.frame(table(mof$measurementType)))
## Var1 Freq
## 1 fish length 14552
## 2 Number of species observed during time period 14552
## 3 underwater visibility 14792
Plot map:
ggplot() +
geom_point(data = df %>% distinct(decimalLongitude, decimalLatitude), aes_string(x = "decimalLongitude", y = "decimalLatitude"), size = 1, stroke = 0.6, alpha = 0.3, colour = "#ff3399") +
borders("world", colour = "#000000", fill = NA) +
coord_quickmap() + theme_void()