Skip to content

Commit

Permalink
Removes pipe
Browse files Browse the repository at this point in the history
  • Loading branch information
vwmaus committed Sep 21, 2023
1 parent ca06b26 commit 915de95
Show file tree
Hide file tree
Showing 13 changed files with 68 additions and 319 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Description: Provides a robust approach to land use mapping using multi-dimensio
while also requiring minimal training sets. The package includes tools for training the 1-NN-TWDTW model,
visualizing temporal patterns, producing land use maps, and visualizing the results.
License: GPL (>= 3)
URL: https://github.com/vwmaus/dtwSat/, http://www.victor-maus.com/dtwSat/
URL: https://github.com/vwmaus/dtwSat/
BugReports: https://github.com/vwmaus/dtwSat/issues/
Maintainer: Victor Maus <vwmaus1@gmail.com>
VignetteBuilder:
Expand Down
25 changes: 13 additions & 12 deletions R/train.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,26 @@
#' \dontrun{
#'
#' # Read training samples
#' samples <-
#' system.file("mato_grosso_brazil/samples.gpkg", package = "dtwSat") |>
#' st_read(quiet = TRUE)
#' samples_path <-
#' system.file("mato_grosso_brazil/samples.gpkg", package = "dtwSat")
#'
#' samples <- st_read(samples_path, quiet = TRUE)
#'
#' # Get satellite image time sereis files
#' tif_files <- system.file("mato_grosso_brazil", package = "dtwSat") |>
#' dir(pattern = "\\.tif$", full.names = TRUE)
#' tif_path <- system.file("mato_grosso_brazil", package = "dtwSat")
#' tif_files <- dir(tif_path, pattern = "\\.tif$", full.names = TRUE)
#'
#' # Get acquisition dates
#' acquisition_date <- regmatches(tif_files, regexpr("[0-9]{8}", tif_files)) |>
#' as.Date(format = "%Y%m%d")
#' acquisition_date <- regmatches(tif_files, regexpr("[0-9]{8}", tif_files))
#' acquisition_date <- as.Date(acquisition_date, format = "%Y%m%d")
#'
#' # Create a 3D datacube
#' dc <- read_stars(tif_files,
#' proxy = FALSE,
#' along = list(time = acquisition_date),
#' RasterIO = list(bands = 1:6)) |>
#' st_set_dimensions(3, c("EVI", "NDVI", "RED", "BLUE", "NIR", "MIR")) |>
#' split(c("band"))
#' RasterIO = list(bands = 1:6))
#' dc <- st_set_dimensions(dc, 3, c("EVI", "NDVI", "RED", "BLUE", "NIR", "MIR"))
#' dc <- split(dc, c("band"))
#'
#' # Create a knn1-twdtw model
#' m <- twdtw_knn1(x = dc,
Expand All @@ -56,9 +57,9 @@
#' time_scale = 'day',
#' time_weight = c(steepness = 0.1, midpoint = 50),
#' formula = band ~ s(time))
#'
#'
#' print(m)
#'
#'
#' # Visualize model patterns
#' plot(m)
#'
Expand Down
3 changes: 0 additions & 3 deletions examples/.gitignore

This file was deleted.

28 changes: 0 additions & 28 deletions examples/benchmark_legacy.R

This file was deleted.

101 changes: 0 additions & 101 deletions examples/fast_twdtw.R

This file was deleted.

31 changes: 0 additions & 31 deletions examples/reshape_modis_files.R

This file was deleted.

83 changes: 0 additions & 83 deletions examples/test_twdtw_raster_analysis.R

This file was deleted.

3 changes: 1 addition & 2 deletions inst/REFERENCES.bib
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ @misc{Didan:2015
author = {Kamel Didan},
title = {{MOD13Q1 MODIS/Terra Vegetation Indices 16-Day L3 Global
250m SIN Grid V006 [Data set], NASA EOSDIS LP DAAC}},
year = {2015},
doi = {10.5067/MODIS/MOD13Q1.006}
year = {2015}
}

21 changes: 11 additions & 10 deletions man/plot.twdtw_knn1.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 11 additions & 10 deletions man/predict.twdtw_knn1.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 915de95

Please sign in to comment.