ch_polar_plot_prep {CSHShydRology}R Documentation

Creates a data structure to be passed to ch_polar_plot

Description

Could be used to move data from a different type of analysis different to the ch_binned_MannWhitney function which uses flows. The two series need to be of the same length and their length is related to the step size. For examples, for five day periods there will be 73 periods.

Usage

ch_polar_plot_prep(
  station,
  plot_title,
  step,
  x0,
  x1,
  stat,
  prob,
  test_s,
  variable = "discharge",
  bin_method = "unstated",
  test_method = "unstated",
  lline1 = "Period 1",
  lline2 = "Period 2",
  pvalue = 0.05
)

Arguments

station

Typically a station number

plot_title

Polar plot title - usually a station name

step

The number of days binned

x0

Time series of length n for a single seasonal cycle

x1

Time series of length n for a single seasonal cycle

stat

Time series of length n for statistical test value for each bin

prob

Time series of length n of probability of test value

test_s

Vector with values of -1, 0, 1 for significance, -1 negative, 1 positive, 0 not significant

variable

Name of variable plotted. Default is discharge

bin_method

Default is unstated

test_method

Default is unstated

lline1

Names of first period, default is Period 1

lline2

Names of second period, default is Period 2

pvalue

Value of p used. Default is 0.05

Value

Returns a list containing:

StationID

ID of station

Station_lname

Name of station

variable

Name of variable

bin_width

Smoothing time step in days

range1

First range of years

range2

Second range of years

p_used

p_value

fail

TRUE if test failed due to missing values

bin_method

Method used for binning

test_method

Mann-Whitney U

series

A data frame containing six columns

The series data frame contains

period

period numbers i.e. 1:365/step

period1

median values for each bin in period 1

period2

median values for each bin in period 2

mwu

Mann Whitney U-statistic for each bin between the two periods

prob

probability of U for each period

code

significance codes for each bin

Author(s)

Paul Whitfield

References

Whitfield, P.H. and A.J. Cannon. 2000. Polar plotting of seasonal hydrologic and climatic data. Northwest Science 74: 76-80.

Whitfield, P.H., Cannon, A.J., 2000. Recent variations in climate and hydrology in Canada. Canadian Water Resources Journal 25: 19-65.

See Also

ch_binned_MannWhitney ch_polar_plot


[Package CSHShydRology version 1.4.0 Index]