Skip to content
This repository was archived by the owner on Feb 7, 2025. It is now read-only.

Commit 46c72d3

Browse files
Seers, Blake (Environment, Aspendale)Seers, Blake (Environment, Aspendale)
Seers, Blake (Environment, Aspendale)
authored and
Seers, Blake (Environment, Aspendale)
committedMar 9, 2023
Update documentation for the calm_wind argument in the windrose function. Addresses #35.
1 parent 1eff5aa commit 46c72d3

File tree

3 files changed

+24
-18
lines changed

3 files changed

+24
-18
lines changed
 

‎DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Collate:
5151
'cfQuery.R'
5252
'cfUser.R'
5353
'findStations.R'
54-
RoxygenNote: 7.1.1
54+
RoxygenNote: 7.2.3
5555
X-schema.org-keywords: r, opensci, zealand, weather, climate, cliflo, data, api, windrose, rain, wind, temperature
5656
X-schema.org-applicationCategory: Data Access
5757
X-schema.org-isPartOf: "https://ropensci.org"

‎R/cfData-plotMethods.R

+12-9
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
#' @include cfDataList.R
22
NULL
33

4-
#' Plot a windrose
4+
#' Plot a Wind Rose
55
#'
6-
#' Plot a windrose showing the wind speed and direction for given facets using
6+
#' Plot a wind rose showing the wind speed and direction for given facets using
77
#' \pkg{ggplot2}.
88
#'
99
#' This is intended to be used as a stand-alone function for any wind dataset. A
10-
#' different windrose is plotted for each level of the faceting variable which
10+
#' different wind rose is plotted for each level of the faceting variable which
1111
#' is coerced to a factor if necessary. The facets will generally be the station
1212
#' where the data were collected, seasons or dates. Currently only one faceting
1313
#' variable is allowed and is passed to \code{\link[ggplot2]{facet_wrap}} with
1414
#' the formula \code{~facet}.
15+
#'
16+
#' Note that calm winds are excluded from the wind rose.
1517
#'
1618
#' @section Theme Selection:
17-
#' For black and white windroses that may be preferred if plots are to be used
19+
#' For black and white wind roses that may be preferred if plots are to be used
1820
#' in journal articles for example, recommended \code{ggtheme}s are \code{'bw'},
1921
#' \code{'linedraw'}, \code{'minimal'} or \code{'classic'} and
2022
#' the \code{col_pal} should be \code{'Greys'}. Otherwise, any of the sequential
@@ -26,15 +28,16 @@ NULL
2628
#' @param speed numeric vector of wind speeds.
2729
#' @param direction numeric vector of wind directions.
2830
#' @param facet character or factor vector of the facets used to plot the various
29-
#' windroses.
31+
#' wind roses.
3032
#' @param n_directions the number of direction bins to plot (petals on the rose).
3133
#' The number of directions defaults to 12.
3234
#' @param n_speeds the number of equally spaced wind speed bins to plot. This is
3335
#' used if \code{speed_cuts} is \code{NA} (default 5).
3436
#' @param speed_cuts numeric vector containing the cut points for the wind speed
35-
#' intervals, or \code{NA} (default).
36-
#' @param calm_wind the upper limit for wind speed that is considered calm
37-
#' (default 0).
37+
#' intervals, or \code{NA} (default).
38+
#' @param calm_wind the direction of wind that is considered calm. Following
39+
#' convention of the National Weather Service, winds with a
40+
#' direction of 0 are considered calm by default.
3841
#' @param variable_wind numeric code for variable winds (if applicable).
3942
#' @param legend_title character string to be used for the legend title.
4043
#' @param col_pal character string indicating the name of the
@@ -59,7 +62,7 @@ NULL
5962
#' station = rep(rep(c("Station A", "Station B"), 2),
6063
#' rep(c(40, 10), each = 2)))
6164
#'
62-
#' # Plot a simple windrose using all the defaults, ignoring any facet variable
65+
#' # Plot a simple wind rose using all the defaults, ignoring any facet variable
6366
#' with(wind_df, windrose(wind_speeds, wind_dirs))
6467
#'
6568
#' # Create custom speed bins, add a legend title, and change to a B&W theme

‎man/windrose.Rd

+11-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)