I want to create species worldwide distribution map for 2000 species. I tried to write the following code, but don't know how to complete it for 2000 .csv files. I want to create separate maps for each species and save them all on my system. Any helps?
library(maptools)
library(rgeos)
library(raster)
library(rgdal)
library(dismo)
library(dplyr)
#plot your observation points
data("wrld_simpl")
list.files(path = "D:/R_projects", full.names = TRUE) %>%
#Import all files
purrr::map(readr::read_csv) %>%
occurrences <- purrr::map(readr::read_csv)
plot(wrld_simpl)
points(occurrences$decimalLongitude, occurrences$decimalLatitude, col="red", pch=1, cex=0.1)