sits set up in dhub

sits R package

This takes awhile.

Installing package into '/usr/local/lib/R/site-library'
(as 'lib' is unspecified)
also installing the dependencies 'shape', 'numDeriv', 'progressr', 'SQUAREM', 'diagram', 'lava', 'cards', 'labelled', 'prodlim', 'broom.helpers', 'patchwork', 'iterators', 'clock', 'gower', 'hardhat', 'ipred', 'timeDate', 'modeltools', 'ggstats', 'poorman', 'foreach', 'ModelMetrics', 'pROC', 'recipes', 'dtw', 'clue', 'flexclust', 'ggrepel', 'RSpectra', 'RcppParallel', 'shinyjs', 'RcppThread', 'globals', 'listenv', 'parallelly', 'zeallot', 'DT', 'GGally', 'ranger', 'philentropy', 'future.apply', 'caret', 'dendextend', 'dtwclust', 'exactextractr', 'future', 'kohonen', 'luz', 'openxlsx', 'randomForest', 'randomForestExplainer', 'supercells', 'xgboost'

check your netrc file

It wants this at the home dir.

cat(paste0(readLines("~/.netrc"), collapse="\n"))

Should look like this

machine urs.earthdata.nasa.gov
login username
password yourpassword

If you don’t see this. You can make it

use_this::edit_file("~/.netrc")

Test if it is working

library(sits)
SITS - satellite image time series analysis.
Loaded sits v1.5.1.
        See ?sits for help, citation("sits") for use in publication.
        Documentation avaliable in https://e-sensing.github.io/sitsbook/.
# Create a data cube covering an area in Brazil
s2_23MMU_cube <- sits_cube(
  source = "AWS",
  collection = "SENTINEL-2-L2A",
  tiles = "23MMU",
  bands = c("B02", "B8A", "B11", "CLOUD"),
  start_date = "2018-07-12",
  end_date = "2019-07-28"
)

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======================================================================| 100%

Make a plot.

plot(s2_23MMU_cube,
  red = "B11",
  blue = "B02",
  green = "B8A",
  date = "2018-10-05"
)