ropensci / tidyhydat

An R package to import Water Survey of Canada hydrometric data and make it tidy
https://docs.ropensci.org/tidyhydat
Apache License 2.0
71 stars 20 forks source link

Fix character NA's in hy_stations() #125

Closed boshek closed 4 years ago

boshek commented 5 years ago
library(tidyhydat)
library(dplyr)
#> 
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#> 
#>     filter, lag
#> The following objects are masked from 'package:base':
#> 
#>     intersect, setdiff, setequal, union

hy_stations() %>% 
  filter(is.na(SED_STATUS))
#>   Queried from version of HYDAT released on 2019-07-17
#>    Observations:                      0
#>    Jurisdictions: 
#>    Station(s) returned:               0
#>    Stations requested but not returned: 
#>     All stations returned.
#> # A tibble: 0 x 15
#> # ... with 15 variables: STATION_NUMBER <chr>, STATION_NAME <chr>,
#> #   PROV_TERR_STATE_LOC <chr>, REGIONAL_OFFICE_ID <dbl>, HYD_STATUS <chr>,
#> #   SED_STATUS <chr>, LATITUDE <dbl>, LONGITUDE <dbl>,
#> #   DRAINAGE_AREA_GROSS <dbl>, DRAINAGE_AREA_EFFECT <dbl>, RHBN <lgl>,
#> #   REAL_TIME <lgl>, CONTRIBUTOR_ID <int>, OPERATOR_ID <int>,
#> #   DATUM_ID <int>

Created on 2019-09-04 by the reprex package (v0.3.0)