Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rgeeExtra: An extensions for 'rgee' #608

Open
11 of 29 tasks
csaybar opened this issue Sep 17, 2023 · 66 comments
Open
11 of 29 tasks

rgeeExtra: An extensions for 'rgee' #608

csaybar opened this issue Sep 17, 2023 · 66 comments

Comments

@csaybar
Copy link

csaybar commented Sep 17, 2023

Submitting Author Name: Cesar Aybar
Submitting Author Github Handle: @csaybar
Other Package Authors Github handles: (comma separated, delete if none) @davemlz, @LBautistaB13, @choisy
Repository: https://github.com/r-earthengine/rgeeExtra
Version submitted: 0.0.1
Submission type: Standard
Editor: @maurolepore
Reviewers: @nmorandeira, @zackarno

Archive: TBD
Version accepted: TBD
Language: en


  • Paste the full DESCRIPTION file inside a code block below:
Package: rgeeExtra
Title: Extensions for 'rgee'
Version: 0.0.1
Authors@R: 
    c(person(given = "Cesar",
           family = "Aybar",
           role = c("aut", "cre"),
           email = "csaybar@gmail.com",
           comment = c(ORCID = "0000-0003-2745-9535")),
      person(given = "David",
           family = "Montero",
	         role = c("ctb"),
	         email = "dml.mont@gmail.com",
	         comment = c(ORCID = "0000-0002-9010-3286")),
      person(given = "Lesly",
           family = "Bautista",
	         role = c("ctb"),
	         email = "leslyarcelly.213@gmail.com",
	         comment = c(ORCID = "0000-0003-3523-8687")),
      person(given = "Marc",
           family = "Choisy",
	         role = c("ctb"),
	         email = "mchoisy@oucru.org",
	         comment = c(ORCID = "0000-0002-5187-6390"))
    )
Description: High-level API to process Google Earth Engine (GEE) raster (ee.Image and ee.ImageCollection) and vector data (ee.Geometry, ee.Feature, and ee.FeatureCollection). Popular Third-party GEE algorithms are re-coded from Javascript and Python to R.
License: Apache License (>= 2)
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
Config/reticulate:
  list(
    packages = list(
      list(package = "earthengine-api")
    )
  )
Imports:
    reticulate (>= 1.31),
    rgee,
    magrittr,
    crayon,
    cli
Suggests:
    testthat (>= 3.0.0),
    googledrive,
    googleCloudStorageR,
    geojsonio,
    magick,
    stars,
    sf,
    knitr,
    rmarkdown
VignetteBuilder: knitr
Language: en-US
BugReports: https://github.com/r-earthengine/rgeeExtra/issues
URL: https://github.com/r-earthengine/rgeeExtra

Scope

  • Please indicate which category or categories from our package fit policies this package falls under: (Please check an appropriate box below. If you are unsure, we suggest you make a pre-submission inquiry.):

    • data retrieval
    • data extraction
    • data munging
    • data deposition
    • data validation and testing
    • workflow automation
    • version control
    • citation management and bibliometrics
    • scientific software wrappers
    • field and lab reproducibility tools
    • database software bindings
    • geospatial data
    • text analysis
  • Explain how and why the package falls under these categories (briefly, 1-2 sentences):

rgeeExtra is an extension of the rgee package that enables interaction with Google Earth Engine (GEE). The advantage of rgeeExtra lies in its user-friendly syntax for R users. The package includes operator overloading and access to various functions created by third parties within the ee_extra package.

  • Who is the target audience and what are scientific applications of this package?

GEE users and any R user who wants to retrieve data using the GEE API from within R.

There are other packages for connecting to GEE, but they are primarily focused on composite generation and data download. See geedim

Yes

  • If you made a pre-submission inquiry, please paste the link to the corresponding issue, forum post, or other discussion, or @tag the editor you contacted.

  • Explain reasons for any pkgcheck items which your package is unable to pass.

  • Package uses global assignment operator ('<<-'). The global assignment operator is used in the .onLoad special function to set the ee_extra Python Package in the R global environment (See here). This approach is similar to other reticulate R packages like keras or tensorflow.

Technical checks

Confirm each of the following by checking the box.

This package:

Publication options

  • Do you intend for this package to go on CRAN?
  • Do you intend for this package to go on Bioconductor?
  • Do you wish to submit an Applications Article about your package to Methods in Ecology and Evolution? If so:
