Closed limnoliver closed 7 years ago
My vision for this workflow would be to find the relevant tables using:
??deposition
??waterquality
Then, under the new lagos_select
setup, this query could be formulated as:
library(LAGOS)
library(dplyr)
dt <- lagos_load(version = "1.087.1")
wq <- lagos_select(table = "epi.nutr", categories = "waterquality", vars = "lagoslakeid")
dep <- lagos_select(table = "hu4.chag", categories = "deposition", vars = "hu4_zoneid")
meta <- dt$locus[, c("lagoslakeid", "hu4_zoneid")]
res <- left_join(wq, meta)
res <- left_join(res, dep)
Also allow multiple "categories". Currently, the example
dt_reduced <- lagos_select(dt, scale = "HU4", category = c("waterquality", "deposition"))
given in?lagos_select
does not retrieve water quality data.