Skip to content

Commit af345e4

Browse files
authored
Version 0.6.1 (#202)
* bump versions * dev version * fix webserivce too * update README * typo * fix to be utc * change to character * update news * update cran comments * update README * update internal data again * update version * skip on cran
1 parent cb6fce4 commit af345e4

17 files changed

+121
-117
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: tidyhydat
22
Title: Extract and Tidy Canadian 'Hydrometric' Data
3-
Version: 0.6.0.9000
3+
Version: 0.6.1
44
Authors@R: c(person("Sam", "Albers", email = "sam.albers@gmail.com", role = c("aut", "cre"),
55
comment = c(ORCID = "0000-0002-9270-7884")),
66
person("David", "Hutchinson", email = "david.hutchinson@canada.ca", role = "ctb"),

NEWS.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# tidyhydat 0.6.1
22
- Add `...` to print methods so you can pass arguments all the way down.
3-
- Add workaround for vroom#519 bug that prevents `realtime_*` fucntions from working
3+
- Add workaround for vroom#519 bug that prevents `realtime_*` functions from working
4+
- `realtime_ws` now returns the `Approval/Approbation` column as a character vector rather than a integer. ECCC is now putting non-integers in that column so this is a less strict formatting solution.
45

56
# tidyhydat 0.6.0
67
- Add capability to access ECCC webservice. The return of `realtime_ws`!

R/realtime-webservice.R

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,10 @@
6868

6969
realtime_ws <- function(station_number, parameters = NULL,
7070
start_date = Sys.Date() - 30, end_date = Sys.Date()) {
71-
# if (length(station_number) >= 300) {
72-
# stop("Only 300 stations are supported for one request. If more stations are required,
73-
# a separate request should be issued to include the excess stations. This second request can
74-
# be issued on the same token if it isn't required.")
75-
# }
71+
if (is_mac()) {
72+
# temporary patch to work around vroom 1.6.4 bug
73+
readr::local_edition(1)
74+
}
7675

7776
if (is.null(parameters)) parameters <- c(46, 16, 52, 47, 8, 5, 41, 18)
7877

@@ -146,7 +145,8 @@ realtime_ws <- function(station_number, parameters = NULL,
146145
get_ws,
147146
type = "text/csv",
148147
encoding = "UTF-8",
149-
col_types = "cTidcci")
148+
col_types = "cTidccc"
149+
)
150150

151151
## Check here to see if csv_df has any data in it
152152
if (nrow(csv_df) == 0) {

README.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ knitr::opts_chunk$set(
1717

1818

1919
<!-- badges: start -->
20-
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/license/apache-2-0/) [![Coverage status](https://codecov.io/gh/ropensci/tidyhydat/branch/master/graph/badge.svg)](https://codecov.io/github/ropensci/tidyhydat?branch=master)
20+
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/license/apache-2-0/)ß
2121
[![R build status](https://github.com/ropensci/tidyhydat/workflows/R-CMD-check/badge.svg)](https://github.com/ropensci/tidyhydat/actions)
2222

2323
[![CRAN\_Status\_Badge](https://www.r-pkg.org/badges/version/tidyhydat)](https://cran.r-project.org/package=tidyhydat) [![CRAN Downloads](https://cranlogs.r-pkg.org/badges/tidyhydat?color=brightgreen)](https://CRAN.R-project.org/package=tidyhydat) [![cran checks](https://badges.cranchecks.info/worst/tidyhydat.svg)](https://cran.r-project.org/web/checks/check_results_tidyhydat.html) [![r-universe](https://ropensci.r-universe.dev/badges/tidyhydat)](https://ropensci.r-universe.dev/builds)

README.md

Lines changed: 39 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44

55
<!-- badges: start -->
66

7-
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/license/apache-2-0/)
8-
[![Coverage
9-
status](https://codecov.io/gh/ropensci/tidyhydat/branch/master/graph/badge.svg)](https://codecov.io/github/ropensci/tidyhydat?branch=master)
7+
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/license/apache-2-0/)ß
108
[![R build
119
status](https://github.com/ropensci/tidyhydat/workflows/R-CMD-check/badge.svg)](https://github.com/ropensci/tidyhydat/actions)
1210

@@ -86,23 +84,24 @@ the same conventions discussed above. Using `realtime_dd()` we can
8684
easily select specific stations by supplying a station of interest:
8785

8886
realtime_dd(station_number = "08MF005")
89-
#> Queried on: 2023-04-04 12:54:46 (UTC)
90-
#> Date range: 2023-03-05 to 2023-04-04
91-
#> # A tibble: 17,118 × 8
92-
#> STATION_NUMBER PROV_TE…¹ Date Param…² Value Grade Symbol Code
93-
#> <chr> <chr> <dttm> <chr> <dbl> <chr> <chr> <chr>
94-
#> 1 08MF005 BC 2023-03-05 08:00:00 Flow 571 <NA> <NA> 1
95-
#> 2 08MF005 BC 2023-03-05 08:05:00 Flow 572 <NA> <NA> 1
96-
#> 3 08MF005 BC 2023-03-05 08:10:00 Flow 571 <NA> <NA> 1
97-
#> 4 08MF005 BC 2023-03-05 08:15:00 Flow 571 <NA> <NA> 1
98-
#> 5 08MF005 BC 2023-03-05 08:20:00 Flow 571 <NA> <NA> 1
99-
#> 6 08MF005 BC 2023-03-05 08:25:00 Flow 572 <NA> <NA> 1
100-
#> 7 08MF005 BC 2023-03-05 08:30:00 Flow 572 <NA> <NA> 1
101-
#> 8 08MF005 BC 2023-03-05 08:35:00 Flow 571 <NA> <NA> 1
102-
#> 9 08MF005 BC 2023-03-05 08:40:00 Flow 572 <NA> <NA> 1
103-
#> 10 08MF005 BC 2023-03-05 08:45:00 Flow 573 <NA> <NA> 1
104-
#> # … with 17,108 more rows, and abbreviated variable names ¹​PROV_TERR_STATE_LOC,
105-
#> # ²​Parameter
87+
#> Queried on: 2024-01-09 05:08:33.18974 (UTC)
88+
#> Date range: 2023-12-10 to 2024-01-09
89+
#> # A tibble: 10,972 × 8
90+
#> STATION_NUMBER PROV_TERR_STATE_LOC Date
91+
#> <chr> <chr> <dttm>
92+
#> 1 08MF005 BC 2023-12-10 08:00:00
93+
#> 2 08MF005 BC 2023-12-10 08:05:00
94+
#> 3 08MF005 BC 2023-12-10 08:10:00
95+
#> 4 08MF005 BC 2023-12-10 08:15:00
96+
#> 5 08MF005 BC 2023-12-10 08:20:00
97+
#> 6 08MF005 BC 2023-12-10 08:25:00
98+
#> 7 08MF005 BC 2023-12-10 08:30:00
99+
#> 8 08MF005 BC 2023-12-10 08:35:00
100+
#> 9 08MF005 BC 2023-12-10 08:40:00
101+
#> 10 08MF005 BC 2023-12-10 08:45:00
102+
#> # ℹ 10,962 more rows
103+
#> # ℹ 5 more variables: Parameter <chr>, Value <dbl>,
104+
#> # Grade <chr>, Symbol <chr>, Code <chr>
106105

107106
Or we can use `realtime_ws`:
108107

@@ -112,27 +111,24 @@ Or we can use `realtime_ws`:
112111
start_date = Sys.Date() - 14,
113112
end_date = Sys.Date()
114113
)
115-
#> Warning: One or more parsing issues, call `problems()` on your data frame for details,
116-
#> e.g.:
117-
#> dat <- vroom(...)
118-
#> problems(dat)
119114
#> All station successfully retrieved
120115
#> All parameters successfully retrieved
121-
#> # A tibble: 4,384 × 10
122-
#> STATIO…¹ Date Name_En Value Unit Grade Symbol Appro…² Param…³
123-
#> <chr> <dttm> <chr> <dbl> <chr> <chr> <chr> <int> <dbl>
124-
#> 1 08MF005 2023-03-21 00:00:00 Water … 5.06 °C -1 <NA> NA 5
125-
#> 2 08MF005 2023-03-21 01:00:00 Water … 4.65 °C -1 <NA> NA 5
126-
#> 3 08MF005 2023-03-21 02:00:00 Water … 4.63 °C -1 <NA> NA 5
127-
#> 4 08MF005 2023-03-21 03:00:00 Water … 4.22 °C -1 <NA> NA 5
128-
#> 5 08MF005 2023-03-21 04:00:00 Water … 4.4 °C -1 <NA> NA 5
129-
#> 6 08MF005 2023-03-21 05:00:00 Water … 3.94 °C -1 <NA> NA 5
130-
#> 7 08MF005 2023-03-21 06:00:00 Water … 4 °C -1 <NA> NA 5
131-
#> 8 08MF005 2023-03-21 07:00:00 Water … 4 °C -1 <NA> NA 5
132-
#> 9 08MF005 2023-03-21 08:00:00 Water … 3.76 °C -1 <NA> NA 5
133-
#> 10 08MF005 2023-03-21 09:00:00 Water … 3.7 °C -1 <NA> NA 5
134-
#> # … with 4,374 more rows, 1 more variable: Code <chr>, and abbreviated variable
135-
#> # names ¹​STATION_NUMBER, ²​Approval, ³​Parameter
116+
#> # A tibble: 1,323 × 10
117+
#> STATION_NUMBER Date Name_En Value Unit
118+
#> <chr> <dttm> <chr> <dbl> <chr>
119+
#> 1 08MF005 2023-12-25 00:00:00 Water tem… 5.14 °C
120+
#> 2 08MF005 2023-12-25 01:00:00 Water tem… 5.12 °C
121+
#> 3 08MF005 2023-12-25 02:00:00 Water tem… 5.11 °C
122+
#> 4 08MF005 2023-12-25 03:00:00 Water tem… 5.1 °C
123+
#> 5 08MF005 2023-12-25 04:00:00 Water tem… 5.1 °C
124+
#> 6 08MF005 2023-12-25 05:00:00 Water tem… 5.07 °C
125+
#> 7 08MF005 2023-12-25 06:00:00 Water tem… 5.06 °C
126+
#> 8 08MF005 2023-12-25 07:00:00 Water tem… 5.04 °C
127+
#> 9 08MF005 2023-12-25 08:00:00 Water tem… 5.02 °C
128+
#> 10 08MF005 2023-12-25 09:00:00 Water tem… 5 °C
129+
#> # ℹ 1,313 more rows
130+
#> # ℹ 5 more variables: Grade <chr>, Symbol <chr>,
131+
#> # Approval <chr>, Parameter <dbl>, Code <chr>
136132

137133
## Compare realtime\_ws and realtime\_dd
138134

@@ -195,12 +191,12 @@ By participating in this project you agree to abide by its terms.
195191

196192
Get citation information for `tidyhydat` in R by running:
197193

198-
199194
To cite package 'tidyhydat' in publications use:
200195

201-
Albers S (2017). "tidyhydat: Extract and Tidy Canadian Hydrometric
202-
Data." _The Journal of Open Source Software_, *2*(20).
203-
doi:10.21105/joss.00511 <https://doi.org/10.21105/joss.00511>,
196+
Albers S (2017). "tidyhydat: Extract and Tidy
197+
Canadian Hydrometric Data." _The Journal of Open
198+
Source Software_, *2*(20). doi:10.21105/joss.00511
199+
<https://doi.org/10.21105/joss.00511>,
204200
<http://dx.doi.org/10.21105/joss.00511>.
205201

206202
A BibTeX entry for LaTeX users is

cran-comments.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ There were zero WARNINGS and zero ERRORS.
55

66
## NEWS
77
- Add `...` to print methods so you can pass arguments all the way down.
8-
- Add workaround for vroom#519 bug that prevents `realtime_*` fucntions from working
8+
- Add workaround for vroom#519 bug that prevents `realtime_*` functions from working
9+
- `realtime_ws` now returns the `Approval/Approbation` column as a character vector rather than a integer. ECCC is now putting non-integers in that column so this is a less strict formatting solution.
910

1011
## Test environments
1112
* win-builder (via `devtools::check_win_devel()` and `devtools::check_win_release()`)

0 commit comments

Comments
 (0)