MEE Options
  • The package is novel and will be of interest to the broad readership of the journal.
  • The manuscript describing the package is no longer than 3000 words.
  • You intend to archive the code for the package in a long-term repository which meets the requirements of the journal (see MEE's Policy on Publishing Code)
  • (Scope: Do consider MEE's Aims and Scope for your manuscript. We make no guarantee that your manuscript will be within MEE scope.)
  • (Although not required, we strongly recommend having a full manuscript prepared when you submit here.)
  • (Please do not submit your package separately to Methods in Ecology and Evolution)

Code of conduct

@ropensci-review-bot
Copy link
Collaborator

Thanks for submitting to rOpenSci, our editors and @ropensci-review-bot will reply soon. Type @ropensci-review-bot help for help.

@ropensci-review-bot
Copy link
Collaborator

🚀

Editor check started

👋

@ropensci-review-bot
Copy link
Collaborator

Checks for rgeeExtra (v0.0.1)

git hash: 79fde841

  • ✔️ Package name is available
  • ✔️ has a 'codemeta.json' file.
  • ✔️ has a 'contributing' file.
  • ✖️ The following functions have no documented return values: [ee_length_ic, ee_length, ee_name_ic, ee_name, ee_subsetting, extra_Initialize, Math-methods, Ops-methods, Summary-methods]
  • ✔️ uses 'roxygen2'.
  • ✔️ 'DESCRIPTION' has a URL field.
  • ✔️ 'DESCRIPTION' has a BugReports field.
  • ✔️ Package has at least one HTML vignette
  • ✔️ All functions have examples.
  • ✔️ Package has continuous integration checks.
  • ✖️ Package coverage failed
  • ✖️ R CMD check found 1 error.
  • ✔️ R CMD check found no warnings.

Important: All failing checks above must be addressed prior to proceeding

Package License: Apache License (>= 2)


1. Package Dependencies

Details of Package Dependency Usage (click to open)

The table below tallies all function calls to all packages ('ncalls'), both internal (r-base + recommended, along with the package itself), and external (imported and suggested packages). 'NA' values indicate packages to which no identified calls to R functions could be found. Note that these results are generated by an automated code-tagging system which may not be entirely accurate.

type package ncalls
internal base 71
internal rgeeExtra 38
internal graphics 5
internal stats 2
imports magrittr 70
imports rgee 29
imports reticulate 5
imports crayon NA
imports cli NA
suggests sf 2
suggests magick 1
suggests testthat NA
suggests googledrive NA
suggests googleCloudStorageR NA
suggests geojsonio NA
suggests stars NA
suggests knitr NA
suggests rmarkdown NA
linking_to NA NA

Click below for tallies of functions used in each package. Locations of each call within this package may be generated locally by running 's <- pkgstats::pkgstats(<path/to/repo>)', and examining the 'external_calls' table.

base

c (13), list (12), length (9), drop (6), for (4), lapply (3), which (3), mode (2), names (2), seq_along (2), sprintf (2), all (1), args (1), basename (1), diff (1), dirname (1), gsub (1), rep (1), scale (1), source (1), system.file (1), tempfile (1), try (1), url (1)

magrittr

%>% (70)

rgeeExtra

ee_get (3), ee_connect_to_py (2), ee_new_list_name (2), ee_source_python (2), ee_check_packages (1), ee_image_getCitation (1), ee_image_getDOI (1), ee_Image_getOffsetParams (1), ee_Image_getScaleParams (1), ee_Image_getSTAC (1), ee_Image_maskClouds (1), ee_Image_matchHistogram (1), ee_Image_panSharpen (1), ee_Image_preprocess (1), ee_Image_scaleAndOffset (1), ee_Image_spectralIndex (1), ee_Image_tasseledCap (1), ee_ImageCollection_closest (1), ee_ImageCollection_getCitation (1), ee_ImageCollection_getDOI (1), ee_ImageCollection_getOffsetParams (1), ee_ImageCollection_getScaleParams (1), ee_ImageCollection_getSTAC (1), ee_ImageCollection_panSharpen (1), ee_ImageCollection_preprocess (1), ee_ImageCollection_scaleAndOffset (1), ee_ImageCollection_spectralIndex (1), ee_ImageCollection_tasseledCap (1), ee_maxValue (1), ee_minValue (1), Math.ee.image.Image (1), Ops.ee.image.Image (1), Summary.ee.image.Image (1)

rgee

ee_as_sf (4), sf_as_ee (4), ee$ImageCollection (3), ee$ImageCollection$first (2), ee$ImageCollection$toList (2), ee$List$get (2), ee$Reducer$max (2), ee$Image (1), ee$Image$abs (1), ee$Image$bandNames (1), ee$Image$pow (1), ee$Image$unmask (1), ee$ImageCollection$getVideoThumbURL (1), ee$List$length (1), ee$List$sequence (1), ee$Number$format (1), ee$Reducer$min (1)

graphics

image (5)

reticulate

import_from_path (4), py_discover_config (1)

sf

st_cast (2)

stats

offset (2)

magick

image_read (1)

NOTE: Some imported packages appear to have no associated function calls; please ensure with author that these 'Imports' are listed appropriately.


2. Statistical Properties

This package features some noteworthy statistical properties which may need to be clarified by a handling editor prior to progressing.

Details of statistical properties (click to open)

The package has:

  • code in R (100% in 12 files) and
  • 1 authors
  • 2 vignettes
  • no internal data file
  • 5 imported packages
  • 48 exported functions (median 4 lines of code)
  • 60 non-exported functions in R (median 8 lines of code)

Statistical properties of package structure as distributional percentiles in relation to all current CRAN packages
The following terminology is used:

  • loc = "Lines of Code"
  • fn = "function"
  • exp/not_exp = exported / not exported

All parameters are explained as tooltips in the locally-rendered HTML version of this report generated by the checks_to_markdown() function

The final measure (fn_call_network_size) is the total number of calls between functions (in R), or more abstract relationships between code objects in other languages. Values are flagged as "noteworthy" when they lie in the upper or lower 5th percentile.

measure value percentile noteworthy
files_R 12 65.5
files_vignettes 2 85.7
files_tests 9 89.6
loc_R 825 62.7
loc_vignettes 120 31.3
loc_tests 477 74.0
num_vignettes 2 89.2
n_fns_r 108 78.4
n_fns_r_exported 48 87.1
n_fns_r_not_exported 60 72.4
n_fns_per_file_r 6 75.7
num_params_per_fn 2 11.9
loc_per_fn_r 5 8.1
loc_per_fn_r_exp 4 7.0
loc_per_fn_r_not_exp 8 22.6
rel_whitespace_R 15 58.6
rel_whitespace_vignettes 50 45.3
rel_whitespace_tests 31 80.2
doclines_per_fn_exp 37 45.3
doclines_per_fn_not_exp 0 0.0 TRUE
fn_call_network_size 13 37.5

2a. Network visualisation

Click to see the interactive network visualisation of calls between objects in package


3. goodpractice and other checks

Details of goodpractice checks (click to open)

3a. Continuous Integration Badges

![R-CMD-check.yaml](https://github.com/r-earthengine/rgeeExtra/actions/workflows/R-CMD-check.yaml"><img src="https://github.com/r-earthengine/rgeeExtra/actions/workflows/R-CMD-check.yaml/badge.svg)

GitHub Workflow Results

id name conclusion sha run_number date
5917635570 Commands success 887d78 13 2023-08-20
6216302723 pages build and deployment success 1c6bba 9 2023-09-17
6216295894 pkgdown success 79fde8 28 2023-09-17
6216295890 R-CMD-check NA 79fde8 28 2023-09-17
6216295893 test-coverage failure 79fde8 3 2023-09-17

3b. goodpractice results

R CMD check with rcmdcheck

R CMD check generated the following error:

  1. checking tests ...
    Running ‘testthat.R’
    ERROR
    Running the tests in ‘tests/testthat.R’ failed.
    Last 13 lines of output:
    ── Error ('test-subsetting.R:6:1'): (code run outside of test_that()) ────────
    Error in ee_connect_to_py(path = ee_current_version, n = 5): The current Python PATH: /usr/bin/python3
    does not have the Python package "earthengine-api" installed. Are you restarted/terminated.
    your R session after install miniconda or run ee_install()?
    If no do it, please try again:

ee_install(): To create and set a Python environment with all rgee dependencies.
ee_install_set_pyenv(): To set a specific Python environment.
Backtrace:

  1. └─rgee::ee_Initialize() at test-subsetting.R:6:0
  2. └─rgee:::ee_connect_to_py(path = ee_current_version, n = 5)

[ FAIL 8 | WARN 0 | SKIP 0 | PASS 0 ]
Error: Test failures
Execution halted

R CMD check generated the following note:

  1. checking installed package size ... NOTE
    installed size is 6.1Mb
    sub-directories of 1Mb or more:
    doc 4.3Mb
    ee_extra 1.6Mb

R CMD check generated the following test_fail:

  1. library(testthat)

library(rgee)
library(rgeeExtra)
library(stars)
Loading required package: abind
Loading required package: sf
Linking to GEOS 3.10.2, GDAL 3.4.3, PROJ 8.2.0; sf_use_s2() is TRUE
library(sf)

if (identical(Sys.getenv("NOT_CRAN"), "true")) {

  • test_check("rgeeExtra")
  • }
    [ FAIL 8 | WARN 0 | SKIP 0 | PASS 0 ]

══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-ee_gif.R:8:1'): (code run outside of test_that()) ────────────
Error in ee_connect_to_py(path = ee_current_version, n = 5): The current Python PATH: /usr/bin/python3
does not have the Python package "earthengine-api" installed. Are you restarted/terminated.
your R session after install miniconda or run ee_install()?
If no do it, please try again:

ee_install(): To create and set a Python environment with all rgee dependencies.
ee_install_set_pyenv(): To set a specific Python environment.
Backtrace:

  1. └─rgee::ee_Initialize() at test-ee_gif.R:8:0
  2. └─rgee:::ee_connect_to_py(path = ee_current_version, n = 5)
    ── Error ('test-ee_image.R:6:1'): (code run outside of test_that()) ──────────
    Error in ee_connect_to_py(path = ee_current_version, n = 5): The current Python PATH: /usr/bin/python3
    does not have the Python package "earthengine-api" installed. Are you restarted/terminated.
    your R session after install miniconda or run ee_install()?
    If no do it, please try again:

ee_install(): To create and set a Python environment with all rgee dependencies.
ee_install_set_pyenv(): To set a specific Python environment.
Backtrace:

  1. └─rgee::ee_Initialize() at test-ee_image.R:6:0
  2. └─rgee:::ee_connect_to_py(path = ee_current_version, n = 5)
    ── Error ('test-eeImageCollection.R:6:1'): (code run outside of test_that()) ──
    Error in ee_connect_to_py(path = ee_current_version, n = 5): The current Python PATH: /usr/bin/python3
    does not have the Python package "earthengine-api" installed. Are you restarted/terminated.
    your R session after install miniconda or run ee_install()?
    If no do it, please try again:

ee_install(): To create and set a Python environment with all rgee dependencies.
ee_install_set_pyenv(): To set a specific Python environment.
Backtrace:

  1. └─rgee::ee_Initialize() at test-eeImageCollection.R:6:0
  2. └─rgee:::ee_connect_to_py(path = ee_current_version, n = 5)
    ── Error ('test-ops-image.R:7:1'): (code run outside of test_that()) ─────────
    Error in ee_connect_to_py(path = ee_current_version, n = 5): The current Python PATH: /usr/bin/python3
    does not have the Python package "earthengine-api" installed. Are you restarted/terminated.
    your R session after install miniconda or run ee_install()?
    If no do it, please try again:

ee_install(): To create and set a Python environment with all rgee dependencies.
ee_install_set_pyenv(): To set a specific Python environment.
Backtrace:

  1. └─rgee::ee_Initialize() at test-ops-image.R:7:0
  2. └─rgee:::ee_connect_to_py(path = ee_current_version, n = 5)
    ── Error ('test-raster.R:6:1'): (code run outside of test_that()) ────────────
    Error in ee_connect_to_py(path = ee_current_version, n = 5): The current Python PATH: /usr/bin/python3
    does not have the Python package "earthengine-api" installed. Are you restarted/terminated.
    your R session after install miniconda or run ee_install()?
    If no do it, please try again:

ee_install(): To create and set a Python environment with all rgee dependencies.
ee_install_set_pyenv(): To set a specific Python environment.
Backtrace:

  1. └─rgee::ee_Initialize() at test-raster.R:6:0
  2. └─rgee:::ee_connect_to_py(path = ee_current_version, n = 5)
    ── Error ('test-subsetting-image.R:6:1'): (code run outside of test_that()) ──
    Error in ee_connect_to_py(path = ee_current_version, n = 5): The current Python PATH: /usr/bin/python3
    does not have the Python package "earthengine-api" installed. Are you restarted/terminated.
    your R session after install miniconda or run ee_install()?
    If no do it, please try again:

ee_install(): To create and set a Python environment with all rgee dependencies.
ee_install_set_pyenv(): To set a specific Python environment.
Backtrace:

  1. └─rgee::ee_Initialize() at test-subsetting-image.R:6:0
  2. └─rgee:::ee_connect_to_py(path = ee_current_version, n = 5)
    ── Error ('test-subsetting-imagecollection.R:6:1'): (code run outside of test_that()) ──
    Error in ee_connect_to_py(path = ee_current_version, n = 5): The current Python PATH: /usr/bin/python3
    does not have the Python package "earthengine-api" installed. Are you restarted/terminated.
    your R session after install miniconda or run ee_install()?
    If no do it, please try again:

ee_install(): To create and set a Python environment with all rgee dependencies.
ee_install_set_pyenv(): To set a specific Python environment.
Backtrace:

  1. └─rgee::ee_Initialize() at test-subsetting-imagecollection.R:6:0
  2. └─rgee:::ee_connect_to_py(path = ee_current_version, n = 5)
    ── Error ('test-subsetting.R:6:1'): (code run outside of test_that()) ────────
    Error in ee_connect_to_py(path = ee_current_version, n = 5): The current Python PATH: /usr/bin/python3
    does not have the Python package "earthengine-api" installed. Are you restarted/terminated.
    your R session after install miniconda or run ee_install()?
    If no do it, please try again:

ee_install(): To create and set a Python environment with all rgee dependencies.
ee_install_set_pyenv(): To set a specific Python environment.
Backtrace:

  1. └─rgee::ee_Initialize() at test-subsetting.R:6:0
  2. └─rgee:::ee_connect_to_py(path = ee_current_version, n = 5)

[ FAIL 8 | WARN 0 | SKIP 0 | PASS 0 ]
Error: Test failures
Execution halted

R CMD check generated the following check_fails:

  1. no_import_package_as_a_whole
  2. rcmdcheck_tests_pass
  3. rcmdcheck_reasonable_installed_size

Test coverage with covr

ERROR: Test Coverage Failed

Cyclocomplexity with cyclocomp

The following functions have cyclocomplexity >= 15:

function cyclocomplexity
Math.ee.image.Image 29
Ops.ee.image.Image 22

Static code analyses with lintr

lintr found the following 108 potential issues:

message number of times
Avoid library() and require() calls in packages 4
Lines should not be more than 80 characters. 88
Use <-, not ->, for assignment. 16


Package Versions

package version
pkgstats 0.1.3.8
pkgcheck 0.1.2.3


Editor-in-Chief Instructions:

Processing may not proceed until the items marked with ✖️ have been resolved.

@csaybar
Copy link
Author

csaybar commented Sep 18, 2023

@ropensci-review-bot

@maurolepore
Copy link
Member

@csaybar thanks a lot for your submission.

  • Can you confirm you're requesting a review in English?
  • Also, this is part of the Champions program, right?

@mpadge kindly noted that coverage and R CMD check failed due to a missing python dependency that our system can't track. I'll need a bit of time to investigate more. Do you know a good/easy way to provide the required Python environment so that the handling editor and reviewers can hit the ground running?

@csaybar
Copy link
Author

csaybar commented Sep 21, 2023

Hi @maurolepore thank you for your quick response. I just activated the notification button to this issue.

Can you confirm you're requesting a review in English?

Yes, I'd prefer to do it in English

Also, this is part of the Champions program, right?

Yes, I'm part of the program and my mentor is Marc Choisy @choisy.

Unfortunately, I haven't been able to resolve the issues related to Python dependencies. These are the same ones you can find in the pangoling package review. The Python coverage when it is evaluated in an ENV with the Python envs is around 95%. See https://app.codecov.io/gh/csaybar/rgeeExtra/tree/master/R

The flag "The following functions have no documented return values: [ee_length_ic, ee_length, ee_name_ic, ee_name, ee_subsetting, extra_Initialize, Math-methods, Ops-methods, Summary-methods] have been solved in rgee 0.0.1.999.
"

@csaybar
Copy link
Author

csaybar commented Sep 21, 2023

@ropensci-review-bot

@maurolepore
Copy link
Member

Great, thanks for pointing me to pangoling. I'll explore how they handled installation during review.

@maurolepore
Copy link
Member

@ropensci-review-bot assign @maurolepore as editor

@ropensci-review-bot
Copy link
Collaborator

Assigned! @maurolepore is now the editor

@maurolepore
Copy link
Member

maurolepore commented Sep 22, 2023

@csaybar, I self-assigned to be the handling editor. I think this makes sense because I would like to explore the installation process, I'm part of the Champions program, and I'm available.

I'll start working on the handling-editor's checklist. In the meantime, could you please list three potential reviewers?

Following our guidelines I'll use no more than one of them, but it's useful to have a few options and also to see the range of expertise you think is helpful.

@csaybar
Copy link
Author

csaybar commented Sep 22, 2023

Hi, @maurolepore,

@zackarno : tidyrgee creator. Experience using GEE and R.

@giswqs: geemap creator. Experience using GEE and R.

@yabellini: Experience using GEE and R.

@ricds: Experience using GEE and R.

@maurolepore
Copy link
Member

maurolepore commented Sep 26, 2023

@csaybar,

I can successfully install rgeeExtra but fail to run the example in README. The reprex below shows a number of helpful error messages. Although I don't show it here, I did put substantial effort in trying to follow the advice but still failed to complete the example :-(

library(rgee)
library(rgeeExtra)

ee_Initialize()
#> Welcome to the Earth Engine client library for R!
#> ----------------------------------------------------------------
#> It seems it is your first time using rgee. First off, keep in mind that
#> Google Earth Engine is only available to registered users, check the
#> official website https://earthengine.google.com/ to get more information.
#> 
#> Before start coding is necessary to set up a Python environment. Run
#> rgee::ee_install() to set up automatically, after that, restart the R
#> session to see changes. See more than 300+ examples of rgee at
#> https://r-earthengine.github.io/.
#> 
#> rgee will need to create the environmental variable "EARTHENGINE_INIT_MESSAGE"
#> in your system to avoid you recieve this message again.
#> Would you like to stop to receive this message? [Y/n]:
#> Error in ee_connect_to_py(path = ee_current_version, n = 5): The current Python PATH: /usr/local/bin/python3
#> does not have the Python package "earthengine-api" installed. Are you restarted/terminated.
#> your R session after install miniconda or run ee_install()?
#> If no do it, please try again:
#> > ee_install(): To create and set a Python environment with all rgee dependencies.
#> > ee_install_set_pyenv(): To set a specific Python environment.
extra_Initialize()
#>  ✔ Initializing ee_Extra module:
#> Error in ee_connect_to_py(path = ee_current_version, n = 5): The current Python PATH: /usr/local/bin/python3
#> does not have the Python package "earthengine-api" installed. Do you restarted/terminated
#> your R session after install miniconda or run ee_install()?
#> If this is not the case, try:
#> > reticulate::use_python(): Refresh your R session and manually set the Python environment with all rgee dependencies.
#> > ee_install(): To create and set a Python environment with all rgee dependencies.
#> > ee_install_set_pyenv(): To set a specific Python environment.

img <- ee$Image("LANDSAT/LC08/C01/T1_SR/LC08_038029_20180810")
#> List of 22
#>  $ python              : chr "/usr/local/bin/python3"
#>  $ libpython           : chr "/opt/python/3.8.17/lib/libpython3.8.so"
#>  $ pythonhome          : chr "/opt/python/3.8.17:/opt/python/3.8.17"
#>  $ pythonpath          : chr "/cloud/lib/x86_64-pc-linux-gnu-library/4.3/reticulate/config:/home/r68453/.local/lib/python3.8/site-packages:/o"| __truncated__
#>  $ prefix              : chr "/opt/python/3.8.17"
#>  $ exec_prefix         : chr "/opt/python/3.8.17"
#>  $ base_exec_prefix    : chr "/opt/python/3.8.17"
#>  $ virtualenv          : chr ""
#>  $ virtualenv_activate : chr ""
#>  $ executable          : chr "/usr/local/bin/python3"
#>  $ base_executable     : chr "/usr/local/bin/python3"
#>  $ version_string      : chr "3.8.17 (default, Jun  6 2023, 15:28:08)  [GCC 9.4.0]"
#>  $ version             : chr "3.8"
#>  $ architecture        : chr "64bit"
#>  $ anaconda            : logi FALSE
#>  $ conda               : chr "False"
#>  $ numpy               : NULL
#>  $ required_module     : chr "ee"
#>  $ required_module_path: NULL
#>  $ available           : logi TRUE
#>  $ python_versions     : chr "/usr/local/bin/python3"
#>  $ forced              : chr "RETICULATE_PYTHON_FALLBACK"
#>  - attr(*, "class")= chr "py_config"
#> Error: Python module ee was not found.
#> 
#> Detected Python configuration:
ndvi <- (img[["B5"]] - img[["B4"]])/(img[["B5"]] + img[["B4"]])**2
#> Error in eval(expr, envir, enclos): object 'img' not found
names(ndvi) <- "pow_ndvi"
#> Error: object 'ndvi' not found

Map$centerObject(img,zoom=12)
#> Error in eval(expr, envir, enclos): object 'img' not found
Map$addLayer(img)
#> The legacy packages maptools, rgdal, and rgeos, underpinning the sp package,
#> which was just loaded, will retire in October 2023.
#> Please refer to R-spatial evolution reports for details, especially
#> https://r-spatial.org/r/2023/05/15/evolution4.html.
#> It may be desirable to make the sf package available;
#> package maintainers should consider adding sf to Suggests:.
#> The sp package is now running under evolution status 2
#>      (status 2 uses the sf package in place of rgdal)
#> Error in eval(expr, envir, enclos): object 'img' not found

Created on 2023-09-26 with reprex v2.0.2

In the installation instructions of rgee I see you point to a posit.cloud project with a file that aims to quickly help a new user set everything up in a fresh environment. That seems like a good idea. Could you please do it also for rgeeExtra, so that I and the reviewers can install the package as quickly as possible?

Note however that on posit.cloud I fail to install rgee because I seem to need gcloud and I can't use sudo to install it because it's password-protected. Here is the project I used. You'll see some FIXME that explain my struggles. As rgeeExtra depends on rgee I guess simplifying the installation of rgee will also help with rgeeExtra?

If posit.cloud limits the system dependencies we can install, how else can we quickly create a working environment for the reviewers? Would it help to have a Docker image on r-hub or a Dockerfile in the repo?

@csaybar
Copy link
Author

csaybar commented Sep 27, 2023

Hi @maurolepore,

I will prepare a reproducible demo in posit/colab over the weekend to facilitate the review process.

I will be sure to keep you updated.

@csaybar
Copy link
Author

csaybar commented Sep 30, 2023

Hi @maurolepore

Here is an example of how to use rgeeExtra in posit cloud.
https://posit.cloud/content/6670766

It is important that the rgeeExtra user has a GEE account.

Unfortunately, positCloud does not have a way to send the token back (I tried to solve this problem a year ago). Kevin Ushey, explain this here

"It's an unfortunate limitation of system() in RStudio; we currently don't have a way of routing stdin from the R process to subprocesses. You could instead run this in a separate Terminal instance for now."

image

So the rgee user who wants to use PositCloud should do so through the terminal using:

$ earthengine authenticate --auth_mode notebook

image

After that rgee & rgeeExtral will work perfectly! I attached two examples that show rgeeExtra features.

image

Feel free to reach out if there's anything I can assist you with!

@maurolepore
Copy link
Member

maurolepore commented Oct 10, 2023

Thanks @csaybar,

I'm sorry for the delay.

I tried your instructions for installation and usage a few times. I arrived to the version below that seems succinct and functional. What do you think?

After your review it would be nice to edit README to ensure the smoothest experience for anyone trying to install and use the package.


Installation

install.packages("remotes")
remotes::install_github("r-spatial/rgee")
remotes::install_github("r-earthengine/rgeeExtra")
rgee::ee_install()

Authenticate with Google Earth Engine

# Run in the Terminal (not in the R console)
earthengine authenticate --auth_mode notebook

Example

library(rgee)
library(rgeeExtra)

ee_Initialize()
#> ── rgee 1.1.7 ─────────────────────────────────────── earthengine-api 0.1.374 ── 
#>  ✔ user: not_defined 
#>  ✔ Initializing Google Earth Engine:Initializing Google Earth Engine:  DONE!
#> Earth Engine account: users/mauro-test 
#> Python Path: /cloud/project/rgee/bin/python 
#> ────────────────────────────────────────────────────────────────────────────────
extra_Initialize()
#>  ✔ Initializing ee_Extra module:Initializing ee_Extra module:  DONE!

img <- ee$Image("LANDSAT/LC08/C01/T1_SR/LC08_038029_20180810")
ndvi <- (img[["B5"]] - img[["B4"]])/(img[["B5"]] + img[["B4"]])**2
names(ndvi) <- "pow_ndvi"

Map$centerObject(img,zoom=12)
Map$addLayer(img)
#> The legacy packages maptools, rgdal, and rgeos, underpinning the sp package,
#> which was just loaded, were retired in October 2023.
#> Please refer to R-spatial evolution reports for details, especially
#> https://r-spatial.org/r/2023/05/15/evolution4.html.
#> It may be desirable to make the sf package available;
#> package maintainers should consider adding sf to Suggests:.

Now that I can install the package I will continue with all other editor checks.

@ropensci ropensci deleted a comment from ropensci-review-bot Oct 14, 2023
@maurolepore
Copy link
Member

@ropensci-review-bot check package

@ropensci-review-bot
Copy link
Collaborator

Thanks, about to send the query.

@ropensci-review-bot
Copy link
Collaborator

🚀

Editor check started

👋

@ropensci-review-bot
Copy link
Collaborator

Checks for rgeeExtra (v0.0.1.999)

git hash: 65d95062

  • ✔️ Package name is available
  • ✔️ has a 'codemeta.json' file.
  • ✔️ has a 'contributing' file.
  • ✔️ uses 'roxygen2'.
  • ✔️ 'DESCRIPTION' has a URL field.
  • ✔️ 'DESCRIPTION' has a BugReports field.
  • ✔️ Package has at least one HTML vignette
  • ✔️ All functions have examples.
  • ✔️ Package has continuous integration checks.
  • ✖️ Package coverage failed
  • ✖️ R CMD check found 1 error.
  • ✔️ R CMD check found no warnings.

Important: All failing checks above must be addressed prior to proceeding

Package License: Apache License (>= 2)


1. Package Dependencies

Details of Package Dependency Usage (click to open)

The table below tallies all function calls to all packages ('ncalls'), both internal (r-base + recommended, along with the package itself), and external (imported and suggested packages). 'NA' values indicate packages to which no identified calls to R functions could be found. Note that these results are generated by an automated code-tagging system which may not be entirely accurate.

type package ncalls
internal base 71
internal rgeeExtra 38
internal graphics 5
internal stats 2
imports magrittr 70
imports rgee 29
imports reticulate 5
imports crayon NA
imports cli NA
suggests sf 2
suggests magick 1
suggests testthat NA
suggests googledrive NA
suggests googleCloudStorageR NA
suggests geojsonio NA
suggests stars NA
suggests knitr NA
suggests rmarkdown NA
linking_to NA NA

Click below for tallies of functions used in each package. Locations of each call within this package may be generated locally by running 's <- pkgstats::pkgstats(<path/to/repo>)', and examining the 'external_calls' table.

base

c (13), list (12), length (9), drop (6), for (4), lapply (3), which (3), mode (2), names (2), seq_along (2), sprintf (2), all (1), args (1), basename (1), diff (1), dirname (1), gsub (1), rep (1), scale (1), source (1), system.file (1), tempfile (1), try (1), url (1)

magrittr

%>% (70)

rgeeExtra

ee_get (3), ee_connect_to_py (2), ee_new_list_name (2), ee_source_python (2), ee_check_packages (1), ee_image_getCitation (1), ee_image_getDOI (1), ee_Image_getOffsetParams (1), ee_Image_getScaleParams (1), ee_Image_getSTAC (1), ee_Image_maskClouds (1), ee_Image_matchHistogram (1), ee_Image_panSharpen (1), ee_Image_preprocess (1), ee_Image_scaleAndOffset (1), ee_Image_spectralIndex (1), ee_Image_tasseledCap (1), ee_ImageCollection_closest (1), ee_ImageCollection_getCitation (1), ee_ImageCollection_getDOI (1), ee_ImageCollection_getOffsetParams (1), ee_ImageCollection_getScaleParams (1), ee_ImageCollection_getSTAC (1), ee_ImageCollection_panSharpen (1), ee_ImageCollection_preprocess (1), ee_ImageCollection_scaleAndOffset (1), ee_ImageCollection_spectralIndex (1), ee_ImageCollection_tasseledCap (1), ee_maxValue (1), ee_minValue (1), Math.ee.image.Image (1), Ops.ee.image.Image (1), Summary.ee.image.Image (1)

rgee

ee_as_sf (4), sf_as_ee (4), ee$ImageCollection (3), ee$ImageCollection$first (2), ee$ImageCollection$toList (2), ee$List$get (2), ee$Reducer$max (2), ee$Image (1), ee$Image$abs (1), ee$Image$bandNames (1), ee$Image$pow (1), ee$Image$unmask (1), ee$ImageCollection$getVideoThumbURL (1), ee$List$length (1), ee$List$sequence (1), ee$Number$format (1), ee$Reducer$min (1)

graphics

image (5)

reticulate

import_from_path (4), py_discover_config (1)

sf

st_cast (2)

stats

offset (2)

magick

image_read (1)

NOTE: Some imported packages appear to have no associated function calls; please ensure with author that these 'Imports' are listed appropriately.


2. Statistical Properties

This package features some noteworthy statistical properties which may need to be clarified by a handling editor prior to progressing.

Details of statistical properties (click to open)

The package has:

  • code in R (100% in 12 files) and
  • 1 authors
  • 2 vignettes
  • no internal data file
  • 5 imported packages
  • 45 exported functions (median 4 lines of code)
  • 63 non-exported functions in R (median 8 lines of code)

Statistical properties of package structure as distributional percentiles in relation to all current CRAN packages
The following terminology is used:

  • loc = "Lines of Code"
  • fn = "function"
  • exp/not_exp = exported / not exported

All parameters are explained as tooltips in the locally-rendered HTML version of this report generated by the checks_to_markdown() function

The final measure (fn_call_network_size) is the total number of calls between functions (in R), or more abstract relationships between code objects in other languages. Values are flagged as "noteworthy" when they lie in the upper or lower 5th percentile.

measure value percentile noteworthy
files_R 12 65.5
files_vignettes 2 85.7
files_tests 9 89.6
loc_R 826 62.7
loc_vignettes 120 31.3
loc_tests 477 74.0
num_vignettes 2 89.2
n_fns_r 108 78.4
n_fns_r_exported 45 86.2
n_fns_r_not_exported 63 73.5
n_fns_per_file_r 6 75.7
num_params_per_fn 2 11.9
loc_per_fn_r 5 8.1
loc_per_fn_r_exp 4 4.3 TRUE
loc_per_fn_r_not_exp 8 22.6
rel_whitespace_R 15 59.3
rel_whitespace_vignettes 50 45.3
rel_whitespace_tests 31 80.2
doclines_per_fn_exp 29 31.0
doclines_per_fn_not_exp 0 0.0 TRUE
fn_call_network_size 13 37.5

2a. Network visualisation

Click to see the interactive network visualisation of calls between objects in package


3. goodpractice and other checks

Details of goodpractice checks (click to open)

3a. Continuous Integration Badges

![R-CMD-check.yaml](https://github.com/r-earthengine/rgeeExtra/actions/workflows/R-CMD-check.yaml"><img src="https://github.com/r-earthengine/rgeeExtra/actions/workflows/R-CMD-check.yaml/badge.svg)

GitHub Workflow Results

id name conclusion sha run_number date
5917635570 Commands success 887d78 13 2023-08-20
6262266802 pages build and deployment success e345bb 11 2023-09-21
6262223266 pkgdown success 65d950 30 2023-09-21
6262223271 R-CMD-check failure 65d950 30 2023-09-21
6262223262 test-coverage failure 65d950 5 2023-09-21

3b. goodpractice results

R CMD check with rcmdcheck

R CMD check generated the following error:

  1. checking tests ...
    Running ‘testthat.R’
    ERROR
    Running the tests in ‘tests/testthat.R’ failed.
    Last 13 lines of output:
    your R session after install miniconda or run ee_install()?
    If this is not the case, try:

ee_install_upgrade(): Install the latest Earth Engine Python version.
reticulate::use_python(): Refresh your R session and manually set the Python environment with all rgee dependencies.
ee_install(): To create and set a Python environment with all rgee dependencies.
ee_install_set_pyenv(): To set a specific Python environment.
Backtrace:

  1. └─rgee::ee_Initialize() at test-subsetting.R:6:0
  2. └─rgee:::ee_check_init()
  3. └─rgee:::ee_connect_to_py(path = ee_current_version, n = 5)
    

[ FAIL 8 | WARN 0 | SKIP 0 | PASS 0 ]
Error: Test failures
Execution halted

R CMD check generated the following note:

  1. checking installed package size ... NOTE
    installed size is 6.2Mb
    sub-directories of 1Mb or more:
    doc 4.3Mb
    ee_extra 1.6Mb

R CMD check generated the following test_fail:

  1. library(testthat)

library(rgee)
library(rgeeExtra)
library(stars)
Loading required package: abind
Loading required package: sf
Linking to GEOS 3.10.2, GDAL 3.4.3, PROJ 8.2.0; sf_use_s2() is TRUE
library(sf)

if (identical(Sys.getenv("NOT_CRAN"), "true")) {

  • test_check("rgeeExtra")
  • }
    [ FAIL 8 | WARN 0 | SKIP 0 | PASS 0 ]

══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-ee_gif.R:8:1'): (code run outside of test_that()) ────────────
Error in ee_connect_to_py(path = ee_current_version, n = 5): The current Python PATH: /usr/bin/python3
does not have the Python package "earthengine-api" installed. Do you restarted/terminated
your R session after install miniconda or run ee_install()?
If this is not the case, try:

ee_install_upgrade(): Install the latest Earth Engine Python version.
reticulate::use_python(): Refresh your R session and manually set the Python environment with all rgee dependencies.
ee_install(): To create and set a Python environment with all rgee dependencies.
ee_install_set_pyenv(): To set a specific Python environment.
Backtrace:

  1. └─rgee::ee_Initialize() at test-ee_gif.R:8:0
  2. └─rgee:::ee_check_init()
  3. └─rgee:::ee_connect_to_py(path = ee_current_version, n = 5)
    

── Error ('test-ee_image.R:6:1'): (code run outside of test_that()) ──────────
Error in ee_connect_to_py(path = ee_current_version, n = 5): The current Python PATH: /usr/bin/python3
does not have the Python package "earthengine-api" installed. Do you restarted/terminated
your R session after install miniconda or run ee_install()?
If this is not the case, try:

ee_install_upgrade(): Install the latest Earth Engine Python version.
reticulate::use_python(): Refresh your R session and manually set the Python environment with all rgee dependencies.
ee_install(): To create and set a Python environment with all rgee dependencies.
ee_install_set_pyenv(): To set a specific Python environment.
Backtrace:

  1. └─rgee::ee_Initialize() at test-ee_image.R:6:0
  2. └─rgee:::ee_check_init()
  3. └─rgee:::ee_connect_to_py(path = ee_current_version, n = 5)
    

── Error ('test-eeImageCollection.R:6:1'): (code run outside of test_that()) ──
Error in ee_connect_to_py(path = ee_current_version, n = 5): The current Python PATH: /usr/bin/python3
does not have the Python package "earthengine-api" installed. Do you restarted/terminated
your R session after install miniconda or run ee_install()?
If this is not the case, try:

ee_install_upgrade(): Install the latest Earth Engine Python version.
reticulate::use_python(): Refresh your R session and manually set the Python environment with all rgee dependencies.
ee_install(): To create and set a Python environment with all rgee dependencies.
ee_install_set_pyenv(): To set a specific Python environment.
Backtrace:

  1. └─rgee::ee_Initialize() at test-eeImageCollection.R:6:0
  2. └─rgee:::ee_check_init()
  3. └─rgee:::ee_connect_to_py(path = ee_current_version, n = 5)
    

── Error ('test-ops-image.R:7:1'): (code run outside of test_that()) ─────────
Error in ee_connect_to_py(path = ee_current_version, n = 5): The current Python PATH: /usr/bin/python3
does not have the Python package "earthengine-api" installed. Do you restarted/terminated
your R session after install miniconda or run ee_install()?
If this is not the case, try:

ee_install_upgrade(): Install the latest Earth Engine Python version.
reticulate::use_python(): Refresh your R session and manually set the Python environment with all rgee dependencies.
ee_install(): To create and set a Python environment with all rgee dependencies.
ee_install_set_pyenv(): To set a specific Python environment.
Backtrace:

  1. └─rgee::ee_Initialize() at test-ops-image.R:7:0
  2. └─rgee:::ee_check_init()
  3. └─rgee:::ee_connect_to_py(path = ee_current_version, n = 5)
    

── Error ('test-raster.R:6:1'): (code run outside of test_that()) ────────────
Error in ee_connect_to_py(path = ee_current_version, n = 5): The current Python PATH: /usr/bin/python3
does not have the Python package "earthengine-api" installed. Do you restarted/terminated
your R session after install miniconda or run ee_install()?
If this is not the case, try:

ee_install_upgrade(): Install the latest Earth Engine Python version.
reticulate::use_python(): Refresh your R session and manually set the Python environment with all rgee dependencies.
ee_install(): To create and set a Python environment with all rgee dependencies.
ee_install_set_pyenv(): To set a specific Python environment.
Backtrace:

  1. └─rgee::ee_Initialize() at test-raster.R:6:0
  2. └─rgee:::ee_check_init()
  3. └─rgee:::ee_connect_to_py(path = ee_current_version, n = 5)
    

── Error ('test-subsetting-image.R:6:1'): (code run outside of test_that()) ──
Error in ee_connect_to_py(path = ee_current_version, n = 5): The current Python PATH: /usr/bin/python3
does not have the Python package "earthengine-api" installed. Do you restarted/terminated
your R session after install miniconda or run ee_install()?
If this is not the case, try:

ee_install_upgrade(): Install the latest Earth Engine Python version.
reticulate::use_python(): Refresh your R session and manually set the Python environment with all rgee dependencies.
ee_install(): To create and set a Python environment with all rgee dependencies.
ee_install_set_pyenv(): To set a specific Python environment.
Backtrace:

  1. └─rgee::ee_Initialize() at test-subsetting-image.R:6:0
  2. └─rgee:::ee_check_init()
  3. └─rgee:::ee_connect_to_py(path = ee_current_version, n = 5)
    

── Error ('test-subsetting-imagecollection.R:6:1'): (code run outside of test_that()) ──
Error in ee_connect_to_py(path = ee_current_version, n = 5): The current Python PATH: /usr/bin/python3
does not have the Python package "earthengine-api" installed. Do you restarted/terminated
your R session after install miniconda or run ee_install()?
If this is not the case, try:

ee_install_upgrade(): Install the latest Earth Engine Python version.
reticulate::use_python(): Refresh your R session and manually set the Python environment with all rgee dependencies.
ee_install(): To create and set a Python environment with all rgee dependencies.
ee_install_set_pyenv(): To set a specific Python environment.
Backtrace:

  1. └─rgee::ee_Initialize() at test-subsetting-imagecollection.R:6:0
  2. └─rgee:::ee_check_init()
  3. └─rgee:::ee_connect_to_py(path = ee_current_version, n = 5)
    

── Error ('test-subsetting.R:6:1'): (code run outside of test_that()) ────────
Error in ee_connect_to_py(path = ee_current_version, n = 5): The current Python PATH: /usr/bin/python3
does not have the Python package "earthengine-api" installed. Do you restarted/terminated
your R session after install miniconda or run ee_install()?
If this is not the case, try:

ee_install_upgrade(): Install the latest Earth Engine Python version.
reticulate::use_python(): Refresh your R session and manually set the Python environment with all rgee dependencies.
ee_install(): To create and set a Python environment with all rgee dependencies.
ee_install_set_pyenv(): To set a specific Python environment.
Backtrace:

  1. └─rgee::ee_Initialize() at test-subsetting.R:6:0
  2. └─rgee:::ee_check_init()
  3. └─rgee:::ee_connect_to_py(path = ee_current_version, n = 5)
    

[ FAIL 8 | WARN 0 | SKIP 0 | PASS 0 ]
Error: Test failures
Execution halted

R CMD check generated the following check_fails:

  1. no_import_package_as_a_whole
  2. rcmdcheck_tests_pass
  3. rcmdcheck_reasonable_installed_size

Test coverage with covr

ERROR: Test Coverage Failed

Cyclocomplexity with cyclocomp

The following functions have cyclocomplexity >= 15:

function cyclocomplexity
Math.ee.image.Image 29
Ops.ee.image.Image 22

Static code analyses with lintr

lintr found the following 111 potential issues:

message number of times
Avoid library() and require() calls in packages 4
Lines should not be more than 80 characters. 91
Use <-, not ->, for assignment. 16


Package Versions

package version
pkgstats 0.1.3.9
pkgcheck 0.1.2.9


Editor-in-Chief Instructions:

Processing may not proceed until the items marked with ✖️ have been resolved.

@csaybar
Copy link
Author

csaybar commented Oct 15, 2023

Hi @maurolepore, we know that setting up an environment with both Python and R can be a bit tiring. Unfortunately, there's not much we can do from our end since the connection relies on reticulate. I've updated the README for rgeeExtra and included a link that explains how to install rgee Python dependencies. Hope it can help.

@maurolepore
Copy link
Member

maurolepore commented Oct 15, 2023

Editor checks:

  • Documentation: The package has sufficient documentation available online (README, pkgdown docs) to allow for an assessment of functionality and scope without installing the package. In particular,
    • Is the case for the package well made?
    • Is the reference index page clear (grouped by topic if necessary)?
    • Are vignettes readable, sufficiently detailed and not just perfunctory?
  • Fit: The package meets criteria for fit and overlap.
  • Installation instructions: Are installation instructions clear enough for human users?
  • Tests: If the package has some interactivity / HTTP / plot production etc. are the tests using state-of-the-art tooling?
  • Contributing information: Is the documentation for contribution clear enough e.g. tokens for tests, playgrounds?
  • License: The package has a CRAN or OSI accepted license.
  • Project management: Are the issue and PR trackers in a good shape, e.g. are there outstanding bugs, is it clear when feature requests are meant to be tackled?

Editor comments

@csaybar,

To help you track my comments, I'll label them with "ml" and a numerical sequence like ml01, ml02, and so on. Bullets and checkboxes mark whether or not I expect input from you:

  • Comments starting with "bullet" (like this one) suggest things that do not require your action or response.
  • Comments starting with "checkbox" (like this one) ask for things that require your action and response.

--

The package has sufficient documentation available online (README, pkgdown docs) to allow for an assessment of functionality and scope without installing the package.

  • ml01. In all code examples please show not only the code but also its outout. This will help the reviewers and users to assess the package functionality without installing the package and running the code.

You may evaluate code chunks in .Rmd or .qmd documents or with the reprex package. It's best to use the option comment = "#>" so that the motivated reader can copy/paste/run without errors.

Is the case for the package well made?

  • ml02. Please Answer "Why rgeeExtra is needed?" at the top of README. That location is the most useful for reviewers and new users.

Note the output of usethis::use_readme_rmd() starts with "The goal of {{{ Package }}} is to ...".

Currently the top of README talks about GEE and rgee but not rgeeExtra (What is Google Earth Engine?). The reader sees the Installation of rgeeExtra before knowing about it.

I think the best case for the package is made at top of the Features article. Moving this text to the top or README and rewording it to answer "why" rather than "what" would solve the problem :-)

rgeeExtra serves as a wrapper for the Python package named eeExtra. The creation of eeExtra was driven by a need to consolidate various third-party GEE packages and projects found on GitHub.

rgeeExtra ensures a seamless integration of these projects across different programming languages by standardizing methods and facilitating the use of JavaScript code projects beyond the traditional Code Editor environment.

Also in other places I see text that can help make the case for the package:

https://r-earthengine.com/rgeeExtra/articles/Introduction.html:

rgeeExtra is an extension of the rgee package, enhancing the capabilities of Google Earth Engine (GEE) integration within the R environment.

https://r-earthengine.com/rgeeExtra/index.html#how-does-it-work:

The rgeeExtra extends the following Earth Engine classes: ...

Is the reference index page clear (grouped by topic if necessary)?

Are vignettes readable, sufficiently detailed and not just perfunctory?

  • ml04. The content of the articles seems very useful, and relocating some of it can help to ensure the content reaches reviewers and users where they most commonly need it and expect it. For example:

    • Make the case for the package at the top of README (moving text from the article "Features" as suggested above).
    • Show installation only in README, before the first usage of the package, and ask multiple new users to confirm they can install and use the package by following the instructions in the exact order they are presented in the installation section in README and its links.
    • Turn the article Introduction into the common "Get started" article (via usethis::use_article("name-of-your-package")). Remove the installation section and instead point to the installation in README. If you keep installation instructions, ensure they come before (not after) the first example of usage. Considering explaining the code in prose step by step, rather than showing a big code-chunk then explaining it at all at once the end. The final figure seems misplaced. It would be more natural to see a plot as the output of a code chunk -- so it should follow the code, not the prose.

Fit: The package meets criteria for fit and overlap.

Installation instructions: Are installation instructions clear enough for human users?

  • ml06. "As is" the installation instructions in README didn't work for me. After several iterations I arrived to
    a this revision: rgeeExtra: An extensions for 'rgee' #608 (comment).
    I suggest asking other newbies like me to try it before asking the reviewers to install it. The limited reviewer's time and energy will be better spent in providing more interesting feedback.

Tests: If the package has some interactivity / HTTP / plot production etc. are the tests using state-of-the-art tooling?

  • ml07. As much as possible please move tests setup code from each test file to a single setup.R file, a test helper, or other advanced testing techniques.

  • ml08. Please help me understand why there are many more functions in the reference index than test-files? It's common for each R/exported_function.R to have a corresponding test/testthat/test-exported_function.R.

  • ml09. Please address the R CMD check failure on GitHub. The last passing commit dates August 18, 2023: https://github.com/r-earthengine/rgeeExtra/commits/master. Do you need to fix some test, or maybe use skip_on_ci() or some other test-helper?

Contributing Is: information the documentation for contribution clear enough e.g. tokens for tests, playgrounds?

  • ml10. Is there any place in the docs where you explain how a contributor or user gets an account with GEE and a token? If not, please add it to the installation instrucitons or wherever you think it's most needed.

License: The package has a CRAN or OSI accepted license.

Yes.

Project management: Are the issue and PR trackers in a good shape, e.g. are there outstanding bugs, is it clear when feature requests are meant to be tackled?

  • ml11. Please review the open issues. The total number of issues is fairly small, and it seems you may be able to close some already (e.g. 4, 5). For the remaining open issues, it would be nice to see a comment where you explain if you plan to address them. It's important to show the reviewers that we've made as much progress on our own before asking their feedback.

Also

  • Running the exmple in README throws:
#> The legacy packages maptools, rgdal, and rgeos, underpinning the sp package,
#> which was just loaded, were retired in October 2023.
#> Please refer to R-spatial evolution reports for details, especially
#> https://r-spatial.org/r/2023/05/15/evolution4.html.
#> It may be desirable to make the sf package available;
#> package maintainers should consider adding sf to Suggests:.

I'm puzzled. Both rgee and rgeeExtra are alraedy using sf. Do you know where this is comming from?

@maurolepore
Copy link
Member

@csaybar,

Thanks for your patience. My feedback took time but I hope it will also save reviewers time later. Please address my comments before I start searching for reviewers.

@ropensci ropensci deleted a comment from ropensci-review-bot Oct 16, 2023
@csaybar
Copy link
Author

csaybar commented Oct 22, 2023

Hi @maurolepore, I apologize for the delayed response, and I quite appreciate all your comments. I plan to begin addressing your feedback during the next week. Have a good weekend!

@csaybar
Copy link
Author

csaybar commented Nov 23, 2023

Hi, @maurolepore! I'm pleased to inform you that a new version of RgeeExtra has been released (v0.1.0). We've made comprehensive improvements to the documentation and included numerous additional examples. Please find attached the responses addressing all your comments. https://r-earthengine.com/rgeeExtra/
Demo here: https://posit.cloud/content/6670766

m01

We have updated our example documentation to include both code and their corresponding outputs. This enhancement facilitates a better understanding and allows readers to easily copy, paste, and execute examples without any issues, aligning with the core idea of rgeeExtra, improving the user experience of R users when they have to use GEE APi.

m02

The updated README now clearly explains the goal and the why of rgeeExtra at the top, providing more clarity to new users.

m03

The support for R6 classes in roxygen2/pkgdown (reticulate) is still a bit buggy, we have been trying some workarounds, and now the method classes are available in the reference index.

m06

The installation instructions in the README have been revised and tested in Windows and Linux OS, ensuring they are clear and functional for all users.

m07/08/09

We have ensured that each function in the R/ folder has a corresponding test file in test/testthat/. We updated the codecov state: https://app.codecov.io/github/csaybar/rgeeExtra/tree/master
All the 135 now pass successfully.

m10

We include the following line in the installation section: 'For additional details on connecting GEE and R, refer to the information provided here. To set up an account, click here.'"

m11

We have made a lot of changes to the API in the past, and all the issues reported were associated with previous versions that are no longer supported. For the first time, we have released a stable version (v.0.1.0), and our intention from now is to maintain its stability respecting the API, we decided.

Regarding the R spatial legacy dependency issues, we currently have an indirect dependency on leafletExtra2. Unfortunately, this package has not yet initiated the transition to sf.

@maurolepore
Copy link
Member

Thanks a lot @csaybar!

Over the next few days I'll review your response and move on to searching for reviewers.

@ropensci-review-bot
Copy link
Collaborator

📆 @nmorandeira you have 2 days left before the due date for your review (2023-12-26).

@ropensci-review-bot
Copy link
Collaborator

📆 @zackarno you have 2 days left before the due date for your review (2023-12-26).

@maurolepore
Copy link
Member

Happy new year everyone!

@nmorandeira and @zackarno, I see your due date was inconveniently in the holiday period, so I think it's fair to expect your reviews a bit later than scheduled. Looking forward to them.

@maurolepore
Copy link
Member

Feliz 2024 @mdelfin. Por favor nota que este no es el lugar para hacer preguntas sobre el paquete. Por favor dirigijte a https://github.com/r-earthengine/rgeeExtra/issues

@zackarno
Copy link

zackarno commented Jan 3, 2024

Happy new years! @maurolepore thanks ! I'm hoping/aiming to get it finished this week!

@zackarno
Copy link

zackarno commented Jan 6, 2024

@csaybar - Thanks for the fantastic package and the chance to review! I look forward to incorporating it into my work and exploring more use-cases over time!

I attempted to limit the scope of my review to just {rgeeExtra}, avoid {rgee} functionality, and also not dig into the EE_extra/EE-Mont python packages which are wrapped.

Below is my review, I tried to tag each comment with a #uid for ease of referencing.There is so much cool stuff here that I feel like I could keep digging for a while longer, but will have to stop myself here:

Package Review

Please check off boxes as applicable, and elaborate in comments below. Your review is not limited to these topics, as described in the reviewer guide

  • Briefly describe any working relationship you have (had) with the package authors.
  • As the reviewer I confirm that there are no conflicts of interest for me to review this work (if you are unsure whether you are in conflict, please speak to your editor before starting your review).

Documentation

The package includes all the following forms of documentation:

  • A statement of need: clearly stating problems the software is designed to solve and its target audience in README
  • Installation instructions: for the development version of package and any non-standard dependencies in README
    • all good, but I added something as a nice-to- have below!
  • Vignette(s): demonstrating major functionality that runs successfully locally
    • see below issue/bugs found in vignettes that causes them not to run properly
  • Function Documentation: for all exported functions
    • see Documentation - Functions section
  • Examples: (that run successfully locally) for all exported functions
    • see Documentation - Examples section
  • Community guidelines: including contribution guidelines in the README or CONTRIBUTING, and DESCRIPTION with URL, BugReports and Maintainer (which may be autogenerated via Authors@R).

Functionality

  • Installation: Installation succeeds as documented.
  • Functionality: Any functional claims of the software have been confirmed.
    • See Functionality - Functionality section below
  • Performance: Any performance claims of the software have been confirmed.
  • Automated tests: Unit tests cover essential functions of the package and a reasonable range of inputs and conditions. All tests pass on the local machine.
  • Packaging guidelines: The package conforms to the rOpenSci packaging guidelines.

Estimated hours spent reviewing: 16 - probably longer than it should have given it was my first review.

  • Should the author(s) deem it appropriate, I agree to be acknowledged as a package reviewer ("rev" role) in the package DESCRIPTION file.

Review Comments

General Comments

  • One thing I found challenging about this package is that its not straight forward to get help with
    "?function_name" syntax. In {rgee} you are able to do it through ee_help() which is not as straight forward as "?function_name", but still better than nothing. Would there be a way to implement either ee_help() or ?function_name help here? #za_gc1

  • It would be nice if the How does it work section of the readme explained a bit more about it's relation to ee_extra/eemont/spectralIndex python packages. #za_gc2

    • For most of this review I had thought you were just porting eemont functions over to rgeeExtra with reticulate, but at the end just realized that ee_extra (python) in the inst folder. Is that coming from: ee_extra package?
  • It could be useful, especially for contributors, if the scope of the package was more clearly defined. The package naming makes it sounds like it could be a grab bag for all sorts of miscellaneous useful functions, but I don't think that is really the intent. Also as it is largely built in python, would you want to keep it that way or be open to more R development? I know that a lot of R development would be through {rgee} which wraps python, but it's still different than writing python to contribute to the ee_extra package - does that make sense? #za_gc3

  • There are some nice defensive assertions you put in place on certain functions particularly the subsetting functions. I think these really improve user experience and should be added more throughout the package. There are many cases where if the user inputs the wrong type of value the function will either a. eventually timeout, b. completely freeze/abort the session, c. give no warning and you only find out later. I've flagged a few in which some class assertions should help the user avoid this experience. #za_gc4

  • names() - It seems likely you have already considered this, but I feel that it would make more sense if the output of names() was consistent across ImageCollection and Image classes. Currently names returns band names for Images and property names for ImageCollections. Why not just have property_names() and names() (or something like that) that works consistently since both Images an ImageCollections have both. #za_gc5

  • would be nice to have a list_spectral_indices() type function (like eemont.listIndices())- would be cool if the object returned would provide the formula & reference for the index as well #za_gc6

  • Extra_closest() - really cool function some comments (in addition to what I believe to be a small bug - see Functionality-Functionality section) #za_gc7

  • Would it be possible to make it some functions allow the user to autocomplete arguments? I'm thinking of Extra_maskClouds, Extra_preprocess. #za_gc8

Documentation - Installation instructions

  • When I am using a more typical python workflow, I feel like I have a clear view of the venv and anything I'm adding to it. In this setup, it seems less visible. I believe that is largely intended and makes sense for a lot of R users. Nonetheless it would be nice if there was more documentation on this for people who are more comfortable with python. For example, I would personally find it useful to see an example of how to pip install all the necessary dependencies for both {rgee} and {rgeeExtra} into a pre-existing/or new venv. #za_di1

Documentation - Examples

Documentation - Functions

  • ee$Image$Extra_preprocess() - would be nice to have more information on how to use in examples, and documentation/vignettes. It's not totally clear what the ... arguments should be as it references ee$Image$cloudmask() which I do not believe is a function (maybe you meant Extra_maskClouds?). Since users should set parameters differently depending img/ic perhaps some explanation of default values should be given. Examples and vignettes sort of give impression that user should run without modifying parameters. I guess defaults are set for Copernicus/S2_SR? #za_df1
  • Extra_matchHistogram()- Would be useful to add Map$addLayer()|Map$addLayer() to roxygen example on function #za_df2
  • ops-math - roxygen in below snippet says multiplication, but shows addition #za_df3
    https://github.com/r-earthengine/rgeeExtra/blob/7ea67d064e56e9429971d64440d8424df68f6249/R/ops-math.R#L40-L44
  • ee_utils_gif_save() roxygen says @return No return value, called to write a GIF file. but it does return a logical after writing the gif (i'm not sure why this is necessary) #za_df4
  • Extra_matchHistogram() could be nice to provide a link and or some information on matching method #za_df5

Documentation - Vignettes

  • aditional vignette
    • Most examples are missing the Extra_ prefix on the functions so they result in error #dv1
    • spelling: "Aditional" -> "Additional" :-) #dv2
  • I would check other Vignettes for this same issue. #dv3
  • Could be nice to have a quick reminder at top of vignettes that in order to follow along users should install {leaflet.extras2} #dv4

Functionality/ User Experience

Functionality -Installation

  • Worked fine for me. However in the past I have seen users struggle (including myself), but I believe this has gotten easier. #fi1

Functionality - Functionality

library(rgee)
library(rgeeExtra)
library(tidyverse)
ee_Initialize()
extra_Initialize()

url_s2 <- "COPERNICUS/S2"
ic <- ee$ImageCollection(url_s2)

date_chr <- "2023-09-10"
date_dt<- as_date(date_chr)
ic_closest_from_dt_obj <-  ic$Extra_closest(date_dt)
#> Error in py_call_impl(callable, call_args$unnamed, call_args$named) : 
#>   ee.ee_exception.EEException: Invalid argument specified for ee.Date(): 2023-09-10
#> Run `reticulate::py_last_error()` for details.
  • Could not find any documentation on what is supposed to happen on geographically large ImageCollection multiple images on same date. Theoretically as a user I might think that it would give me an ImageCollection containing all the images closes to that date, but I don't think that is what you were going for. Nonetheless I think we need some instructions in the roxygen and vignettes. Also this below cases is an example where Extra_closest() silently fails and then crashes/aborts the session on the next call that tries to do something with the resulting object. This is a case where some assertions would improve user experience. #za_ff3
ic_closest <-  ic$Extra_closest(date_chr) # works
class(ic_closest)
#> [1] "ee.imagecollection.ImageCollection" "ee.collection.Collection"           "ee.element.Element"                
#>[4] "ee.computedobject.ComputedObject"   "ee.encodable.Encodable"             "python.builtin.object"  

# if I run this in combination with above chunk my R session will freeze/abort
ee_get_date_ic(ic_closest)
  • enhancement idea - would be a nice feature if user could also supply an image instead of a date. The function then could find the closest image in the image collection to that date of the image supplied. Similar to functionalit of find_closest() function in this example. #za_ff4
  • Extra_minValue/Extra_maxValue() - I think this function is only designed for ee.Image therefore some class assertions would be nice to avoid slow "ee.ee_exception.EEException: User memory limit exceeded" message if someone runs on anything else? #za_ff5
  • Extra_matchHistogram() - probably a user error, but I had a hard time trying to reproduce the Histogram Matching Example from Google. I think my issue likely relates to what was flagged in #za_df1 here is an attempt: #za_ff6
library(rgee)
library(rgeeExtra)
library(tidyverse)
ee_Initialize()
extra_Initialize()

# make geom
geometry = ee$Geometry$Polygon(
  list(
    c(-155.97117211519446, 20.09006980142336),
    c(-155.97117211519446, 19.7821681268256),
    c(-155.73256280122962, 19.7821681268256),
    c(-155.73256280122962, 20.09006980142336)
  )
)
skysat = ee$Image('SKYSAT/GEN-A/PUBLIC/ORTHO/RGB/s01_20161020T214047Z')$clip(geometry)
landsat_ic = ee$ImageCollection('LANDSAT/LC08/C01/T1_SR')$
  filterBounds(geometry) %>% 
  # leaving as default -- this is probably wrong! but not super clear how to adjust
  # would be nice if vignettes showed good default presets for at least landsat & and sentinel 2
  ee$ImageCollection$Extra_preprocess() 

date_skysat <- ee_get_date_img(skysat)$time_start # if you run Extra_closest w/ this it aborts session
date_skysat_chr<- as.character(as_date(date_skysat))

landsat_ic_closest <- ee$ImageCollection$Extra_closest(landsat_ic ,date_skysat_chr,32,"day")

# would be nice if Extra_closest returns img in the above
landsat_img_closest <- landsat_ic_closest[[1]] # but alas we have to convert it

landsat_img_rgb <- landsat_img_closest$select(
  opt_selectors = c( "B4","B3","B2"),
  opt_names = c("R","G","B")
)

bands <- list("R"="R","G"="G","B"="B")
matched <- ee$Image$Extra_matchHistogram(skysat,landsat_img_rgb,  bands)

vis_params_refl = list('min'=0, 'max'= 0.25)
vis_params_dn = list('min'= 0, 'max'= 255)
aoi_center_pt <- ee$Geometry$Point(c(-155.79584,19.9986))
Map$centerObject(aoi_center_pt,13)

m1 <- Map$addLayer(landsat_img_rgb, visParams = vis_params_refl,"landsat ref")
m2 <- Map$addLayer(skysat,visParams= vis_params_dn, 'SkySat source')
m1|m2 # looks good
m3 <- Map$addLayer(matched,visParams= vis_params_refl, 'SkySat matched')
m4 <- Map$addLayer(matched,visParams= vis_params_dn, 'SkySat matched')
m1|m3 # matches is just black 
m1|m4 # matches is just black 

For a user like me who wrote the code below what are some tools we have from {rgee} and {rgeeExtra} to help troubleshoot and figure out what is going on? This is all I can think of right now but doesn't get me much further? #za_ff7

# trying to trouble shoot - wrote this before I THINK i might have identified the problem
# in leaving the Extra_preprocess as default
rgeeExtra::ee_minValue(landsat_img_rgb) 
rgeeExtra::ee_maxValue(landsat_img_rgb) 
rgeeExtra::ee_minValue(skysat)
rgeeExtra::ee_maxValue(skysat) 

rgeeExtra::ee_minValue(matched) # all 0s
rgeeExtra::ee_maxValue(matched) # all 0s
  • Extra_cloudMask() would be nice to have this for ics (ee_ImageCollection_maskClouds) #za_ff8

Functionality - Code style

  • in vignettes and examples you seem to prefer the %>% syntax for chaining together {rgee}/{rgeeExtra} processes like this:
doi <- ee$ImageCollection("NASA/GPM_L3/IMERG_V06")[[1]] %>%
  ee$Image$Extra_getDOI()

rather than:

doi <- ee$ImageCollection("NASA/GPM_L3/IMERG_V06")[[1]]$
  Extra_getDOI()

ic <- ee$ImageCollection("NASA/GPM_L3/IMERG_V06")

  • is this somehow best practices or you just think easier for R-users? I think the second looks cleaner (especially for longer chains) and might be easier for users migrating from the JavaScript code editor. #za_fc1
  • perhaps useful if it could be made clear somewhere in the documentation that you can do both styles and if there is a benefit to either of certain cases #za_fc2

@maurolepore
Copy link
Member

@zackarno, thanks a lot for your thorough review!

@csaybar please wait a bit for @nmorandeira's review then you can address both reviews.

@maurolepore maurolepore pinned this issue Jan 7, 2024
@nmorandeira
Copy link

nmorandeira commented Jan 16, 2024

Thanks @csaybar for developing this excellent package!, and thanks @maurolepore for the invitation to review it. Sorry for the delay, I'm out of my office with very limited internet access. I provide some comments, mainly related to the documentation. As I said to @maurolepore, my views are as an end-user, since I have no experience in developing a package. I hope you find these comments useful!

Package Review

  • As the reviewer I confirm that there are no conflicts of interest for me to review this work (if you are unsure whether you are in conflict, please speak to your editor before starting your review).

Documentation

The package includes all the following forms of documentation:

  • A statement of need: clearly stating problems the software is designed to solve and its target audience in README.
    See below, I suggest adding more detail on this.

  • Installation instructions: for the development version of package and any non-standard dependencies in README.
    See my comment below. Installation instructions are insufficient.

  • Vignette(s): demonstrating major functionality that runs successfully locally
    See my comments below.

  • Function Documentation: for all exported functions
    See my comments below.

  • Examples: (that run successfully locally) for all exported functions
    See my comments below.

  • Community guidelines: including contribution guidelines in the README or CONTRIBUTING, and DESCRIPTION with URL, BugReports and Maintainer (which may be autogenerated via Authors@R).

Functionality

  • Installation: Installation succeeds as documented.
    I found problems initializing ee, see report below.

I haven't tested functionality, performance, automated tests and packaging guidelines.

Estimated hours spent reviewing: 10; ~3 hours were spent in trying to solve the installation issues.

  • Should the author(s) deem it appropriate, I agree to be acknowledged as a package reviewer ("rev" role) in the package DESCRIPTION file.

Review Comments

  • In the Readme of the repository and in the rgeeExtra webpage, section "Why rgeeExtra is needed?"[https://github.com/r-earthengine/rgeeExtra?tab=readme-ov-file#why-rgeeextra-is-needed-] I would add a few sentences explaining the table, for the user to quickly know the extra features of the package in comparison with rgee.

For example, "While GEE's primary language is JavaScript, which diverges from R's structure, rgeeExtra serves as a bridge". Isn't this true for rgee? What are the additional advantages of using rgeeExtra? I now know the answer :), after using the package and reviewing the Articles, but It would be nice for the user to quickly decide if it's worth installing rgeeExtra or no.

  • The equation provided as example is confusing because is called “ndvi” but includes a **2. I would name the object “ndvi_squared”, or alternatively remove the ** 2 from the equation.

  • Add to the Readme.MD in the repository a link to https://r-earthengine.com/rgeeExtra/index.html
    Articles are a nice vignette! I would highlight them.

  • Citation: is there an error? In this section, it says


‘citation("rgeeExtra")
To cite **rgee** in publications use:
  
  C Aybar, Q Wu, L Bautista, R Yali and A Barja (2020) rgee: An R
  package for interacting with Google Earth Engine Journal of Open
  Source Software URL https://github.com/r-spatial/rgee/.

A BibTeX entry for LaTeX users is

@Article{,
  title = {rgee: An R package for interacting with Google Earth Engine},
  author = {Cesar Aybar and Quisheng Wu and Lesly Bautista and Roy Yali and Antony Barja},
  journal = {Journal of Open Source Software},
  year = {2020},
}
‘

In R, running citation(“rgeeExtra”) gives the corrected text “To cite rgeeExtra in publications use”, but the same reference by Aybar et al. (2020) refering to rgee.

  • Installation. This was one of the main issues I encountered while reviewing the package. I was not able to initialize ee, here follows my error (probably related to miniconda or Python?). I couldn’t solve this issue in my laptop. Instead, I decided to conduct the review on other PC were I had already set up my environment. My suggestion is to include a clear step-to-step instruction to install the package and to initialize ee.

I followed the instructions provided here by Mauro: #608 (comment) .
When running rgee::ee_install() I get this error:

image

I'm successfully using gee with Python in this laptop, but probably my R + Python environment is not correctly configured.

  • Function Documentation: after reviewing the Articles, it's not clear for me if all the functions included in rgeeExtra are listed in the examples. It seems to me that there may be extra functions that I have still not explored. A vignette including the list of functions and its parameters would be appreciated.

Articles

Here I provide some comments on the articles.

Introduction

SAVI computation. I get this error:

Error in py_get_attr_impl(x, name, silent) : 
  AttributeError: type object 'Image' has no attribute 'spectralIndex'

Please check this error. I replaced “preprocess” with “Extra_preprocess”, and “spectralIndex” with “Extra_spectralIndex”. Next, I also replaced “geoviz_1” with “geoviz”. In this way I get no error, but I also don’t see any image in the visualizer.

Besides, if it’s possible to compute an spectral index this way, I would add a comment in the Readme file: after giving the ndvi or squared ndvi equation as an example of how an user can define a new formula using the rgeeExtra syntax, I would link to this SAVI example (or an NDVI example) as an additional advantage of the package, i.e. providing an easy way to compute well known spectral indexes.

Image

Add dependency:
library(leaflet.extras2)
1. Arithmetic Operations. The screenshot image shows global coverage, but the code gives a plot with zoom 9. Be consistent so that the user doesn't think he/she has done something wrong.

2. Mathematical functions. Comment that you can visualize each NDVI transformation by clicking on the layer selector.

4. Tasseled Cap Transformation.
I suggest replacing the display by the most used RGB combination for tasseled cap (R = TCB, G = TCG, B = TCW).

A reference to the citation for the the tasseled cap transformation would be nice, as well as for the other indexes included in the articles (NDVI, SAVI, etc).

6. Histogram Matching
The visualization parameters should be different for each image. A possible solution (I have also added the source scene for comparison purposes):

visParams_L8 <- list(
  bands = c("B4","B3","B2"),
  min = 0.1, 
  max = 0.5, 
  gamma = 1.5
)

visParams_L7 <- list(
  bands = c("B3","B2","B1"),
  min = 0.1, 
  max = 0.5, 
  gamma = 1.5
)

# Display matched and target images on the map for comparison.
Map$setCenter(lon = -121.984, lat = 47.847, zoom = 14)
m0 <- Map$addLayer(source, visParams = visParams_L8, "source")
m1 <- Map$addLayer(matched, visParams = visParams_L8, "matched") 
 
m2 <- Map$addLayer(target, visParams = visParams_L7, "target")

m0 | m2

m1 | m2

7. Cloud masking
Please check the parameters. I don’t get the same display.
image

8. Automated Preprocessing
Please check the parameters. I don’t get the same display.
image

9. Summary Methods.
Add visualization instructions.

10. Minimum and Maximum values.
Requires geojsonio, which also has several dependencies. Add: library(geojsonio)
Also, the text says “These functions offer two modes: “Rectangle” for using the image’s footprint and “Points” for sampling over it”. Can you add examples for these two modes?

Image Collection

8. Complete GIF Toolkit for Earth Engine.
Excellent tool! Please add the dependency:
library(magick)

Also, save the gif file to the working directory (It was saved in a temporal folder with a random name, so it’s difficult to find it).

11. Get the temporal nearest image.
Excellent tool! I would move this example before example (8). Also, the title is in italics, it seems to be an error.
As an user, I would find much more useful to find the closest cloud-free image.

@maurolepore
Copy link
Member

@ropensci-review-bot submit review #608 (comment) time 10

@ropensci-review-bot
Copy link
Collaborator

Logged review for nmorandeira (hours: 10)

@maurolepore
Copy link
Member

@ropensci-review-bot submit review #608 (comment) time 16

@ropensci-review-bot
Copy link
Collaborator

Logged review for zackarno (hours: 16)

@maurolepore
Copy link
Member

Thanks a lot @nmorandeira for your review! Your perspective is very valuable and really nicely complements that of @zackarno.

@csaybar you can now start addressing the reviews.

@maurolepore maurolepore unpinned this issue Jan 17, 2024
@csaybar
Copy link
Author

csaybar commented Jan 18, 2024 via email

@ropensci-review-bot
Copy link
Collaborator

@csaybar, @davemlz, @LBautistaB13, @choisy: please post your response with @ropensci-review-bot submit response <url to issue comment> if you haven't done so already (this is an automatic reminder).

Here's the author guide for response. https://devguide.ropensci.org/authors-guide.html

@ldecicco-USGS
Copy link

Hi @csaybar , I'm checking in on issues that have been static for awhile. Let us know if there is progress to report or any questions you may have.

@maurolepore
Copy link
Member

If the author mentions changes might take time, apply the holding label via typing @ropensci-review-bot put on hold. You’ll get a reminder every 90 days (in the issue) to check in with the package author(s).

--https://devdevguide.netlify.app/softwarereview_editor

--

Hi @csaybar, shall we put this submission on hold?

It's totally fine to do so. The label helps us to better understand and manage the process.

@csaybar
Copy link
Author

csaybar commented May 13, 2024

Hi everyone,

I sincerely apologize for my delayed response,

I had a bit of trouble properly solving all of your valid requests. As many of you know, rgee-extra is an extension of rgee. At the same time, rgee relies on the earthengine-api (Python). Therefore, updates to the Python client library directly impact rgee. Recently, the earthengine-api has undergone substantial changes concerning authentication (see updates here and here), which have break many of rgee’s functionalities.

After some internal discussions, we have decided to restructure rgee into a new package (to be named rgee2) to address installation & authentication problems.

@JulioContrerasH is working part-time on developing rgee2, but we do not expect it to be ready before the end of August. We are committed to keeping rgee-extra as an extension of rgee2. However, we prefer to pause further development on the project until rgee2 first version is released.

Thank you for your understanding, and sorry for the lengthy message. :(
Yes, @maurolepore, please can u move it to hold.

@maurolepore
Copy link
Member

@csaybar, thanks for your efforts. I'll go ahead and put the submission on hold.

@maurolepore
Copy link
Member

@ropensci-review-bot put on hold

@ropensci-review-bot
Copy link
Collaborator

Submission on hold!

@nmorandeira
Copy link

Thanks for the update @csaybar
Good luck with rgee2!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants