BIM Web service R Package

Data access using rBIM R package

BIM provides downloadable access in various databases using defined parameters. The mapper web service allows you to visualize high resolution of species occurrences specific to ASEAN countries. These datasets can be downloaded and analyse for reserachers, policy makers, universities, NGO and non-government organizations.

To get a list of species occurrence per country
A simple way to get data from the server and visualize using map using GBIF online mapper

Note: Parameters for &country = 'country=PH' # country code of Philippines
Generating species occurrence map per country
# need to define new projection. Only this projection will work with custom queries.
epsg4326 <- leafletCRS(crsClass = "L.CRS.EPSG4326", code = "EPSG:4326",
proj4def = "+proj=longlat +datum=WGS84 +no_defs",
resolutions = 2^(10:0),
origin =c(0,0)
# create the gbif-geyser style raster layer
projection <- '4326' # must use this projection code for custom maps
style <- 'style=gbif-geyser' # any style will work
tileRaster <- paste0('',projection,'/omt/{z}/{x}/{y}@1x.png?',style)
# create the data layer with dragonfly data # Note the "adhoc"
prefix <- '{z}/{x}/{y}@1x.png?'
# make query
style <- 'style=classic.poly' # style of polygons
taxonKey = 'taxonKey=1' # taxon key of Odonata
country = 'country=PH' # country code of Philippines
tilePolygons = paste0(prefix,style,'&',taxonKey,'&',country)
# plot the map
leaflet(options = leafletOptions(crs = epsg4326)) %>%
setView(lng=121.65357287126402,lat=11.204269254887807,zoom=03) %>%
addTiles(urlTemplate=tileRaster) %>%
addTiles(urlTemplate=tilePolygons) %>%
addMarkers(121.65357287126402,11.204269254887807) # country centroid of Philppines