Skip to content

Commit

Permalink
Add references to documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
vwmaus committed Jan 27, 2019
1 parent fb9a447 commit 4c25af8
Show file tree
Hide file tree
Showing 96 changed files with 460 additions and 1,902 deletions.
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
^Meta$
^doc$
^.*\.Rproj$
^\.Rproj\.user$
^\vignettes$
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
Meta
doc
# History files
.Rhistory

Expand All @@ -22,4 +24,3 @@ tardis.f
*.o
*.so
Makefile

1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ import(rgdal)
import(snow)
import(zoo)
importFrom(RColorBrewer,brewer.pal)
importFrom(Rdpack,reprompt)
importFrom(caret,createDataPartition)
importFrom(dtw,asymmetric)
importFrom(dtw,rabinerJuangStepPattern)
Expand Down
5 changes: 5 additions & 0 deletions R/class-crossValidation.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@
#' \item{\code{accuracy}:}{A list with the accuracy and other TWDTW information for each
#' data partitions.}
#' }
#'
#' @references
#' \insertRef{Maus:2019}{dtwSat}
#'
#' \insertRef{Maus:2016}{dtwSat}
#'
#' @examples
#' \dontrun{
Expand Down
5 changes: 5 additions & 0 deletions R/class-twdtwAssessment.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@
#' If the twdtwRaster is unprojected (longitude/latitude) the estimated area is the sum of the approximate
#' surface area in km2 of each cell (pixel). If the twdtwRaster is projected the estimated area is calculated
#' using the the pixel resolution in the map unit.
#'
#' @references
#' \insertRef{Maus:2019}{dtwSat}
#'
#' \insertRef{Maus:2016}{dtwSat}
#'
NULL
setClass(
Expand Down
5 changes: 5 additions & 0 deletions R/class-twdtwMatches.R
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@
#' \code{\link[dtwSat]{twdtwTimeSeries-class}}, and
#' \code{\link[dtwSat]{twdtwRaster-class}}
#'
#' @references
#' \insertRef{Maus:2019}{dtwSat}
#'
#' \insertRef{Maus:2016}{dtwSat}
#'
#' @examples
#' ts = twdtwTimeSeries(timeseries=MOD13Q1.ts.list)
#' patterns = twdtwTimeSeries(timeseries=MOD13Q1.patterns.list)
Expand Down
5 changes: 5 additions & 0 deletions R/class-twdtwRaster.R
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@
#' \code{\link[dtwSat]{twdtwMatches-class}}, and
#' \code{\link[dtwSat]{twdtwTimeSeries-class}}
#'
#' @references
#' \insertRef{Maus:2019}{dtwSat}
#'
#' \insertRef{Maus:2016}{dtwSat}
#'
#' @examples
#' # Creating a new object of class twdtwTimeSeries
#' evi = brick(system.file("lucc_MT/data/evi.tif", package="dtwSat"))
Expand Down
5 changes: 5 additions & 0 deletions R/class-twdtwTimeSeries.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@
#' \code{\link[dtwSat]{getTimeSeries}}, and
#' \code{\link[dtwSat]{twdtwApply}}
#'
#' @references
#' \insertRef{Maus:2019}{dtwSat}
#'
#' \insertRef{Maus:2016}{dtwSat}
#'
#' @examples
#' # Creating a new object of class twdtwTimeSeries
#' ptt = new("twdtwTimeSeries", timeseries = MOD13Q1.patterns.list,
Expand Down
5 changes: 5 additions & 0 deletions R/createPatterns.R
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@
#' \code{\link[dtwSat]{getTimeSeries}}, and
#' \code{\link[dtwSat]{twdtwApply}}
#'
#' @references
#' \insertRef{Maus:2019}{dtwSat}
#'
#' \insertRef{Maus:2016}{dtwSat}
#'
#' @export
setGeneric("createPatterns", function(x, from=NULL, to=NULL, freq=1, attr=NULL, split=TRUE, formula, ...) standardGeneric("createPatterns"))

Expand Down
60 changes: 35 additions & 25 deletions R/data.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
#'
#' @description This dataset has a list of patterns with the phenological cycle of: Soybean,
#' Cotton, and Maize. These time series are based on the MODIS product
#' MOD13Q1 250 m 16 days [1]. The patterns were built from ground truth samples of each
#' MOD13Q1 250 m 16 days \insertCite{Didan:2015}{dtwSat}. The patterns were built
#' from ground truth samples of each
#' crop using Generalized Additive Models (GAM), see \link[dtwSat]{createPatterns}.
#'
#' @docType data
Expand All @@ -36,13 +37,15 @@
#' \link[dtwSat]{MOD13Q1.ts.list}, and
#' \link[dtwSat]{createPatterns}.
#'
#' @seealso MOD13Q1 documentation: See
#' \url{https://lpdaac.usgs.gov/dataset_discovery/modis/modis_products_table/mod13q1_v006}.
#' @seealso For details about MOD13Q1 see \insertCite{Didan:2015}{dtwSat}.
#'
#' @references
#' [1] Friedl MA, Sulla-Menashe D, Tan B, Schneider A, Ramankutty N, Sibley A, Huang X. (2010).
#' MODIS Collection 5 global land cover: Algorithm refinements and characterization of new
#' datasets. Remote Sensing of Environment, 114(1), 168 182.
#' \insertAllCited{}
#'
#' \insertRef{Maus:2019}{dtwSat}
#'
#' \insertRef{Maus:2016}{dtwSat}

#'
"MOD13Q1.patterns.list"

Expand All @@ -51,7 +54,8 @@
#' @author Victor Maus, \email{vwmaus1@@gmail.com}
#'
#' @description This dataset has a time series based on the
#' MODIS product MOD13Q1 250 m 16 days [1]. It is an irregularly sampled time series
#' MODIS product MOD13Q1 250 m 16 days \insertCite{Didan:2015}{dtwSat}.
#' It is an irregularly sampled time series
#' using the real date of each pixel from ''2009-08-05'' to ''2013-07-31''.
#'
#' @docType data
Expand All @@ -64,13 +68,15 @@
#' \link[dtwSat]{MOD13Q1.patterns.list}.
#'
#'
#' @seealso MOD13Q1 documentation:
#' \url{https://lpdaac.usgs.gov/dataset_discovery/modis/modis_products_table/mod13q1_v006}.
#' @seealso For details about MOD13Q1 see \insertCite{Didan:2015}{dtwSat}.
#'
#' @references
#' [1] Friedl MA, Sulla-Menashe D, Tan B, Schneider A, Ramankutty N, Sibley A, Huang X. (2010).
#' MODIS Collection 5 global land cover: Algorithm refinements and characterization of new
#' datasets. Remote Sensing of Environment, 114(1), 168 182.
#' \insertAllCited{}
#'
#' \insertRef{Maus:2019}{dtwSat}
#'
#' \insertRef{Maus:2016}{dtwSat}

#'
"MOD13Q1.ts"

Expand All @@ -93,7 +99,8 @@
#' @author Victor Maus, \email{vwmaus1@@gmail.com}
#'
#' @description This dataset has a list of time series based on the
#' MODIS product MOD13Q1 250 m 16 days [1]. It is an irregularly sampled time series
#' MODIS product MOD13Q1 250 m 16 days \insertCite{Didan:2015}{dtwSat}.
#' It is an irregularly sampled time series
#' using the real date of each pixel from ''2009-08-05'' to ''2013-07-31''.
#'
#' @docType data
Expand All @@ -106,36 +113,39 @@
#' \link[dtwSat]{MOD13Q1.patterns.list}.
#'
#'
#' @seealso MOD13Q1 documentation:
#' \url{https://lpdaac.usgs.gov/dataset_discovery/modis/modis_products_table/mod13q1_v006}.
#' @seealso For details about MOD13Q1 see \insertCite{Didan:2015}{dtwSat}.
#'
#' @references
#' [1] Friedl MA, Sulla-Menashe D, Tan B, Schneider A, Ramankutty N, Sibley A, Huang X. (2010).
#' MODIS Collection 5 global land cover: Algorithm refinements and characterization of new
#' datasets. Remote Sensing of Environment, 114(1), 168 182.
#' \insertAllCited{}
#'
#' \insertRef{Maus:2019}{dtwSat}
#'
#' \insertRef{Maus:2016}{dtwSat}

#'
"MOD13Q1.ts.list"


#' @title Data: Pattern time series
#' @author Victor Maus, \email{vwmaus1@@gmail.com}
#'
#' @description This dataset has a list of patterns with the phenological cycle of: Water,
#' Cotton-Fallow, Forest, Low vegetation, Pasture, Soybean-Cotton, Soybean-Maize, Soybean-Millet,
#' Soybean-Sunflower, and Wetland. These time series are based on the MODIS product
#' MOD13Q1 250 m 16 days [1]. The patterns were built from ground truth samples of each
#' MOD13Q1 250 m 16 days \insertCite{Didan:2015}{dtwSat}.
#' The patterns were built from ground truth samples of each
#' crop using Generalized Additive Models (GAM), see \link[dtwSat]{createPatterns}.
#'
#' @docType data
#' @format A \link[dtwSat]{twdtwTimeSeries} object.
#'
#' @seealso MOD13Q1 documentation: See
#' \url{https://lpdaac.usgs.gov/dataset_discovery/modis/modis_products_table/mod13q1_v006}.
#' @seealso For details about MOD13Q1 see \insertCite{Didan:2015}{dtwSat}.
#'
#' @references
#' [1] Friedl MA, Sulla-Menashe D, Tan B, Schneider A, Ramankutty N, Sibley A, Huang X. (2010).
#' MODIS Collection 5 global land cover: Algorithm refinements and characterization of new
#' datasets. Remote Sensing of Environment, 114(1), 168 182.
#' \insertAllCited{}
#'
#' \insertRef{Maus:2019}{dtwSat}
#'
#' \insertRef{Maus:2016}{dtwSat}
#'
"MOD13Q1.MT.yearly.patterns"

9 changes: 3 additions & 6 deletions R/dwtSat.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
#' @author Victor Maus, \email{vwmaus1@@gmail.com}
#'
#' @description Provides an implementation of the Time-Weighted Dynamic Time Warping
#' (TWDTW) method for land use and land cover mapping using satellite image time series [1].
#' (TWDTW) method for land use and land cover mapping using satellite image time series
#' \insertCite{Maus:2016,Maus:2019}{dtwSat}.
#' TWDTW is based on the Dynamic Time Warping technique and has achieved high accuracy
#' for land use and land cover classification using satellite data. The method is based
#' on comparing unclassified satellite image time series with a set of known temporal
Expand All @@ -26,12 +27,8 @@
#' for satellite datasets, visualize the results of the time series analysis, produce
#' land cover maps, and create temporal plots for land cover change analysis.
#'
#'
#' @references
#' [1] Maus V, Camara G, Cartaxo R, Sanchez A, Ramos FM, de Queiroz, GR.
#' (2016). A Time-Weighted Dynamic Time Warping method for land use and land cover
#' mapping. Selected Topics in Applied Earth Observations and Remote Sensing,
#' IEEE Journal of, vol.PP, no.99, pp.1-11.
#' \insertAllCited{}
#'
#' @seealso \code{\link[dtwSat]{twdtwApply}}
#'
Expand Down
8 changes: 7 additions & 1 deletion R/getInternals.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,13 @@ setGeneric("getMatches", function(object, timeseries.labels=NULL, patterns.label
#' getInternals(mat)
#'
#' @return a list with TWDTW results or an object \code{\link[dtwSat]{twdtwTimeSeries-class}}.
#'
#'
#' @references
#' \insertRef{Maus:2019}{dtwSat}
#'
#' \insertRef{Maus:2016}{dtwSat}
#'
#'
NULL

#' @aliases getAlignments
Expand Down
5 changes: 5 additions & 0 deletions R/getTimeSeries.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ setGeneric("getPatterns", function(object, ...) standardGeneric("getPatterns"))
#'
#' @return a list with TWDTW results or an object \code{\link[dtwSat]{twdtwTimeSeries-class}}.
#'
#' @references
#' \insertRef{Maus:2019}{dtwSat}
#'
#' \insertRef{Maus:2016}{dtwSat}
#'
#' @examples
#' # Getting time series from objects of class twdtwTimeSeries
#' ts = twdtwTimeSeries(MOD13Q1.ts.list)
Expand Down
12 changes: 5 additions & 7 deletions R/linearWeight.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,15 @@
#' can be passed to \code{\link[dtwSat]{twdtwApply}} through the argument \code{weight.fun}.
#' This will add a time-weight to the dynamic time warping analysis. The time weight
#' creates a global constraint useful to analyse time series with phenological cycles
#' of vegetation that are usually bound to seasons. In previous studies by [1] the
#' logistic weight had better results than the linear for land cover classification.
#' See [1] for details about the method.
#' of vegetation that are usually bound to seasons. In previous studies by
#' \insertCite{Maus:2016;textual}{dtwSat} the logistic weight had better results than the
#' linear for land cover classification. See \insertCite{Maus:2016;textual}{dtwSat} and
#' \insertCite{Maus:2019;textual}{dtwSat}.
#'
#' @seealso \code{\link[dtwSat]{twdtwApply}}
#'
#' @references
#' [1] Maus V, Camara G, Cartaxo R, Sanchez A, Ramos FM, de Queiroz, GR.
#' (2016). A Time-Weighted Dynamic Time Warping method for land use and land cover
#' mapping. Selected Topics in Applied Earth Observations and Remote Sensing,
#' IEEE Journal of, vol.PP, no.99, pp.1-11.
#' \insertAllCited{}
#'
#' @examples
#' lin_fun = linearWeight(a=0.1)
Expand Down
12 changes: 5 additions & 7 deletions R/logisticWeight.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,15 @@
#' can be passed to \code{\link[dtwSat]{twdtwApply}} through the argument \code{weight.fun}.
#' This will add a time-weight to the dynamic time warping analysis. The time weight
#' creates a global constraint useful to analyse time series with phenological cycles
#' of vegetation that are usually bound to seasons. In previous studies by [1] the
#' logistic weight had better results than the linear for land cover classification.
#' See [1] for details about the method.
#' of vegetation that are usually bound to seasons. In previous studies by
#' \insertCite{Maus:2016;textual}{dtwSat} the logistic weight had better results than the
#' linear for land cover classification. See \insertCite{Maus:2016;textual}{dtwSat} and
#' \insertCite{Maus:2019;textual}{dtwSat}.
#'
#' @seealso \code{\link[dtwSat]{twdtwApply}}
#'
#' @references
#' [1] Maus V, Camara G, Cartaxo R, Sanchez A, Ramos FM, de Queiroz, GR.
#' (2016). A Time-Weighted Dynamic Time Warping method for land use and land cover
#' mapping. Selected Topics in Applied Earth Observations and Remote Sensing,
#' IEEE Journal of, vol.PP, no.99, pp.1-11.
#' \insertAllCited{}
#'
#' @examples
#' log_fun = logisticWeight(alpha=-0.1, beta=100)
Expand Down
16 changes: 16 additions & 0 deletions R/miscellaneous.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
#'
#' @seealso \link[dtwSat]{shiftDates}
#'
#' @references
#' \insertRef{Maus:2019}{dtwSat}
#'
#' \insertRef{Maus:2016}{dtwSat}
#'
#' @examples
#' year = c(2000, 2001)
#' doy = c(366, 365)
Expand Down Expand Up @@ -48,11 +53,22 @@ getDatesFromDOY = function(year, doy){
#'
#' @return An object of the same class as the input \code{object}.
#'
#' @references
#' \insertRef{Maus:2019}{dtwSat}
#'
#' \insertRef{Maus:2016}{dtwSat}
#'
#' @export
setGeneric("shiftDates", function(object, year=NULL) standardGeneric("shiftDates"))

#' @rdname shiftDates
#' @aliases shiftDates-twdtwTimeSeries
#'
#' @references
#' \insertRef{Maus:2019}{dtwSat}
#'
#' \insertRef{Maus:2016}{dtwSat}
#'
#' @examples
#' patt = twdtwTimeSeries(MOD13Q1.patterns.list)
#' npatt = shiftDates(patt, year=2005)
Expand Down
5 changes: 5 additions & 0 deletions R/plotAccuracy.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
#' @seealso
#' \code{\link[dtwSat]{twdtwAssessment}} and \code{\link[dtwSat]{twdtwAssess}}
#'
#' @references
#' \insertRef{Maus:2019}{dtwSat}
#'
#' \insertRef{Maus:2016}{dtwSat}
#'
#' @examples
#' \dontrun{
#'
Expand Down
5 changes: 5 additions & 0 deletions R/plotAdjustedArea.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
#' @seealso
#' \code{\link[dtwSat]{twdtwAssessment}} and \code{\link[dtwSat]{twdtwAssess}}
#'
#' @references
#' \insertRef{Maus:2019}{dtwSat}
#'
#' \insertRef{Maus:2016}{dtwSat}
#'
#' @examples
#' \dontrun{
#'
Expand Down
5 changes: 5 additions & 0 deletions R/plotAlignments.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
#' \code{\link[dtwSat]{plotMatches}}, and
#' \code{\link[dtwSat]{plotClassification}}.
#'
#' @references
#' \insertRef{Maus:2019}{dtwSat}
#'
#' \insertRef{Maus:2016}{dtwSat}
#'
#' @examples
#' log_fun = logisticWeight(-0.1, 100)
#' ts = twdtwTimeSeries(MOD13Q1.ts.list)
Expand Down
Loading

0 comments on commit 4c25af8

Please sign in to comment.