addWindBarbs | R Documentation |
Add a multi-sided polygon to a plot.
addWindBarbs(
x,
y,
speed,
dir,
circleSize = 1,
circleFill = "transparent",
lineCol = 1,
extraBarbLength = 0,
barbSize = 1,
...
)
x |
vector of longitudes |
y |
vector of latitudes |
speed |
vector of wind speeds in knots |
dir |
wind directions in degrees clockwise from north |
circleSize |
size of the circle |
circleFill |
circle fill color |
lineCol |
line color (currently not supported) |
extraBarbLength |
add length to barbs |
barbSize |
size of the barb |
... |
additional arguments to be passed to |
https://commons.wikimedia.org/wiki/Wind_speed
## Not run:
library(maps)
library(RAWSmet)
setRawsDataDir("~/Data/RAWS")
cefaMeta <- cefa_loadMeta()
maps::map('state', "washington")
station1 <- cefa_load(nwsID = 451702, meta = cefaMeta) %>% raws_filterDate(20100623, 20100623)
station2 <- cefa_load(nwsID = 452319, meta = cefaMeta) %>% raws_filterDate(20100623, 20100623)
lat <- c(station1$meta$latitude, station2$meta$latitude)
lon <- c(station1$meta$longitude, station2$meta$longitude)
speed <- c(station1$data[1,]$windSpeed, station2$data[1,]$windSpeed)
dir <- c(station1$data[1,]$windDirection, station2$data[1,]$windDirection)
addWindBarbs(lon, lat, speed, dir, lwd = 2)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.