SubidAttributeSummary {HYPEtools} | R Documentation |
Summarize subbasin attributes
Description
Prepare data frame containing summary of subbasin attributes.
Usage
SubidAttributeSummary(
subids = NULL,
gd,
bd = NULL,
gc = NULL,
desc = NULL,
group = NULL,
group.upstream = TRUE,
signif.digits = NULL,
progbar = FALSE,
summarize.landuse = TRUE,
summarize.soil = TRUE,
summarize.crop = TRUE,
summarize.upstreamarea = TRUE,
unweighted.gd.cols = NULL,
upstream.gd.cols = NULL,
olake.slc = NULL,
bd.weight = FALSE,
mapoutputs = NULL
)
Arguments
subids |
Vector containing SUBIDs of subbasins to summarize. |
gd |
Imported HYPE GeoData.txt file. See |
bd |
Imported HYPE BranchData.txt file. See |
gc |
Imported HYPE GeoClass.txt file. See |
desc |
Optional, Imported HYPE Description file. If provided, then dataframe columns will be renamed using the short names in the description file. See |
group |
Optional, Integer vector of same length as number of SLC classes in gd. Alternative grouping index specification to gcl + type for |
group.upstream |
Logical, if |
signif.digits |
Optional, Integer specifying number of significant digits to round outputs to. Used by |
progbar |
Logical, display a progress bar while calculating summary information. Used by |
summarize.landuse |
Logical, specify whether or not subbasin upstream landuse fractions should be calculated. |
summarize.soil |
Logical, specify whether or not subbasin upstream soil fractions should be calculated. |
summarize.crop |
Logical, specify whether or not subbasin upstream crop fractions should be calculated. |
summarize.upstreamarea |
Logical, specify whether or not subbasin upstream area should be calculated. |
unweighted.gd.cols |
Vector, names of |
upstream.gd.cols |
Vector, specify column names of |
olake.slc |
Integer, SLC class number representing outlet lake fractions. Used by |
bd.weight |
Logical, if set to TRUE, flow weights will be applied for areas upstream of stream bifurcations. See |
mapoutputs |
Vector, paths to mapoutput files that should be read by |
Details
SubidAttributeSummary
can be used to create a data frame object containing subbasin attribute summary information. This data frame can then be used as the attributes
input for PlotPerformanceByAttribute
. The function can summarize subbasin upstream landuse, soil, and crop fractions using UpstreamGroupSLCClasses
. In addition, the
function can summarize upstream GeoData information using UpstreamGeoData
. Finally, the function can join mapoutput and GeoData columns directly to the output data frame (i.e without further processing).
Value
SubidAttributeSummary
returns a data frame object containing subbasin attribute summary information.
See Also
UpstreamGroupSLCClasses
, GroupSLCClasses
, UpstreamGeoData
, ReadMapOutput
for subbasin attribute summary functions; PlotPerformanceByAttribute
for related plotting function.
Examples
subass <- ReadSubass(filename = system.file("demo_model", "results",
"subass1.txt",
package = "HYPEtools"
), check.names = TRUE)
gd <- ReadGeoData(filename = system.file("demo_model",
"GeoData.txt",
package = "HYPEtools"
))
gc <- ReadGeoClass(filename = system.file("demo_model",
"GeoClass.txt",
package = "HYPEtools"
))
SubidAttributeSummary(subids <- subass$SUBID,
gd = gd, gc = gc,
mapoutputs = c(system.file("demo_model", "results", "mapCOUT.txt", package = "HYPEtools")),
upstream.gd.cols = c("SLOPE_MEAN")
)