Skip to content

Commit 33cca39

Browse files
committed
add drainage area to cleanup_cols
1 parent 05833a0 commit 33cca39

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

R/read_waterdata.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
#' for more information.
66
#'
77
#' @export
8-
#' @param service character, can be any existing collection such
9-
#' as "daily", "monitoring-locations", "time-series-metadata"
8+
#' @param service character, can be any existing collection.
109
#' @param CQL A string in a Common Query Language format.
1110
#' @param convertType logical, defaults to `TRUE`. If `TRUE`, the function
1211
#' will convert the data to dates and qualifier to string vector.
@@ -64,9 +63,12 @@ read_waterdata <- function(service,
6463

6564
output_id <- switch(service,
6665
"daily" = "daily_id",
66+
"latest-daily" = "latest_daily_id",
6767
"time-series-metadata" = "time_series_id",
6868
"monitoring-locations" = "monitoring_location_id",
6969
"latest-continuous" = "latest_continuous_id",
70+
"continuous" = "continuous_id",
71+
"field-measurements" = "field_measurement_id",
7072
service)
7173

7274
if(!"properties" %in% names(args)){

R/walk_pages.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,10 @@ cleanup_cols <- function(df, service = "daily"){
161161

162162
if("contributing_drainage_area" %in% names(df)){
163163
df$contributing_drainage_area <- as.numeric(df$contributing_drainage_area)
164+
}
165+
166+
if("drainage_area" %in% names(df)){
167+
df$drainage_area <- as.numeric(df$drainage_area)
164168
}
165169

166170
df

man/read_waterdata.Rd

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)