start_annotation_simple: Start simple annotation

Description Usage Arguments Value Examples

Description

Submit a dataframe for on-the-fly annotation. Does not require login - for use for small numbers of records and pilot jobs.

You can annotate using layers that are on earthengine! Layer parameters: Used by all:

For STOAT layers:

For non STOAT layers, ie those in Google Earth Engine:

Usage

1
2
3
4
5
6
start_annotation_simple(
  events,
  layers,
  coords = c("lng", "lat"),
  date = "date"
)

Arguments

events

A data.frame for on the fly annotation

layers

A list of parameters or vector of codes, of the layers, see the examples below.

coords

A vector of length 2 containing column names for record longitudes, and latitudes.

date

Column name for record dates, dates must take the format YYYY-MM-DD

Value

Input data.frame with values from the annotation appended, in addition to unique identifier field event_id.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
## Not run: 
events <- data.frame(
   event_id = as.character(1:2),
   lng = c(-4, 24),
   lat = c(10, 10),
   date = '2015-01-01'
)

# simple layer string format: PRODUCT-VARIABLE-S_BUFF-T_BUFF
layers <- 'landsat8-evi-100-16'
start_annotation_simple(events, layers)

start_annotation_simple(events, layers)

# For lcv_count (Count of landcover value), 'value' returned is a string of
# landcover counts within the AOI.
# The output format is:
#  <LANDCOVER_CLASS>:<COUNT_OF_PIXELS_WITH_THAT_CLASS>
#  classes are seperated by commas.

start_annotation_simple(events, list(
  list(
    id="COPERNICUS/Landcover/100m/Proba-V-C3/Global",
    s_buff=1000,
    reducers=list("lcv_count", "mode"),
    static=FALSE,
    t_buff=365,
    bands=list("discrete_classification")
  )
))

# Annotating with two worldclim layers:
#   bio01 is annual mean temperature
#   bio12 is annual precipitation

start_annotation_simple(events, list(
 list(
   "id"= "WORLDCLIM/V1/BIO",
   "s_buff"=1000,
   "reducers"=list("mean"),
   "static"= TRUE,
   "t_buff"= 1,
   "bands"=list("bio01")
 ),
 list(
   "id"= "WORLDCLIM/V1/BIO",
   "s_buff"=1000,
   "reducers"=list("mean"),
   "static"= TRUE,
   "t_buff"= 1,
   "bands"=list("bio12")
 )
))

## End(Not run)

rstoat documentation built on Nov. 10, 2021, 9:07 a.m.