readNWISDaily: Import NWIS Daily Data for EGRET analysis
Description
Imports data from NWIS web service. This function gets the data from here: http://waterservices.usgs.gov/
A list of parameter codes can be found here: http://nwis.waterdata.usgs.gov/nwis/pmcodes/
A list of statistic codes can be found here: http://nwis.waterdata.usgs.gov/nwis/help/?read_file=stat&format=table
character USGS site number. This is usually an 8 digit number
parameterCd
character USGS parameter code. This is usually an 5 digit number.
startDate
character starting date for data retrieval in the form YYYY-MM-DD.
endDate
character ending date for data retrieval in the form YYYY-MM-DD.
interactive
logical Option for interactive mode. If true, there is user interaction for error handling and data checks.
convert
logical Option to include a conversion from cfs to cms (35.314667). The default is TRUE,
which is appropriate for using NWIS data in the EGRET package. Set this to FALSE to not include the conversion. If the parameter code is not 00060 (NWIS discharge),
Value
A data frame 'Daily' with the following columns:
lll{
Name Type Description
Date Date Date
Q numeric Discharge in m^3/s
Julian integer Number of days since Jan. 1, 1850
Month integer Month of the year [1-12]
Day integer Day of the year [1-366]
DecYear numeric Decimal year
MonthSeq integer Number of months since January 1, 1850
Qualifier character Qualifying code
i integer Index of days, starting with 1
LogQ numeric Natural logarithm of Q
Q7 numeric 7 day running average of Q
Q30 numeric 30 day running average of Q
}