Description Usage Arguments Details Value Author(s) Examples
makeMEOWmap
takes a dataset with values and a MEOW column and makes a map in ggplot2
1 2 3 4 5 | makeMEOWmap(newdata, fillColName, regionColName = type, type = "ECOREGION",
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. |
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 |
makeMEOWmap
takes a dataset with values and a MEOW column and makes a map in ggplot2
Returns ggplot
object
Jarrett Byrnes.
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))
makeMEOWmap(ndf, fillColName="Values", regionColName="Ecoregions")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.