View source: R/loadTabularData.R
loadTabularData | R Documentation |
Loads csv files with tabular hydrometeorological data where years are in rows and decades or months are in columns. The function automatically detects if monthly or decadal (10-day) data is provided. The function automatically computes the long-term norm of the data provided and returns a time aware tibble with date, data, data norm columns and code columns.
loadTabularData( fPath, fName, code, stationName, rName, rBasin, dataType, units )
fPath |
Path to the input file |
fName |
File name (.csv file as input required) |
code |
Hydrometeorological station code |
stationName |
Hydrometeorological station name/location |
rName |
Name of river |
rBasin |
Name of basin |
dataType |
Type of data, either 'Q' (discharge data), 'T' (temperature data) or 'P' (precipitation data) |
units |
Data units |
Note that the input file needs to be in coma-separated format and
without header.
The most common format for hydrological data in Central Asia is in tabular form with the years in rows and the months or decades in columns, i.e. the data has 13 columns and as many rows as years of data. An input file containing monthly data might look like follows:
1990,0.1,0.1,0.2,0.2,0.3,0.3,0.4,0.4,0.3,0.2,0.1,0.1
1991,0.1,0.1,0.2,0.2,0.3,0.3,0.4,0.4,0.3,0.2,0.1,0.1
1992,0.1,0.1,0.2,0.2,0.3,0.3,0.4,0.4,0.3,0.2,0.1,0.1
...
An input file containing decadal data (every 10 days) would have 37 columns, the first for the year and the following for each decade in a year.
Time-aware tibble with relevant data
Other Pre-processing:
convert2HYY()
,
doQuantileMapping()
,
gen_HRU_Climate_CSV_RSMinerve()
,
gen_basinElevationBands()
,
plotNormDevHYY()
## Not run: demo_data <- loadTabularData( fPath = "./", fName = "discharge.csv", code = "ABC", stationName = "DemoStation", rName = "Demo River", rBasin = "Demo Basin", dataType = "Q", unit = "m3/s") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.