Data cleaning step 4
Further removing records with temporal range outside that of our predictor variables
clean_step4 <- clean_step3 %>%
filter(year >= 1955) # WorldClim temporal range is 1970 to 2000s tho
print(paste0(nrow(gbif_download)-nrow(clean_step3), " records deleted; ",
nrow(clean_step4), " records remaining." ))
ggplot() +
geom_sf(data = country_map) +
geom_point(data = gbif_download,
aes(x = decimallongitude,
y = decimallatitude),
shape = "+",
color = "black") +
geom_point(data = clean_step4,
aes(x = decimallongitude,
y = decimallatitude),
shape = "+",
color = "red") +
coord_sf(xlim = st_bbox(country_map)[c(1,3)],
ylim = st_bbox(country_map)[c(2,4)]) +
theme_bw()
Oh noooooo there are just three records left! You may not have enough data points for what you want to do. You can always go back to your pipeline and refine.