plotdap | R Documentation |
Visualize data returned from rerddap servers. Use plotdap()
to initialize
a plot, specify the plotting method (specifically, 'base' or 'ggplot2'),
and set some global options/parameters. Then use add_tabledap()
and/or add_griddap()
to add "layers" of actual data to be visualized.
plotdap(
method = c("ggplot2", "base"),
mapData = maps::map("world", plot = FALSE, fill = TRUE),
crs = NULL,
datum = sf::st_crs(4326),
mapTitle = NULL,
mapFill = "gray80",
mapColor = "gray90",
...
)
method |
the plotting method. Currently ggplot2 and base plotting are supported. |
mapData |
an object coercable to an sf object via |
crs |
a coordinate reference system: integer with the epsg code, or character with proj4string. |
datum |
crs that provides datum to use when generating graticules.
Set to |
mapTitle |
a title for the map. |
mapFill |
fill used for the map. |
mapColor |
color used to draw boundaries of the map. |
... |
arguments passed along to |
The "ggplot2" method is slower than "base" (especially
for high-res grids/rasters), but is more flexible/extensible. Additional ggplot2
layers, as well as scale defaults, labels, theming, etc. may be modified via
the add_ggplot()
function. See the mapping vignette for an introduction
and overview of rerddap's visualization methods –
browseVignettes(package = "rerddap")
.
A plotdap object
Carson Sievert
tabledap()
, griddap()
# base plotting tends to be faster (especially for grids),
# but is less extensible plotdap("base")
plotdap()
plotdap("base")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.