Showing posts with label GBIF. Show all posts
Showing posts with label GBIF. Show all posts

Sunday, September 20, 2015

Retrieve GBIF Species Occurrence Data with Function from dismo Package

..The dismo package is awesome: with some short lines of code you can read & map species distribution data from GBIF (the global biodiversity information facility) easily:






library(dismo)

# get GBIF data with function:
myrger <- gbif("Myricaria", "germanica", geo = T)

# check:
str(myrger)

# plot occurrences:
library(maptools)
data(wrld_simpl)
plot(wrld_simpl, col = "light yellow", axes = T)
points(myrger$lon, myrger$lat, col = "red", cex = 0.5)
text(-140, -50, "MYRICARIA\nGERMANICA")
Read more »

Nice Species Distribution Maps with GBIF-Data in R

Here's an example of how to easily produce real nice distribution maps from GBIF-data in R with package maps...















# go to gbif and download a csv file with the species you 
# want (example data)
# ..in R first set working directory to your download directory..
data <- read.csv("occurrence-search-1316347695527.CSV",
header = T, sep = ",")

str(data)
require(maps)
pdf("myr_germ.pdf")
map("world", resolution = 75)
points(data$Longitude, data$Latitude, col = 2, cex = 0.05)
text(-140, -50, "MYRICARIA\nGERMANICA")
dev.off()

# that's all there is to it..
Read more »