View source: R/polar_polarMap.R
polarMap | R Documentation |
polarMap()
creates a leaflet
map using bivariate polar plots as markers.
Any number of pollutants can be specified using the pollutant
argument, and
multiple layers of markers can be added and toggled between using control
.
polarMap(
data,
pollutant = NULL,
x = "ws",
limits = "free",
upper = "fixed",
latitude = NULL,
longitude = NULL,
control = NULL,
popup = NULL,
label = NULL,
provider = "OpenStreetMap",
cols = "turbo",
alpha = 1,
key = FALSE,
draw.legend = TRUE,
collapse.control = FALSE,
d.icon = 200,
d.fig = 3.5,
type = deprecated(),
...
)
data |
A data frame. The data frame must contain the data to plot the
directional analysis marker, which includes wind speed ( |
pollutant |
The column name(s) of the pollutant(s) to plot. If multiple pollutants are specified, they can be toggled between using a "layer control" interface. |
x |
The radial axis variable to plot. |
limits |
One of:
|
upper |
One of:
|
latitude, longitude |
The decimal latitude/longitude. If not provided, will be automatically inferred from data by looking for a column named "lat"/"latitude" or "lon"/"lng"/"long"/"longitude" (case-insensitively). |
control |
Used for splitting the input data into different groups which
can be selected between using a "layer control" interface, passed to the
|
popup |
Columns to be used as the HTML content for marker popups. Popups
may be useful to show information about the individual sites (e.g., site
names, codes, types, etc.). If a vector of column names are provided they
are passed to |
label |
Column to be used as the HTML content for hover-over labels. Labels are useful for the same reasons as popups, though are typically shorter. |
provider |
The base map(s) to be used. See
http://leaflet-extras.github.io/leaflet-providers/preview/ for a list of
all base maps that can be used. If multiple base maps are provided, they
can be toggled between using a "layer control" interface. By default, the
interface will use the provider names as labels, but users can define their
own using a named vector (e.g., |
cols |
The colours used for plotting. See |
alpha |
The alpha transparency to use for the plotting surface (a value between 0 and 1 with zero being fully transparent and 1 fully opaque). |
key |
Should a key for each marker be drawn? Default is |
draw.legend |
When |
collapse.control |
Should the "layer control" interface be collapsed?
Defaults to |
d.icon |
The diameter of the plot on the map in pixels. This will affect
the size of the individual polar markers. Alternatively, a vector in the
form |
d.fig |
The diameter of the plots to be produced using |
type |
. Different sites are now
automatically detected based on latitude and longitude. Please use |
... |
Arguments passed on to
|
A leaflet object.
the original openair::polarPlot()
polarMapStatic()
for the static ggmap
equivalent of polarMap()
Other interactive directional analysis maps:
annulusMap()
,
diffMap()
,
freqMap()
,
percentileMap()
,
pollroseMap()
,
windroseMap()
## Not run:
polarMap(polar_data,
pollutant = "nox",
x = "ws",
provider = "Stamen.Toner"
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.