Skip to content

Commit

Permalink
filter out records tagged as "Water, sample" as these are likely temp…
Browse files Browse the repository at this point in the history
…erature of grab samples. See USGS-R#56
  • Loading branch information
limnoliver committed Mar 31, 2022
1 parent b0017c9 commit b43dd45
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion 5_data_munge/out/wqp_data_streams.rds.ind
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
hash: 2e65f46ab8178a7cb07484aad04cd29d
hash: e1fc3f9ca8c625e78dafa54fa4736432

4 changes: 3 additions & 1 deletion 5_data_munge/src/munge_wqp_files.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ filter_site_types <- function(in_ind, sites_ind, keep_types, out_ind) {
pull(MonitoringLocationIdentifier)

dat <- readRDS(sc_retrieve(in_ind, remake_file = 'getters.yml')) %>%
filter(MonitoringLocationIdentifier %in% sites)
filter(MonitoringLocationIdentifier %in% sites) %>%
filter(!CharacteristicName %in% 'Water, sample')

saveRDS(dat, as_data_file(out_ind))
gd_put(out_ind)
Expand All @@ -31,6 +32,7 @@ munge_wqp_withdepths <- function(in_ind, min_value, max_value, max_daily_range,
is.na(`ActivityDepthHeightMeasure/MeasureValue`) & is.na(`ResultDepthHeightMeasure/MeasureValue`) & is.na(`ActivityTopDepthHeightMeasure/MeasureValue`) ~ `ActivityBottomDepthHeightMeasure/MeasureValue`
))


dat <- mutate(dat, sample_depth_unit_code = case_when(
!is.na(`ActivityDepthHeightMeasure/MeasureValue`) ~ `ActivityDepthHeightMeasure/MeasureUnitCode`,
is.na(`ActivityDepthHeightMeasure/MeasureValue`) & !is.na(`ResultDepthHeightMeasure/MeasureValue`) ~ `ResultDepthHeightMeasure/MeasureUnitCode`,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
version: 0.3.0
name: 5_data_munge/out/wqp_data_streams.rds.ind
type: file
hash: fcf1a007a0c51e1c1ed04e8557e53042
time: 2021-04-16 17:26:32 UTC
hash: 1091d4b0e14854dd8450a914273a0363
time: 2022-03-31 20:30:18 UTC
depends:
1_wqp_pull/out/wqp_data.rds.ind: ff1f0c0c41adba063248b83dea39c943
1_wqp_pull/inout/wqp_inventory.feather.ind: 9fdcb5bd5f6a63ed85a6e595e022d05f
1_wqp_pull/out/wqp_data.rds.ind: 1a8dbb9cd4dfd070cbfc946511ca65d7
1_wqp_pull/inout/wqp_inventory.feather.ind: 4d0042964407bcf7c2656a19e5c4bcd2
stream_types: ff830476c42cccbd885995ef9cb26b5c
fixed: 987ddc70a46a2204bf0a037cfbaf2482
code:
functions:
filter_site_types: 18728d55f0b9e889c42708016b3afcf3
filter_site_types: a923ea39d53730097f3abceb1c329d5a

0 comments on commit b43dd45

Please sign in to comment.