update addWindBarb() and create raws_windBarbTimeseriesPlot
Closed this issue · 0 comments
Brian Potter at AirFire said that he currently uses this site because it has easy/nice graphics: https://mesowest.utah.edu
Turns out they get their data from an entirely different data provider: https://developers.synopticdata.com that we won't be working with because 1) you have to pay and 2) that's not what our contract task says.
However, the Mesonet site does have some nice graphics like:
I'm thinking we could create a nice base plot graphic like this but using the wind barbs.
I'd like you to see about modifying the addWindBarb()
function to allow its use in a timeseries plot like this:
data <-
example_fw13SaddleMountain %>%
raws_filterDate("2017-09-01", "2017-10-01") %>%
raws_extractData()
plot(data$datetime, data$windSpeed)
addWindBarbs2(data$datetime, data$windSpeed, data$windSpeed, data$windDirection)
Currently, the incoming x
and y
parameters to addWindBarb()
assume they are latitude and longitude and the function does some clever resizing to make sure things always look correct regardless of the dimensions of the map.
I recommend just copying addWindBarb()
to addWindBarb2()
to create a "timeseries" version of this function that doesn't do the fancy map resizing (or does it differently). After you have this working so that the example above will work, then you can decide whether to have two separate functions or a single function with a forMap = TRUE/FALSE
switch or something like that.
Then, when all of that is in hand, you can create a raws_windBarbTimeseriesPlot()
that will do the right thing given a "raws timeseries object".