Produces a goodness-of-fit statistic graph for the specified reach for analysis regions specified by the build_gof_stats function.

gof_graph(gof_stats, stream, bankfull_elevation, stat = "MAE")

Arguments

gof_stats

data frame; A gof_stats data frame. See the build_gof_stats function for details on how to create.

stream

character; The name of the stream.

bankfull_elevation

numeric; The detrended bankfull elevation (in feet) that is used to calculate hydraulic geometry.

stat

character; The statistic to graph "RMSE", "MAE" (the default).

Value

A ggplot object.

Details

Add a discussion of how to interpret the graph.

See also

The build_gof_stats function for details on how to create a gof_stats data frame.

Examples

# Extract attribute data from the fluvgeo::sin_xs_points sf dataframe
sin_xs_points_df <- fluvgeo::sin_riffle_channel_points_sf

# Set variable values
streams <- c("Sinsinawa")
regions <- c("Eastern United States", "IN Central Till Plain")
bankfull_elevations = seq(103, 104, 0.1)

# Call the xs_dimensions function
sin <- xs_dimensions(xs_points = sin_xs_points_df,
                     streams = streams,
                     regions = regions,
                     bankfull_elevations = bankfull_elevations)

# Call the build_gof_stats function
sin_gof <- build_gof_stats(xs_dims = sin,
                           streams = streams,
                           regions = regions,
                           bankfull_elevations = bankfull_elevations)

# Call the gof_graph function
sin_gof_graph <- gof_graph(gof_stats = sin_gof,
                           stream = streams,
                           bankfull_elevation = 103.5,
                           stat = "MAE")
#> Warning: `aes_string()` was deprecated in ggplot2 3.0.0.
#>  Please use tidy evaluation idioms with `aes()`.
#>  See also `vignette("ggplot2-in-packages")` for more information.
#>  The deprecated feature was likely used in the fluvgeo package.
#>   Please report the issue at
#>   <https://github.com/FluvialGeomorph/fluvgeo/issues>.
#> Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
#>  Please use `linewidth` instead.
#>  The deprecated feature was likely used in the fluvgeo package.
#>   Please report the issue at
#>   <https://github.com/FluvialGeomorph/fluvgeo/issues>.

# Print the graph
sin_gof_graph