Description Usage Arguments Value Examples
View source: R/emodnet_map_plot.R
Plot your spatial data following the EMODnet style
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
data |
Data to be plotted in a map. Accepts sf, RasterLayer, "SpatialPolygonsDataFrame", "SpatialPointsDataFrame", "SpatialLinesDataFrame" |
fill |
column or vector used for filling in case of plotting a polygon. |
title |
Title of the plot. |
subtitle |
Subtitle of the plot. |
legend |
Legend of the values. |
crs |
Coordinate Reference System of the map. Default: LAEA Europe, EPGS:3035. Accepts EPGS and strings. |
xlim |
Vector with minimum and maximum longitude. Default to Europe scale. |
ylim |
Vector with minimum and maximum latitude. Default to Europe scale. |
direction |
Direction in which the scale colors are drawn. Default 1. Reverse with -1. |
option |
The color style used for the filling. Default "viridis". Try also "plasma" |
zoom |
If TRUE, the size of the plot is calculated from the bounding box of the data. Otherwise you should provide xlim and ylim to your desired size |
plot_polygon_border |
if TRUE, the border of the polygon will be drawn. Default is TRUE. Set to FALSE if you have small polygons compared to the size of the canvas. |
... |
params to be passed to emodnet_map_basic |
ggplot
1 2 3 4 5 6 7 | aphiaid <- 107451
specname <- "Eriocheir sinensis"
Esgrid <- sf::st_read(paste0("http://geo.vliz.be/geoserver/wfs/ows?", "service=WFS&version=1.3.0&",
"request=GetFeature&", "typeName=Dataportal%3Aeurobis_grid_1d",
"-obisenv&", "viewParams=aphiaid%3A", aphiaid, "&", "outputFormat=json", "&maxFeatures=10"))
emodnet_map_plot(Esgrid, fill = Esgrid$RecordCount, title = specname,
subtitle = paste("Aphiaid =", aphiaid), legend = "Abundance", plot_polygon_border = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.