wnCreateVectorMap: Make a vector map of observed or forecasted wind field

Description Usage Arguments Details Value Examples

Description

wnCreateVectorMap returns a ggmap object of the vector field

Usage

1
2
wnCreateVectorMap(df, lat, lon, zoom, maptype, colorscale = "discrete",
  axis_labels = TRUE, datatype = "observed")

Arguments

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)

Details

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.

Value

ggmap object representation of the wind field

Examples

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')

nwagenbrenner/windtools documentation built on May 24, 2019, 10:56 a.m.