Skip to content

jhnwllr/es50

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
R
 
 
 
 
 
 
 
 

GBIF es50

Work on es50 maps for GBIF.

Scripts below for making simple hexagon es50 maps for any taxonKey using the api

installation


making an es50 map

library(roperators)
library(dplyr)
library(dggridR) # used to make hexagon grid
library(magrittr) # for %T>% pipe

taxonKey = "789"
spacing = 300 # space between hexagon grids in miles I think 
facet = "speciesKey" # which rank to use... # can also be genusKey

grid = dggridR::dgconstruct(spacing=spacing, metric=FALSE, resround='down') %>%
gbifrasters::getPolygonGrid(spacing,landOnly=FALSE) %>% # get from entire globe
gbifrasters::getData(taxonKey,facet=facet) %T>%  # get data from GBIF using facet api
saveRDS(file="C:/Users/ftw712/Desktop/grid.rda") # save data because it takes a while usually...

# grid = readRDS(file="C:/Users/ftw712/Desktop/gridTest.rda")

p = gbifrasters::plotPolyMap(grid,
variable="es50",
legend.position = c(.50,-0.06),
breaks=NULL,
labels=NULL,
polygon_text_size=3,
polygon_alpha = 1,
labelType="",
keywidth=0.01,
keyheight=0.3,
legend_text_size=15
)

p

Making es50 plot

getting data

About

es50 maps and research work for GBIF.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages