Skip to content

Commit

Permalink
Merge pull request #90 from business-science/rc-0.1.4
Browse files Browse the repository at this point in the history
RC 0.1.4
  • Loading branch information
DavisVaughan authored May 26, 2020
2 parents d86127b + 25189e8 commit a89ee4b
Show file tree
Hide file tree
Showing 126 changed files with 5,194 additions and 4,743 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: tibbletime
Type: Package
Title: Time Aware Tibbles
Version: 0.1.3.9000
Version: 0.1.4
Authors@R: c(
person("Davis", "Vaughan", email = "[email protected]", role = c("aut", "cre")),
person("Matt", "Dancho", email = "[email protected]", role = c("aut"))
Expand Down
5 changes: 4 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# tibbletime (development version)
# tibbletime 0.1.4

* Minor release to stay compatible with tibble 3.0.0 and the upcoming release
of dplyr 1.0.0.

# tibbletime 0.1.3

Expand Down
14 changes: 7 additions & 7 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
## Release Summary

This is a minor release of 'tibbletime'. It mainly updates the `tidyr::nest()`
and `tidyr::unnest()` methods for compatability with tidyr 1.0.0.
This is a minor release to keep tibbletime compatible with tibble and dplyr.

## Test environments
* local Mac install, R 3.6.0
* ubuntu 14.04.5 (on travis-ci) (3.6.0, devel, release)
* local Mac install, R 4.0.0
* ubuntu 14.04.5 (on travis-ci) (4.0.0, devel, release)
* win-builder (devel and release)

## R CMD check results
Expand All @@ -17,8 +16,9 @@ There were no ERRORs, WARNINGs or NOTEs.

R CMD check succeeded

## Revdep checks
## revdepcheck results

The 4 revdeps have been checked, and nothing has been broken by this release.
This should free up anomalize to be fixed as well (tidyr 1.0.0 broke it).
We checked 5 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package.

* We saw 0 new problems
* We failed to check 0 packages
12 changes: 5 additions & 7 deletions revdep/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,14 @@
|language |(EN) |
|collate |en_US.UTF-8 |
|ctype |en_US.UTF-8 |
|tz |America/Los_Angeles |
|date |2019-09-19 |
|tz |America/New_York |
|date |2020-05-26 |

# Dependencies

|package |old |new |Δ |
|:----------|:-----|:----------|:--|
|tibbletime |0.1.2 |0.1.2.9000 |* |
|ellipsis |NA |0.2.0.9000 |* |
|zoo |NA |1.8-6 |* |
|package |old |new |Δ |
|:----------|:-----|:-----|:--|
|tibbletime |0.1.3 |0.1.4 |* |

# Revdeps

Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* using options ‘--no-manual --no-build-vignettes’
* checking for file ‘anomalize/DESCRIPTION’ ... OK
* checking extension type ... Package
* this is package ‘anomalize’ version ‘0.1.1
* this is package ‘anomalize’ version ‘0.2.0
* package encoding: UTF-8
* checking package namespace information ... OK
* checking package dependencies ... OK
Expand All @@ -16,10 +16,7 @@
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking whether package ‘anomalize’ can be installed ... OK
* checking installed package size ... NOTE
installed size is 5.3Mb
sub-directories of 1Mb or more:
help 4.7Mb
* checking installed package size ... OK
* checking package directory ... OK
* checking ‘build’ directory ... OK
* checking DESCRIPTION meta-information ... OK
Expand Down Expand Up @@ -61,4 +58,4 @@
* checking running R code from vignettes ... NONE
* checking re-building of vignette outputs ... SKIPPED
* DONE
Status: 1 NOTE
Status: OK
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,35 @@ gesd(x, alpha = 0.05, max_anoms = 0.2, verbose = TRUE)



cleanEx()
nameEx("clean_anomalies")
### * clean_anomalies

flush(stderr()); flush(stdout())

### Name: clean_anomalies
### Title: Clean anomalies from anomalized data
### Aliases: clean_anomalies

### ** Examples


library(dplyr)

# Needed to pass CRAN check / This is loaded by default
set_time_scale_template(time_scale_template())

data(tidyverse_cran_downloads)

tidyverse_cran_downloads %>%
time_decompose(count, method = "stl") %>%
anomalize(remainder, method = "iqr") %>%
clean_anomalies()





cleanEx()
nameEx("decompose_methods")
### * decompose_methods
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ Type 'q()' to quit R.
> source(file.path(R.home("share"), "R", "examples-header.R"))
> options(warn = 1)
> library('anomalize')
══ Use anomalize to improve your Forecasts by 50%! ═════════════════════════════
Business Science offers a 1-hour course - Lab #18: Time Series Anomaly Detection!
</> Learn more at: https://university.business-science.io/p/learning-labs-pro </>
>
> base::assign(".oldSearch", base::search(), pos = 'CheckExEnv')
> base::assign(".old_wd", base::getwd(), pos = 'CheckExEnv')
Expand Down Expand Up @@ -58,11 +61,6 @@ The following objects are masked from ‘package:base’:
> tidyverse_cran_downloads %>%
+ time_decompose(count, method = "stl") %>%
+ anomalize(remainder, method = "iqr")
Warning: Detecting old grouped_df format, replacing `vars` attribute by `groups`
Warning: `cols` is now required.
Please use `cols = c(nested.col)`
Warning: `cols` is now required.
Please use `cols = c(nested.col)`
# A time tibble: 6,375 x 9
# Index: date
# Groups: package [15]
Expand Down Expand Up @@ -232,6 +230,66 @@ $outlier_report
>
>
> cleanEx()
> nameEx("clean_anomalies")
> ### * clean_anomalies
>
> flush(stderr()); flush(stdout())
>
> ### Name: clean_anomalies
> ### Title: Clean anomalies from anomalized data
> ### Aliases: clean_anomalies
>
> ### ** Examples
>
>
> 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

>
> # Needed to pass CRAN check / This is loaded by default
> set_time_scale_template(time_scale_template())
>
> data(tidyverse_cran_downloads)
>
> tidyverse_cran_downloads %>%
+ time_decompose(count, method = "stl") %>%
+ anomalize(remainder, method = "iqr") %>%
+ clean_anomalies()
# A time tibble: 6,375 x 10
# Index: date
# Groups: package [15]
package date observed season trend remainder remainder_l1 remainder_l2
<chr> <date> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
 1 tidyr 2017-01-01 873 -2761. 5053. -1418. -3748. 3708.
 2 tidyr 2017-01-02 1840 901. 5047. -4108. -3748. 3708.
 3 tidyr 2017-01-03 2495 1460. 5041. -4006. -3748. 3708.
 4 tidyr 2017-01-04 2906 1430. 5035. -3559. -3748. 3708.
 5 tidyr 2017-01-05 2847 1239. 5029. -3421. -3748. 3708.
 6 tidyr 2017-01-06 2756 367. 5024. -2635. -3748. 3708.
 7 tidyr 2017-01-07 1439 -2635. 5018. -944. -3748. 3708.
 8 tidyr 2017-01-08 1556 -2761. 5012. -695. -3748. 3708.
 9 tidyr 2017-01-09 3678 901. 5006. -2229. -3748. 3708.
10 tidyr 2017-01-10 7086 1460. 5000. 626. -3748. 3708.
# … with 6,365 more rows, and 2 more variables: anomaly <chr>,
# observed_cleaned <dbl>
>
>
>
>
>
> cleanEx()

detaching ‘package:dplyr’

> nameEx("decompose_methods")
> ### * decompose_methods
>
Expand Down Expand Up @@ -323,7 +381,6 @@ The following objects are masked from ‘package:base’:
+ anomalize(remainder, method = "iqr") %>%
+ time_recompose() %>%
+ plot_anomalies(time_recomposed = TRUE)
Warning: Detecting old grouped_df format, replacing `vars` attribute by `groups`
frequency = 7 days
trend = 91 days
>
Expand All @@ -334,10 +391,6 @@ trend = 91 days
+ anomalize(remainder, method = "iqr") %>%
+ time_recompose() %>%
+ plot_anomalies(time_recomposed = TRUE, ncol = 3)
Warning: `cols` is now required.
Please use `cols = c(nested.col)`
Warning: `cols` is now required.
Please use `cols = c(nested.col)`
>
>
>
Expand Down Expand Up @@ -380,7 +433,6 @@ The following objects are masked from ‘package:base’:
+ time_decompose(count, method = "stl") %>%
+ anomalize(remainder, method = "iqr") %>%
+ plot_anomaly_decomposition()
Warning: Detecting old grouped_df format, replacing `vars` attribute by `groups`
frequency = 7 days
trend = 91 days
>
Expand Down Expand Up @@ -482,9 +534,6 @@ The following objects are masked from ‘package:base’:
> # Basic Usage
> tidyverse_cran_downloads %>%
+ time_apply(count, period = "1 week", .fun = mean, na.rm = TRUE)
Warning: Detecting old grouped_df format, replacing `vars` attribute by `groups`
Warning: `cols` is now required.
Please use `cols = c(nested.col)`
# A time tibble: 6,375 x 4
# Index: date
# Groups: package [15]
Expand Down Expand Up @@ -539,9 +588,6 @@ The following objects are masked from ‘package:base’:
> # Basic Usage
> tidyverse_cran_downloads %>%
+ time_decompose(count, method = "stl")
Warning: Detecting old grouped_df format, replacing `vars` attribute by `groups`
Warning: `cols` is now required.
Please use `cols = c(nested.col)`
# A time tibble: 6,375 x 6
# Index: date
# Groups: package [15]
Expand All @@ -567,8 +613,6 @@ Please use `cols = c(nested.col)`
+ trend = "2 months",
+ merge = TRUE,
+ message = FALSE)
Warning: `cols` is now required.
Please use `cols = c(nested.col)`
# A time tibble: 6,375 x 7
# Index: date
# Groups: package [15]
Expand Down Expand Up @@ -627,7 +671,6 @@ The following objects are masked from ‘package:base’:
+ filter(package == "tidyquant") %>%
+ ungroup() %>%
+ time_frequency(period = "auto")
Warning: Detecting old grouped_df format, replacing `vars` attribute by `groups`
frequency = 7 days
[1] 7
>
Expand Down Expand Up @@ -699,11 +742,6 @@ The following objects are masked from ‘package:base’:
+ time_decompose(count, method = "stl") %>%
+ anomalize(remainder, method = "iqr") %>%
+ time_recompose()
Warning: Detecting old grouped_df format, replacing `vars` attribute by `groups`
Warning: `cols` is now required.
Please use `cols = c(nested.col)`
Warning: `cols` is now required.
Please use `cols = c(nested.col)`
# A time tibble: 6,375 x 11
# Index: date
# Groups: package [15]
Expand All @@ -719,8 +757,8 @@ Please use `cols = c(nested.col)`
 8 tidyr 2017-01-08 1556 -2761. 5012. -695. -3748. 3708.
 9 tidyr 2017-01-09 3678 901. 5006. -2229. -3748. 3708.
