library(openeo)
Add credentials here (configure connect) or point to a R script that holds the credentials and cares for connection
host = "https://openeo.vito.be" con = connect(host = host)
capabilities()
list_service_types()
list_file_formats()
colls = list_collections()
describe_collection(collection = "S2_FAPAR_SCENECLASSIFICATION_V102_PYRAMID")
list_processes()
list_jobs()
p = processes() # creating the graph data = p$load_collection(id = "SENTINEL2_L2A_SENTINELHUB", spatial_extent = list( west=16.1, east=16.6, south= 47.2, north=48.6 ), temporal_extent = list( "2018-01-01", "2018-02-01" )) spectral_reduce = p$reduce_dimension(data = data, dimension = "bands", reducer = function(x, context) { B08 = x[8] B04 = x[4] B02 = x[2] (2.5 * (B08 - B04)) / sum(B08, 6 * B04, -7.5 * B02, 1) }) temporal_reduce = p$reduce_dimension(data = spectral_reduce,dimension = "t", reducer = function(x, context) { p$min(x) }) result = p$save_result(data = temporal_reduce, format="GTiff") # print as JSON graph = as(result, "Graph") graph
# write to file cat(graphToJSON(graph),file = "vito-r-evi-phenology-graph.json") # client side graph validation graph$validate() validate_process(graph = graph) # compute the result and check if the graph was valid compute_result(graph=graph,format="GTiff",output_file = "vito-evi.tif")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.