ee_extract_tidy {tidyrgee}R Documentation

ee_extract_tidy

Description

ee_extract_tidy

Usage

ee_extract_tidy(
  x,
  y,
  stat = "mean",
  scale,
  via = "getInfo",
  container = "rgee_backup",
  sf = TRUE,
  lazy = FALSE,
  quiet = FALSE,
  ...
)

Arguments

x

tidyee, ee$Image, or ee$ImageCollection

y

sf or ee$feature or ee$FeatureCollection

stat

zonal stat ("mean", "median" , "min","max" etc)

scale

A nominal scale in meters of the Image projection to work in. By default 1000.

via

Character. Method to export the image. Three method are implemented: "getInfo", "drive", "gcs".

container

Character. Name of the folder ('drive') or bucket ('gcs') to be exported into (ignore if via is not defined as "drive" or "gcs").

sf

Logical. Should return an sf object?

lazy

Logical. If TRUE, a future::sequential object is created to evaluate the task in the future. Ignore if via is set as "getInfo". See details.

quiet

Logical. Suppress info message.

...

additional parameters

Value

data.frame in long format with point estimates for each time-step and y feature based on statistic provided

See Also

ee_extract for information about ee_extract on ee$ImageCollections and ee$Images

Examples

## Not run: 
library(rgee)
library(tidyrgee)
ee_Initizialize()
modis_ic <- ee$ImageCollection("MODIS/006/MOD13Q1")
point_sample_buffered <- tidyrgee::bgd_msna |>
    sample_n(3) |>
    sf::st_as_sf(coords=c("_gps_reading_longitude",
                       "_gps_reading_latitude"), crs=4326) |>
    sf::st_transform(crs=32646) |>
    sf::st_buffer(dist = 500) |>
    dplyr::select(`_uuid`)
modis_ic_tidy <- as_tidyee(modis_ic)
modis_monthly_baseline_mean <- modis_ic_tidy |>
 select("NDVI") |>
 filter(year %in% 2000:2015) |>
  group_by(month) |>
 summarise(stat="mean")

ndvi_monthly_mean_at_pt<- modis_monthly_baseline_mean |>
   ee_extract(y = point_sample_buffered,
            fun="mean",
            scale = 500)

## End(Not run)

[Package tidyrgee version 0.1.0 Index]