odm_data.RdThe function odm_data can be used to help in formating new data. odm_data takes a vector of dates and data and outputs a dataframe formated for use with the functions in this package. site_id, variable_id, and method_id need to already exist in their respective tables in the ODM.
odm_data(date_time, data_value, utc_offset = -5, site_id, variable_id, qualifier_id = NA, method_id, source_id = 1, level_id = 0, channel = ODM)
| date_time | local date time for each record |
|---|---|
| data_value | matching data value for each date time record |
| utc_offset | difference in hours from Coordinated Universal Time (UTC) |
| site_id | corresponds to an existing Sites record in the Sites table |
| variable_id | corresponds to an existing record in the Variables table |
| qualifier_id | corresponds to an existing record in the Qualifiers table |
| method_id | corresponds to an existing record in the Methods table |
| source_id | corresponds to an existing record in the Sources table |
| level_id | corresponds to a record in the QualityControlLevels table |
| channel | connection handle as returned by odbcConnect |
The output is a properly formated dataframe suitable for further use in workflows involving this package.