Imports the depth duration frequency 2013 or 2022 results from xml files either from an FEH webservice download or from the Peakflows dataset downloaded from the national river flow archive (NRFA) website
DDFImport(x, ARF = FALSE, Plot = TRUE, DDFVersion = 22)
A data frame of DDF results (mm) with columns for duration and rows for return period. If Plot equals TRUE a DDF plot is also returned.
the xml file path
logical argument with a default of FALSE. If TRUE, the areal reduction factor is applied to the results. If FALSE, no area reduction factor is applied
logical argument with a default of TRUE. If TRUE the DDF curve is plotted for a few return periods
Version of the DDF model (numeric). either 22 or 13. The default is 22.
Anthony Hammond
This function returns a data-frame of results. For further durations and return periods the separate DDF function can be applied with the data-frame as the argument/input. File paths for importing data require forward slashes. On some operating systems, such as windows, the copy and pasted file paths will have backward slashes and would need to be changed accordingly.
#Import DDF22 results from a NRFA peakflows xml file and display in console
if (FALSE) DDF22.4003 <- DDFImport("C:/Data/NRFAPeakFlow_v11/Suitable for QMED/04003.xml")
if (FALSE) DDF22.4003
#Import DDF22 results from a FEH webserver xml file and display in the console
if (FALSE) DDF22.MySite <- DDFImport("C:/Data/FEH_Catchment_384200_458200.xml")
Run the code above in your browser using DataLab