marsFetchBaroData: Fetch barometric pressure data for a target SMP, date range,...

View source: R/mars_data_fetch_write_functions.R

marsFetchBaroDataR Documentation

Fetch barometric pressure data for a target SMP, date range, and interval

Description

Returns a data frame with datetime, barometric pressure, smp id, and number of neighbors interpolated from to collect the data.

Usage

marsFetchBaroData(
  con,
  target_id,
  start_date,
  end_date,
  data_interval = c("5 mins", "15 mins")
)

Arguments

con

An ODBC connection to the MARS Analysis database returned by odbc::dbConnect

target_id

chr, single SMP ID where the user has requested data

start_date

string or POSIXct, format: "YYYY-MM-DD", start of data request range

end_date

string or POSIXct, format: "YYYY-MM-DD", end of data request range

data_interval

chr, "5 mins" or "15 mins", interval at which baro data will be returned.

Value

Output will be a dataframe with four columns:

dtime

POSIXct, format: "YYYY-MM-DD HH:MM:SS" in America/New_York

baro_psi

num, barometric pressure in psi

smp_id

chr, SMP ID for each baro

If there are fewer than five baros to interprolate from, based on marsInterpolateBaro

See Also

marsInterpolateBaro


taywater/pwdgsi documentation built on June 14, 2025, 9 p.m.