MENU

Fun & Interesting

Drawing distribution maps using R

ALESS Lab 8,687 5 years ago
Video Not Working? Fix It Now

GBIF dataset citation: GBIF.org (2 May 2020) GBIF Occurrence Download https://doi.org/10.15468/dl.z32evt See also: https://www.youtube.com/watch?v=1C1zVJO-Rk0 install.packages("maptools") install.packages("rgeos") install.packages("raster") install.packages("rgdal") install.packages("dismo") library(maptools) library(rgeos) library(raster) library(rgdal) library(dismo) #plot your observation points data("wrld_simpl") read.csv("Poritidae_map.csv") Occurrences ← read.csv("Poritidae_map.csv") #make sure occurrences are where they are supposed to be plot(wrld_simpl) points(Occurrences$decimalLongitude, Occurrences$decimalLatitude, col="red", pch=1, cex = 0.3) #zoom (Japan) plot(wrld_simpl, xlim=c(130,150), ylim=c(30,50), axes=T)

Comment