Skip to content

Instantly share code, notes, and snippets.

@emhart
Created July 23, 2013 20:46
Show Gist options
  • Save emhart/6066023 to your computer and use it in GitHub Desktop.
Save emhart/6066023 to your computer and use it in GitHub Desktop.
gbif data and climate maps.
library(rWBclimate)
library(rgbif)
splist <- c("Junco hyemalis", "Aix sponsa")
out <- occurrencelist_many(splist, coordinatestatus = TRUE, maxresults = 20)
options(kmlpath = "/Users/edmundhart/kmltemp")
sp.map.df <- create_map_df(c("USA","MEX"))
sp.map <- ggplot(sp.map.df,aes(x=long,y=lat,group=group))+geom_polygon(fill="white",colour="black")+xlim(-130,-65)+ylim(12,50)
sp.map + geom_point(data=gbifdata(out),aes(y=decimalLatitude,x=decimalLongitude,group=taxonName,colour=taxonName))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment