View source: R/polar_windroseMap.R
windroseMap | R Documentation |
windroseMap()
creates a leaflet
map using wind roses as markers. Multiple
layers of markers can be added and toggled between using control
.
windroseMap(
data,
ws.int = 2,
breaks = 4,
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 a
|
ws.int |
The wind speed interval. Default is 2 m/s but for low met masts with low mean wind speeds a value of 1 or 0.5 m/s may be better. |
breaks |
Most commonly, the number of break points for wind speed in windRose. For windRose and the ws.int default of 2 m/s, the default, 4, generates the break points 2, 4, 6, 8 m/s. Breaks can also be used to set specific break points. For example, the argument breaks = c(0, 1, 10, 100) breaks the data into segments <1, 1-10, 10-100, >100. |
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 |
Should a shared legend be created at the side of the map?
Default is |
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::windRose()
windroseMapStatic()
for the static ggmap
equivalent of
windroseMap()
Other interactive directional analysis maps:
annulusMap()
,
diffMap()
,
freqMap()
,
percentileMap()
,
polarMap()
,
pollroseMap()
## Not run:
windroseMap(polar_data,
provider = "Stamen.Toner"
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.