Skip to content

Commit

Permalink
Starts dependencies dropping
Browse files Browse the repository at this point in the history
  • Loading branch information
vwmaus committed Jul 14, 2023
1 parent d8ed1d1 commit c7a0273
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 9 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ vignettes/twdtw03-speed.Rmd
^data/mod13q1/
^data/mod13q1.db
^CRAN-RELEASE$
^CRAN-SUBMISSION$
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ Makefile
dtw_result_subarea_250m_1_2017-09-01.tif
/doc/
/Meta/
CRAN-SUBMISSION
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: dtwSat
Type: Package
Title: Time-Weighted Dynamic Time Warping for Satellite Image Time Series Analysis
Version: 0.2.8
Date: 2022-10-11
Version: 1.0.0
Date: 2023-06-30
Authors@R:
c(person(given = "Victor",
family = "Maus",
Expand Down Expand Up @@ -71,7 +71,7 @@ LazyData: true
VignetteBuilder:
knitr
Encoding: UTF-8
RoxygenNote: 7.2.1
RoxygenNote: 7.2.3
Collate:
'class-crossValidation.R'
'class-twdtwRaster.R'
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# dtwSat v1.0.0

* Major release: drops dependencies on rgdal and rgeos

# dtwSat v0.2.8

* Adds faster implementation of TWDTW for logistic weight function
Expand Down
2 changes: 1 addition & 1 deletion R/twdtw_reduce_time.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
#' rbenchmark::benchmark(
#' legacy_twdtw = twdtwClassify(twdtwApply(x = tw_ts, y = tw_patt, weight.fun = log_fun),
#' from = from, to = to, by = by)[[1]],
#' fast_twdtw = twdtwReduceTime(x = mn_ts, y = mn_patt, rom = from, to = to, by = by)
#' fast_twdtw = twdtwReduceTime(x = mn_ts, y = mn_patt, from = from, to = to, by = by)
#' )
#' }
#'
Expand Down
6 changes: 5 additions & 1 deletion cran-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@
rhub::check_for_cran(check_args = '--as-cran')
rhub::check_for_cran(check_args = '--as-cran', valgrind = TRUE)

* Local Ubuntu 22.04.1 LTS x86_64-pc-linux-gnu (64-bit), R 4.2.1 (2022-06-23)
* Local Ubuntu 22.04.1 LTS x86_64-pc-linux-gnu (64-bit), R 4.3.0 (2023-04-21)
devtools::check(args = '--as-cran')
devtools::submit_cran()

## REVIEWS

# v1.0.0

* This is a major review that removes obsolete package dependencies

# v0.2.8

* Fixes errors from https://cran.r-project.org/web/checks/check_results_dtwSat.html
Expand Down
3 changes: 3 additions & 0 deletions examples/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
create_patterns.R
dtwsat_gdalcubes
parallel_twdtw_gdalcubes.R
9 changes: 5 additions & 4 deletions examples/benchmark_legacy.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ to = "2017-08-31"
by = "12 month"

# S4 objects for original implementation
tw_patt = readRDS(system.file("lucc_MT/patterns/patt.rds", package = "dtwSat"))
tw_ts = twdtwTimeSeries(MOD13Q1.ts)
tw_patt = subset(readRDS(system.file("lucc_MT/patterns/patt.rds", package = "dtwSat")), labels = "Soy_Cotton")
tw_ts = twdtwTimeSeries(MOD13Q1.ts)

# Table from csv for legacy version
mn_patt <- lapply(dir(system.file("lucc_MT/patterns", package = "dtwSat"), pattern = ".csv$", full.names = TRUE), read.csv, stringsAsFactors = FALSE)
mn_patt <- lapply(dir(system.file("lucc_MT/patterns", package = "dtwSat"), pattern = ".csv$", full.names = TRUE), read.csv, stringsAsFactors = FALSE)[12]
mn_ts <- read.csv(system.file("reduce_time/ts_MODIS13Q1.csv", package = "dtwSat"), stringsAsFactors = FALSE)

# Benchtmark
Expand All @@ -21,7 +21,8 @@ rbenchmark::benchmark(
t2_s4_fast = twdtwClassify(x = tw_ts, y = tw_patt, from = from, to = to, by = by, alpha = alpha, beta = beta, legacy = FALSE),
t3_s4_fast_tw = twdtwClassify(x = tw_ts, y = tw_patt, from = from, to = to, by = by, alpha = alpha, beta = beta, legacy = FALSE),
t4_s3_fast = twdtwClassify(x = mn_ts, y = mn_patt, from = from, to = to, by = by, alpha = alpha, beta = beta, time.window = FALSE),
t5_s3_fast_tw = twdtwClassify(x = mn_ts, y = mn_patt, from = from, to = to, by = by, alpha = alpha, beta = beta, time.window = TRUE)
t5_s3_fast_tw = twdtwClassify(x = mn_ts, y = mn_patt, from = from, to = to, by = by, alpha = alpha, beta = beta, time.window = TRUE),
replications = 100
)

plotClassification(twdtwClassify(x = tw_ts, y = tw_patt, from = from, to = to, by = by, alpha = alpha, beta = beta, legacy = FALSE, time.window = FALSE))

0 comments on commit c7a0273

Please sign in to comment.