knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(rgee) library(tidyrgee) ee_Initialize() modis_link <- "MODIS/006/MOD13Q1" modisIC <- ee$ImageCollection(modis_link) modis_ndvi_tidy <- as_tidyee(modisIC) |> select("NDVI")
Currently it's now working with multiples statistics. I did a few changes:
inner_join
method for both tidyee
and ImageCollection
. The one being utilized here inside of summarise is the tidyee
methodinner_join
function create_tidyee(..., tidyee_index=F)
. The tidyee_index=F seems to be the crucial to make this run without getting hung up giving the weird python "time has elapsed" errorsummarised_mean_sd <- modis_ndvi_tidy |> filter(year %in% 2000:2015) |> group_by(month) |> summarise(stat=list("mean","sd","min"))
tidyee=T
) causes this issue because as you can see in the following chunk I can easily use the set_idx
function and have it run with no delayic_with_tidyee_idx <- summarised_mean_sd$ee_ob |> tidyrgee:::set_idx() ic_with_tidyee_idx$aggregate_array("tidyee_index")$getInfo()
create_tidyee
with tidyee_index=T
and have it run instantly. Unforutunately no matter how i put this at the end of the summarise
function it hangs.... WHY!? create_tidyee(x = summarised_mean_sd$ee_ob ,vrt = summarised_mean_sd$vrt,tidyee_index = T)
Although I don't understand this issue fully, perhaps a good/safe way forward would just be to set_idx whenever filter is called!!! as long as it doesnt hang
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.