Description Usage Arguments Details Value Examples
wnCreateVectorMap
returns a ggmap object of the vector field
1 2 | wnCreateVectorMap(df, lat, lon, zoom, maptype, colorscale = "discrete",
axis_labels = TRUE, datatype = "observed")
|
df |
dataframe |
lat |
center lat of Google Maps image |
lon |
center lon of Google Maps image |
zoom |
zoom for Google Maps image (1-20) |
maptype |
type of Google Maps image (terrain, hybrid, satellite, roadmap) |
colorscale |
color scale to use for vectors (discrete or continuous) |
axis_labels |
whether or not to plot axis labels on map (TRUE or FALSE) |
datatype |
data to display (obbserved or predicted) |
This fucntion returns a vector plot of the wind field overlayed on a static Google Maps image. If multiple hours are supplied, the plot is faceted on the hour. Note that if more than 4-6 hours are requested this can take some time. Observed or predicted winds can be plotted.
ggmap object representation of the wind field
1 2 3 4 5 6 | data(wind)
s <- subsetOnSpeed(wind, 'R2', '<', 6.0)
s.avg <- buildBiasHourlyAverages(s)
h <- c(0, 6, 12, 18)
s.hr <- subsetOnHour(s.avg, h)
m <- makeVectorMap(s.hr, 43.45, -113.15, 12, 'terrain')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.