makeVectorMap: Make a vector map of the wind field

Description Usage Arguments Details Value Examples

Description

makeVectorMap returns a ggmap object of the vector field

Usage

1
2
3
makeVectorMap(df, lat, lon, zoom, maptype, min_time = 0, max_time = 23,
  colorscale = "discrete", axis_labels = TRUE, scaling_factor = 800,
  hourly_averaging = TRUE)

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)

min_time

starting hour (0-23, default=0)

max_time

ending hour (0-23), default=23)

colorscale

color scale to use for vectors (discrete or continuous)

axis_labels

whether or not to plot axis labels on map (TRUE or FALSE)

scaling_factor

controls the size of the wind vectors

hourly_averaging

whether or not the data should be averaged by hour

Details

This fucntion returns a vector plot of the wind field overlayed on a static Google Maps image. If hourly_averaging is TRUE, the data will be averaged by the hour and the plot will be faceted on the hour. If hourly_averaging is set to FALSE, the data will be averaged by plot location only.

Value

ggmap object representation of the wind field

Examples

1
2
3
4
5
6
7
8
data(wind)
#' #hourly vector maps for cases when R2 measured speeds < 6 m/s
s <- subsetOnSpeed(wind, 'R2', '<', 6.0)
m <- makeVectorMap(s, 43.45, -113.15, 12, 'terrain')
#average vector map for a specific time period
t<-as.POSIXct(strptime("2010-08-16 11:00:00", '%Y-%m-%d %H:%M:%S'))
s <- subset(wind, subset=(datetime == t))
m <- makeVectorMap((s, 43.45, -113.15, 12, 'terrain', hourly_averaging=FALSE)

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