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

Description Usage Arguments Value See Also

View source: R/mars_data_fetch_write_functions.R

Description

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

Usage

1
2
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

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

end_date

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_est

POSIXct, format: "YYYY-MM-DD HH:MM:SS"

baro_psi

num, barometric pressure in psi

smp_id

chr, SMP ID for each baro

neighbors

num, count of baros interpolated from

If the target SMP has an on-site baro with data, the "neighbors" column will be NA. If there are fewer than five baros to interprolate from, based on marsInterpolateBaro, all columns other than "dtime_est" will be NA.

The function will also output and open an html document describing the data request and including a raster plot of barometric pressures.

See Also

marsInterpolateBaro


taywater/pwdgsi documentation built on Nov. 17, 2019, 6:02 a.m.