README.md

EMODnetBiologyMaps

R build
status

The goal of EMODnetBiologyMaps is to create ggplot2 maps of using the EMODnet style:

Installation

You can install the development version of EMODnetBiologyMaps with:

devtools::install_github("EMODnet/EMODnetBiologyMaps")

Example

  1. Export a gridded abundance map of anchovies (Engraulis encrasicolus):
# devtools::install_github("lifewatch/eurobis")
library(EMODnetBiologyMaps)
library(eurobis)

# Retrieve grid data for "Eriocheir sinensis" (AphiaID = 126426) using the eurobis package
points <- getEurobisGrid(aphiaid = 126426, gridsize = '1d')

# Render ggplot2 map
map <- emodnet_map_plot(points, fill = points$RecordCount,  title = "Engraulis encrasicolus", subtitle = "AphiaID 126426", legend = "Abundance", zoom = FALSE, option = "viridis")

# Save with EMODnet logo
emodnet_map_logo(map, path = "./data-raw/map1.png", width = 198, height = 121, dpi = 300, units = "mm", gravity = "northeast", offset = "+650+200", color = TRUE)


map1



EMODnet/EMODnetBiologyMaps documentation built on Aug. 12, 2021, 7:47 p.m.