View source: R/mars_data_fetch_write_functions.R
marsFetchRainfallData | R Documentation |
Return data from the rain gage nearest a target SMP, for a specified date range.
marsFetchRainfallData(
con,
target_id,
source = c("gage", "radar"),
start_date,
end_date,
daylightsavings
)
con |
Formal class 'PostgreSQL', a connection to the MARS Analysis database |
target_id |
chr, an SMP_ID that where the user has requested data |
source |
chr, either "gage" or "radar" to retrieve rain gage data or radar rainfall data |
start_date |
string or POSIXCT date, format: "YYYY-MM-DD", start of data request range |
end_date |
stringor POSIXCT date, format: "YYYY-MM-DD", end of data request range |
daylightsavings |
logi, Adjust for daylight savings time? when doing QAQC
this should be |
Output will be a data frame with four columns, which corresponds to the specified SMP and date range:
dtime_est OR dtime_edt |
POSIXct datetime with tz = EST or EDT as specified by |
rainfall_in |
num, rainfall for the 15 minute preceding the corresponding datetime |
gage_uid OR radar_uid |
Unique identifier for where the data came from |
event_id |
event number during this timestep |
marsGapFillEventID
, marsDetectEvents
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.