[R] Extracting wind direction and wind speed from wind rose plot

javad bayat j@b@y@t194 @end|ng |rom gm@||@com
Wed Oct 30 11:48:03 CET 2024


Dear all;
I am searching for a way to extract wind direction and speed from a wind
rose plot. I have a graph and I want to make a dataframe of 5 years with
hourly intervals.

> start_date <- as.POSIXct("2019-01-01 00:00:00")
> end_date <- as.POSIXct("2023-12-31 23:00:00")
> time_sequence <- seq(from = start_date, to = end_date, by = "hour")

> df <- data.frame(
  year = as.integer(format(time_sequence, "%Y")),
  month = as.integer(format(time_sequence, "%m")),
  day = as.integer(format(time_sequence, "%d")),
  hour = as.integer(format(time_sequence, "%H"))
)

> head(df)
  year month day hour
1 2019     1   1    0
2 2019     1   1    1
3 2019     1   1    2
4 2019     1   1    3
5 2019     1   1    4
6 2019     1   1    5


And I want to add 2 more cols to this dataframe as Wind_Dir and Wind_Speed
that the data extracted from the plot by analyzing it.
Is there any library to do this? or any function to write for this purpose?
I would be more than happy if you please help me to do this.
Sincerely







-- 
Best Regards
Javad Bayat
M.Sc. Environment Engineering
Alternative Mail: bayat194 using yahoo.com

	[[alternative HTML version deleted]]



More information about the R-help mailing list