Description Usage Arguments Details Value Author(s) Examples
makeGROWmap
takes a dataset with values and a GROW column and makes a map in ggplot2
.
Code is modified and extended from @jebyrnes package meowR https://github.com/jebyrnes/meowR.
1 2 3 4 5 6 | makeGROWmap(newdata, fillColName, regionColName = type, type = "ECOREGION",
realm = "Marine", noAxisLabels = T, fillPal = brewer.pal(11,
"Spectral"), pal = "Spectral", pathCol = "black", pathAlpha = 1,
guide = guide_colourbar(title = fillColName), dataOut = FALSE,
na.value = NA, add.worldmap = FALSE, fillAlphaColName = NULL,
excludeNoDataAreas = T, prevggplot = NULL, ...)
|
newdata |
dataset to be used |
fillColName |
name of the column with information to be used for a fill value |
regionColName |
data name of column with ecoregion, province, or realm names |
type |
are these values from an ECOREGION, PROVINCE, or REALM map. Defaults to "ECOREGION". Note all caps. |
realm |
What geographic realm are the data from (Marine, Freshwater, Terrestrial, Hotspot, IPBES)? |
noAxisLabels |
Should axis labels for latitude and longitude be plotted. Defaults to TRUE |
fillPal |
The palatte used by |
pal |
The palatte used by |
pathCol |
The path color for regional outlines. Defaults to "black" |
pathAlpha |
The alpha of the regional outlines. Defaults to 1. |
guide |
What kind of guide should be used, and what should it's title be? Defaults to |
dataOut |
Return a merged dataframe for plotting instead of a plot? Defaults to |
na.value |
How are NAs areas handled for fill? Defaults to making them not plot - NA. |
add.worldmap |
Should a map of the world be plotted under the regions? Defaults to FALSE |
fillAlphaColName |
Colname of column used to scale alpha level of fill |
excludeNoDataAreas |
Exclude areas/regions from the plot with no data? |
prevggplot |
A ggplot argument that this plot will be added on top of. If null, a new ggplot object is created. |
... |
Other arguments to be supplied to color scale |
makeGROWmap
takes a dataset with values and a GROW column and makes a map in ggplot2
Returns ggplot
object
Sarah Supp.
1 2 3 4 5 6 | data(regions.df)
ndf <- data.frame(Ecoregions = levels(regions.df$ECOREGION),
Values = runif(length(levels(regions.df$ECOREGION)), 0,100))
makeGROWmap(ndf, fillColName="Values", regionColName="Ecoregions")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.