View source: R/auditDistances.R
| auditDistances | R Documentation |
Flags each row with the FIRST applicable reason from a fixed precedence: lat/lon NA, lat/lon out of range, depth negative, Repi above outlier threshold, Rhyp < Repi (geometric impossibility). Rows with no issue are dropped from the output.
auditDistances(DT, repiOutlier = 5000)
DT |
record metadata |
repiOutlier |
threshold in km above which |
Does NOT read record.json or provider flatfiles. Comparison against
raw/flatfile distances is deferred to v2.
data.table of flagged rows with column Reason.
x <- data.table::data.table(
EventLatitude = c(0, 95),
EventLongitude = c(0, 0),
StationLatitude = c(0.1, 0.1),
StationLongitude = c(0.1, 0.1),
EventDepth = c(10, 10),
Repi = c(15, 20),
Rhyp = c(18, 25)
)
auditDistances(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.