10 tidyr 2017-01-10 7086 1460. 5000. 626. -3748. 3708.
# … with 6,365 more rows, and 3 more variables: anomaly <chr>,
# recomposed_l1 <dbl>, recomposed_l2 <dbl>
# … with 6,365 more rows, and 3 more variables: anomaly <chr>,
# recomposed_l1 <dbl>, recomposed_l2 <dbl>
>
>
>
Expand Down Expand Up @@ -766,7 +804,7 @@ detaching ‘package:dplyr’
> cleanEx()
> options(digits = 7L)
> base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n")
Time elapsed: 7.939 0.154 8.343 0.002 0.003
Time elapsed: 10.053 0.208 10.304 0.001 0.002
> grDevices::dev.off()
null device
1
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
library(testthat)
library(anomalize)
library(dplyr)
library(ggplot2)
library(tibble)

# set_time_scale_template(time_scale_template())

test_check("anomalize")
library(testthat)
library(anomalize)
library(dplyr)
library(ggplot2)
library(tibble)
library(stringr)

# set_time_scale_template(time_scale_template())

test_check("anomalize")
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ Type 'q()' to quit R.

> library(testthat)
> library(anomalize)
══ Use anomalize to improve your Forecasts by 50%! ═════════════════════════════
Business Science offers a 1-hour course - Lab #18: Time Series Anomaly Detection!
</> Learn more at: https://university.business-science.io/p/learning-labs-pro </>
> library(dplyr)

Attaching package: 'dplyr'
Expand All @@ -35,13 +38,16 @@ The following objects are masked from 'package:base':

> library(ggplot2)
> library(tibble)
Warning message:
package 'tibble' was built under R version 3.6.2
> library(stringr)
>
> # set_time_scale_template(time_scale_template())
>
> test_check("anomalize")
══ testthat results ══════════════════════════════════════════════════════════════════════════════════════════════════════
[ OK: 64 | SKIPPED: 0 | WARNINGS: 17 | FAILED: 0 ]
══ testthat results ═══════════════════════════════════════════════════════════
[ OK: 67 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 0 ]
>
> proc.time()
user system elapsed
8.106 0.184 8.317
14.141 0.257 14.437
Loading

0 comments on commit a89ee4b

Please sign in to comment.