View source: R/mars_data_fetch_write_functions.R
marsFetchSMPSnapshot | R Documentation |
Returns a data frame with requested snapshot date, SMP ID, OW suffix, and SMP snapshot
marsFetchSMPSnapshot(con, smp_id, ow_suffix, request_date)
con |
An ODBC connection to the MARS Analysis database returned by odbc::dbConnect |
smp_id |
vector of chr, SMP ID, where the user has requested data |
ow_suffix |
vector of chr, OW Suffix, where the user has requested data |
request_date |
single date or vector the length of SMP ID, either "YYYY-MM-DD" or "today", of the request data |
Output will be a dataframe with the following columns:
smp_id |
chr, requested SMP ID |
ow_suffix |
chr, request OW suffix |
ow_uid |
num, ow_uid derived from smp_id and ow_suffix |
request_date |
chr, date of requested snapshot, format: "YYYY-MM-DD |
snapshot_uid |
num |
dcia_ft2 |
num |
storage_footprint_ft2 |
num |
orifice_diam_in |
num |
infil_footprint_ft2 |
num |
assumption_orificeheight_ft |
num |
storage_depth_ft |
num |
sumpdepth_ft |
num |
lined |
chr, 0 or 1 for unlined or lined, respectively |
surface |
chr, 0 or 1 for subsurface or surface, respectively |
If a requested smp_id and ow_suffix combination is not valid, the function will return NAs for that snapshot. Function queries the SQL function "insert_snapshot", which inserts rows into the MARS table "snapshot", and, in turn, "snapshot_metadata".
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.