diff --git a/404.html b/404.html index 60f948ee6..2addca617 100644 --- a/404.html +++ b/404.html @@ -8,13 +8,13 @@ - +

404

Looks like we've got some broken links.
Take me home.
- + diff --git a/api/index.html b/api/index.html index 219547c8d..19c8d87d4 100644 --- a/api/index.html +++ b/api/index.html @@ -8,7 +8,7 @@ - + @@ -145,6 +145,6 @@
- + diff --git a/assets/js/51.7739e561.js b/assets/js/51.79fc567a.js similarity index 99% rename from assets/js/51.7739e561.js rename to assets/js/51.79fc567a.js index bdacb3703..833ef471c 100644 --- a/assets/js/51.7739e561.js +++ b/assets/js/51.79fc567a.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[51],{316:function(e,t,s){e.exports=s.p+"assets/img/federation.a955d770.png"},488:function(e,t,s){"use strict";s.r(t);var a=s(4),n=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"federation-aspects-and-known-issues"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#federation-aspects-and-known-issues"}},[e._v("#")]),e._v(" Federation Aspects and Known Issues")]),e._v(" "),t("p",[e._v("openEO Platform is a federated platform. This means that multiple independent 'back-ends',\nwhich all support the openEO interface, are combined into a single instance. From the outside,\nit appears to be a single platform, but you get access to data collections and processing resources from\nmultiple instances.")]),e._v(" "),t("p",[e._v("This image gives you a look at platforms that make up the federation:")]),e._v(" "),t("p",[t("img",{attrs:{src:s(316),alt:"openeo.cloud federation"}})]),e._v(" "),t("p",[e._v("At this time, the federation can not yet entirely hide the fact that it is built out of\nseparate components:")]),e._v(" "),t("ul",[t("li",[e._v("Within the same processing request, you can only use collections from the same back-end")]),e._v(" "),t("li",[e._v("Some processes are not (fully) supported by all back-ends.")]),e._v(" "),t("li",[e._v("If a back-end requires data from an external source, bandwidth limitations may result in slower processing.")])]),e._v(" "),t("h2",{attrs:{id:"data-collections"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#data-collections"}},[e._v("#")]),e._v(" Data Collections")]),e._v(" "),t("p",[e._v("The federation exposes the "),t("em",[e._v("union")]),e._v(" of the data collections of each of the underlying back-ends.\nWhen a processing request is submitted to the federated platform, the input collections are used to determine to which back-end the actual processing work should be delegated to.")]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("Note")]),e._v(" "),t("p",[e._v("For the technical discussion on collection federation, see "),t("a",{attrs:{href:"https://github.com/Open-EO/openeo-aggregator/issues/5",target:"_blank",rel:"noopener noreferrer"}},[e._v("Open-EO/openeo-aggregator#5"),t("OutboundLink")],1)])]),e._v(" "),t("h3",{attrs:{id:"terrascope"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#terrascope"}},[e._v("#")]),e._v(" Terrascope")]),e._v(" "),t("p",[e._v("Terrascope hosts a number of collections itself.\nFor coarse resolution data (e.g. 100 m resolution) this is often the full archive,\nwhile for medium resolution (Sentinel 1, 2) data is only offered for selected areas.")]),e._v(" "),t("p",[e._v("Additional data can be processed upon request, if it is not available from another provider.\nThis may result in an additional cost for processing and storage.")]),e._v(" "),t("h3",{attrs:{id:"sentinel-hub"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#sentinel-hub"}},[e._v("#")]),e._v(" Sentinel Hub")]),e._v(" "),t("p",[e._v("The Terrascope back-end also integrates with Sentinel Hub (part of Euro Data Cube) to give you\naccess to additional collections.\nThis practically means that data needs to be transferred from Sentinel Hub to the Terrascope data center before it can be processed.\nThis works very well for small areas, or a 100x100km MGRS tile in batch mode,\nbut is not yet recommended for processing medium size to large countries or continents.")]),e._v(" "),t("p",[e._v("The collection metadata of the Terrascope back-end tries to clearly identify which collections are served by Sentinel Hub.")]),e._v(" "),t("h4",{attrs:{id:"commercial-data"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#commercial-data"}},[e._v("#")]),e._v(" Commercial Data")]),e._v(" "),t("p",[e._v("openEO Platform provides direct access to commercial data. Currently, data must be purchased directly through Sentinel Hub (see Sentinel Hub documentation on purchasing commercial data "),t("a",{attrs:{href:"https://docs.sentinel-hub.com/api/latest/api/data-import/",target:"_blank",rel:"noopener noreferrer"}},[e._v("here"),t("OutboundLink")],1),e._v("), but we are working to support ordering commercial data directly from the platform in the future.")]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("Experimental usage")]),e._v(" "),t("p",[e._v("The below described way of how to connect to commercial data is currently only supported by the pyhton client and experimental. As such the behavior might still change in the future.")])]),e._v(" "),t("p",[e._v("Data is accessed as part of the load_collection process and via a "),t("code",[e._v("featureflags")]),e._v(" argument. To access the data, you must:")]),e._v(" "),t("ul",[t("li",[e._v("select the commercial data provider in "),t("code",[e._v("collection_id")]),e._v(" (e.g. "),t("code",[e._v('collection_id="PLANETSCOPE"')]),e._v(")")]),e._v(" "),t("li",[e._v("set the Sentinel Hub BYOC collection ID ("),t("code",[e._v("byoc-{id}")]),e._v(") as "),t("code",[e._v("featureflags")]),e._v(" argument\n(e.g. with openEO Python client version 0.10.1 or higher:\n"),t("code",[e._v('datacube.result_node().update_arguments(featureflags={"byoc_collection_id": byoc_collection_id})')]),e._v(")")])]),e._v(" "),t("p",[e._v("Full example of loading a commercial data collection:")]),e._v(" "),t("div",{staticClass:"language-python extra-class"},[t("pre",{pre:!0,attrs:{class:"language-python"}},[t("code",[e._v("toc "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" connection"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("load_collection"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("(")]),e._v("\n collection_id"),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"PLANETSCOPE"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n spatial_extent"),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"west"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("104.86")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"south"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("8.85")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"east"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("106.11")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"north"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("10.37")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n temporal_extent"),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"2019-03-01"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"2020-12-31"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n bands"),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"B3"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(")")]),e._v("\n\ntoc"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("result_node"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("(")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(")")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("update_arguments"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("(")]),e._v("featureflags"),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"byoc_collection_id"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(":")]),e._v(" byoc_collection_id"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(")")]),e._v("\n")])])]),t("p",[e._v("List of currently supported commercial data providers:")]),e._v(" "),t("ul",[t("li",[e._v("Airbus Pleiades (ID: "),t("a",{attrs:{href:"https://openeo.cloud/data-collections/view/?id=PLEIADES",target:"_blank",rel:"noopener noreferrer"}},[e._v("PLEIADES"),t("OutboundLink")],1),e._v(")")]),e._v(" "),t("li",[e._v("Airbus Spot (ID: "),t("a",{attrs:{href:"https://openeo.cloud/data-collections/view/?id=SPOT",target:"_blank",rel:"noopener noreferrer"}},[e._v("SPOT"),t("OutboundLink")],1),e._v(")")]),e._v(" "),t("li",[e._v("PlanetScope (ID: "),t("a",{attrs:{href:"https://openeo.cloud/data-collections/view/?id=PLANETSCOPE",target:"_blank",rel:"noopener noreferrer"}},[e._v("PLANETSCOPE"),t("OutboundLink")],1),e._v(")")]),e._v(" "),t("li",[e._v("WorldView (ID: "),t("a",{attrs:{href:"https://openeo.cloud/data-collections/view/?id=WORLDVIEW",target:"_blank",rel:"noopener noreferrer"}},[e._v("WORLDVIEW"),t("OutboundLink")],1),e._v(")")])]),e._v(" "),t("h3",{attrs:{id:"eodc"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#eodc"}},[e._v("#")]),e._v(" EODC")]),e._v(" "),t("p",[e._v("EODC provides Sentinel-1 (GRH), Sentinel-2 and Sentinel-3 Level-1 globally. On top, pre-processed Level-2 data is\navailable on request (this may result in additional costs). In detail Gamma0 data processed with SNAP and optical ARD\nproducts processed with FORCE are provided.")]),e._v(" "),t("p",[e._v("If the available pre-processed collections are not sufficient, there is on option to perform ARD processing on demand\nwith SNAP respectively FORCE. This may again result in additional costs for processing and storage.")]),e._v(" "),t("p",[e._v("Currently most processes are only available for Level-2 data. Only the ARD processes can be executed on Level-1 data. Also\nonly either ARD processes "),t("strong",[e._v("or")]),e._v(' "standard" processes can be used in one process graph. Combining both types of processes\nis not yet supported. One option to nevertheless achieve a combination of process types is to run ARD on Level-1 data,\nsave the results of the job, and then in a second job load results and perform additional computations.')]),e._v(" "),t("h3",{attrs:{id:"enforce-back-end-selection-for-common-collections"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#enforce-back-end-selection-for-common-collections"}},[e._v("#")]),e._v(" Enforce back-end selection for common collections")]),e._v(" "),t("p",[e._v("Some collections are provided by multiple underlying back-ends,\npossibly with differences in spatial or temporal coverage.\nThis is exposed in the collection metadata with "),t("code",[e._v("federation:backends")]),e._v(" summary, e.g.:")]),e._v(" "),t("div",{staticClass:"language-json extra-class"},[t("pre",{pre:!0,attrs:{class:"language-json"}},[t("code",[t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[e._v('"id"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"WATER_BODIES"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[e._v('"type"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"Collection"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n ...\n "),t("span",{pre:!0,attrs:{class:"token property"}},[e._v('"summaries"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[e._v('"federation:backends"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"vito"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"sentinelhub"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n ...\n "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),t("p",[e._v("When a user submits a processing request,\nthe federated platform will try, by default, to automatically determine\nwhich underlying back-end is best choice for the actual processing,\nbased for example on the requested spatial extent.")]),e._v(" "),t("p",[e._v("You can however also enforce the selection of a certain back-end\nby using the metadata property filtering feature\nof the "),t("code",[e._v("load_collection")]),e._v(' process.\nFor example, with the Python client, to enforce the selection of\nthe "sentinelhub" back-end:')]),e._v(" "),t("CodeSwitcher",{attrs:{languages:{py:"Python",r:"R"}},scopedSlots:e._u([{key:"py",fn:function(){return[t("div",{staticClass:"language-python extra-class"},[t("pre",{pre:!0,attrs:{class:"language-python"}},[t("code",[e._v("cube "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" connection"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("load_collection"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("(")]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"WATER_BODIES"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("\n properties"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"federation:backends"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("lambda")]),e._v(" v"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(":")]),e._v(" v "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("==")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"sentinelhub"')]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(")")]),e._v("\n")])])])]},proxy:!0},{key:"r",fn:function(){return[t("div",{staticClass:"language-r extra-class"},[t("pre",{pre:!0,attrs:{class:"language-r"}},[t("code",[e._v("cube "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" p"),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("$")]),e._v("load_collection"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("(")]),e._v("\n id "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"WATER_BODIES"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token ellipsis"}},[e._v("...")]),e._v("\n properties "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" list"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("(")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"federation:backends"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("function")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("(")]),e._v("x"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(")")]),e._v(" x "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("==")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"sentinelhub"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(")")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(")")]),e._v("\n")])])])]},proxy:!0}])}),e._v(" "),t("h2",{attrs:{id:"processes"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#processes"}},[e._v("#")]),e._v(" Processes")]),e._v(" "),t("p",[e._v("Each of the underlying back-ends of the federation can define its own set of available processes,\nbut there is in practice a very large common ground across these back-ends.\nAs such, the federation's listing of available processes is the "),t("em",[e._v("intersection")]),e._v("\nof the process sets of each of the underlying back-ends.\nThis is the most straightforward combination with the least surprise.")]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("Advanced/experimental usage")]),e._v(" "),t("p",[e._v("A savvy user that knows which underlying back-end will execute their job\ncan however still submit process graphs with processes that are available\non that back-end but fall outside the intersection,\nas the federation will just forward the process graph as-is to that back-end.")])]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("Note")]),e._v(" "),t("p",[e._v("For the technical discussion on process federation, see "),t("a",{attrs:{href:"https://github.com/Open-EO/openeo-aggregator/issues/4",target:"_blank",rel:"noopener noreferrer"}},[e._v("Open-EO/openeo-aggregator#4"),t("OutboundLink")],1)])]),e._v(" "),t("h2",{attrs:{id:"file-formats"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#file-formats"}},[e._v("#")]),e._v(" File formats")]),e._v(" "),t("p",[e._v("The federation currently lists the "),t("em",[e._v("union")]),e._v(" of import/export file formats available\nat each of the underlying back-ends.")]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("Note")]),e._v(" "),t("p",[e._v("For the technical discussion on file format federation, see "),t("a",{attrs:{href:"https://github.com/Open-EO/openeo-aggregator/issues/1",target:"_blank",rel:"noopener noreferrer"}},[e._v("Open-EO/openeo-aggregator#1"),t("OutboundLink")],1)])]),e._v(" "),t("h2",{attrs:{id:"on-demand-preview"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#on-demand-preview"}},[e._v("#")]),e._v(" On-demand-preview")]),e._v(" "),t("p",[e._v("Sometimes there is a need to quickly inspect results of a process graph on the map without first running the entire graph first and waiting for the results to be computed and returned. This "),t("code",[e._v("on-demand-preview")]),e._v(" is available in the "),t("a",{attrs:{href:"https://editor.openeo.cloud/",target:"_blank",rel:"noopener noreferrer"}},[e._v("openEO Platform Editor"),t("OutboundLink")],1),e._v(" and the "),t("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/index.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("openEO Python Client*"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("In the Editor you can find the functionality in the "),t("code",[e._v("Web Services")]),e._v(" tab. Use the button"),t("code",[e._v("Show on Map")]),e._v(".")]),e._v(" "),t("p",[e._v("In the Python Client, you can use the "),t("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/api.html#openeo.rest.datacube.DataCube.preview",target:"_blank",rel:"noopener noreferrer"}},[e._v(".preview() method"),t("OutboundLink")],1),e._v(" to create a service with your process graph and display the results in an ipyleaflet Map object. You can find an example implementation in "),t("a",{attrs:{href:"https://github.com/openEOPlatform/sample-notebooks/blob/main/on-demand_preview.ipynb",target:"_blank",rel:"noopener noreferrer"}},[e._v("this Jupyter notebook"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("Note")]),e._v(" "),t("p",[e._v("This functionallity currently only works with collections that are also on the Sentinel Hub backend (Provider > Backend > sentinelhub). In order for the map to display meaningful results, your process graph should:")]),e._v(" "),t("ul",[t("li",[e._v("return one or three bands,")]),e._v(" "),t("li",[e._v("a single temporal extent,")]),e._v(" "),t("li",[e._v("and scale the data to a range so that the output format can adequately save it.")])])]),e._v(" "),t("p",[e._v("*You need to have at least version 0.19.0 installed to use this functionality.")]),e._v(" "),t("h2",{attrs:{id:"batch-jobs"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#batch-jobs"}},[e._v("#")]),e._v(" Batch jobs")]),e._v(" "),t("p",[e._v("As discussed above, when the federated platform receives a processing request, such as a batch job,\nit will automatically determine to which back-end this request should be delegated for actual processing.")]),e._v(" "),t("h3",{attrs:{id:"managed-job-splitting"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#managed-job-splitting"}},[e._v("#")]),e._v(" Managed job splitting")]),e._v(" "),t("p",[e._v("In addition to this basic delegation feature, the federation also provides more advanced (pre)processing capabilities.\nFor instance, the federation platform can be instructed to split up a single batch job in multiple sub-jobs\nand distribute these across one or more processing back-ends.\nThe federation platform will automatically create, start and keep track of these sub-jobs\nwhile the user just have to interact with a single job: e.g. check the overall processing status,\ndownload the combined result assets, ...")]),e._v(" "),t("p",[e._v("Currently, spatial tile-based splitting is supported as splitting strategy\nand it can be enabled by providing a specific job option when submitting the batch job.\nFor example, using the openEO Python Client, instruct the federation platform to\nsplit up datacube processing in UTM based tiles of 20km by 20km:")]),e._v(" "),t("div",{staticClass:"language-python extra-class"},[t("pre",{pre:!0,attrs:{class:"language-python"}},[t("code",[e._v("job "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" datacube"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("create_job"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("(")]),e._v("\n job_options"),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"tile_grid"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"utm-20km"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(")")]),e._v("\n")])])]),t("p",[e._v('This creates a virtual master job on the level of the federation platform and real batch jobs\non the appropriate processing back-ends.\nSubsequent interaction (starting the jobs, polling their status, requesting the result assets, ...)\ncan be done through the "master" '),t("code",[e._v("job")]),e._v(" object created above, in the same way as with normal batch jobs.")]),e._v(" "),t("h3",{attrs:{id:"validity-of-signed-urls-in-batch-job-results"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#validity-of-signed-urls-in-batch-job-results"}},[e._v("#")]),e._v(" Validity of signed URLs in batch job results")]),e._v(" "),t("p",[e._v("Batch job results are accessible to the user via signed URLs stored in the result assets. Within the platform,\nthese URLs have a validity (expiry time) of 7 days. Within these 7 days, the results of a batch job can be accessed\nby any person with the URL. Each time a user requests the results from the job endpoint ("),t("code",[e._v("GET /jobs/{job_id}/results")]),e._v("),\na freshly signed URL (valid for 7 days) is created for the result assets.")]),e._v(" "),t("h3",{attrs:{id:"customizing-batch-job-resources-on-terrascope"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#customizing-batch-job-resources-on-terrascope"}},[e._v("#")]),e._v(" Customizing batch job resources on Terrascope")]),e._v(" "),t("p",[e._v("Jobs running on the (Terrascope) cluster get assigned a default amount of CPU and memory resources. This\nmay not always be enough for your job, for instance when using UDF's. Also for very large jobs, you may want\nto tune your resource settings to optimize for cost.")]),e._v(" "),t("p",[e._v("The example below shows how to start a job with all options set to their default values. It is important to highlight\nthat default settings are subject to change by the backend whenever needed.")]),e._v(" "),t("div",{staticClass:"language-python extra-class"},[t("pre",{pre:!0,attrs:{class:"language-python"}},[t("code",[e._v("job_options "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v(" \n "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"executor-memory"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"2G"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"executor-memoryOverhead"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"3G"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"executor-cores"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("2")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"task-cpus"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"executor-request-cores"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"400m"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"max-executors"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"100"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"driver-memory"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"8G"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"driver-memoryOverhead"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"2G"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"driver-cores"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("5")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"udf-dependency-archives"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(":")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"logging-threshold"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"info"')]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\ncube"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("execute_batch"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("(")]),e._v("job_options"),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("job_options"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(")")]),e._v("\n")])])]),t("p",[e._v("This is a short overview of the various options:")]),e._v(" "),t("ul",[t("li",[e._v("executor-memory: memory assigned to your workers, for the JVM that executes most predefined processes")]),e._v(" "),t("li",[e._v("executor-memoryOverhead: memory assigned on top of the JVM, for instance to run UDF's")]),e._v(" "),t("li",[e._v("executor-cores: number of CPUs per worker (executor). The number of parallel tasks is executor-cores/task-cpus")]),e._v(" "),t("li",[e._v("task-cpus: CPUs assigned to a single task. UDF's using libraries like Tensorflow can benefit from further parallellization on the level of individual tasks.")]),e._v(" "),t("li",[e._v("executor-request-cores: this settings is only relevant for Kubernetes based backends, allows to overcommit CPU")]),e._v(" "),t("li",[e._v("max-executors: the maximum number of workers assigned to your job. Maximum number of parallel tasks is "),t("code",[e._v("max-executors*executor-cores/task-cpus")]),e._v(". Increasing this can inflate your costs, while not necessarily improving performance!")]),e._v(" "),t("li",[e._v("driver-memory: memory assigned to the spark 'driver' JVM that controls execution of your batch job")]),e._v(" "),t("li",[e._v("driver-memoryOverhead: memory assigned to the spark 'driver' on top of JVM memory, for Python processes.")]),e._v(" "),t("li",[e._v("logging-threshold: the threshold for logging, set to 'info' by default, can be set to 'debug' to generate much more logging")]),e._v(" "),t("li",[e._v("udf-dependency-archives: an array of urls pointing to zip files with extra dependencies, see below")])]),e._v(" "),t("h4",{attrs:{id:"custom-udf-dependencies"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#custom-udf-dependencies"}},[e._v("#")]),e._v(" Custom UDF dependencies")]),e._v(" "),t("p",[e._v("User defined functions often depend on (specific versions of) libraries or require small auxiliary data files. The UDF specifications do not yet\ndefine a standardized manner to provide this other than having the ability of selecting from a predefined set of 'runtimes' that than again have a predefined configuration.")]),e._v(" "),t("p",[e._v("The Terrascope/Geotrellis backends solve this via the udf-dependency-archives job option, that allows to specify a list of zip files that should be included in the working directory of the UDF.")]),e._v(" "),t("p",[e._v("This enables the following example workflow for Python UDF's:")]),e._v(" "),t("ol",[t("li",[e._v("Create a Python 'virtualenv' with your dependencies")]),e._v(" "),t("li",[e._v("Based on the 'site-packages' directory of the virtualenv, create a zip file with all dependencies")]),e._v(" "),t("li",[e._v("Upload the zip to a url that can be reached by the backend.")]),e._v(" "),t("li",[e._v("In job options, add "),t("code",[e._v("\"udf-dependency-archives\": ['https://yourhost.com/myEnv.zip#tmp/mydir']")]),e._v(" The "),t("code",[e._v("#tmp/mydir")]),e._v(" suffix indicates where you want to unzip your files, relative to the working directory.")]),e._v(" "),t("li",[e._v("In your UDF, before trying to import libraries, add your directory to the Python path: "),t("code",[e._v("sys.path.insert(0, 'tmp/mydir')")])]),e._v(" "),t("li",[e._v("Now your libraries should be loaded before anything else!")])]),e._v(" "),t("p",[e._v("Known limitations:")]),e._v(" "),t("ul",[t("li",[e._v("Your dependencies need to be compatible with the Python version of the backend, currently 3.8.")]),e._v(" "),t("li",[e._v("Your dependencies need to be compatible with the OS of the backend, currently AlmaLinux 8.")]),e._v(" "),t("li",[e._v("The backend has a limited set of Python dependences that are preloaded, and cannot be changed, such as numpy.")])]),e._v(" "),t("h4",{attrs:{id:"learning-more"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#learning-more"}},[e._v("#")]),e._v(" Learning more")]),e._v(" "),t("p",[e._v("The topic of resource optimization is a complex one, and here we just give a short summary. The goal of openEO is to hide most of these\ndetails from the user, but we realize that advanced users sometimes want to have a bit more insight, so in the spirit of being open, we give some hints.")]),e._v(" "),t("p",[e._v("To learn more about these options, we point to the piece of code that handles this:")]),e._v(" "),t("p",[e._v("https://github.com/Open-EO/openeo-geopyspark-driver/blob/faf5d5364a82e870e42efd2a8aee9742f305da9f/openeogeotrellis/backend.py#L1213")]),e._v(" "),t("p",[e._v("Most memory related options are translated to Apache Spark configuration settings, which are documented here:")]),e._v(" "),t("p",[e._v("https://spark.apache.org/docs/3.3.1/configuration.html#application-properties")]),e._v(" "),t("h3",{attrs:{id:"batch-job-results-on-sentinel-hub"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#batch-job-results-on-sentinel-hub"}},[e._v("#")]),e._v(" Batch job results on Sentinel Hub")]),e._v(" "),t("p",[e._v("If you are processing data and the underlying back-end is Sentinel Hub, the output extent of your batch job results is currently larger than your input extent because Sentinel Hub processes whole tiles (this may change in the future and the data will be cropped to your input extent).")])],1)}),[],!1,null,null,null);t.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[51],{316:function(e,t,s){e.exports=s.p+"assets/img/federation.a955d770.png"},490:function(e,t,s){"use strict";s.r(t);var a=s(4),n=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"federation-aspects-and-known-issues"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#federation-aspects-and-known-issues"}},[e._v("#")]),e._v(" Federation Aspects and Known Issues")]),e._v(" "),t("p",[e._v("openEO Platform is a federated platform. This means that multiple independent 'back-ends',\nwhich all support the openEO interface, are combined into a single instance. From the outside,\nit appears to be a single platform, but you get access to data collections and processing resources from\nmultiple instances.")]),e._v(" "),t("p",[e._v("This image gives you a look at platforms that make up the federation:")]),e._v(" "),t("p",[t("img",{attrs:{src:s(316),alt:"openeo.cloud federation"}})]),e._v(" "),t("p",[e._v("At this time, the federation can not yet entirely hide the fact that it is built out of\nseparate components:")]),e._v(" "),t("ul",[t("li",[e._v("Within the same processing request, you can only use collections from the same back-end")]),e._v(" "),t("li",[e._v("Some processes are not (fully) supported by all back-ends.")]),e._v(" "),t("li",[e._v("If a back-end requires data from an external source, bandwidth limitations may result in slower processing.")])]),e._v(" "),t("h2",{attrs:{id:"data-collections"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#data-collections"}},[e._v("#")]),e._v(" Data Collections")]),e._v(" "),t("p",[e._v("The federation exposes the "),t("em",[e._v("union")]),e._v(" of the data collections of each of the underlying back-ends.\nWhen a processing request is submitted to the federated platform, the input collections are used to determine to which back-end the actual processing work should be delegated to.")]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("Note")]),e._v(" "),t("p",[e._v("For the technical discussion on collection federation, see "),t("a",{attrs:{href:"https://github.com/Open-EO/openeo-aggregator/issues/5",target:"_blank",rel:"noopener noreferrer"}},[e._v("Open-EO/openeo-aggregator#5"),t("OutboundLink")],1)])]),e._v(" "),t("h3",{attrs:{id:"terrascope"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#terrascope"}},[e._v("#")]),e._v(" Terrascope")]),e._v(" "),t("p",[e._v("Terrascope hosts a number of collections itself.\nFor coarse resolution data (e.g. 100 m resolution) this is often the full archive,\nwhile for medium resolution (Sentinel 1, 2) data is only offered for selected areas.")]),e._v(" "),t("p",[e._v("Additional data can be processed upon request, if it is not available from another provider.\nThis may result in an additional cost for processing and storage.")]),e._v(" "),t("h3",{attrs:{id:"sentinel-hub"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#sentinel-hub"}},[e._v("#")]),e._v(" Sentinel Hub")]),e._v(" "),t("p",[e._v("The Terrascope back-end also integrates with Sentinel Hub (part of Euro Data Cube) to give you\naccess to additional collections.\nThis practically means that data needs to be transferred from Sentinel Hub to the Terrascope data center before it can be processed.\nThis works very well for small areas, or a 100x100km MGRS tile in batch mode,\nbut is not yet recommended for processing medium size to large countries or continents.")]),e._v(" "),t("p",[e._v("The collection metadata of the Terrascope back-end tries to clearly identify which collections are served by Sentinel Hub.")]),e._v(" "),t("h4",{attrs:{id:"commercial-data"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#commercial-data"}},[e._v("#")]),e._v(" Commercial Data")]),e._v(" "),t("p",[e._v("openEO Platform provides direct access to commercial data. Currently, data must be purchased directly through Sentinel Hub (see Sentinel Hub documentation on purchasing commercial data "),t("a",{attrs:{href:"https://docs.sentinel-hub.com/api/latest/api/data-import/",target:"_blank",rel:"noopener noreferrer"}},[e._v("here"),t("OutboundLink")],1),e._v("), but we are working to support ordering commercial data directly from the platform in the future.")]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("Experimental usage")]),e._v(" "),t("p",[e._v("The below described way of how to connect to commercial data is currently only supported by the pyhton client and experimental. As such the behavior might still change in the future.")])]),e._v(" "),t("p",[e._v("Data is accessed as part of the load_collection process and via a "),t("code",[e._v("featureflags")]),e._v(" argument. To access the data, you must:")]),e._v(" "),t("ul",[t("li",[e._v("select the commercial data provider in "),t("code",[e._v("collection_id")]),e._v(" (e.g. "),t("code",[e._v('collection_id="PLANETSCOPE"')]),e._v(")")]),e._v(" "),t("li",[e._v("set the Sentinel Hub BYOC collection ID ("),t("code",[e._v("byoc-{id}")]),e._v(") as "),t("code",[e._v("featureflags")]),e._v(" argument\n(e.g. with openEO Python client version 0.10.1 or higher:\n"),t("code",[e._v('datacube.result_node().update_arguments(featureflags={"byoc_collection_id": byoc_collection_id})')]),e._v(")")])]),e._v(" "),t("p",[e._v("Full example of loading a commercial data collection:")]),e._v(" "),t("div",{staticClass:"language-python extra-class"},[t("pre",{pre:!0,attrs:{class:"language-python"}},[t("code",[e._v("toc "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" connection"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("load_collection"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("(")]),e._v("\n collection_id"),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"PLANETSCOPE"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n spatial_extent"),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"west"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("104.86")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"south"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("8.85")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"east"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("106.11")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"north"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("10.37")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n temporal_extent"),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"2019-03-01"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"2020-12-31"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n bands"),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"B3"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(")")]),e._v("\n\ntoc"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("result_node"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("(")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(")")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("update_arguments"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("(")]),e._v("featureflags"),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"byoc_collection_id"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(":")]),e._v(" byoc_collection_id"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(")")]),e._v("\n")])])]),t("p",[e._v("List of currently supported commercial data providers:")]),e._v(" "),t("ul",[t("li",[e._v("Airbus Pleiades (ID: "),t("a",{attrs:{href:"https://openeo.cloud/data-collections/view/?id=PLEIADES",target:"_blank",rel:"noopener noreferrer"}},[e._v("PLEIADES"),t("OutboundLink")],1),e._v(")")]),e._v(" "),t("li",[e._v("Airbus Spot (ID: "),t("a",{attrs:{href:"https://openeo.cloud/data-collections/view/?id=SPOT",target:"_blank",rel:"noopener noreferrer"}},[e._v("SPOT"),t("OutboundLink")],1),e._v(")")]),e._v(" "),t("li",[e._v("PlanetScope (ID: "),t("a",{attrs:{href:"https://openeo.cloud/data-collections/view/?id=PLANETSCOPE",target:"_blank",rel:"noopener noreferrer"}},[e._v("PLANETSCOPE"),t("OutboundLink")],1),e._v(")")]),e._v(" "),t("li",[e._v("WorldView (ID: "),t("a",{attrs:{href:"https://openeo.cloud/data-collections/view/?id=WORLDVIEW",target:"_blank",rel:"noopener noreferrer"}},[e._v("WORLDVIEW"),t("OutboundLink")],1),e._v(")")])]),e._v(" "),t("h3",{attrs:{id:"eodc"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#eodc"}},[e._v("#")]),e._v(" EODC")]),e._v(" "),t("p",[e._v("EODC provides Sentinel-1 (GRH), Sentinel-2 and Sentinel-3 Level-1 globally. On top, pre-processed Level-2 data is\navailable on request (this may result in additional costs). In detail Gamma0 data processed with SNAP and optical ARD\nproducts processed with FORCE are provided.")]),e._v(" "),t("p",[e._v("If the available pre-processed collections are not sufficient, there is on option to perform ARD processing on demand\nwith SNAP respectively FORCE. This may again result in additional costs for processing and storage.")]),e._v(" "),t("p",[e._v("Currently most processes are only available for Level-2 data. Only the ARD processes can be executed on Level-1 data. Also\nonly either ARD processes "),t("strong",[e._v("or")]),e._v(' "standard" processes can be used in one process graph. Combining both types of processes\nis not yet supported. One option to nevertheless achieve a combination of process types is to run ARD on Level-1 data,\nsave the results of the job, and then in a second job load results and perform additional computations.')]),e._v(" "),t("h3",{attrs:{id:"enforce-back-end-selection-for-common-collections"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#enforce-back-end-selection-for-common-collections"}},[e._v("#")]),e._v(" Enforce back-end selection for common collections")]),e._v(" "),t("p",[e._v("Some collections are provided by multiple underlying back-ends,\npossibly with differences in spatial or temporal coverage.\nThis is exposed in the collection metadata with "),t("code",[e._v("federation:backends")]),e._v(" summary, e.g.:")]),e._v(" "),t("div",{staticClass:"language-json extra-class"},[t("pre",{pre:!0,attrs:{class:"language-json"}},[t("code",[t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[e._v('"id"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"WATER_BODIES"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[e._v('"type"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"Collection"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n ...\n "),t("span",{pre:!0,attrs:{class:"token property"}},[e._v('"summaries"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[e._v('"federation:backends"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"vito"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"sentinelhub"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n ...\n "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),t("p",[e._v("When a user submits a processing request,\nthe federated platform will try, by default, to automatically determine\nwhich underlying back-end is best choice for the actual processing,\nbased for example on the requested spatial extent.")]),e._v(" "),t("p",[e._v("You can however also enforce the selection of a certain back-end\nby using the metadata property filtering feature\nof the "),t("code",[e._v("load_collection")]),e._v(' process.\nFor example, with the Python client, to enforce the selection of\nthe "sentinelhub" back-end:')]),e._v(" "),t("CodeSwitcher",{attrs:{languages:{py:"Python",r:"R"}},scopedSlots:e._u([{key:"py",fn:function(){return[t("div",{staticClass:"language-python extra-class"},[t("pre",{pre:!0,attrs:{class:"language-python"}},[t("code",[e._v("cube "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" connection"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("load_collection"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("(")]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"WATER_BODIES"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("\n properties"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"federation:backends"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("lambda")]),e._v(" v"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(":")]),e._v(" v "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("==")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"sentinelhub"')]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(")")]),e._v("\n")])])])]},proxy:!0},{key:"r",fn:function(){return[t("div",{staticClass:"language-r extra-class"},[t("pre",{pre:!0,attrs:{class:"language-r"}},[t("code",[e._v("cube "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" p"),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("$")]),e._v("load_collection"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("(")]),e._v("\n id "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"WATER_BODIES"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token ellipsis"}},[e._v("...")]),e._v("\n properties "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" list"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("(")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"federation:backends"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("function")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("(")]),e._v("x"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(")")]),e._v(" x "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("==")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"sentinelhub"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(")")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(")")]),e._v("\n")])])])]},proxy:!0}])}),e._v(" "),t("h2",{attrs:{id:"processes"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#processes"}},[e._v("#")]),e._v(" Processes")]),e._v(" "),t("p",[e._v("Each of the underlying back-ends of the federation can define its own set of available processes,\nbut there is in practice a very large common ground across these back-ends.\nAs such, the federation's listing of available processes is the "),t("em",[e._v("intersection")]),e._v("\nof the process sets of each of the underlying back-ends.\nThis is the most straightforward combination with the least surprise.")]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("Advanced/experimental usage")]),e._v(" "),t("p",[e._v("A savvy user that knows which underlying back-end will execute their job\ncan however still submit process graphs with processes that are available\non that back-end but fall outside the intersection,\nas the federation will just forward the process graph as-is to that back-end.")])]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("Note")]),e._v(" "),t("p",[e._v("For the technical discussion on process federation, see "),t("a",{attrs:{href:"https://github.com/Open-EO/openeo-aggregator/issues/4",target:"_blank",rel:"noopener noreferrer"}},[e._v("Open-EO/openeo-aggregator#4"),t("OutboundLink")],1)])]),e._v(" "),t("h2",{attrs:{id:"file-formats"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#file-formats"}},[e._v("#")]),e._v(" File formats")]),e._v(" "),t("p",[e._v("The federation currently lists the "),t("em",[e._v("union")]),e._v(" of import/export file formats available\nat each of the underlying back-ends.")]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("Note")]),e._v(" "),t("p",[e._v("For the technical discussion on file format federation, see "),t("a",{attrs:{href:"https://github.com/Open-EO/openeo-aggregator/issues/1",target:"_blank",rel:"noopener noreferrer"}},[e._v("Open-EO/openeo-aggregator#1"),t("OutboundLink")],1)])]),e._v(" "),t("h2",{attrs:{id:"on-demand-preview"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#on-demand-preview"}},[e._v("#")]),e._v(" On-demand-preview")]),e._v(" "),t("p",[e._v("Sometimes there is a need to quickly inspect results of a process graph on the map without first running the entire graph first and waiting for the results to be computed and returned. This "),t("code",[e._v("on-demand-preview")]),e._v(" is available in the "),t("a",{attrs:{href:"https://editor.openeo.cloud/",target:"_blank",rel:"noopener noreferrer"}},[e._v("openEO Platform Editor"),t("OutboundLink")],1),e._v(" and the "),t("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/index.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("openEO Python Client*"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("In the Editor you can find the functionality in the "),t("code",[e._v("Web Services")]),e._v(" tab. Use the button"),t("code",[e._v("Show on Map")]),e._v(".")]),e._v(" "),t("p",[e._v("In the Python Client, you can use the "),t("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/api.html#openeo.rest.datacube.DataCube.preview",target:"_blank",rel:"noopener noreferrer"}},[e._v(".preview() method"),t("OutboundLink")],1),e._v(" to create a service with your process graph and display the results in an ipyleaflet Map object. You can find an example implementation in "),t("a",{attrs:{href:"https://github.com/openEOPlatform/sample-notebooks/blob/main/on-demand_preview.ipynb",target:"_blank",rel:"noopener noreferrer"}},[e._v("this Jupyter notebook"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("Note")]),e._v(" "),t("p",[e._v("This functionallity currently only works with collections that are also on the Sentinel Hub backend (Provider > Backend > sentinelhub). In order for the map to display meaningful results, your process graph should:")]),e._v(" "),t("ul",[t("li",[e._v("return one or three bands,")]),e._v(" "),t("li",[e._v("a single temporal extent,")]),e._v(" "),t("li",[e._v("and scale the data to a range so that the output format can adequately save it.")])])]),e._v(" "),t("p",[e._v("*You need to have at least version 0.19.0 installed to use this functionality.")]),e._v(" "),t("h2",{attrs:{id:"batch-jobs"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#batch-jobs"}},[e._v("#")]),e._v(" Batch jobs")]),e._v(" "),t("p",[e._v("As discussed above, when the federated platform receives a processing request, such as a batch job,\nit will automatically determine to which back-end this request should be delegated for actual processing.")]),e._v(" "),t("h3",{attrs:{id:"managed-job-splitting"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#managed-job-splitting"}},[e._v("#")]),e._v(" Managed job splitting")]),e._v(" "),t("p",[e._v("In addition to this basic delegation feature, the federation also provides more advanced (pre)processing capabilities.\nFor instance, the federation platform can be instructed to split up a single batch job in multiple sub-jobs\nand distribute these across one or more processing back-ends.\nThe federation platform will automatically create, start and keep track of these sub-jobs\nwhile the user just have to interact with a single job: e.g. check the overall processing status,\ndownload the combined result assets, ...")]),e._v(" "),t("p",[e._v("Currently, spatial tile-based splitting is supported as splitting strategy\nand it can be enabled by providing a specific job option when submitting the batch job.\nFor example, using the openEO Python Client, instruct the federation platform to\nsplit up datacube processing in UTM based tiles of 20km by 20km:")]),e._v(" "),t("div",{staticClass:"language-python extra-class"},[t("pre",{pre:!0,attrs:{class:"language-python"}},[t("code",[e._v("job "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" datacube"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("create_job"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("(")]),e._v("\n job_options"),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"tile_grid"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"utm-20km"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(")")]),e._v("\n")])])]),t("p",[e._v('This creates a virtual master job on the level of the federation platform and real batch jobs\non the appropriate processing back-ends.\nSubsequent interaction (starting the jobs, polling their status, requesting the result assets, ...)\ncan be done through the "master" '),t("code",[e._v("job")]),e._v(" object created above, in the same way as with normal batch jobs.")]),e._v(" "),t("h3",{attrs:{id:"validity-of-signed-urls-in-batch-job-results"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#validity-of-signed-urls-in-batch-job-results"}},[e._v("#")]),e._v(" Validity of signed URLs in batch job results")]),e._v(" "),t("p",[e._v("Batch job results are accessible to the user via signed URLs stored in the result assets. Within the platform,\nthese URLs have a validity (expiry time) of 7 days. Within these 7 days, the results of a batch job can be accessed\nby any person with the URL. Each time a user requests the results from the job endpoint ("),t("code",[e._v("GET /jobs/{job_id}/results")]),e._v("),\na freshly signed URL (valid for 7 days) is created for the result assets.")]),e._v(" "),t("h3",{attrs:{id:"customizing-batch-job-resources-on-terrascope"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#customizing-batch-job-resources-on-terrascope"}},[e._v("#")]),e._v(" Customizing batch job resources on Terrascope")]),e._v(" "),t("p",[e._v("Jobs running on the (Terrascope) cluster get assigned a default amount of CPU and memory resources. This\nmay not always be enough for your job, for instance when using UDF's. Also for very large jobs, you may want\nto tune your resource settings to optimize for cost.")]),e._v(" "),t("p",[e._v("The example below shows how to start a job with all options set to their default values. It is important to highlight\nthat default settings are subject to change by the backend whenever needed.")]),e._v(" "),t("div",{staticClass:"language-python extra-class"},[t("pre",{pre:!0,attrs:{class:"language-python"}},[t("code",[e._v("job_options "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v(" \n "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"executor-memory"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"2G"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"executor-memoryOverhead"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"3G"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"executor-cores"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("2")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"task-cpus"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"executor-request-cores"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"400m"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"max-executors"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"100"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"driver-memory"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"8G"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"driver-memoryOverhead"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"2G"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"driver-cores"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("5")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"udf-dependency-archives"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(":")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"logging-threshold"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"info"')]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\ncube"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("execute_batch"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("(")]),e._v("job_options"),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("job_options"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(")")]),e._v("\n")])])]),t("p",[e._v("This is a short overview of the various options:")]),e._v(" "),t("ul",[t("li",[e._v("executor-memory: memory assigned to your workers, for the JVM that executes most predefined processes")]),e._v(" "),t("li",[e._v("executor-memoryOverhead: memory assigned on top of the JVM, for instance to run UDF's")]),e._v(" "),t("li",[e._v("executor-cores: number of CPUs per worker (executor). The number of parallel tasks is executor-cores/task-cpus")]),e._v(" "),t("li",[e._v("task-cpus: CPUs assigned to a single task. UDF's using libraries like Tensorflow can benefit from further parallellization on the level of individual tasks.")]),e._v(" "),t("li",[e._v("executor-request-cores: this settings is only relevant for Kubernetes based backends, allows to overcommit CPU")]),e._v(" "),t("li",[e._v("max-executors: the maximum number of workers assigned to your job. Maximum number of parallel tasks is "),t("code",[e._v("max-executors*executor-cores/task-cpus")]),e._v(". Increasing this can inflate your costs, while not necessarily improving performance!")]),e._v(" "),t("li",[e._v("driver-memory: memory assigned to the spark 'driver' JVM that controls execution of your batch job")]),e._v(" "),t("li",[e._v("driver-memoryOverhead: memory assigned to the spark 'driver' on top of JVM memory, for Python processes.")]),e._v(" "),t("li",[e._v("logging-threshold: the threshold for logging, set to 'info' by default, can be set to 'debug' to generate much more logging")]),e._v(" "),t("li",[e._v("udf-dependency-archives: an array of urls pointing to zip files with extra dependencies, see below")])]),e._v(" "),t("h4",{attrs:{id:"custom-udf-dependencies"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#custom-udf-dependencies"}},[e._v("#")]),e._v(" Custom UDF dependencies")]),e._v(" "),t("p",[e._v("User defined functions often depend on (specific versions of) libraries or require small auxiliary data files. The UDF specifications do not yet\ndefine a standardized manner to provide this other than having the ability of selecting from a predefined set of 'runtimes' that than again have a predefined configuration.")]),e._v(" "),t("p",[e._v("The Terrascope/Geotrellis backends solve this via the udf-dependency-archives job option, that allows to specify a list of zip files that should be included in the working directory of the UDF.")]),e._v(" "),t("p",[e._v("This enables the following example workflow for Python UDF's:")]),e._v(" "),t("ol",[t("li",[e._v("Create a Python 'virtualenv' with your dependencies")]),e._v(" "),t("li",[e._v("Based on the 'site-packages' directory of the virtualenv, create a zip file with all dependencies")]),e._v(" "),t("li",[e._v("Upload the zip to a url that can be reached by the backend.")]),e._v(" "),t("li",[e._v("In job options, add "),t("code",[e._v("\"udf-dependency-archives\": ['https://yourhost.com/myEnv.zip#tmp/mydir']")]),e._v(" The "),t("code",[e._v("#tmp/mydir")]),e._v(" suffix indicates where you want to unzip your files, relative to the working directory.")]),e._v(" "),t("li",[e._v("In your UDF, before trying to import libraries, add your directory to the Python path: "),t("code",[e._v("sys.path.insert(0, 'tmp/mydir')")])]),e._v(" "),t("li",[e._v("Now your libraries should be loaded before anything else!")])]),e._v(" "),t("p",[e._v("Known limitations:")]),e._v(" "),t("ul",[t("li",[e._v("Your dependencies need to be compatible with the Python version of the backend, currently 3.8.")]),e._v(" "),t("li",[e._v("Your dependencies need to be compatible with the OS of the backend, currently AlmaLinux 8.")]),e._v(" "),t("li",[e._v("The backend has a limited set of Python dependences that are preloaded, and cannot be changed, such as numpy.")])]),e._v(" "),t("h4",{attrs:{id:"learning-more"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#learning-more"}},[e._v("#")]),e._v(" Learning more")]),e._v(" "),t("p",[e._v("The topic of resource optimization is a complex one, and here we just give a short summary. The goal of openEO is to hide most of these\ndetails from the user, but we realize that advanced users sometimes want to have a bit more insight, so in the spirit of being open, we give some hints.")]),e._v(" "),t("p",[e._v("To learn more about these options, we point to the piece of code that handles this:")]),e._v(" "),t("p",[e._v("https://github.com/Open-EO/openeo-geopyspark-driver/blob/faf5d5364a82e870e42efd2a8aee9742f305da9f/openeogeotrellis/backend.py#L1213")]),e._v(" "),t("p",[e._v("Most memory related options are translated to Apache Spark configuration settings, which are documented here:")]),e._v(" "),t("p",[e._v("https://spark.apache.org/docs/3.3.1/configuration.html#application-properties")]),e._v(" "),t("h3",{attrs:{id:"batch-job-results-on-sentinel-hub"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#batch-job-results-on-sentinel-hub"}},[e._v("#")]),e._v(" Batch job results on Sentinel Hub")]),e._v(" "),t("p",[e._v("If you are processing data and the underlying back-end is Sentinel Hub, the output extent of your batch job results is currently larger than your input extent because Sentinel Hub processes whole tiles (this may change in the future and the data will be cropped to your input extent).")])],1)}),[],!1,null,null,null);t.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/52.4250f428.js b/assets/js/52.f71825e2.js similarity index 99% rename from assets/js/52.4250f428.js rename to assets/js/52.f71825e2.js index e5b50f7f4..efe1ecf9b 100644 --- a/assets/js/52.4250f428.js +++ b/assets/js/52.f71825e2.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[52],{320:function(t,a,s){t.exports=s.p+"assets/img/chart.722d5801.png"},507:function(t,a,s){"use strict";s.r(a);var n=s(4),e=Object(n.a)({},(function(){var t=this,a=t._self._c;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"no2-monitoring"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#no2-monitoring"}},[t._v("#")]),t._v(" NO₂ monitoring")]),t._v(" "),a("p",[a("a",{attrs:{href:"https://sentinels.copernicus.eu/web/sentinel/missions/sentinel-5p/instrumental-payload",target:"_blank",rel:"noopener noreferrer"}},[t._v("TROPOMI ("),a("strong",[t._v("TROPO")]),t._v("spheric "),a("strong",[t._v("M")]),t._v("onitoring "),a("strong",[t._v("I")]),t._v("nstrument)"),a("OutboundLink")],1),t._v(" is the name of a sensor on board of the "),a("a",{attrs:{href:"https://sentinels.copernicus.eu/web/sentinel/missions/sentinel-5p",target:"_blank",rel:"noopener noreferrer"}},[t._v("Sentinel-5 Precursor (S5P) satellite"),a("OutboundLink")],1),t._v(", developed to monitor atmospheric chemistry.")]),t._v(" "),a("p",[t._v("This use case analyses Sentinel 5P imagery, focusing in particular on NO₂ measurements. Compared to other variables measured by TROPOMI, NO₂ is of high interest not only because of its direct relation with environmental health, but also because the main sources are typically known, because it is not transported over long distances and because the total column values measured by TROPOMI are strong indication of the ground level values.")]),t._v(" "),a("p",[t._v("This document describes how to analyze NO₂ data on openEO Platform using the Python, JavaScript and R client.\nAdditionally, we've prepared "),a("a",{attrs:{href:"https://github.com/openEOPlatform/sample-notebooks/blob/main/sentinel-5p.ipynb",target:"_blank",rel:"noopener noreferrer"}},[t._v("a basic Jupyter Notebook"),a("OutboundLink")],1),t._v(" for Python and much more advanced R and Python Shiny apps that you can run to analyze and visualize the NO₂ data in various ways.")]),t._v(" "),a("h2",{attrs:{id:"shiny-apps-r-and-python"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#shiny-apps-r-and-python"}},[t._v("#")]),t._v(" Shiny apps (R and Python)")]),t._v(" "),a("p",[t._v("In the Shiny app the NO₂ values can be analyzed globally over a full year. The analysis allows the user to set threshold values for the cloud cover. Gaps due to the cloud removal are filled by a linear interpolation. Noise gets removed by computing 30-day smoothed values, using kernel smoothing of the time series.")]),t._v(" "),a("p",[t._v("The Shiny app allows for three different modes:")]),t._v(" "),a("ul",[a("li",[t._v("Time series analysis / comparison against locally measured data")]),t._v(" "),a("li",[t._v("Map visualization for individual days")]),t._v(" "),a("li",[t._v("Animated maps that highlight differences in space and time")])]),t._v(" "),a("p",[t._v("Currently, the Shiny apps can only run on your local computer but we are looking into offering a hosted version, too. There's also "),a("RouterLink",{attrs:{to:"/getting-started/python/shiny.html"}},[t._v("a guide that explains how to run openEO code in a Python Shiny app in general")]),t._v(".")],1),t._v(" "),a("p",[t._v("You can find the full source code and documentation of the apps in their respective repositories:")]),t._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"https://github.com/Open-EO/r4openeo-usecases/tree/main/uc3-s5p-dashboard",target:"_blank",rel:"noopener noreferrer"}},[t._v("R Shiny app repository"),a("OutboundLink")],1)]),t._v(" "),a("li",[a("a",{attrs:{href:"https://github.com/openEOPlatform/s5p-py-dashboard",target:"_blank",rel:"noopener noreferrer"}},[t._v("Python Shiny app repository"),a("OutboundLink")],1)])]),t._v(" "),a("h3",{attrs:{id:"time-series-analyser"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#time-series-analyser"}},[t._v("#")]),t._v(" Time-Series Analyser")]),t._v(" "),a("p",[t._v('The Time-Series Analyser allows one to see the "reduced" time series (min/max/smoothed mean) of Sentinel 5P NO2 data from a given region. Basically, to use this function, the user can pass the coordinates of the bounding box of the area of interest, which are shown in a dynamic map; but also the time frame and the cloud cover to be considered in the computation. The analyser can also do a comparison against locally measured data (for selected areas only).')]),t._v(" "),a("h3",{attrs:{id:"map-maker-for-one-snapshot"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#map-maker-for-one-snapshot"}},[t._v("#")]),t._v(" Map Maker for one Snapshot")]),t._v(" "),a("p",[t._v("If the user desires to look at NO2 data at one given point in time, this function is the developed for this purpose. This second option in the Shiny app allows one to visualize how does a country's pattern in NO2 looks like in a given time, following S5P NO2 data.")]),t._v(" "),a("h3",{attrs:{id:"spacetime-animation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#spacetime-animation"}},[t._v("#")]),t._v(" Spacetime Animation")]),t._v(" "),a("p",[t._v("Here, the user can create and visualise their own spatio-temporal animation of S5P NO2 data. Given a starting and ending date, as well as the quality flag for cloud cover and a given country name, the user may have their own personalised spacetime GIF ready for their usage.")]),t._v(" "),a("p",[a("img",{attrs:{src:"https://github.com/Open-EO/r4openeo-usecases/raw/main/uc3-s5p-dashboard/image/spacetime-animation.gif",alt:"Spacetime animation generated by the dashboard"}})]),t._v(" "),a("h2",{attrs:{id:"basic-no2-analysis-in-python-r-and-javascript"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#basic-no2-analysis-in-python-r-and-javascript"}},[t._v("#")]),t._v(" Basic NO₂ analysis in Python, R and JavaScript")]),t._v(" "),a("p",[t._v("openEO Platform has multiple collections that offer Sentinel-5P data, e.g. for NO₂:")]),t._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"https://openeo.cloud/data-collections/view/?id=TERRASCOPE_S5P_L3_NO2_TD_V1",target:"_blank",rel:"noopener noreferrer"}},[t._v("TERRASCOPE_S5P_L3_NO2_TD_V1"),a("OutboundLink")],1),t._v(" - daily, hosted by VITO, pre-processed to remove clouds etc.")]),t._v(" "),a("li",[a("a",{attrs:{href:"https://openeo.cloud/data-collections/view/?id=TERRASCOPE_S5P_L3_NO2_TM_V1",target:"_blank",rel:"noopener noreferrer"}},[t._v("TERRASCOPE_S5P_L3_NO2_TD_V1"),a("OutboundLink")],1),t._v(" - monthly, hosted by VITO, pre-processed to remove clouds etc.")]),t._v(" "),a("li",[a("a",{attrs:{href:"https://openeo.cloud/data-collections/view/?id=TERRASCOPE_S5P_L3_NO2_TY_V1",target:"_blank",rel:"noopener noreferrer"}},[t._v("TERRASCOPE_S5P_L3_NO2_TD_V1"),a("OutboundLink")],1),t._v(" - yearly, hosted by VITO, pre-processed to remove clouds etc.")]),t._v(" "),a("li",[a("a",{attrs:{href:"https://openeo.cloud/data-collections/view/?id=SENTINEL_5P_L2",target:"_blank",rel:"noopener noreferrer"}},[t._v("SENTINEL_5P_L2"),a("OutboundLink")],1),t._v(" - Level 2 data, hosted by Sentinel Hub")])]),t._v(" "),a("p",[a("code",[t._v("SENTINEL_5P_L2")]),t._v(" also contains additional data such as CO, O₂, SO₂ and you can also experiment with those. CO is also available on VITO in Collections such as "),a("code",[t._v("TERRASCOPE_S5P_L3_CO_TD_V1")]),t._v(".")]),t._v(" "),a("p",[t._v("In this example we'll use the daily composites from the "),a("code",[t._v("TERRASCOPE_S5P_L3_NO2_TD_V1")]),t._v(" collection, which is available starting from end of April 2018.")]),t._v(" "),a("h3",{attrs:{id:"_1-load-a-data-cube"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-load-a-data-cube"}},[t._v("#")]),t._v(" 1. Load a data cube")]),t._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("Attention")]),t._v(" "),a("p",[t._v("This tutorial assumes you have completed the Getting Started guides and are connected and logged in to openEO Platform.\nYour connection object should be stored in a variable named "),a("code",[t._v("connection")]),t._v(".")])]),t._v(" "),a("p",[t._v("First of all, we need to load the data into a datacube. We set the temporal extent to the year 2019 and choose spatial extent, here an area over Münster, Germany.")]),t._v(" "),a("CodeSwitcher",{attrs:{languages:{py:"Python",js:"JavaScript",r:"R"}},scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("year "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2019")]),t._v("\nextent "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Münster")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Polygon"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"coordinates"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("7.737228350528245")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("51.86687168604513")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("7.507741544165615")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("51.86687168604513")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("7.507741544165615")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("52.05013100121914")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("7.737228350528245")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("52.05013100121914")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("7.737228350528245")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("51.86687168604513")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" connection"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("load_collection"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TERRASCOPE_S5P_L3_NO2_TD_V1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n spatial_extent "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" extent"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n temporal_extent "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string-interpolation"}},[a("span",{pre:!0,attrs:{class:"token string"}},[t._v('f"')]),a("span",{pre:!0,attrs:{class:"token interpolation"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("year"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")])]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('-01-01"')])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string-interpolation"}},[a("span",{pre:!0,attrs:{class:"token string"}},[t._v('f"')]),a("span",{pre:!0,attrs:{class:"token interpolation"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("year"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")])]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('-12-31"')])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" builder "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" connection"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("buildProcess")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" year "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2019")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" extent "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Münster")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Polygon"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v('"coordinates"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("7.737228350528245")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("51.86687168604513")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("7.507741544165615")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("51.86687168604513")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("7.507741544165615")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("52.05013100121914")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("7.737228350528245")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("52.05013100121914")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("7.737228350528245")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("51.86687168604513")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" datacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("load_collection")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TERRASCOPE_S5P_L3_NO2_TD_V1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" extent"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token template-string"}},[a("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")]),a("span",{pre:!0,attrs:{class:"token interpolation"}},[a("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("year"),a("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("-01-01")]),a("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token template-string"}},[a("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")]),a("span",{pre:!0,attrs:{class:"token interpolation"}},[a("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("year"),a("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("-12-31")]),a("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]},proxy:!0},{key:"r",fn:function(){return[a("div",{staticClass:"language-r extra-class"},[a("pre",{pre:!0,attrs:{class:"language-r"}},[a("code",[t._v("p "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" processes"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\nyear "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019"')]),t._v("\nextent "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" list"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Münster")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"type"')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Polygon"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"coordinates"')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" list"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("list"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n list"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("5.9521131313239675")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("51.78636868072434")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n list"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("5.971674074614773")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("50.52897921775278")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n list"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("9.893643204421315")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("50.609735254808925")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n list"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("9.864301789485104")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("51.870991335721925")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n list"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("5.9521131313239675")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("51.78636868072434")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" p"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("$")]),t._v("load_collection"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n id "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TERRASCOPE_S5P_L3_NO2_TD_V1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n spatial_extent "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" extent"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n temporal_extent "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" list"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("paste"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("year"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"-01-01"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" sep "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('""')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" paste"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("year"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"-12-31"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" sep "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('""')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0}])}),t._v(" "),a("h3",{attrs:{id:"_2-fill-gaps"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-fill-gaps"}},[t._v("#")]),t._v(" 2. Fill gaps")]),t._v(" "),a("p",[t._v("The data cube may contain no-data values due to the removal of clouds in the pre-processing of the collection.\nWe'll apply a linear interpolation along the temporal dimension:")]),t._v(" "),a("CodeSwitcher",{attrs:{languages:{py:"Python",js:"JavaScript",r:"R"}},scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("datacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("apply_dimension"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("dimension "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" process "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"array_interpolate_linear"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("interpolate")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" _"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" builder")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("array_interpolate_linear")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply_dimension")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" interpolate"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]},proxy:!0},{key:"r",fn:function(){return[a("div",{staticClass:"language-r extra-class"},[a("pre",{pre:!0,attrs:{class:"language-r"}},[a("code",[t._v("interpolate "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" context"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n p"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("$")]),t._v("array_interpolate_linear"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" p"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("$")]),t._v("apply_dimension"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" dimension "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" process "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" interpolate"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0}])}),t._v(" "),a("h3",{attrs:{id:"_3-smoothen-values-optional"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-smoothen-values-optional"}},[t._v("#")]),t._v(" 3. Smoothen values (optional)")]),t._v(" "),a("p",[t._v("If you want to smoothen the values to get rid of noise for example, we can run a moving average over a certain amount of days over the temporal dimension.\nIf you want to work on the raw values, you can also omit this step.\nThe "),a("code",[t._v("moving_average_window")]),t._v(" variable specifies the smoothing in number of days.\nYou can choose it freely, but it needs to be an odd integer >= 3.\nIn the example below 31 was chosen to smooth the timeseries with a moving average of a full month.")]),t._v(" "),a("CodeSwitcher",{attrs:{languages:{py:"Python",js:"JavaScript",r:"R"}},scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("moving_average_window "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("31")]),t._v("\nudf "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" openeo"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("UDF"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token triple-quoted-string string"}},[t._v('"""\nfrom pandas import Series\nimport numpy as np\n\ndef apply_timeseries(series: Series, context: dict) -> Series:\n return np.convolve(series, np.ones({n})/{n}, mode=\'same\')\n"""')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("format")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("n "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" moving_average_window"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("apply_dimension"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("dimension "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" process "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" udf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" moving_average_window "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("31")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" udf "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token template-string"}},[a("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\nfrom pandas import Series\nimport numpy as np\n\ndef apply_timeseries(series: Series, context: dict) -> Series:\n return np.convolve(series, np.ones(")]),a("span",{pre:!0,attrs:{class:"token interpolation"}},[a("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("moving_average_window"),a("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v(")/")]),a("span",{pre:!0,attrs:{class:"token interpolation"}},[a("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("moving_average_window"),a("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v(", mode='same')\n")]),a("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("run")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" _"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" builder")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("run_udf")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" udf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Python"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply_dimension")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" run"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0},{key:"r",fn:function(){return[a("div",{staticClass:"language-r extra-class"},[a("pre",{pre:!0,attrs:{class:"language-r"}},[a("code",[t._v("moving_average_window "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("31")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nudf "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(' "\nfrom pandas import Series\nimport numpy as np\n\ndef apply_timeseries'),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("series"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" Series"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" context"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" dict"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),t._v(" Series"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("\n return np.convolve"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("series"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" np.ones"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("NN"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),t._v("NN"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" mode"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'same'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v('\n"\nrun '),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" context"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n p"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("$")]),t._v("run_udf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" runtime "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Python"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" udf "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" gsub"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"NN"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" moving_average_window"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" udf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" p"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("$")]),t._v("apply_dimension"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" dimension "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" process "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" run"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0}])}),t._v(" "),a("div",{staticClass:"custom-block tip"},[a("p",{staticClass:"custom-block-title"},[t._v("Note")]),t._v(" "),a("p",[t._v("A technical detail here is that we run the moving average as a Python UDF, which is custom Python code.\nWe don't have a pre-defined process in openEO yet that easily allows this and as such we fall back to a UDF.\nWe embed the Python code in a string in this example so that you can easily copy the code, but ideally\nyou'd store it in a file and load the UDF from there.")]),t._v(" "),a("p",[t._v("The Python UDF code (for all client languages!) itself is pretty simple:")]),t._v(" "),a("div",{staticClass:"language-py extra-class"},[a("pre",{pre:!0,attrs:{class:"language-py"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" pandas "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" Series\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" numpy "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("as")]),t._v(" np\n\nN "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("31")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("def")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply_timeseries")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("series"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" Series"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" context"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("dict")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("-")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" Series"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" np"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("convolve"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("series"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" np"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("ones"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("N"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),t._v("N"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" mode"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'same'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]),t._v(" "),a("h3",{attrs:{id:"_4-what-do-you-want-to-know"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-what-do-you-want-to-know"}},[t._v("#")]),t._v(" 4. What do you want to know?")]),t._v(" "),a("p",[t._v("Now it's time to decide what we actually want to compute and get an insight into.")]),t._v(" "),a("p",[t._v("Currently, the data cube at still has 4 dimensions:\nThe spatial dimensions "),a("code",[t._v("x")]),t._v(" and "),a("code",[t._v("y")]),t._v(" covering the extent of Münster,\nthe temporal dimension "),a("code",[t._v("t")]),t._v(" covering usually about 365 values of the given year, and\nthe band dimension "),a("code",[t._v("bands")]),t._v(" with just a single label "),a("code",[t._v("NO2")]),t._v(".")]),t._v(" "),a("p",[t._v("As the "),a("code",[t._v("bands")]),t._v(" dimension only has a single label it gets dropped automatically during export,\nwhich means we now basically have a series of NO₂ maps, one for each day.\nWe have several options now:")]),t._v(" "),a("ol",[a("li",[t._v("Store the daily maps as netCDF file")]),t._v(" "),a("li",[t._v("Reduce the temporal dimension to get a single map for the year as GeoTIff")]),t._v(" "),a("li",[t._v("Reduce the spatial dimensions to get a timeseries as JSON")])]),t._v(" "),a("h4",{attrs:{id:"_4-1-netcdf-export"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-1-netcdf-export"}},[t._v("#")]),t._v(" 4.1 netCDF Export")]),t._v(" "),a("p",[t._v("To store daily maps in a netCDF file, we simply need to store the datacube:")]),t._v(" "),a("CodeSwitcher",{attrs:{languages:{py:"Python",js:"JavaScript",r:"R"}},scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("datacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("save_result"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("format")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"netCDF"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[t._v("datacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("save_result")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"netCDF"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]},proxy:!0},{key:"r",fn:function(){return[a("div",{staticClass:"language-r extra-class"},[a("pre",{pre:!0,attrs:{class:"language-r"}},[a("code",[t._v("datacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" p"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("$")]),t._v("save_result"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" format "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"netCDF"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0}])}),t._v(" "),a("h4",{attrs:{id:"_4-2-map-for-a-year-as-geotiff"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-2-map-for-a-year-as-geotiff"}},[t._v("#")]),t._v(" 4.2 Map for a year as GeoTiff")]),t._v(" "),a("p",[t._v("To get a map with values for a year we need to reduce the temporal dimensions by reducing the values along the temporal dimension.\nYou can run different reducers such as "),a("code",[t._v("mean")]),t._v(" (in the example below), "),a("code",[t._v("max")]),t._v(" or "),a("code",[t._v("min")]),t._v(" so that\nwe get a single value for each pixel.")]),t._v(" "),a("p",[t._v("Lastly, you need to specify that you want to store the result as GeoTiff ("),a("code",[t._v("GTiff")]),t._v(" due to the naming in GDAL).")]),t._v(" "),a("CodeSwitcher",{attrs:{languages:{py:"Python",js:"JavaScript",r:"R"}},scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("datacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("reduce_dimension"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("reducer "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"mean"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" dimension "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("save_result"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("format")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"GTiff"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("reducer")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" _"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" builder")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("mean")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("reduce_dimension")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" reducer"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" dimension "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("save_result")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"GTiff"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]},proxy:!0},{key:"r",fn:function(){return[a("div",{staticClass:"language-r extra-class"},[a("pre",{pre:!0,attrs:{class:"language-r"}},[a("code",[t._v("reducer "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" context"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" \n p"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("$")]),t._v("mean"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" p"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("$")]),t._v("reduce_dimension"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" reducer "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" reducer"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" dimension "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" p"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("$")]),t._v("save_result"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" format "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"GTiff"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0}])}),t._v(" "),a("h4",{attrs:{id:"_4-3-timeseries-as-json"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-3-timeseries-as-json"}},[t._v("#")]),t._v(" 4.3 Timeseries as JSON")]),t._v(" "),a("p",[t._v("To get a timeseries we need to reduce the spatial dimensions by aggregating them.\nYou can run different aggregation methods such as "),a("code",[t._v("mean")]),t._v(" (in the example below), "),a("code",[t._v("max")]),t._v(" or "),a("code",[t._v("min")]),t._v(" so that\nwe get a single value for each timestep.")]),t._v(" "),a("p",[t._v("Lastly, you need to specify that you want to store the result as JSON.")]),t._v(" "),a("CodeSwitcher",{attrs:{languages:{py:"Python",js:"JavaScript",r:"R"}},scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("datacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("aggregate_spatial"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("geometries "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" extent"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" reducer "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"mean"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("save_result"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("format")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"JSON"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("reducer")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" _"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" builder")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("mean")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("aggregate_spatial")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" extent"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" reducer"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("save_result")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"JSON"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]},proxy:!0},{key:"r",fn:function(){return[a("div",{staticClass:"language-r extra-class"},[a("pre",{pre:!0,attrs:{class:"language-r"}},[a("code",[t._v("reducer "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" context"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" \n p"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("$")]),t._v("mean"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" p"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("$")]),t._v("aggregate_spatial"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" geometries "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" extent"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" reducer "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" reducer"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" p"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("$")]),t._v("save_result"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" format "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"JSON"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0}])}),t._v(" "),a("h3",{attrs:{id:"_5-execute-the-process"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-execute-the-process"}},[t._v("#")]),t._v(" 5. Execute the process")]),t._v(" "),a("p",[t._v("Regardless of which of the options you chose in chapter 4, you can now send the process\nto the backend and compute the result.\nFrom simplicity, we simply execute it synchronously and store the result in memory.\nFor the GeoTiff and netCDF files you may want to store them into files though.\nThe JSON output you could directly work with.")]),t._v(" "),a("CodeSwitcher",{attrs:{languages:{py:"Python",js:"JavaScript",r:"R"}},scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("results "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" connection"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("execute"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" result "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" connection"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("computeResult")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]},proxy:!0},{key:"r",fn:function(){return[a("div",{staticClass:"language-r extra-class"},[a("pre",{pre:!0,attrs:{class:"language-r"}},[a("code",[t._v("result "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" compute_result"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("graph "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0}])}),t._v(" "),a("h3",{attrs:{id:"result"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#result"}},[t._v("#")]),t._v(" Result")]),t._v(" "),a("p",[t._v("If you'd visualize the results of running the timeseries analysis for mean, min and max\ncould results in such a chart:")]),t._v(" "),a("p",[a("img",{attrs:{src:s(320),alt:"min/max/mean NO2 chart"}})])],1)}),[],!1,null,null,null);a.default=e.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[52],{320:function(t,a,s){t.exports=s.p+"assets/img/chart.722d5801.png"},506:function(t,a,s){"use strict";s.r(a);var n=s(4),e=Object(n.a)({},(function(){var t=this,a=t._self._c;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"no2-monitoring"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#no2-monitoring"}},[t._v("#")]),t._v(" NO₂ monitoring")]),t._v(" "),a("p",[a("a",{attrs:{href:"https://sentinels.copernicus.eu/web/sentinel/missions/sentinel-5p/instrumental-payload",target:"_blank",rel:"noopener noreferrer"}},[t._v("TROPOMI ("),a("strong",[t._v("TROPO")]),t._v("spheric "),a("strong",[t._v("M")]),t._v("onitoring "),a("strong",[t._v("I")]),t._v("nstrument)"),a("OutboundLink")],1),t._v(" is the name of a sensor on board of the "),a("a",{attrs:{href:"https://sentinels.copernicus.eu/web/sentinel/missions/sentinel-5p",target:"_blank",rel:"noopener noreferrer"}},[t._v("Sentinel-5 Precursor (S5P) satellite"),a("OutboundLink")],1),t._v(", developed to monitor atmospheric chemistry.")]),t._v(" "),a("p",[t._v("This use case analyses Sentinel 5P imagery, focusing in particular on NO₂ measurements. Compared to other variables measured by TROPOMI, NO₂ is of high interest not only because of its direct relation with environmental health, but also because the main sources are typically known, because it is not transported over long distances and because the total column values measured by TROPOMI are strong indication of the ground level values.")]),t._v(" "),a("p",[t._v("This document describes how to analyze NO₂ data on openEO Platform using the Python, JavaScript and R client.\nAdditionally, we've prepared "),a("a",{attrs:{href:"https://github.com/openEOPlatform/sample-notebooks/blob/main/sentinel-5p.ipynb",target:"_blank",rel:"noopener noreferrer"}},[t._v("a basic Jupyter Notebook"),a("OutboundLink")],1),t._v(" for Python and much more advanced R and Python Shiny apps that you can run to analyze and visualize the NO₂ data in various ways.")]),t._v(" "),a("h2",{attrs:{id:"shiny-apps-r-and-python"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#shiny-apps-r-and-python"}},[t._v("#")]),t._v(" Shiny apps (R and Python)")]),t._v(" "),a("p",[t._v("In the Shiny app the NO₂ values can be analyzed globally over a full year. The analysis allows the user to set threshold values for the cloud cover. Gaps due to the cloud removal are filled by a linear interpolation. Noise gets removed by computing 30-day smoothed values, using kernel smoothing of the time series.")]),t._v(" "),a("p",[t._v("The Shiny app allows for three different modes:")]),t._v(" "),a("ul",[a("li",[t._v("Time series analysis / comparison against locally measured data")]),t._v(" "),a("li",[t._v("Map visualization for individual days")]),t._v(" "),a("li",[t._v("Animated maps that highlight differences in space and time")])]),t._v(" "),a("p",[t._v("Currently, the Shiny apps can only run on your local computer but we are looking into offering a hosted version, too. There's also "),a("RouterLink",{attrs:{to:"/getting-started/python/shiny.html"}},[t._v("a guide that explains how to run openEO code in a Python Shiny app in general")]),t._v(".")],1),t._v(" "),a("p",[t._v("You can find the full source code and documentation of the apps in their respective repositories:")]),t._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"https://github.com/Open-EO/r4openeo-usecases/tree/main/uc3-s5p-dashboard",target:"_blank",rel:"noopener noreferrer"}},[t._v("R Shiny app repository"),a("OutboundLink")],1)]),t._v(" "),a("li",[a("a",{attrs:{href:"https://github.com/openEOPlatform/s5p-py-dashboard",target:"_blank",rel:"noopener noreferrer"}},[t._v("Python Shiny app repository"),a("OutboundLink")],1)])]),t._v(" "),a("h3",{attrs:{id:"time-series-analyser"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#time-series-analyser"}},[t._v("#")]),t._v(" Time-Series Analyser")]),t._v(" "),a("p",[t._v('The Time-Series Analyser allows one to see the "reduced" time series (min/max/smoothed mean) of Sentinel 5P NO2 data from a given region. Basically, to use this function, the user can pass the coordinates of the bounding box of the area of interest, which are shown in a dynamic map; but also the time frame and the cloud cover to be considered in the computation. The analyser can also do a comparison against locally measured data (for selected areas only).')]),t._v(" "),a("h3",{attrs:{id:"map-maker-for-one-snapshot"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#map-maker-for-one-snapshot"}},[t._v("#")]),t._v(" Map Maker for one Snapshot")]),t._v(" "),a("p",[t._v("If the user desires to look at NO2 data at one given point in time, this function is the developed for this purpose. This second option in the Shiny app allows one to visualize how does a country's pattern in NO2 looks like in a given time, following S5P NO2 data.")]),t._v(" "),a("h3",{attrs:{id:"spacetime-animation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#spacetime-animation"}},[t._v("#")]),t._v(" Spacetime Animation")]),t._v(" "),a("p",[t._v("Here, the user can create and visualise their own spatio-temporal animation of S5P NO2 data. Given a starting and ending date, as well as the quality flag for cloud cover and a given country name, the user may have their own personalised spacetime GIF ready for their usage.")]),t._v(" "),a("p",[a("img",{attrs:{src:"https://github.com/Open-EO/r4openeo-usecases/raw/main/uc3-s5p-dashboard/image/spacetime-animation.gif",alt:"Spacetime animation generated by the dashboard"}})]),t._v(" "),a("h2",{attrs:{id:"basic-no2-analysis-in-python-r-and-javascript"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#basic-no2-analysis-in-python-r-and-javascript"}},[t._v("#")]),t._v(" Basic NO₂ analysis in Python, R and JavaScript")]),t._v(" "),a("p",[t._v("openEO Platform has multiple collections that offer Sentinel-5P data, e.g. for NO₂:")]),t._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"https://openeo.cloud/data-collections/view/?id=TERRASCOPE_S5P_L3_NO2_TD_V1",target:"_blank",rel:"noopener noreferrer"}},[t._v("TERRASCOPE_S5P_L3_NO2_TD_V1"),a("OutboundLink")],1),t._v(" - daily, hosted by VITO, pre-processed to remove clouds etc.")]),t._v(" "),a("li",[a("a",{attrs:{href:"https://openeo.cloud/data-collections/view/?id=TERRASCOPE_S5P_L3_NO2_TM_V1",target:"_blank",rel:"noopener noreferrer"}},[t._v("TERRASCOPE_S5P_L3_NO2_TD_V1"),a("OutboundLink")],1),t._v(" - monthly, hosted by VITO, pre-processed to remove clouds etc.")]),t._v(" "),a("li",[a("a",{attrs:{href:"https://openeo.cloud/data-collections/view/?id=TERRASCOPE_S5P_L3_NO2_TY_V1",target:"_blank",rel:"noopener noreferrer"}},[t._v("TERRASCOPE_S5P_L3_NO2_TD_V1"),a("OutboundLink")],1),t._v(" - yearly, hosted by VITO, pre-processed to remove clouds etc.")]),t._v(" "),a("li",[a("a",{attrs:{href:"https://openeo.cloud/data-collections/view/?id=SENTINEL_5P_L2",target:"_blank",rel:"noopener noreferrer"}},[t._v("SENTINEL_5P_L2"),a("OutboundLink")],1),t._v(" - Level 2 data, hosted by Sentinel Hub")])]),t._v(" "),a("p",[a("code",[t._v("SENTINEL_5P_L2")]),t._v(" also contains additional data such as CO, O₂, SO₂ and you can also experiment with those. CO is also available on VITO in Collections such as "),a("code",[t._v("TERRASCOPE_S5P_L3_CO_TD_V1")]),t._v(".")]),t._v(" "),a("p",[t._v("In this example we'll use the daily composites from the "),a("code",[t._v("TERRASCOPE_S5P_L3_NO2_TD_V1")]),t._v(" collection, which is available starting from end of April 2018.")]),t._v(" "),a("h3",{attrs:{id:"_1-load-a-data-cube"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-load-a-data-cube"}},[t._v("#")]),t._v(" 1. Load a data cube")]),t._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("Attention")]),t._v(" "),a("p",[t._v("This tutorial assumes you have completed the Getting Started guides and are connected and logged in to openEO Platform.\nYour connection object should be stored in a variable named "),a("code",[t._v("connection")]),t._v(".")])]),t._v(" "),a("p",[t._v("First of all, we need to load the data into a datacube. We set the temporal extent to the year 2019 and choose spatial extent, here an area over Münster, Germany.")]),t._v(" "),a("CodeSwitcher",{attrs:{languages:{py:"Python",js:"JavaScript",r:"R"}},scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("year "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2019")]),t._v("\nextent "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Münster")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Polygon"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"coordinates"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("7.737228350528245")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("51.86687168604513")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("7.507741544165615")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("51.86687168604513")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("7.507741544165615")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("52.05013100121914")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("7.737228350528245")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("52.05013100121914")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("7.737228350528245")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("51.86687168604513")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" connection"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("load_collection"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TERRASCOPE_S5P_L3_NO2_TD_V1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n spatial_extent "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" extent"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n temporal_extent "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string-interpolation"}},[a("span",{pre:!0,attrs:{class:"token string"}},[t._v('f"')]),a("span",{pre:!0,attrs:{class:"token interpolation"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("year"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")])]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('-01-01"')])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string-interpolation"}},[a("span",{pre:!0,attrs:{class:"token string"}},[t._v('f"')]),a("span",{pre:!0,attrs:{class:"token interpolation"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("year"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")])]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('-12-31"')])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" builder "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" connection"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("buildProcess")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" year "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2019")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" extent "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Münster")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Polygon"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v('"coordinates"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("7.737228350528245")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("51.86687168604513")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("7.507741544165615")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("51.86687168604513")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("7.507741544165615")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("52.05013100121914")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("7.737228350528245")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("52.05013100121914")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("7.737228350528245")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("51.86687168604513")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" datacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("load_collection")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TERRASCOPE_S5P_L3_NO2_TD_V1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" extent"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token template-string"}},[a("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")]),a("span",{pre:!0,attrs:{class:"token interpolation"}},[a("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("year"),a("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("-01-01")]),a("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token template-string"}},[a("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")]),a("span",{pre:!0,attrs:{class:"token interpolation"}},[a("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("year"),a("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("-12-31")]),a("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]},proxy:!0},{key:"r",fn:function(){return[a("div",{staticClass:"language-r extra-class"},[a("pre",{pre:!0,attrs:{class:"language-r"}},[a("code",[t._v("p "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" processes"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\nyear "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019"')]),t._v("\nextent "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" list"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Münster")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"type"')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Polygon"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"coordinates"')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" list"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("list"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n list"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("5.9521131313239675")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("51.78636868072434")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n list"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("5.971674074614773")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("50.52897921775278")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n list"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("9.893643204421315")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("50.609735254808925")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n list"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("9.864301789485104")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("51.870991335721925")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n list"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("5.9521131313239675")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("51.78636868072434")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" p"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("$")]),t._v("load_collection"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n id "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TERRASCOPE_S5P_L3_NO2_TD_V1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n spatial_extent "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" extent"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n temporal_extent "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" list"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("paste"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("year"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"-01-01"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" sep "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('""')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" paste"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("year"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"-12-31"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" sep "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('""')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0}])}),t._v(" "),a("h3",{attrs:{id:"_2-fill-gaps"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-fill-gaps"}},[t._v("#")]),t._v(" 2. Fill gaps")]),t._v(" "),a("p",[t._v("The data cube may contain no-data values due to the removal of clouds in the pre-processing of the collection.\nWe'll apply a linear interpolation along the temporal dimension:")]),t._v(" "),a("CodeSwitcher",{attrs:{languages:{py:"Python",js:"JavaScript",r:"R"}},scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("datacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("apply_dimension"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("dimension "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" process "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"array_interpolate_linear"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("interpolate")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" _"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" builder")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("array_interpolate_linear")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply_dimension")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" interpolate"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]},proxy:!0},{key:"r",fn:function(){return[a("div",{staticClass:"language-r extra-class"},[a("pre",{pre:!0,attrs:{class:"language-r"}},[a("code",[t._v("interpolate "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" context"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n p"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("$")]),t._v("array_interpolate_linear"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" p"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("$")]),t._v("apply_dimension"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" dimension "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" process "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" interpolate"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0}])}),t._v(" "),a("h3",{attrs:{id:"_3-smoothen-values-optional"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-smoothen-values-optional"}},[t._v("#")]),t._v(" 3. Smoothen values (optional)")]),t._v(" "),a("p",[t._v("If you want to smoothen the values to get rid of noise for example, we can run a moving average over a certain amount of days over the temporal dimension.\nIf you want to work on the raw values, you can also omit this step.\nThe "),a("code",[t._v("moving_average_window")]),t._v(" variable specifies the smoothing in number of days.\nYou can choose it freely, but it needs to be an odd integer >= 3.\nIn the example below 31 was chosen to smooth the timeseries with a moving average of a full month.")]),t._v(" "),a("CodeSwitcher",{attrs:{languages:{py:"Python",js:"JavaScript",r:"R"}},scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("moving_average_window "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("31")]),t._v("\nudf "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" openeo"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("UDF"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token triple-quoted-string string"}},[t._v('"""\nfrom pandas import Series\nimport numpy as np\n\ndef apply_timeseries(series: Series, context: dict) -> Series:\n return np.convolve(series, np.ones({n})/{n}, mode=\'same\')\n"""')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("format")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("n "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" moving_average_window"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("apply_dimension"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("dimension "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" process "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" udf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" moving_average_window "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("31")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" udf "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token template-string"}},[a("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\nfrom pandas import Series\nimport numpy as np\n\ndef apply_timeseries(series: Series, context: dict) -> Series:\n return np.convolve(series, np.ones(")]),a("span",{pre:!0,attrs:{class:"token interpolation"}},[a("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("moving_average_window"),a("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v(")/")]),a("span",{pre:!0,attrs:{class:"token interpolation"}},[a("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("moving_average_window"),a("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v(", mode='same')\n")]),a("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("run")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" _"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" builder")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("run_udf")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" udf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Python"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply_dimension")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" run"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0},{key:"r",fn:function(){return[a("div",{staticClass:"language-r extra-class"},[a("pre",{pre:!0,attrs:{class:"language-r"}},[a("code",[t._v("moving_average_window "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("31")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nudf "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(' "\nfrom pandas import Series\nimport numpy as np\n\ndef apply_timeseries'),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("series"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" Series"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" context"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" dict"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),t._v(" Series"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("\n return np.convolve"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("series"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" np.ones"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("NN"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),t._v("NN"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" mode"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'same'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v('\n"\nrun '),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" context"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n p"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("$")]),t._v("run_udf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" runtime "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Python"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" udf "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" gsub"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"NN"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" moving_average_window"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" udf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" p"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("$")]),t._v("apply_dimension"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" dimension "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" process "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" run"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0}])}),t._v(" "),a("div",{staticClass:"custom-block tip"},[a("p",{staticClass:"custom-block-title"},[t._v("Note")]),t._v(" "),a("p",[t._v("A technical detail here is that we run the moving average as a Python UDF, which is custom Python code.\nWe don't have a pre-defined process in openEO yet that easily allows this and as such we fall back to a UDF.\nWe embed the Python code in a string in this example so that you can easily copy the code, but ideally\nyou'd store it in a file and load the UDF from there.")]),t._v(" "),a("p",[t._v("The Python UDF code (for all client languages!) itself is pretty simple:")]),t._v(" "),a("div",{staticClass:"language-py extra-class"},[a("pre",{pre:!0,attrs:{class:"language-py"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" pandas "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" Series\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" numpy "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("as")]),t._v(" np\n\nN "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("31")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("def")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply_timeseries")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("series"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" Series"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" context"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("dict")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("-")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" Series"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" np"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("convolve"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("series"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" np"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("ones"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("N"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),t._v("N"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" mode"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'same'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]),t._v(" "),a("h3",{attrs:{id:"_4-what-do-you-want-to-know"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-what-do-you-want-to-know"}},[t._v("#")]),t._v(" 4. What do you want to know?")]),t._v(" "),a("p",[t._v("Now it's time to decide what we actually want to compute and get an insight into.")]),t._v(" "),a("p",[t._v("Currently, the data cube at still has 4 dimensions:\nThe spatial dimensions "),a("code",[t._v("x")]),t._v(" and "),a("code",[t._v("y")]),t._v(" covering the extent of Münster,\nthe temporal dimension "),a("code",[t._v("t")]),t._v(" covering usually about 365 values of the given year, and\nthe band dimension "),a("code",[t._v("bands")]),t._v(" with just a single label "),a("code",[t._v("NO2")]),t._v(".")]),t._v(" "),a("p",[t._v("As the "),a("code",[t._v("bands")]),t._v(" dimension only has a single label it gets dropped automatically during export,\nwhich means we now basically have a series of NO₂ maps, one for each day.\nWe have several options now:")]),t._v(" "),a("ol",[a("li",[t._v("Store the daily maps as netCDF file")]),t._v(" "),a("li",[t._v("Reduce the temporal dimension to get a single map for the year as GeoTIff")]),t._v(" "),a("li",[t._v("Reduce the spatial dimensions to get a timeseries as JSON")])]),t._v(" "),a("h4",{attrs:{id:"_4-1-netcdf-export"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-1-netcdf-export"}},[t._v("#")]),t._v(" 4.1 netCDF Export")]),t._v(" "),a("p",[t._v("To store daily maps in a netCDF file, we simply need to store the datacube:")]),t._v(" "),a("CodeSwitcher",{attrs:{languages:{py:"Python",js:"JavaScript",r:"R"}},scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("datacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("save_result"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("format")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"netCDF"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[t._v("datacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("save_result")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"netCDF"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]},proxy:!0},{key:"r",fn:function(){return[a("div",{staticClass:"language-r extra-class"},[a("pre",{pre:!0,attrs:{class:"language-r"}},[a("code",[t._v("datacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" p"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("$")]),t._v("save_result"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" format "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"netCDF"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0}])}),t._v(" "),a("h4",{attrs:{id:"_4-2-map-for-a-year-as-geotiff"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-2-map-for-a-year-as-geotiff"}},[t._v("#")]),t._v(" 4.2 Map for a year as GeoTiff")]),t._v(" "),a("p",[t._v("To get a map with values for a year we need to reduce the temporal dimensions by reducing the values along the temporal dimension.\nYou can run different reducers such as "),a("code",[t._v("mean")]),t._v(" (in the example below), "),a("code",[t._v("max")]),t._v(" or "),a("code",[t._v("min")]),t._v(" so that\nwe get a single value for each pixel.")]),t._v(" "),a("p",[t._v("Lastly, you need to specify that you want to store the result as GeoTiff ("),a("code",[t._v("GTiff")]),t._v(" due to the naming in GDAL).")]),t._v(" "),a("CodeSwitcher",{attrs:{languages:{py:"Python",js:"JavaScript",r:"R"}},scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("datacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("reduce_dimension"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("reducer "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"mean"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" dimension "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("save_result"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("format")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"GTiff"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("reducer")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" _"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" builder")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("mean")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("reduce_dimension")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" reducer"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" dimension "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("save_result")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"GTiff"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]},proxy:!0},{key:"r",fn:function(){return[a("div",{staticClass:"language-r extra-class"},[a("pre",{pre:!0,attrs:{class:"language-r"}},[a("code",[t._v("reducer "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" context"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" \n p"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("$")]),t._v("mean"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" p"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("$")]),t._v("reduce_dimension"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" reducer "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" reducer"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" dimension "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" p"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("$")]),t._v("save_result"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" format "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"GTiff"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0}])}),t._v(" "),a("h4",{attrs:{id:"_4-3-timeseries-as-json"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-3-timeseries-as-json"}},[t._v("#")]),t._v(" 4.3 Timeseries as JSON")]),t._v(" "),a("p",[t._v("To get a timeseries we need to reduce the spatial dimensions by aggregating them.\nYou can run different aggregation methods such as "),a("code",[t._v("mean")]),t._v(" (in the example below), "),a("code",[t._v("max")]),t._v(" or "),a("code",[t._v("min")]),t._v(" so that\nwe get a single value for each timestep.")]),t._v(" "),a("p",[t._v("Lastly, you need to specify that you want to store the result as JSON.")]),t._v(" "),a("CodeSwitcher",{attrs:{languages:{py:"Python",js:"JavaScript",r:"R"}},scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("datacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("aggregate_spatial"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("geometries "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" extent"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" reducer "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"mean"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("save_result"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("format")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"JSON"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("reducer")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" _"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" builder")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("mean")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("aggregate_spatial")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" extent"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" reducer"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("save_result")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"JSON"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]},proxy:!0},{key:"r",fn:function(){return[a("div",{staticClass:"language-r extra-class"},[a("pre",{pre:!0,attrs:{class:"language-r"}},[a("code",[t._v("reducer "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" context"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" \n p"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("$")]),t._v("mean"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" p"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("$")]),t._v("aggregate_spatial"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" geometries "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" extent"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" reducer "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" reducer"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" p"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("$")]),t._v("save_result"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" format "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"JSON"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0}])}),t._v(" "),a("h3",{attrs:{id:"_5-execute-the-process"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-execute-the-process"}},[t._v("#")]),t._v(" 5. Execute the process")]),t._v(" "),a("p",[t._v("Regardless of which of the options you chose in chapter 4, you can now send the process\nto the backend and compute the result.\nFrom simplicity, we simply execute it synchronously and store the result in memory.\nFor the GeoTiff and netCDF files you may want to store them into files though.\nThe JSON output you could directly work with.")]),t._v(" "),a("CodeSwitcher",{attrs:{languages:{py:"Python",js:"JavaScript",r:"R"}},scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("results "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" connection"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("execute"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" result "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" connection"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("computeResult")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]},proxy:!0},{key:"r",fn:function(){return[a("div",{staticClass:"language-r extra-class"},[a("pre",{pre:!0,attrs:{class:"language-r"}},[a("code",[t._v("result "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" compute_result"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("graph "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0}])}),t._v(" "),a("h3",{attrs:{id:"result"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#result"}},[t._v("#")]),t._v(" Result")]),t._v(" "),a("p",[t._v("If you'd visualize the results of running the timeseries analysis for mean, min and max\ncould results in such a chart:")]),t._v(" "),a("p",[a("img",{attrs:{src:s(320),alt:"min/max/mean NO2 chart"}})])],1)}),[],!1,null,null,null);a.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/58.8e398728.js b/assets/js/58.9ba4fef6.js similarity index 79% rename from assets/js/58.8e398728.js rename to assets/js/58.9ba4fef6.js index e65ee5b21..45e7dfe15 100644 --- a/assets/js/58.8e398728.js +++ b/assets/js/58.9ba4fef6.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[58],{485:function(t,n,s){"use strict";s.r(n);var o=s(4),e=Object(o.a)({},(function(){var t=this._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[t("DataCollections")],1)}),[],!1,null,null,null);n.default=e.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[58],{481:function(t,n,s){"use strict";s.r(n);var o=s(4),e=Object(o.a)({},(function(){var t=this._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[t("DataCollections")],1)}),[],!1,null,null,null);n.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/59.8eb71ce0.js b/assets/js/59.c4fa31a6.js similarity index 98% rename from assets/js/59.8eb71ce0.js rename to assets/js/59.c4fa31a6.js index 2a06c7c70..d21d886ed 100644 --- a/assets/js/59.8eb71ce0.js +++ b/assets/js/59.c4fa31a6.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[59],{481:function(e,t,o){"use strict";o.r(t);var a=o(4),r=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"platform-credit-usage"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#platform-credit-usage"}},[e._v("#")]),e._v(" Platform credit usage")]),e._v(" "),t("p",[e._v("As a user of openEO platform, you require a subscription to get access. Various packages are "),t("a",{attrs:{href:"https://openeo.cloud/#plans",target:"_blank",rel:"noopener noreferrer"}},[e._v("available"),t("OutboundLink")],1),e._v(",\nbut they all come with a number of 'platform credits' that you can consume in various ways.")]),e._v(" "),t("p",[e._v("Currently, credits can be deducted based on:")]),e._v(" "),t("ul",[t("li",[e._v("CPU usage (cores/second)")]),e._v(" "),t("li",[e._v("Memory usage (GB/second)")]),e._v(" "),t("li",[e._v("Storage (GB/day)")]),e._v(" "),t("li",[e._v("Data access to specific layers (e.g. Sentinel Hub or commercial)")]),e._v(" "),t("li",[e._v("Usage of services contributed by third parties, through an 'added value' cost (e.g. per hectare)")])]),e._v(" "),t("p",[e._v("For example, let's say we compute a Sentinel-2 based NDWI for an area of 10 hectares to a series of GeoTiffs (one per observation).")]),e._v(" "),t("p",[e._v("When running this example, the batch job reports the usage, which can be seen in the\n"),t("a",{attrs:{href:"https://editor.openeo.cloud",target:"_blank",rel:"noopener noreferrer"}},[e._v("Platform Editor"),t("OutboundLink")],1),e._v(' by clicking the "i" button for an individual batch job:')]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/5937096/159861044-d758443f-9056-4474-909f-ebd8400de9dd.png",alt:"Usage Metrics shown in the Platform Editor"}}),e._v(" "),t("figcaption",[e._v("Usage Metrics shown in the Platform Editor for an example batch job.")])]),e._v(" "),t("p",[e._v("13,400,773 mb-seconds corresponds to 3.64 GB hours or 3.64 credits\n5099 CPU seconds corresponds to 1.4 CPU hour which translates to 2.12 credits")]),e._v(" "),t("p",[e._v("Summing this up, we arrive at 5.76 credits. In the current free tier, you receive 1000 credits, which amounts to quite a few of jobs like this!\nIt is important to note however that resource consumption (CPU and memory in this case) is not fixed over time because the\nperformance characteristics of a particular cloud tends to fluctuate depending on overall load.\nCloud providers do try to avoid this, but in general only manage to do so within the limits of a given SLA.")]),e._v(" "),t("h2",{attrs:{id:"platform-credit-rates"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#platform-credit-rates"}},[e._v("#")]),e._v(" Platform credit rates")]),e._v(" "),t("p",[e._v("The example above also shows that conversion rates need to be applied to convert resource usage into credits.\nAs openEO platform consists of different software components that are operated on different clouds, these conversion rates are not set to a fixed value\nfor the platform as a whole. For instance, a backend running on more expensive but faster CPU's, might charge more for a CPU hour compared to a provider\nrunning on slower but cheaper CPU's.")]),e._v(" "),t("p",[e._v("While this might seem to make the costs unpredictable, we recommend users to also evaluate their own resource usage.\nIf the cost for a particular job appears relatively high, it might be worthwhile to try running it against a different backend if possible.")]),e._v(" "),t("p",[e._v("The platform will also notify users of changes to the conversion rate, especially if a resource would become more expensive.\nIf you do notice an unexpected increase in credit usage, we recommend contacting the platform through the helpdesk, to ensure that this is expected.")]),e._v(" "),t("h2",{attrs:{id:"estimating-resource-usage"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#estimating-resource-usage"}},[e._v("#")]),e._v(" Estimating resource usage")]),e._v(" "),t("p",[e._v("Often you want to know up front what kind of costs you will incur by using the platform, especially when generating larger results\nor running the same job at fixed times. For the platform however, this is not trivial to do without actually running your job, because the resource\nconsumption heavily depends on the exact combination of processes that you are using.")]),e._v(" "),t("p",[e._v("Hence, the way to estimate job usage is to start small. For instance, for a query on 10m resolution, you may want to start with a 10ha area,\nand simply run that job. As shown above, this will usually incur a cost of only a few cents. In the worst case, you might discover that this already\ncosts a few euros, but then you would also notice that your job is taking multiple hours to run.")]),e._v(" "),t("p",[e._v("In any case, once you've established an initial cost for a small area, you can extrapolate to a larger area. If simple linear extrapolation shows that\na larger job is affordable, then run the job on larger areas, like 50ha or up to 100x100km. This will show you how your job scales,\nand what kind of costs you will be incurring! If at any point the cost appears unreasonable, please contact the platform!")])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[59],{482:function(e,t,o){"use strict";o.r(t);var a=o(4),r=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"platform-credit-usage"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#platform-credit-usage"}},[e._v("#")]),e._v(" Platform credit usage")]),e._v(" "),t("p",[e._v("As a user of openEO platform, you require a subscription to get access. Various packages are "),t("a",{attrs:{href:"https://openeo.cloud/#plans",target:"_blank",rel:"noopener noreferrer"}},[e._v("available"),t("OutboundLink")],1),e._v(",\nbut they all come with a number of 'platform credits' that you can consume in various ways.")]),e._v(" "),t("p",[e._v("Currently, credits can be deducted based on:")]),e._v(" "),t("ul",[t("li",[e._v("CPU usage (cores/second)")]),e._v(" "),t("li",[e._v("Memory usage (GB/second)")]),e._v(" "),t("li",[e._v("Storage (GB/day)")]),e._v(" "),t("li",[e._v("Data access to specific layers (e.g. Sentinel Hub or commercial)")]),e._v(" "),t("li",[e._v("Usage of services contributed by third parties, through an 'added value' cost (e.g. per hectare)")])]),e._v(" "),t("p",[e._v("For example, let's say we compute a Sentinel-2 based NDWI for an area of 10 hectares to a series of GeoTiffs (one per observation).")]),e._v(" "),t("p",[e._v("When running this example, the batch job reports the usage, which can be seen in the\n"),t("a",{attrs:{href:"https://editor.openeo.cloud",target:"_blank",rel:"noopener noreferrer"}},[e._v("Platform Editor"),t("OutboundLink")],1),e._v(' by clicking the "i" button for an individual batch job:')]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/5937096/159861044-d758443f-9056-4474-909f-ebd8400de9dd.png",alt:"Usage Metrics shown in the Platform Editor"}}),e._v(" "),t("figcaption",[e._v("Usage Metrics shown in the Platform Editor for an example batch job.")])]),e._v(" "),t("p",[e._v("13,400,773 mb-seconds corresponds to 3.64 GB hours or 3.64 credits\n5099 CPU seconds corresponds to 1.4 CPU hour which translates to 2.12 credits")]),e._v(" "),t("p",[e._v("Summing this up, we arrive at 5.76 credits. In the current free tier, you receive 1000 credits, which amounts to quite a few of jobs like this!\nIt is important to note however that resource consumption (CPU and memory in this case) is not fixed over time because the\nperformance characteristics of a particular cloud tends to fluctuate depending on overall load.\nCloud providers do try to avoid this, but in general only manage to do so within the limits of a given SLA.")]),e._v(" "),t("h2",{attrs:{id:"platform-credit-rates"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#platform-credit-rates"}},[e._v("#")]),e._v(" Platform credit rates")]),e._v(" "),t("p",[e._v("The example above also shows that conversion rates need to be applied to convert resource usage into credits.\nAs openEO platform consists of different software components that are operated on different clouds, these conversion rates are not set to a fixed value\nfor the platform as a whole. For instance, a backend running on more expensive but faster CPU's, might charge more for a CPU hour compared to a provider\nrunning on slower but cheaper CPU's.")]),e._v(" "),t("p",[e._v("While this might seem to make the costs unpredictable, we recommend users to also evaluate their own resource usage.\nIf the cost for a particular job appears relatively high, it might be worthwhile to try running it against a different backend if possible.")]),e._v(" "),t("p",[e._v("The platform will also notify users of changes to the conversion rate, especially if a resource would become more expensive.\nIf you do notice an unexpected increase in credit usage, we recommend contacting the platform through the helpdesk, to ensure that this is expected.")]),e._v(" "),t("h2",{attrs:{id:"estimating-resource-usage"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#estimating-resource-usage"}},[e._v("#")]),e._v(" Estimating resource usage")]),e._v(" "),t("p",[e._v("Often you want to know up front what kind of costs you will incur by using the platform, especially when generating larger results\nor running the same job at fixed times. For the platform however, this is not trivial to do without actually running your job, because the resource\nconsumption heavily depends on the exact combination of processes that you are using.")]),e._v(" "),t("p",[e._v("Hence, the way to estimate job usage is to start small. For instance, for a query on 10m resolution, you may want to start with a 10ha area,\nand simply run that job. As shown above, this will usually incur a cost of only a few cents. In the worst case, you might discover that this already\ncosts a few euros, but then you would also notice that your job is taking multiple hours to run.")]),e._v(" "),t("p",[e._v("In any case, once you've established an initial cost for a small area, you can extrapolate to a larger area. If simple linear extrapolation shows that\na larger job is affordable, then run the job on larger areas, like 50ha or up to 100x100km. This will show you how your job scales,\nand what kind of costs you will be incurring! If at any point the cost appears unreasonable, please contact the platform!")])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/61.3747a915.js b/assets/js/61.7cf6cd94.js similarity index 99% rename from assets/js/61.3747a915.js rename to assets/js/61.7cf6cd94.js index 2d7645b3b..bf6d68f16 100644 --- a/assets/js/61.3747a915.js +++ b/assets/js/61.7cf6cd94.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[61],{482:function(e,t,o){"use strict";o.r(t);var a=o(4),i=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"collections"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#collections"}},[e._v("#")]),e._v(" Collections")]),e._v(" "),t("p",[e._v("This page describes requirements on STAC collection metadata for backend providers in the openEO platform federation. These requirements should be considered an addition to what is already required by the "),t("a",{attrs:{href:"https://api.openeo.org/#tag/EO-Data-Discovery/operation/describe-collection",target:"_blank",rel:"noopener noreferrer"}},[e._v("openEO API"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("h2",{attrs:{id:"collection-availability"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#collection-availability"}},[e._v("#")]),e._v(" Collection availability")]),e._v(" "),t("p",[e._v("The collections are a key asset of the platform, and users need to know what they can expect from a certain collection.\nThe federation relies on openEO collection metadata following the STAC specification to communicate this towards the user. Backend providers\nneed to comply with these requirements for their collection:")]),e._v(" "),t("p",[e._v("The 'experimental' flag from https://stac-extensions.github.io/version/v1.1.0/schema.json needs to be set on experimental collections.\nA collection can be experimental either because there are issues with the actual data or catalog, or because of backend specific issues that make the use of the collection unstable.\nA collection marked as experimental does not need to comply with further requirements.")]),e._v(" "),t("h3",{attrs:{id:"requirements-for-non-experimental-collections"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#requirements-for-non-experimental-collections"}},[e._v("#")]),e._v(" Requirements for non-experimental collections")]),e._v(" "),t("p",[e._v("The main goal for non-experimental features is to achieve high user satisfaction by providing stability & usability "),t("em",[e._v("and")]),e._v(" to comply with federation agreements that make it possible to offer a unified service.\nThe list below makes this more concrete, but is not expected to cover all aspects. It is therefore important that providers, who know their implementations and datasets best, properly judge if a specific collection can be\nconsidered non-experimental.")]),e._v(" "),t("ol",[t("li",[t("p",[e._v("Collections need to indicate the key 'providers' that are responsible for ensuring access to the data and continuity in the case of active missions. The user may depend on the guarantees offered by these\nproviders with respect to the properties (timeliness, completeness,...) of a specific collection.\nThe providers with role 'host' and 'producer' are mandatory.")])]),e._v(" "),t("li",[t("p",[e._v("The collection description and extents needs to specify known limitations with respect to the original collection. For instance, if only a subset of the full archive is available, this should be indicated. Extents can be rough approximations to avoid requiring very detailed geometry in the metadata.")])]),e._v(" "),t("li",[t("p",[e._v("Collections without an end time are assumed to be active missions. By default, 99% of items in these collections should be available within 48 hours after being published by the producer. This gives users a basic guarantee with respect to timeliness of products.")])]),e._v(" "),t("li",[t("p",[e._v("Collection metadata should be valid STAC metadata and must include all extensions in "),t("code",[e._v("stac_extensions")]),e._v(". Tools such as "),t("a",{attrs:{href:"https://github.com/stac-utils/stac-validator",target:"_blank",rel:"noopener noreferrer"}},[e._v("STAC-validator"),t("OutboundLink")],1),e._v(" can indicate obvious issues.")])]),e._v(" "),t("li",[t("p",[e._v("FAIR principle R1: "),t("a",{attrs:{href:"https://www.go-fair.org/fair-principles/r1-metadata-richly-described-plurality-accurate-relevant-attributes/",target:"_blank",rel:"noopener noreferrer"}},[e._v("(Meta)data are richly described with a plurality of accurate and relevant attributes"),t("OutboundLink")],1)])]),e._v(" "),t("li",[t("p",[e._v("Collections have to follow harmonization guidelines specified below, if applicable.")])]),e._v(" "),t("li",[t("p",[e._v("Collections naming (id, dimensions, bands) should remain constant.")])]),e._v(" "),t("li",[t("p",[e._v("Backwards incompatible changes or removal need to be announced with a lead time of 6 months, together with a migration path.")])]),e._v(" "),t("li",[t("p",[e._v("Minimum availability of non-experimental collections is 98% on a monthly basis. The backend availability is used here if availability is not measured per collection.")])]),e._v(" "),t("li",[t("p",[e._v("Availability of a collection means that a simple process graph (e.g. using load_collection) returns a correct result. Collections may have special conditions to work, for instance in the case of commercial data.")])])]),e._v(" "),t("h2",{attrs:{id:"harmonization"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#harmonization"}},[e._v("#")]),e._v(" Harmonization")]),e._v(" "),t("p",[e._v("When back-ends offer/mirror the same datasets, it is required to align names and metadata. For the following collections and metadata an agreement has been achieved. These are all Copernicus Missions, and the standard names refer to the archives prepared and distributed by ESA. If it is not possible/desirable to use this name as collection id, a 'common_name' can be added next to the 'id' property to identify the collection as a standard archive.")]),e._v(" "),t("ul",[t("li",[e._v("SENTINEL1_GRD")]),e._v(" "),t("li",[e._v("SENTINEL2_L1C")]),e._v(" "),t("li",[t("a",{attrs:{href:"#sentinel2-l2a"}},[e._v("SENTINEL2_L2A")])]),e._v(" "),t("li",[e._v("SENTINEL3_OLCI_L1B")])]),e._v(" "),t("h3",{attrs:{id:"common-naming-convention"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#common-naming-convention"}},[e._v("#")]),e._v(" Common naming convention")]),e._v(" "),t("p",[e._v("In order to achieve a uniform structure for all collections on the platform and thus make it easier for users to navigate between collections, it is recommended to follow the common naming convention*:")]),e._v(" "),t("ul",[t("li",[e._v('Names should be written in capital letters ("all caps")')]),e._v(" "),t("li",[e._v("Names should consist of a combination of different optional attributes (see table)")]),e._v(" "),t("li",[e._v("The different attributes should be separated by an underscore")])]),e._v(" "),t("p",[e._v("Very roughly speaking, collections can be divided into two groups (in reality it is more of a spectrum with all gradations in between):")]),e._v(" "),t("ul",[t("li",[e._v("collections containing raw data (or processing levels of that data) measured directly by a satellite (or an other measurement platform) and often distributed by the platform operator (e.g., ESA)")]),e._v(" "),t("li",[e._v("derived collections, which are based on (pre-processed) raw data that has been processed to create a collection with a specific purpose (e.g., a land cover map) and are often distributed by the institution (or a service of an institution) that created the collection")])]),e._v(" "),t("table",[t("thead",[t("tr",[t("th",[e._v("Attribute")]),e._v(" "),t("th",[e._v("Type")]),e._v(" "),t("th",[e._v("Description")]),e._v(" "),t("th",[e._v("Examples")])])]),e._v(" "),t("tbody",[t("tr",[t("td",[e._v("Provider")]),e._v(" "),t("td",[e._v("string")]),e._v(" "),t("td",[e._v("Often used for derived collections produced or order by the listed provider.")]),e._v(" "),t("td",[t("code",[e._v("ESA")]),e._v(", "),t("code",[e._v("CNSE")]),e._v(", "),t("code",[e._v("EMODNET")]),e._v(", "),t("code",[e._v("TERRASCOPE")]),e._v(". "),t("code",[e._v("CAMS")]),e._v(", "),t("code",[e._v("CGLS")])])]),e._v(" "),t("tr",[t("td",[e._v("Satellite/Platform")]),e._v(" "),t("td",[e._v("string")]),e._v(" "),t("td",[e._v("Name of the satellite/platform that acquired the data in the collection.")]),e._v(" "),t("td",[t("code",[e._v("SENTINEL2")]),e._v(", "),t("code",[e._v("LANDSAT8")]),e._v(", "),t("code",[e._v("PALSAR2")])])]),e._v(" "),t("tr",[t("td",[e._v("Processing level")]),e._v(" "),t("td",[e._v("string")]),e._v(" "),t("td",[e._v("Name of the level to which the data was processed (often processed raw data).")]),e._v(" "),t("td",[t("code",[e._v("L2A")]),e._v(", "),t("code",[e._v("L3")]),e._v(", "),t("code",[e._v("L2_1")])])]),e._v(" "),t("tr",[t("td",[e._v("Version")]),e._v(" "),t("td",[e._v("string")]),e._v(" "),t("td",[e._v("Often used for derived collections that are produced in several versions.")]),e._v(" "),t("td",[t("code",[e._v("V1")]),e._v(", "),t("code",[e._v("V2")])])]),e._v(" "),t("tr",[t("td",[e._v("Resolution")]),e._v(" "),t("td",[e._v("string ("),t("code",[e._v("number + unit")]),e._v(" or "),t("code",[e._v("string")]),e._v(")")]),e._v(" "),t("td",[e._v("Usually added, if the resolution is of particular importance for the collection (e.g., novel product with this resolution) for the collection.")]),e._v(" "),t("td",[t("code",[e._v("10M")]),e._v(", "),t("code",[e._v("120M")]),e._v(", "),t("code",[e._v("EUROPE")]),e._v(", "),t("code",[e._v("GLOBAL")])])]),e._v(" "),t("tr",[t("td",[e._v("Product Description")]),e._v(" "),t("td",[e._v("string")]),e._v(" "),t("td",[e._v("Human readable description of the data within the collection. Can also be an abbreviation or acronym.")]),e._v(" "),t("td",[t("code",[e._v("LAND_COVER_MAP")]),e._v(", "),t("code",[e._v("WORLDCOVER")]),e._v(", "),t("code",[e._v("NDVI")]),e._v(", "),t("code",[e._v("LAI")])])]),e._v(" "),t("tr",[t("td",[e._v("Year")]),e._v(" "),t("td",[e._v("number")]),e._v(" "),t("td",[e._v("Often used for derived products that where updated in the specified year or created based on data of the specified year.")]),e._v(" "),t("td",[t("code",[e._v("2022")])])])])]),e._v(" "),t("p",[e._v("Collections containing raw data or processing levels of that data often use a combination of satellite/platform and processing level (e.g., "),t("code",[e._v("SENTINEL2_L1C")]),e._v(" ). Derived collections often use a combination of provider and product description (e.g., CNES_LAND_COVER_MAP).")]),e._v(" "),t("p",[e._v("*Some existing collections may not strictly follow this naming convention as they were added to the platform prior to this agreement.")]),e._v(" "),t("h3",{attrs:{id:"sentinel2-l2a"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#sentinel2-l2a"}},[e._v("#")]),e._v(" Sentinel2-L2A")]),e._v(" "),t("p",[e._v("The common name for this collection is 'SENTINEL2_L2A'. It refers to the L2A products generated by the Sen2Cor software, which can be configured to be compatible with the ESA generated products. Note that the products in the ESA archive were also processed with different versions of Sen2Cor, so it is not possible to specify a very specific version or configuration of the processing chain.")]),e._v(" "),t("h4",{attrs:{id:"bands"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#bands"}},[e._v("#")]),e._v(" Bands")]),e._v(" "),t("p",[e._v("Band names for spectral bands follow the Bxx naming convention used by ESA. For example: B01, B02, B03, B08, B8A, B12")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("SCL")]),e._v(" = the Sen2Cor scene classification band")]),e._v(" "),t("li",[t("code",[e._v("approximateViewAzimuth")]),e._v(" = collective term for the mean and accurate viewing azimuth angle. Depending on which backend is processing the data, the mean angle (for Sentinel Hub) or the accurate angle (for Terrascope) is used. If the accurate angle ("),t("code",[e._v("viewAzimuthAngles")]),e._v(") or the mean angle ("),t("code",[e._v("viewAzimuthMean")]),e._v(") is explicitly specified, the data is processed on the backend that holds the specified band.")]),e._v(" "),t("li",[t("code",[e._v("viewZenithMean")]),e._v(" = collective term for the mean and accurate viewing zenith angle. Depending on which backend is processing the data, the mean angle (for Sentinel Hub) or the accurate angle (for Terrascope) is used. If the accurate angle ("),t("code",[e._v("viewZenithMean")]),e._v(") or the mean angle ("),t("code",[e._v("viewZenithAngles")]),e._v(") is explicitly specified, the data is processed on the backend that holds those bands.")]),e._v(" "),t("li",[t("code",[e._v("sunAzimuthAngles")]),e._v("/"),t("code",[e._v("sunZenithAngles")]),e._v(" = collective term for the exact sun azimuth and sun zenith angle.")])]),e._v(" "),t("h3",{attrs:{id:"common-properties"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#common-properties"}},[e._v("#")]),e._v(" Common Properties")]),e._v(" "),t("p",[e._v("We list here a set of common properties, that can be relevant for multiple collections. Collections are strongly encouraged to use these properties instead of using a different name for the same property.")]),e._v(" "),t("h4",{attrs:{id:"common"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#common"}},[e._v("#")]),e._v(" Common")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/stac-extensions/sat#satorbit_state",target:"_blank",rel:"noopener noreferrer"}},[e._v("sat:orbit_state"),t("OutboundLink")],1)]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/stac-extensions/sat#satrelative_orbit",target:"_blank",rel:"noopener noreferrer"}},[e._v("sat:relative_orbit"),t("OutboundLink")],1)])]),e._v(" "),t("h4",{attrs:{id:"optical-instruments"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#optical-instruments"}},[e._v("#")]),e._v(" Optical instruments")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/stac-extensions/eo#eocloud_cover",target:"_blank",rel:"noopener noreferrer"}},[e._v("eo:cloud_cover"),t("OutboundLink")],1)])]),e._v(" "),t("h4",{attrs:{id:"sar-instruments"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#sar-instruments"}},[e._v("#")]),e._v(" SAR instruments")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/stac-extensions/sar#item-properties-or-asset-fields",target:"_blank",rel:"noopener noreferrer"}},[e._v("sar:instrument_mode"),t("OutboundLink")],1)])])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[61],{485:function(e,t,o){"use strict";o.r(t);var a=o(4),i=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"collections"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#collections"}},[e._v("#")]),e._v(" Collections")]),e._v(" "),t("p",[e._v("This page describes requirements on STAC collection metadata for backend providers in the openEO platform federation. These requirements should be considered an addition to what is already required by the "),t("a",{attrs:{href:"https://api.openeo.org/#tag/EO-Data-Discovery/operation/describe-collection",target:"_blank",rel:"noopener noreferrer"}},[e._v("openEO API"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("h2",{attrs:{id:"collection-availability"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#collection-availability"}},[e._v("#")]),e._v(" Collection availability")]),e._v(" "),t("p",[e._v("The collections are a key asset of the platform, and users need to know what they can expect from a certain collection.\nThe federation relies on openEO collection metadata following the STAC specification to communicate this towards the user. Backend providers\nneed to comply with these requirements for their collection:")]),e._v(" "),t("p",[e._v("The 'experimental' flag from https://stac-extensions.github.io/version/v1.1.0/schema.json needs to be set on experimental collections.\nA collection can be experimental either because there are issues with the actual data or catalog, or because of backend specific issues that make the use of the collection unstable.\nA collection marked as experimental does not need to comply with further requirements.")]),e._v(" "),t("h3",{attrs:{id:"requirements-for-non-experimental-collections"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#requirements-for-non-experimental-collections"}},[e._v("#")]),e._v(" Requirements for non-experimental collections")]),e._v(" "),t("p",[e._v("The main goal for non-experimental features is to achieve high user satisfaction by providing stability & usability "),t("em",[e._v("and")]),e._v(" to comply with federation agreements that make it possible to offer a unified service.\nThe list below makes this more concrete, but is not expected to cover all aspects. It is therefore important that providers, who know their implementations and datasets best, properly judge if a specific collection can be\nconsidered non-experimental.")]),e._v(" "),t("ol",[t("li",[t("p",[e._v("Collections need to indicate the key 'providers' that are responsible for ensuring access to the data and continuity in the case of active missions. The user may depend on the guarantees offered by these\nproviders with respect to the properties (timeliness, completeness,...) of a specific collection.\nThe providers with role 'host' and 'producer' are mandatory.")])]),e._v(" "),t("li",[t("p",[e._v("The collection description and extents needs to specify known limitations with respect to the original collection. For instance, if only a subset of the full archive is available, this should be indicated. Extents can be rough approximations to avoid requiring very detailed geometry in the metadata.")])]),e._v(" "),t("li",[t("p",[e._v("Collections without an end time are assumed to be active missions. By default, 99% of items in these collections should be available within 48 hours after being published by the producer. This gives users a basic guarantee with respect to timeliness of products.")])]),e._v(" "),t("li",[t("p",[e._v("Collection metadata should be valid STAC metadata and must include all extensions in "),t("code",[e._v("stac_extensions")]),e._v(". Tools such as "),t("a",{attrs:{href:"https://github.com/stac-utils/stac-validator",target:"_blank",rel:"noopener noreferrer"}},[e._v("STAC-validator"),t("OutboundLink")],1),e._v(" can indicate obvious issues.")])]),e._v(" "),t("li",[t("p",[e._v("FAIR principle R1: "),t("a",{attrs:{href:"https://www.go-fair.org/fair-principles/r1-metadata-richly-described-plurality-accurate-relevant-attributes/",target:"_blank",rel:"noopener noreferrer"}},[e._v("(Meta)data are richly described with a plurality of accurate and relevant attributes"),t("OutboundLink")],1)])]),e._v(" "),t("li",[t("p",[e._v("Collections have to follow harmonization guidelines specified below, if applicable.")])]),e._v(" "),t("li",[t("p",[e._v("Collections naming (id, dimensions, bands) should remain constant.")])]),e._v(" "),t("li",[t("p",[e._v("Backwards incompatible changes or removal need to be announced with a lead time of 6 months, together with a migration path.")])]),e._v(" "),t("li",[t("p",[e._v("Minimum availability of non-experimental collections is 98% on a monthly basis. The backend availability is used here if availability is not measured per collection.")])]),e._v(" "),t("li",[t("p",[e._v("Availability of a collection means that a simple process graph (e.g. using load_collection) returns a correct result. Collections may have special conditions to work, for instance in the case of commercial data.")])])]),e._v(" "),t("h2",{attrs:{id:"harmonization"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#harmonization"}},[e._v("#")]),e._v(" Harmonization")]),e._v(" "),t("p",[e._v("When back-ends offer/mirror the same datasets, it is required to align names and metadata. For the following collections and metadata an agreement has been achieved. These are all Copernicus Missions, and the standard names refer to the archives prepared and distributed by ESA. If it is not possible/desirable to use this name as collection id, a 'common_name' can be added next to the 'id' property to identify the collection as a standard archive.")]),e._v(" "),t("ul",[t("li",[e._v("SENTINEL1_GRD")]),e._v(" "),t("li",[e._v("SENTINEL2_L1C")]),e._v(" "),t("li",[t("a",{attrs:{href:"#sentinel2-l2a"}},[e._v("SENTINEL2_L2A")])]),e._v(" "),t("li",[e._v("SENTINEL3_OLCI_L1B")])]),e._v(" "),t("h3",{attrs:{id:"common-naming-convention"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#common-naming-convention"}},[e._v("#")]),e._v(" Common naming convention")]),e._v(" "),t("p",[e._v("In order to achieve a uniform structure for all collections on the platform and thus make it easier for users to navigate between collections, it is recommended to follow the common naming convention*:")]),e._v(" "),t("ul",[t("li",[e._v('Names should be written in capital letters ("all caps")')]),e._v(" "),t("li",[e._v("Names should consist of a combination of different optional attributes (see table)")]),e._v(" "),t("li",[e._v("The different attributes should be separated by an underscore")])]),e._v(" "),t("p",[e._v("Very roughly speaking, collections can be divided into two groups (in reality it is more of a spectrum with all gradations in between):")]),e._v(" "),t("ul",[t("li",[e._v("collections containing raw data (or processing levels of that data) measured directly by a satellite (or an other measurement platform) and often distributed by the platform operator (e.g., ESA)")]),e._v(" "),t("li",[e._v("derived collections, which are based on (pre-processed) raw data that has been processed to create a collection with a specific purpose (e.g., a land cover map) and are often distributed by the institution (or a service of an institution) that created the collection")])]),e._v(" "),t("table",[t("thead",[t("tr",[t("th",[e._v("Attribute")]),e._v(" "),t("th",[e._v("Type")]),e._v(" "),t("th",[e._v("Description")]),e._v(" "),t("th",[e._v("Examples")])])]),e._v(" "),t("tbody",[t("tr",[t("td",[e._v("Provider")]),e._v(" "),t("td",[e._v("string")]),e._v(" "),t("td",[e._v("Often used for derived collections produced or order by the listed provider.")]),e._v(" "),t("td",[t("code",[e._v("ESA")]),e._v(", "),t("code",[e._v("CNSE")]),e._v(", "),t("code",[e._v("EMODNET")]),e._v(", "),t("code",[e._v("TERRASCOPE")]),e._v(". "),t("code",[e._v("CAMS")]),e._v(", "),t("code",[e._v("CGLS")])])]),e._v(" "),t("tr",[t("td",[e._v("Satellite/Platform")]),e._v(" "),t("td",[e._v("string")]),e._v(" "),t("td",[e._v("Name of the satellite/platform that acquired the data in the collection.")]),e._v(" "),t("td",[t("code",[e._v("SENTINEL2")]),e._v(", "),t("code",[e._v("LANDSAT8")]),e._v(", "),t("code",[e._v("PALSAR2")])])]),e._v(" "),t("tr",[t("td",[e._v("Processing level")]),e._v(" "),t("td",[e._v("string")]),e._v(" "),t("td",[e._v("Name of the level to which the data was processed (often processed raw data).")]),e._v(" "),t("td",[t("code",[e._v("L2A")]),e._v(", "),t("code",[e._v("L3")]),e._v(", "),t("code",[e._v("L2_1")])])]),e._v(" "),t("tr",[t("td",[e._v("Version")]),e._v(" "),t("td",[e._v("string")]),e._v(" "),t("td",[e._v("Often used for derived collections that are produced in several versions.")]),e._v(" "),t("td",[t("code",[e._v("V1")]),e._v(", "),t("code",[e._v("V2")])])]),e._v(" "),t("tr",[t("td",[e._v("Resolution")]),e._v(" "),t("td",[e._v("string ("),t("code",[e._v("number + unit")]),e._v(" or "),t("code",[e._v("string")]),e._v(")")]),e._v(" "),t("td",[e._v("Usually added, if the resolution is of particular importance for the collection (e.g., novel product with this resolution) for the collection.")]),e._v(" "),t("td",[t("code",[e._v("10M")]),e._v(", "),t("code",[e._v("120M")]),e._v(", "),t("code",[e._v("EUROPE")]),e._v(", "),t("code",[e._v("GLOBAL")])])]),e._v(" "),t("tr",[t("td",[e._v("Product Description")]),e._v(" "),t("td",[e._v("string")]),e._v(" "),t("td",[e._v("Human readable description of the data within the collection. Can also be an abbreviation or acronym.")]),e._v(" "),t("td",[t("code",[e._v("LAND_COVER_MAP")]),e._v(", "),t("code",[e._v("WORLDCOVER")]),e._v(", "),t("code",[e._v("NDVI")]),e._v(", "),t("code",[e._v("LAI")])])]),e._v(" "),t("tr",[t("td",[e._v("Year")]),e._v(" "),t("td",[e._v("number")]),e._v(" "),t("td",[e._v("Often used for derived products that where updated in the specified year or created based on data of the specified year.")]),e._v(" "),t("td",[t("code",[e._v("2022")])])])])]),e._v(" "),t("p",[e._v("Collections containing raw data or processing levels of that data often use a combination of satellite/platform and processing level (e.g., "),t("code",[e._v("SENTINEL2_L1C")]),e._v(" ). Derived collections often use a combination of provider and product description (e.g., CNES_LAND_COVER_MAP).")]),e._v(" "),t("p",[e._v("*Some existing collections may not strictly follow this naming convention as they were added to the platform prior to this agreement.")]),e._v(" "),t("h3",{attrs:{id:"sentinel2-l2a"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#sentinel2-l2a"}},[e._v("#")]),e._v(" Sentinel2-L2A")]),e._v(" "),t("p",[e._v("The common name for this collection is 'SENTINEL2_L2A'. It refers to the L2A products generated by the Sen2Cor software, which can be configured to be compatible with the ESA generated products. Note that the products in the ESA archive were also processed with different versions of Sen2Cor, so it is not possible to specify a very specific version or configuration of the processing chain.")]),e._v(" "),t("h4",{attrs:{id:"bands"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#bands"}},[e._v("#")]),e._v(" Bands")]),e._v(" "),t("p",[e._v("Band names for spectral bands follow the Bxx naming convention used by ESA. For example: B01, B02, B03, B08, B8A, B12")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("SCL")]),e._v(" = the Sen2Cor scene classification band")]),e._v(" "),t("li",[t("code",[e._v("approximateViewAzimuth")]),e._v(" = collective term for the mean and accurate viewing azimuth angle. Depending on which backend is processing the data, the mean angle (for Sentinel Hub) or the accurate angle (for Terrascope) is used. If the accurate angle ("),t("code",[e._v("viewAzimuthAngles")]),e._v(") or the mean angle ("),t("code",[e._v("viewAzimuthMean")]),e._v(") is explicitly specified, the data is processed on the backend that holds the specified band.")]),e._v(" "),t("li",[t("code",[e._v("viewZenithMean")]),e._v(" = collective term for the mean and accurate viewing zenith angle. Depending on which backend is processing the data, the mean angle (for Sentinel Hub) or the accurate angle (for Terrascope) is used. If the accurate angle ("),t("code",[e._v("viewZenithMean")]),e._v(") or the mean angle ("),t("code",[e._v("viewZenithAngles")]),e._v(") is explicitly specified, the data is processed on the backend that holds those bands.")]),e._v(" "),t("li",[t("code",[e._v("sunAzimuthAngles")]),e._v("/"),t("code",[e._v("sunZenithAngles")]),e._v(" = collective term for the exact sun azimuth and sun zenith angle.")])]),e._v(" "),t("h3",{attrs:{id:"common-properties"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#common-properties"}},[e._v("#")]),e._v(" Common Properties")]),e._v(" "),t("p",[e._v("We list here a set of common properties, that can be relevant for multiple collections. Collections are strongly encouraged to use these properties instead of using a different name for the same property.")]),e._v(" "),t("h4",{attrs:{id:"common"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#common"}},[e._v("#")]),e._v(" Common")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/stac-extensions/sat#satorbit_state",target:"_blank",rel:"noopener noreferrer"}},[e._v("sat:orbit_state"),t("OutboundLink")],1)]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/stac-extensions/sat#satrelative_orbit",target:"_blank",rel:"noopener noreferrer"}},[e._v("sat:relative_orbit"),t("OutboundLink")],1)])]),e._v(" "),t("h4",{attrs:{id:"optical-instruments"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#optical-instruments"}},[e._v("#")]),e._v(" Optical instruments")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/stac-extensions/eo#eocloud_cover",target:"_blank",rel:"noopener noreferrer"}},[e._v("eo:cloud_cover"),t("OutboundLink")],1)])]),e._v(" "),t("h4",{attrs:{id:"sar-instruments"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#sar-instruments"}},[e._v("#")]),e._v(" SAR instruments")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/stac-extensions/sar#item-properties-or-asset-fields",target:"_blank",rel:"noopener noreferrer"}},[e._v("sar:instrument_mode"),t("OutboundLink")],1)])])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file diff --git a/assets/js/63.4bcb504f.js b/assets/js/63.6e1a0849.js similarity index 98% rename from assets/js/63.4bcb504f.js rename to assets/js/63.6e1a0849.js index b2aa01903..bde0011c3 100644 --- a/assets/js/63.4bcb504f.js +++ b/assets/js/63.6e1a0849.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[63],{486:function(e,t,n){"use strict";n.r(t);var o=n(4),r=Object(o.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"federation-contract"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#federation-contract"}},[e._v("#")]),e._v(" Federation Contract")]),e._v(" "),t("p",[e._v("For a federation to work, all providers need to come up with a federation contract to agree on.\nSee the "),t("RouterLink",{attrs:{to:"/federation/"}},[e._v("overview about the existing federation concepts and issues")]),e._v(".")],1),e._v(" "),t("p",[e._v("This contract has 2 main goals:")]),e._v(" "),t("ol",[t("li",[e._v("Achieve user satisfaction, which can be measured in terms of user growth and number of complaints versus the usage of a specific feature.")]),e._v(" "),t("li",[e._v("Agree on interfaces and harmonization rules to align the different services in the federation.")])]),e._v(" "),t("p",[e._v("The platform aims to be inclusive towards onboarding new features and components,\nto stimulate growth and innovation. To allow this in an environment that also supports\nuser-critical workflows such functionality needs to be clearly marked, for instance by setting\nan 'experimental' property on a process, collection or backend, and by indicating it in descriptions or the documentation.")]),e._v(" "),t("p",[e._v("We assume that most often, an implementor knows when a feature is mature enough. However, when there is doubt about indicating a feature as experimental:")]),e._v(" "),t("ul",[t("li",[e._v("By default or if unsure, it is probably experimental.")]),e._v(" "),t("li",[e._v("If a feature is new or it hasn't been used, it's experimental.")]),e._v(" "),t("li",[e._v("If still in doubt, consult with partner providers.")])]),e._v(" "),t("p",[e._v("If a non-experimental component exceeds the "),t("a",{attrs:{href:"https://sre.google/workbook/implementing-slos/",target:"_blank",rel:"noopener noreferrer"}},[e._v("error budget"),t("OutboundLink")],1),e._v(", for instance when downtime exceeds the objective,\nthe provider is expected to stop working on new features and improve reliability, or to mark the component\nas experimental. Reverting a 'stable' feature to 'experimental' should be considered a backwards incompatible change, requiring communication towards the user and proper consideration of the impact.")]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("Note")]),e._v(" "),t("p",[e._v('To join the federation, it is required to (mostly) fulfill these requirements and document differences for users in the "'),t("RouterLink",{attrs:{to:"/federation/"}},[e._v("Federation Aspects and Known Issues")]),e._v('".\nNevertheless, these requirements are negotiable if there are good arguments for a change as the current state of the "contract" is just the compromise that the existing providers have agreed upon and if a new back-end joins the federation new compromises may need to be made.')],1)]),e._v(" "),t("ul",[t("li",[t("RouterLink",{attrs:{to:"/federation/backends/api.html"}},[e._v("API")])],1),e._v(" "),t("li",[t("RouterLink",{attrs:{to:"/federation/backends/collections.html"}},[e._v("Collections")])],1),e._v(" "),t("li",[t("RouterLink",{attrs:{to:"/federation/backends/fileformats.html"}},[e._v("File Formats")])],1),e._v(" "),t("li",[t("RouterLink",{attrs:{to:"/federation/backends/processes.html"}},[e._v("Processes")])],1)])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[63],{487:function(e,t,n){"use strict";n.r(t);var o=n(4),r=Object(o.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"federation-contract"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#federation-contract"}},[e._v("#")]),e._v(" Federation Contract")]),e._v(" "),t("p",[e._v("For a federation to work, all providers need to come up with a federation contract to agree on.\nSee the "),t("RouterLink",{attrs:{to:"/federation/"}},[e._v("overview about the existing federation concepts and issues")]),e._v(".")],1),e._v(" "),t("p",[e._v("This contract has 2 main goals:")]),e._v(" "),t("ol",[t("li",[e._v("Achieve user satisfaction, which can be measured in terms of user growth and number of complaints versus the usage of a specific feature.")]),e._v(" "),t("li",[e._v("Agree on interfaces and harmonization rules to align the different services in the federation.")])]),e._v(" "),t("p",[e._v("The platform aims to be inclusive towards onboarding new features and components,\nto stimulate growth and innovation. To allow this in an environment that also supports\nuser-critical workflows such functionality needs to be clearly marked, for instance by setting\nan 'experimental' property on a process, collection or backend, and by indicating it in descriptions or the documentation.")]),e._v(" "),t("p",[e._v("We assume that most often, an implementor knows when a feature is mature enough. However, when there is doubt about indicating a feature as experimental:")]),e._v(" "),t("ul",[t("li",[e._v("By default or if unsure, it is probably experimental.")]),e._v(" "),t("li",[e._v("If a feature is new or it hasn't been used, it's experimental.")]),e._v(" "),t("li",[e._v("If still in doubt, consult with partner providers.")])]),e._v(" "),t("p",[e._v("If a non-experimental component exceeds the "),t("a",{attrs:{href:"https://sre.google/workbook/implementing-slos/",target:"_blank",rel:"noopener noreferrer"}},[e._v("error budget"),t("OutboundLink")],1),e._v(", for instance when downtime exceeds the objective,\nthe provider is expected to stop working on new features and improve reliability, or to mark the component\nas experimental. Reverting a 'stable' feature to 'experimental' should be considered a backwards incompatible change, requiring communication towards the user and proper consideration of the impact.")]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("Note")]),e._v(" "),t("p",[e._v('To join the federation, it is required to (mostly) fulfill these requirements and document differences for users in the "'),t("RouterLink",{attrs:{to:"/federation/"}},[e._v("Federation Aspects and Known Issues")]),e._v('".\nNevertheless, these requirements are negotiable if there are good arguments for a change as the current state of the "contract" is just the compromise that the existing providers have agreed upon and if a new back-end joins the federation new compromises may need to be made.')],1)]),e._v(" "),t("ul",[t("li",[t("RouterLink",{attrs:{to:"/federation/backends/api.html"}},[e._v("API")])],1),e._v(" "),t("li",[t("RouterLink",{attrs:{to:"/federation/backends/collections.html"}},[e._v("Collections")])],1),e._v(" "),t("li",[t("RouterLink",{attrs:{to:"/federation/backends/fileformats.html"}},[e._v("File Formats")])],1),e._v(" "),t("li",[t("RouterLink",{attrs:{to:"/federation/backends/processes.html"}},[e._v("Processes")])],1)])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/64.2cd2ee00.js b/assets/js/64.bc34fb18.js similarity index 99% rename from assets/js/64.2cd2ee00.js rename to assets/js/64.bc34fb18.js index 5e6c6b86a..53632ca8b 100644 --- a/assets/js/64.2cd2ee00.js +++ b/assets/js/64.bc34fb18.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[64],{487:function(e,a,_){"use strict";_.r(a);var v=_(4),o=Object(v.a)({},(function(){var e=this,a=e._self._c;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("h1",{attrs:{id:"processes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#processes"}},[e._v("#")]),e._v(" Processes")]),e._v(" "),a("h2",{attrs:{id:"core-profile"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#core-profile"}},[e._v("#")]),e._v(" Core Profile")]),e._v(" "),a("p",[e._v("As the openEO project defines a lot of processes, we need to define a core profile (i.e. a subset) that needs to be implemented on each back-end.\nAll processes specifications can be found at "),a("a",{attrs:{href:"https://processes.openeo.org",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://processes.openeo.org"),a("OutboundLink")],1)]),e._v(" "),a("h3",{attrs:{id:"data-cubes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#data-cubes"}},[e._v("#")]),e._v(" Data Cubes")]),e._v(" "),a("ul",[a("li",[a("code",[e._v("add_dimension")]),e._v(": Add a new dimension")]),e._v(" "),a("li",[a("code",[e._v("aggregate_spatial")]),e._v(": Zonal statistics for geometries")]),e._v(" "),a("li",[a("code",[e._v("aggregate_temporal")]),e._v(": Temporal aggregations")]),e._v(" "),a("li",[a("code",[e._v("aggregate_temporal_period")]),e._v(": Temporal aggregations based on calendar hierarchies")]),e._v(" "),a("li",[a("code",[e._v("apply")]),e._v(": Apply a process to each pixel")]),e._v(" "),a("li",[a("code",[e._v("apply_dimension")]),e._v(": Apply a process to pixels along a dimension")]),e._v(" "),a("li",[a("code",[e._v("apply_kernel")]),e._v(": Apply a spatial convolution with a kernel")]),e._v(" "),a("li",[a("code",[e._v("dimension_labels")]),e._v(": Get the dimension labels")]),e._v(" "),a("li",[a("code",[e._v("drop_dimension")]),e._v(": Remove a dimension")]),e._v(" "),a("li",[a("code",[e._v("filter_bands")]),e._v(": Filter the bands by names")]),e._v(" "),a("li",[a("code",[e._v("filter_bbox")]),e._v(": Spatial filter using a bounding box")]),e._v(" "),a("li",[a("code",[e._v("filter_spatial")]),e._v(": Spatial filter using geometries")]),e._v(" "),a("li",[a("code",[e._v("filter_temporal")]),e._v(": Temporal filter for temporal intervals")]),e._v(" "),a("li",[a("code",[e._v("load_collection")]),e._v(": Load a collection")]),e._v(" "),a("li",[a("code",[e._v("load_result")]),e._v(": Load batch job results - "),a("strong",[e._v("experimental")])]),e._v(" "),a("li",[a("code",[e._v("mask")]),e._v(": Apply a raster mask")]),e._v(" "),a("li",[a("code",[e._v("mask_polygon")]),e._v(": Apply a polygon mask")]),e._v(" "),a("li",[a("code",[e._v("merge_cubes")]),e._v(": Merge two data cubes")]),e._v(" "),a("li",[a("code",[e._v("reduce_dimension")]),e._v(": Reduce dimensions")]),e._v(" "),a("li",[a("code",[e._v("rename_dimension")]),e._v(": Rename a dimension")]),e._v(" "),a("li",[a("code",[e._v("rename_labels")]),e._v(": Rename dimension labels -> needed often for apply_dimension")]),e._v(" "),a("li",[a("code",[e._v("resample_cube_spatial")]),e._v(": Resample the spatial dimensions to match a target data cube")]),e._v(" "),a("li",[a("code",[e._v("resample_cube_temporal")]),e._v(": Resample temporal dimensions to match a target data cube - "),a("strong",[e._v("experimental")])]),e._v(" "),a("li",[a("code",[e._v("resample_spatial")]),e._v(": Resample and warp the spatial dimensions")]),e._v(" "),a("li",[a("code",[e._v("save_result")]),e._v(": Save processed data")])]),e._v(" "),a("h3",{attrs:{id:"arrays-reducers"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#arrays-reducers"}},[e._v("#")]),e._v(" Arrays / Reducers")]),e._v(" "),a("ul",[a("li",[a("code",[e._v("array_append")]),e._v(": Append a value to an array - "),a("strong",[e._v("experimental")])]),e._v(" "),a("li",[a("code",[e._v("array_apply")]),e._v(": Apply a process to each array element")]),e._v(" "),a("li",[a("code",[e._v("array_concat")]),e._v(": Merge two arrays - "),a("strong",[e._v("experimental")])]),e._v(" "),a("li",[a("code",[e._v("array_contains")]),e._v(": Check whether the array contains a given value")]),e._v(" "),a("li",[a("code",[e._v("array_create")]),e._v(": Create an array - "),a("strong",[e._v("experimental")])]),e._v(" "),a("li",[a("code",[e._v("array_element")]),e._v(": Get an element from an array")]),e._v(" "),a("li",[a("code",[e._v("array_filter")]),e._v(": Filter an array based on a condition")]),e._v(" "),a("li",[a("code",[e._v("array_find")]),e._v(": Get the index for a value in an array")]),e._v(" "),a("li",[a("code",[e._v("array_interpolate_linear")]),e._v(": One-dimensional linear interpolation for arrays - "),a("strong",[e._v("experimental")])]),e._v(" "),a("li",[a("code",[e._v("array_labels")]),e._v(": Get the labels for an array")]),e._v(" "),a("li",[a("code",[e._v("array_modify")]),e._v(": Change the content of an array (insert, remove, update) - "),a("strong",[e._v("experimental")])]),e._v(" "),a("li",[a("code",[e._v("count")]),e._v(": Count the number of elements")]),e._v(" "),a("li",[a("code",[e._v("extrema")]),e._v(": Minimum and maximum values")]),e._v(" "),a("li",[a("code",[e._v("first")]),e._v(": First element")]),e._v(" "),a("li",[a("code",[e._v("last")]),e._v(": Last element")]),e._v(" "),a("li",[a("code",[e._v("max")]),e._v(": Maximum value")]),e._v(" "),a("li",[a("code",[e._v("mean")]),e._v(": Arithmetic mean (average)")]),e._v(" "),a("li",[a("code",[e._v("median")]),e._v(": Statistical median")]),e._v(" "),a("li",[a("code",[e._v("min")]),e._v(": Minimum value")]),e._v(" "),a("li",[a("code",[e._v("order")]),e._v(": Create a permutation")]),e._v(" "),a("li",[a("code",[e._v("product")]),e._v(": Compute the product by multiplying numbers")]),e._v(" "),a("li",[a("code",[e._v("rearrange")]),e._v(": Rearrange an array based on a permutation")]),e._v(" "),a("li",[a("code",[e._v("sort")]),e._v(": Sort data")]),e._v(" "),a("li",[a("code",[e._v("sum")]),e._v(": Compute the sum by adding up numbers")])]),e._v(" "),a("h3",{attrs:{id:"math"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#math"}},[e._v("#")]),e._v(" Math")]),e._v(" "),a("ul",[a("li",[a("code",[e._v("absolute")]),e._v(": Absolute value")]),e._v(" "),a("li",[a("code",[e._v("add")]),e._v(": Addition of two numbers")]),e._v(" "),a("li",[a("code",[e._v("arccos")]),e._v(": Inverse cosine")]),e._v(" "),a("li",[a("code",[e._v("arcosh")]),e._v(": Inverse hyperbolic cosine")]),e._v(" "),a("li",[a("code",[e._v("arcsin")]),e._v(": Inverse sine")]),e._v(" "),a("li",[a("code",[e._v("arctan")]),e._v(": Inverse tangent")]),e._v(" "),a("li",[a("code",[e._v("arctan2")]),e._v(": Inverse tangent of two numbers")]),e._v(" "),a("li",[a("code",[e._v("arsinh")]),e._v(": Inverse hyperbolic sine")]),e._v(" "),a("li",[a("code",[e._v("artanh")]),e._v(": Inverse hyperbolic tangent")]),e._v(" "),a("li",[a("code",[e._v("ceil")]),e._v(": Round fractions up")]),e._v(" "),a("li",[a("code",[e._v("clip")]),e._v(": Clip a value between a minimum and a maximum")]),e._v(" "),a("li",[a("code",[e._v("constant")]),e._v(": Define a constant value -> pretty easy implementation")]),e._v(" "),a("li",[a("code",[e._v("cos")]),e._v(": Cosine")]),e._v(" "),a("li",[a("code",[e._v("cosh")]),e._v(": Hyperbolic cosine")]),e._v(" "),a("li",[a("code",[e._v("divide")]),e._v(": Division of two numbers")]),e._v(" "),a("li",[a("code",[e._v("e")]),e._v(": Euler's number")]),e._v(" "),a("li",[a("code",[e._v("exp")]),e._v(": Exponentiation to the base e")]),e._v(" "),a("li",[a("code",[e._v("floor")]),e._v(": Round fractions down")]),e._v(" "),a("li",[a("code",[e._v("int")]),e._v(": Integer part of a number")]),e._v(" "),a("li",[a("code",[e._v("linear_scale_range")]),e._v(": Linear transformation between two ranges")]),e._v(" "),a("li",[a("code",[e._v("ln")]),e._v(": Natural logarithm")]),e._v(" "),a("li",[a("code",[e._v("log")]),e._v(": Logarithm to a base")]),e._v(" "),a("li",[a("code",[e._v("mod")]),e._v(": Modulo")]),e._v(" "),a("li",[a("code",[e._v("multiply")]),e._v(": Multiplication of two numbers")]),e._v(" "),a("li",[a("code",[e._v("nan")]),e._v(" - Not a Number - "),a("strong",[e._v("experimental")])]),e._v(" "),a("li",[a("code",[e._v("pi")]),e._v(": Pi")]),e._v(" "),a("li",[a("code",[e._v("power")]),e._v(": Exponentiation")]),e._v(" "),a("li",[a("code",[e._v("round")]),e._v(": Round to a specified precision")]),e._v(" "),a("li",[a("code",[e._v("sgn")]),e._v(": Signum")]),e._v(" "),a("li",[a("code",[e._v("sin")]),e._v(": Sine")]),e._v(" "),a("li",[a("code",[e._v("sinh")]),e._v(": Hyperbolic sine")]),e._v(" "),a("li",[a("code",[e._v("sqrt")]),e._v(": Square root")]),e._v(" "),a("li",[a("code",[e._v("subtract")]),e._v(": Subtraction of two numbers")]),e._v(" "),a("li",[a("code",[e._v("tan")]),e._v(": Tangent")]),e._v(" "),a("li",[a("code",[e._v("tanh")]),e._v(": Hyperbolic tangent")])]),e._v(" "),a("h3",{attrs:{id:"statistics-indices"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#statistics-indices"}},[e._v("#")]),e._v(" Statistics / Indices")]),e._v(" "),a("ul",[a("li",[a("code",[e._v("ndvi")]),e._v(": Normalized Difference Vegetation Index")]),e._v(" "),a("li",[a("code",[e._v("normalized_difference")]),e._v(": Normalized difference")]),e._v(" "),a("li",[a("code",[e._v("quantiles")]),e._v(": Quantiles")]),e._v(" "),a("li",[a("code",[e._v("sd")]),e._v(": Standard deviation")]),e._v(" "),a("li",[a("code",[e._v("variance")]),e._v(": Variance")])]),e._v(" "),a("h3",{attrs:{id:"logic"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#logic"}},[e._v("#")]),e._v(" Logic")]),e._v(" "),a("ul",[a("li",[a("code",[e._v("and")]),e._v(": Logical AND")]),e._v(" "),a("li",[a("code",[e._v("all")]),e._v(": Are all of the values true?")]),e._v(" "),a("li",[a("code",[e._v("any")]),e._v(": Is at least one value true?")]),e._v(" "),a("li",[a("code",[e._v("between")]),e._v(": Between comparison")]),e._v(" "),a("li",[a("code",[e._v("eq")]),e._v(": Equal to comparison")]),e._v(" "),a("li",[a("code",[e._v("gt")]),e._v(": Greater than comparison")]),e._v(" "),a("li",[a("code",[e._v("gte")]),e._v(": Greater than or equal to comparison")]),e._v(" "),a("li",[a("code",[e._v("if")]),e._v(": If-Then-Else conditional")]),e._v(" "),a("li",[a("code",[e._v("is_infinite")]),e._v(": Value is an infinite number - "),a("strong",[e._v("experimental")])]),e._v(" "),a("li",[a("code",[e._v("is_nan")]),e._v(": Value is not a number")]),e._v(" "),a("li",[a("code",[e._v("is_nodata")]),e._v(": Value is a no-data value")]),e._v(" "),a("li",[a("code",[e._v("is_valid")]),e._v(": Value is valid data")]),e._v(" "),a("li",[a("code",[e._v("lt")]),e._v(": Less than comparison")]),e._v(" "),a("li",[a("code",[e._v("lte")]),e._v(": Less than or equal to comparison")]),e._v(" "),a("li",[a("code",[e._v("neq")]),e._v(": Not equal to comparison")]),e._v(" "),a("li",[a("code",[e._v("not")]),e._v(": Inverting a boolean")]),e._v(" "),a("li",[a("code",[e._v("or")]),e._v(": Logical OR")]),e._v(" "),a("li",[a("code",[e._v("xor")]),e._v(": Logical XOR (exclusive or)")])])])}),[],!1,null,null,null);a.default=o.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[64],{486:function(e,a,_){"use strict";_.r(a);var v=_(4),o=Object(v.a)({},(function(){var e=this,a=e._self._c;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("h1",{attrs:{id:"processes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#processes"}},[e._v("#")]),e._v(" Processes")]),e._v(" "),a("h2",{attrs:{id:"core-profile"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#core-profile"}},[e._v("#")]),e._v(" Core Profile")]),e._v(" "),a("p",[e._v("As the openEO project defines a lot of processes, we need to define a core profile (i.e. a subset) that needs to be implemented on each back-end.\nAll processes specifications can be found at "),a("a",{attrs:{href:"https://processes.openeo.org",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://processes.openeo.org"),a("OutboundLink")],1)]),e._v(" "),a("h3",{attrs:{id:"data-cubes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#data-cubes"}},[e._v("#")]),e._v(" Data Cubes")]),e._v(" "),a("ul",[a("li",[a("code",[e._v("add_dimension")]),e._v(": Add a new dimension")]),e._v(" "),a("li",[a("code",[e._v("aggregate_spatial")]),e._v(": Zonal statistics for geometries")]),e._v(" "),a("li",[a("code",[e._v("aggregate_temporal")]),e._v(": Temporal aggregations")]),e._v(" "),a("li",[a("code",[e._v("aggregate_temporal_period")]),e._v(": Temporal aggregations based on calendar hierarchies")]),e._v(" "),a("li",[a("code",[e._v("apply")]),e._v(": Apply a process to each pixel")]),e._v(" "),a("li",[a("code",[e._v("apply_dimension")]),e._v(": Apply a process to pixels along a dimension")]),e._v(" "),a("li",[a("code",[e._v("apply_kernel")]),e._v(": Apply a spatial convolution with a kernel")]),e._v(" "),a("li",[a("code",[e._v("dimension_labels")]),e._v(": Get the dimension labels")]),e._v(" "),a("li",[a("code",[e._v("drop_dimension")]),e._v(": Remove a dimension")]),e._v(" "),a("li",[a("code",[e._v("filter_bands")]),e._v(": Filter the bands by names")]),e._v(" "),a("li",[a("code",[e._v("filter_bbox")]),e._v(": Spatial filter using a bounding box")]),e._v(" "),a("li",[a("code",[e._v("filter_spatial")]),e._v(": Spatial filter using geometries")]),e._v(" "),a("li",[a("code",[e._v("filter_temporal")]),e._v(": Temporal filter for temporal intervals")]),e._v(" "),a("li",[a("code",[e._v("load_collection")]),e._v(": Load a collection")]),e._v(" "),a("li",[a("code",[e._v("load_result")]),e._v(": Load batch job results - "),a("strong",[e._v("experimental")])]),e._v(" "),a("li",[a("code",[e._v("mask")]),e._v(": Apply a raster mask")]),e._v(" "),a("li",[a("code",[e._v("mask_polygon")]),e._v(": Apply a polygon mask")]),e._v(" "),a("li",[a("code",[e._v("merge_cubes")]),e._v(": Merge two data cubes")]),e._v(" "),a("li",[a("code",[e._v("reduce_dimension")]),e._v(": Reduce dimensions")]),e._v(" "),a("li",[a("code",[e._v("rename_dimension")]),e._v(": Rename a dimension")]),e._v(" "),a("li",[a("code",[e._v("rename_labels")]),e._v(": Rename dimension labels -> needed often for apply_dimension")]),e._v(" "),a("li",[a("code",[e._v("resample_cube_spatial")]),e._v(": Resample the spatial dimensions to match a target data cube")]),e._v(" "),a("li",[a("code",[e._v("resample_cube_temporal")]),e._v(": Resample temporal dimensions to match a target data cube - "),a("strong",[e._v("experimental")])]),e._v(" "),a("li",[a("code",[e._v("resample_spatial")]),e._v(": Resample and warp the spatial dimensions")]),e._v(" "),a("li",[a("code",[e._v("save_result")]),e._v(": Save processed data")])]),e._v(" "),a("h3",{attrs:{id:"arrays-reducers"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#arrays-reducers"}},[e._v("#")]),e._v(" Arrays / Reducers")]),e._v(" "),a("ul",[a("li",[a("code",[e._v("array_append")]),e._v(": Append a value to an array - "),a("strong",[e._v("experimental")])]),e._v(" "),a("li",[a("code",[e._v("array_apply")]),e._v(": Apply a process to each array element")]),e._v(" "),a("li",[a("code",[e._v("array_concat")]),e._v(": Merge two arrays - "),a("strong",[e._v("experimental")])]),e._v(" "),a("li",[a("code",[e._v("array_contains")]),e._v(": Check whether the array contains a given value")]),e._v(" "),a("li",[a("code",[e._v("array_create")]),e._v(": Create an array - "),a("strong",[e._v("experimental")])]),e._v(" "),a("li",[a("code",[e._v("array_element")]),e._v(": Get an element from an array")]),e._v(" "),a("li",[a("code",[e._v("array_filter")]),e._v(": Filter an array based on a condition")]),e._v(" "),a("li",[a("code",[e._v("array_find")]),e._v(": Get the index for a value in an array")]),e._v(" "),a("li",[a("code",[e._v("array_interpolate_linear")]),e._v(": One-dimensional linear interpolation for arrays - "),a("strong",[e._v("experimental")])]),e._v(" "),a("li",[a("code",[e._v("array_labels")]),e._v(": Get the labels for an array")]),e._v(" "),a("li",[a("code",[e._v("array_modify")]),e._v(": Change the content of an array (insert, remove, update) - "),a("strong",[e._v("experimental")])]),e._v(" "),a("li",[a("code",[e._v("count")]),e._v(": Count the number of elements")]),e._v(" "),a("li",[a("code",[e._v("extrema")]),e._v(": Minimum and maximum values")]),e._v(" "),a("li",[a("code",[e._v("first")]),e._v(": First element")]),e._v(" "),a("li",[a("code",[e._v("last")]),e._v(": Last element")]),e._v(" "),a("li",[a("code",[e._v("max")]),e._v(": Maximum value")]),e._v(" "),a("li",[a("code",[e._v("mean")]),e._v(": Arithmetic mean (average)")]),e._v(" "),a("li",[a("code",[e._v("median")]),e._v(": Statistical median")]),e._v(" "),a("li",[a("code",[e._v("min")]),e._v(": Minimum value")]),e._v(" "),a("li",[a("code",[e._v("order")]),e._v(": Create a permutation")]),e._v(" "),a("li",[a("code",[e._v("product")]),e._v(": Compute the product by multiplying numbers")]),e._v(" "),a("li",[a("code",[e._v("rearrange")]),e._v(": Rearrange an array based on a permutation")]),e._v(" "),a("li",[a("code",[e._v("sort")]),e._v(": Sort data")]),e._v(" "),a("li",[a("code",[e._v("sum")]),e._v(": Compute the sum by adding up numbers")])]),e._v(" "),a("h3",{attrs:{id:"math"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#math"}},[e._v("#")]),e._v(" Math")]),e._v(" "),a("ul",[a("li",[a("code",[e._v("absolute")]),e._v(": Absolute value")]),e._v(" "),a("li",[a("code",[e._v("add")]),e._v(": Addition of two numbers")]),e._v(" "),a("li",[a("code",[e._v("arccos")]),e._v(": Inverse cosine")]),e._v(" "),a("li",[a("code",[e._v("arcosh")]),e._v(": Inverse hyperbolic cosine")]),e._v(" "),a("li",[a("code",[e._v("arcsin")]),e._v(": Inverse sine")]),e._v(" "),a("li",[a("code",[e._v("arctan")]),e._v(": Inverse tangent")]),e._v(" "),a("li",[a("code",[e._v("arctan2")]),e._v(": Inverse tangent of two numbers")]),e._v(" "),a("li",[a("code",[e._v("arsinh")]),e._v(": Inverse hyperbolic sine")]),e._v(" "),a("li",[a("code",[e._v("artanh")]),e._v(": Inverse hyperbolic tangent")]),e._v(" "),a("li",[a("code",[e._v("ceil")]),e._v(": Round fractions up")]),e._v(" "),a("li",[a("code",[e._v("clip")]),e._v(": Clip a value between a minimum and a maximum")]),e._v(" "),a("li",[a("code",[e._v("constant")]),e._v(": Define a constant value -> pretty easy implementation")]),e._v(" "),a("li",[a("code",[e._v("cos")]),e._v(": Cosine")]),e._v(" "),a("li",[a("code",[e._v("cosh")]),e._v(": Hyperbolic cosine")]),e._v(" "),a("li",[a("code",[e._v("divide")]),e._v(": Division of two numbers")]),e._v(" "),a("li",[a("code",[e._v("e")]),e._v(": Euler's number")]),e._v(" "),a("li",[a("code",[e._v("exp")]),e._v(": Exponentiation to the base e")]),e._v(" "),a("li",[a("code",[e._v("floor")]),e._v(": Round fractions down")]),e._v(" "),a("li",[a("code",[e._v("int")]),e._v(": Integer part of a number")]),e._v(" "),a("li",[a("code",[e._v("linear_scale_range")]),e._v(": Linear transformation between two ranges")]),e._v(" "),a("li",[a("code",[e._v("ln")]),e._v(": Natural logarithm")]),e._v(" "),a("li",[a("code",[e._v("log")]),e._v(": Logarithm to a base")]),e._v(" "),a("li",[a("code",[e._v("mod")]),e._v(": Modulo")]),e._v(" "),a("li",[a("code",[e._v("multiply")]),e._v(": Multiplication of two numbers")]),e._v(" "),a("li",[a("code",[e._v("nan")]),e._v(" - Not a Number - "),a("strong",[e._v("experimental")])]),e._v(" "),a("li",[a("code",[e._v("pi")]),e._v(": Pi")]),e._v(" "),a("li",[a("code",[e._v("power")]),e._v(": Exponentiation")]),e._v(" "),a("li",[a("code",[e._v("round")]),e._v(": Round to a specified precision")]),e._v(" "),a("li",[a("code",[e._v("sgn")]),e._v(": Signum")]),e._v(" "),a("li",[a("code",[e._v("sin")]),e._v(": Sine")]),e._v(" "),a("li",[a("code",[e._v("sinh")]),e._v(": Hyperbolic sine")]),e._v(" "),a("li",[a("code",[e._v("sqrt")]),e._v(": Square root")]),e._v(" "),a("li",[a("code",[e._v("subtract")]),e._v(": Subtraction of two numbers")]),e._v(" "),a("li",[a("code",[e._v("tan")]),e._v(": Tangent")]),e._v(" "),a("li",[a("code",[e._v("tanh")]),e._v(": Hyperbolic tangent")])]),e._v(" "),a("h3",{attrs:{id:"statistics-indices"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#statistics-indices"}},[e._v("#")]),e._v(" Statistics / Indices")]),e._v(" "),a("ul",[a("li",[a("code",[e._v("ndvi")]),e._v(": Normalized Difference Vegetation Index")]),e._v(" "),a("li",[a("code",[e._v("normalized_difference")]),e._v(": Normalized difference")]),e._v(" "),a("li",[a("code",[e._v("quantiles")]),e._v(": Quantiles")]),e._v(" "),a("li",[a("code",[e._v("sd")]),e._v(": Standard deviation")]),e._v(" "),a("li",[a("code",[e._v("variance")]),e._v(": Variance")])]),e._v(" "),a("h3",{attrs:{id:"logic"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#logic"}},[e._v("#")]),e._v(" Logic")]),e._v(" "),a("ul",[a("li",[a("code",[e._v("and")]),e._v(": Logical AND")]),e._v(" "),a("li",[a("code",[e._v("all")]),e._v(": Are all of the values true?")]),e._v(" "),a("li",[a("code",[e._v("any")]),e._v(": Is at least one value true?")]),e._v(" "),a("li",[a("code",[e._v("between")]),e._v(": Between comparison")]),e._v(" "),a("li",[a("code",[e._v("eq")]),e._v(": Equal to comparison")]),e._v(" "),a("li",[a("code",[e._v("gt")]),e._v(": Greater than comparison")]),e._v(" "),a("li",[a("code",[e._v("gte")]),e._v(": Greater than or equal to comparison")]),e._v(" "),a("li",[a("code",[e._v("if")]),e._v(": If-Then-Else conditional")]),e._v(" "),a("li",[a("code",[e._v("is_infinite")]),e._v(": Value is an infinite number - "),a("strong",[e._v("experimental")])]),e._v(" "),a("li",[a("code",[e._v("is_nan")]),e._v(": Value is not a number")]),e._v(" "),a("li",[a("code",[e._v("is_nodata")]),e._v(": Value is a no-data value")]),e._v(" "),a("li",[a("code",[e._v("is_valid")]),e._v(": Value is valid data")]),e._v(" "),a("li",[a("code",[e._v("lt")]),e._v(": Less than comparison")]),e._v(" "),a("li",[a("code",[e._v("lte")]),e._v(": Less than or equal to comparison")]),e._v(" "),a("li",[a("code",[e._v("neq")]),e._v(": Not equal to comparison")]),e._v(" "),a("li",[a("code",[e._v("not")]),e._v(": Inverting a boolean")]),e._v(" "),a("li",[a("code",[e._v("or")]),e._v(": Logical OR")]),e._v(" "),a("li",[a("code",[e._v("xor")]),e._v(": Logical XOR (exclusive or)")])])])}),[],!1,null,null,null);a.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/65.da8ccf99.js b/assets/js/65.5e555d6e.js similarity index 79% rename from assets/js/65.da8ccf99.js rename to assets/js/65.5e555d6e.js index f19ed669b..09bcc0911 100644 --- a/assets/js/65.da8ccf99.js +++ b/assets/js/65.5e555d6e.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[65],{489:function(t,n,s){"use strict";s.r(n);var e=s(4),o=Object(e.a)({},(function(){var t=this._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[t("FileFormatsSpec")],1)}),[],!1,null,null,null);n.default=o.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[65],{488:function(t,n,s){"use strict";s.r(n);var e=s(4),o=Object(e.a)({},(function(){var t=this._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[t("FileFormatsSpec")],1)}),[],!1,null,null,null);n.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/66.c4596935.js b/assets/js/66.325913e7.js similarity index 99% rename from assets/js/66.c4596935.js rename to assets/js/66.325913e7.js index 4eeb60cec..db021268f 100644 --- a/assets/js/66.c4596935.js +++ b/assets/js/66.325913e7.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[66],{490:function(t,a,s){"use strict";s.r(a);var e=s(4),n=Object(e.a)({},(function(){var t=this,a=t._self._c;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"get-started-with-the-openeo-python-client-client-side-processing"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#get-started-with-the-openeo-python-client-client-side-processing"}},[t._v("#")]),t._v(" Get started with the openEO Python Client Client Side Processing")]),t._v(" "),a("h2",{attrs:{id:"background"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#background"}},[t._v("#")]),t._v(" Background")]),t._v(" "),a("p",[t._v("The client-side processing functionality allows to test and use openEO with its processes locally, i.e. without any connection to an openEO back-end.\nIt relies on the projects "),a("a",{attrs:{href:"https://github.com/Open-EO/openeo-pg-parser-networkx%3E",target:"_blank",rel:"noopener noreferrer"}},[t._v("openeo-pg-parser-networkx"),a("OutboundLink")],1),t._v(", which provides an openEO process graph parsing tool, and "),a("a",{attrs:{href:"https://github.com/Open-EO/openeo-processes-dask",target:"_blank",rel:"noopener noreferrer"}},[t._v("openeo-processes-dask"),a("OutboundLink")],1),t._v(", which provides an Xarray and Dask implementation of most openEO processes.")]),t._v(" "),a("h2",{attrs:{id:"installation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#installation"}},[t._v("#")]),t._v(" Installation")]),t._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("Important")]),t._v(" "),a("p",[t._v("This feature requires "),a("code",[t._v("Python>=3.9")]),t._v(".")])]),t._v(" "),a("p",[t._v("The openEO Python client library can easily be installed with a tool like "),a("code",[t._v("pip")]),t._v(", for example:")]),t._v(" "),a("div",{staticClass:"language-shell script extra-class"},[a("pre",{pre:!0,attrs:{class:"language-shell"}},[a("code",[t._v("pip "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("install")]),t._v(" openeo"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("localprocessing"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),a("h2",{attrs:{id:"usage"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#usage"}},[t._v("#")]),t._v(" Usage")]),t._v(" "),a("p",[t._v("Every openEO process graph relies on data which is typically provided by a cloud infrastructure (the openEO back-end).\nThe client-side processing adds the possibility to read and use local netCDFs, geoTIFFs, ZARR files, and remote STAC Collections or Items for your experiments.")]),t._v(" "),a("h3",{attrs:{id:"stac-collections-and-items"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#stac-collections-and-items"}},[t._v("#")]),t._v(" STAC Collections and Items")]),t._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("Important")]),t._v(" "),a("p",[t._v("The provided examples using STAC rely on third party STAC Catalogs, we can't guarantee that the urls will remain valid.")])]),t._v(" "),a("p",[t._v("With the "),a("code",[t._v("load_stac")]),t._v(" process it's possible to load and use data provided by remote or local STAC Collections or Items.\nThe following code snippet loads Sentinel-2 L2A data from a public STAC Catalog, using specific spatial and temporal extent, band name and also properties for cloud coverage.")]),t._v(" "),a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" openeo"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("local "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" LocalConnection\nlocal_conn "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" LocalConnection"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"./"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\nurl "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a"')]),t._v("\nspatial_extent "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"west"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("11")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"east"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("12")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"south"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("46")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"north"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("47")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\ntemporal_extent "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-01-01"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-06-15"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\nbands "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"red"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\nproperties "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"eo:cloud_cover"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("dict")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("lt"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("50")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\ns2_cube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" local_conn"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("load_stac"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("url"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("url"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n spatial_extent"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("spatial_extent"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n temporal_extent"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("temporal_extent"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n bands"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("bands"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n properties"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("properties"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ns2_cube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("execute"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("p",[t._v("When calling the "),a("code",[t._v(".execute()")]),t._v(" method on a "),a("code",[t._v("Datacube")]),t._v(" created from a "),a("code",[t._v("LocalConnection")]),t._v(", an "),a("code",[t._v("xarray.DataArray")]),t._v(" object containing dask arrays is returned:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v(" >>> s2_cube.execute()\n \n dask.array\n Coordinates: (12/53)\n * time (time) datetime64[ns] 2019-01-02...\n id (time) >> # Check if the data is loaded correctly\n>>> s2_datacube.execute()\n\ndask.array\nCoordinates:\n * t (t) datetime64[ns] 2022-06-02 2022-06-05 ... 2022-06-27 2022-06-30\n * x (x) float64 6.75e+05 6.75e+05 6.75e+05 ... 6.843e+05 6.843e+05\n * y (y) float64 5.155e+06 5.155e+06 5.155e+06 ... 5.148e+06 5.148e+06\n crs |S1 ...\n * bands (bands) object 'B04' 'B03' 'B02' 'B08' 'SCL'\nAttributes:\n Conventions: CF-1.9\n institution: openEO platform - Geotrellis backend: 0.9.5a1\n description:\n title:\n")])])]),a("p",[t._v("As you can see in the previous example, we are using a call to "),a("code",[t._v(".execute()")]),t._v(" which will execute locally the generated openEO process graph.\nIn this case, the process graph consist only in a single "),a("code",[t._v("load_collection")]),t._v(", which performs lazy loading of the data. With this first step you can check if the data is being read correctly by openEO.")]),t._v(" "),a("p",[t._v("Looking at the metadata of this netCDF sample, we can see that it contains the bands B04, B03, B02, B08 and SCL.\nAdditionally, we also see that it is composed by more than one element in time and that it covers the month of June 2022.")]),t._v(" "),a("p",[t._v("We can now do a simple processing for demo purposes, let's compute the median NDVI in time and visualize the result:")]),t._v(" "),a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("b04 "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" s2_datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("band"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B04"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nb08 "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" s2_datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("band"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B08"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nndvi "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("b08 "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("-")]),t._v(" b04"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("b08 "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" b04"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nndvi_median "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" ndvi"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("reduce_dimension"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("dimension"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" reducer"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"median"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nresult_ndvi "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" ndvi_median"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("execute"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nresult_ndvi"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("plot"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("imshow"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("cmap"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Greens"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("p",[t._v("We can perform the same example using data provided by STAC Collection:")]),t._v(" "),a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" openeo"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("local "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" LocalConnection\nlocal_conn "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" LocalConnection"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"./"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\nurl "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a"')]),t._v("\nspatial_extent "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"east"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("11.40")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"north"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("46.52")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"south"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("46.46")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"west"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("11.25")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\ntemporal_extent "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2022-06-01"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2022-06-30"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\nbands "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"red"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"nir"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\nproperties "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"eo:cloud_cover"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("dict")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("lt"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("80")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\ns2_datacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" local_conn"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("load_stac"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n url"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("url"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n spatial_extent"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("spatial_extent"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n temporal_extent"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("temporal_extent"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n bands"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("bands"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n properties"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("properties"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\nb04 "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" s2_datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("band"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"red"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nb08 "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" s2_datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("band"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"nir"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nndvi "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("b08 "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("-")]),t._v(" b04"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("b08 "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" b04"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nndvi_median "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" ndvi"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("reduce_dimension"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("dimension"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"time"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" reducer"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"median"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nresult_ndvi "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" ndvi_median"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("execute"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("h2",{attrs:{id:"client-side-processing-example-notebooks"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#client-side-processing-example-notebooks"}},[t._v("#")]),t._v(" Client-Side Processing Example Notebooks")]),t._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"https://github.com/Open-EO/openeo-python-client/tree/master/examples/notebooks/Client_Side_Processing",target:"_blank",rel:"noopener noreferrer"}},[t._v("From the openEO Python Client repo"),a("OutboundLink")],1)]),t._v(" "),a("li",[a("a",{attrs:{href:"https://github.com/EO-College/cubes-and-clouds/blob/main/lectures/3.1_data_processing/exercises/_alternatives/31_data_processing_stac.ipynb",target:"_blank",rel:"noopener noreferrer"}},[t._v("From the Cubes and Clouds repo"),a("OutboundLink")],1)])]),t._v(" "),a("h2",{attrs:{id:"additional-information"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#additional-information"}},[t._v("#")]),t._v(" Additional Information")]),t._v(" "),a("p",[t._v("Additional information and resources about the openEO Python Client Library:")]),t._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Official openEO Python Client Library Documentation"),a("OutboundLink")],1)]),t._v(" "),a("li",[a("a",{attrs:{href:"https://github.com/openEOPlatform/sample-notebooks",target:"_blank",rel:"noopener noreferrer"}},[t._v("Official openeo.cloud sample notebooks"),a("OutboundLink")],1)]),t._v(" "),a("li",[a("a",{attrs:{href:"https://github.com/Open-EO/openeo-python-client/tree/master/examples",target:"_blank",rel:"noopener noreferrer"}},[t._v("Example Python scripts"),a("OutboundLink")],1)]),t._v(" "),a("li",[a("a",{attrs:{href:"https://github.com/Open-EO/openeo-python-client/tree/master/examples/notebooks",target:"_blank",rel:"noopener noreferrer"}},[t._v("Example Jupyter Notebooks"),a("OutboundLink")],1)]),t._v(" "),a("li",[a("a",{attrs:{href:"https://github.com/Open-EO/openeo-python-client",target:"_blank",rel:"noopener noreferrer"}},[t._v("Repository on GitHub"),a("OutboundLink")],1)]),t._v(" "),a("li",[a("RouterLink",{attrs:{to:"/getting-started/python/shiny.html"}},[t._v("Run openEO processes in a Python Shiny App")])],1)])])}),[],!1,null,null,null);a.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[66],{489:function(t,a,s){"use strict";s.r(a);var e=s(4),n=Object(e.a)({},(function(){var t=this,a=t._self._c;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"get-started-with-the-openeo-python-client-client-side-processing"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#get-started-with-the-openeo-python-client-client-side-processing"}},[t._v("#")]),t._v(" Get started with the openEO Python Client Client Side Processing")]),t._v(" "),a("h2",{attrs:{id:"background"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#background"}},[t._v("#")]),t._v(" Background")]),t._v(" "),a("p",[t._v("The client-side processing functionality allows to test and use openEO with its processes locally, i.e. without any connection to an openEO back-end.\nIt relies on the projects "),a("a",{attrs:{href:"https://github.com/Open-EO/openeo-pg-parser-networkx%3E",target:"_blank",rel:"noopener noreferrer"}},[t._v("openeo-pg-parser-networkx"),a("OutboundLink")],1),t._v(", which provides an openEO process graph parsing tool, and "),a("a",{attrs:{href:"https://github.com/Open-EO/openeo-processes-dask",target:"_blank",rel:"noopener noreferrer"}},[t._v("openeo-processes-dask"),a("OutboundLink")],1),t._v(", which provides an Xarray and Dask implementation of most openEO processes.")]),t._v(" "),a("h2",{attrs:{id:"installation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#installation"}},[t._v("#")]),t._v(" Installation")]),t._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("Important")]),t._v(" "),a("p",[t._v("This feature requires "),a("code",[t._v("Python>=3.9")]),t._v(".")])]),t._v(" "),a("p",[t._v("The openEO Python client library can easily be installed with a tool like "),a("code",[t._v("pip")]),t._v(", for example:")]),t._v(" "),a("div",{staticClass:"language-shell script extra-class"},[a("pre",{pre:!0,attrs:{class:"language-shell"}},[a("code",[t._v("pip "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("install")]),t._v(" openeo"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("localprocessing"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),a("h2",{attrs:{id:"usage"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#usage"}},[t._v("#")]),t._v(" Usage")]),t._v(" "),a("p",[t._v("Every openEO process graph relies on data which is typically provided by a cloud infrastructure (the openEO back-end).\nThe client-side processing adds the possibility to read and use local netCDFs, geoTIFFs, ZARR files, and remote STAC Collections or Items for your experiments.")]),t._v(" "),a("h3",{attrs:{id:"stac-collections-and-items"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#stac-collections-and-items"}},[t._v("#")]),t._v(" STAC Collections and Items")]),t._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("Important")]),t._v(" "),a("p",[t._v("The provided examples using STAC rely on third party STAC Catalogs, we can't guarantee that the urls will remain valid.")])]),t._v(" "),a("p",[t._v("With the "),a("code",[t._v("load_stac")]),t._v(" process it's possible to load and use data provided by remote or local STAC Collections or Items.\nThe following code snippet loads Sentinel-2 L2A data from a public STAC Catalog, using specific spatial and temporal extent, band name and also properties for cloud coverage.")]),t._v(" "),a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" openeo"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("local "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" LocalConnection\nlocal_conn "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" LocalConnection"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"./"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\nurl "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a"')]),t._v("\nspatial_extent "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"west"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("11")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"east"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("12")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"south"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("46")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"north"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("47")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\ntemporal_extent "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-01-01"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-06-15"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\nbands "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"red"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\nproperties "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"eo:cloud_cover"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("dict")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("lt"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("50")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\ns2_cube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" local_conn"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("load_stac"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("url"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("url"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n spatial_extent"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("spatial_extent"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n temporal_extent"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("temporal_extent"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n bands"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("bands"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n properties"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("properties"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ns2_cube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("execute"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("p",[t._v("When calling the "),a("code",[t._v(".execute()")]),t._v(" method on a "),a("code",[t._v("Datacube")]),t._v(" created from a "),a("code",[t._v("LocalConnection")]),t._v(", an "),a("code",[t._v("xarray.DataArray")]),t._v(" object containing dask arrays is returned:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v(" >>> s2_cube.execute()\n \n dask.array\n Coordinates: (12/53)\n * time (time) datetime64[ns] 2019-01-02...\n id (time) >> # Check if the data is loaded correctly\n>>> s2_datacube.execute()\n\ndask.array\nCoordinates:\n * t (t) datetime64[ns] 2022-06-02 2022-06-05 ... 2022-06-27 2022-06-30\n * x (x) float64 6.75e+05 6.75e+05 6.75e+05 ... 6.843e+05 6.843e+05\n * y (y) float64 5.155e+06 5.155e+06 5.155e+06 ... 5.148e+06 5.148e+06\n crs |S1 ...\n * bands (bands) object 'B04' 'B03' 'B02' 'B08' 'SCL'\nAttributes:\n Conventions: CF-1.9\n institution: openEO platform - Geotrellis backend: 0.9.5a1\n description:\n title:\n")])])]),a("p",[t._v("As you can see in the previous example, we are using a call to "),a("code",[t._v(".execute()")]),t._v(" which will execute locally the generated openEO process graph.\nIn this case, the process graph consist only in a single "),a("code",[t._v("load_collection")]),t._v(", which performs lazy loading of the data. With this first step you can check if the data is being read correctly by openEO.")]),t._v(" "),a("p",[t._v("Looking at the metadata of this netCDF sample, we can see that it contains the bands B04, B03, B02, B08 and SCL.\nAdditionally, we also see that it is composed by more than one element in time and that it covers the month of June 2022.")]),t._v(" "),a("p",[t._v("We can now do a simple processing for demo purposes, let's compute the median NDVI in time and visualize the result:")]),t._v(" "),a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("b04 "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" s2_datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("band"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B04"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nb08 "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" s2_datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("band"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B08"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nndvi "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("b08 "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("-")]),t._v(" b04"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("b08 "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" b04"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nndvi_median "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" ndvi"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("reduce_dimension"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("dimension"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" reducer"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"median"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nresult_ndvi "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" ndvi_median"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("execute"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nresult_ndvi"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("plot"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("imshow"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("cmap"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Greens"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("p",[t._v("We can perform the same example using data provided by STAC Collection:")]),t._v(" "),a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" openeo"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("local "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" LocalConnection\nlocal_conn "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" LocalConnection"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"./"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\nurl "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a"')]),t._v("\nspatial_extent "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"east"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("11.40")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"north"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("46.52")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"south"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("46.46")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"west"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("11.25")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\ntemporal_extent "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2022-06-01"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2022-06-30"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\nbands "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"red"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"nir"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\nproperties "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"eo:cloud_cover"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("dict")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("lt"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("80")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\ns2_datacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" local_conn"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("load_stac"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n url"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("url"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n spatial_extent"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("spatial_extent"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n temporal_extent"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("temporal_extent"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n bands"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("bands"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n properties"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("properties"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\nb04 "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" s2_datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("band"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"red"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nb08 "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" s2_datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("band"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"nir"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nndvi "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("b08 "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("-")]),t._v(" b04"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("b08 "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" b04"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nndvi_median "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" ndvi"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("reduce_dimension"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("dimension"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"time"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" reducer"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"median"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nresult_ndvi "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" ndvi_median"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("execute"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("h2",{attrs:{id:"client-side-processing-example-notebooks"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#client-side-processing-example-notebooks"}},[t._v("#")]),t._v(" Client-Side Processing Example Notebooks")]),t._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"https://github.com/Open-EO/openeo-python-client/tree/master/examples/notebooks/Client_Side_Processing",target:"_blank",rel:"noopener noreferrer"}},[t._v("From the openEO Python Client repo"),a("OutboundLink")],1)]),t._v(" "),a("li",[a("a",{attrs:{href:"https://github.com/EO-College/cubes-and-clouds/blob/main/lectures/3.1_data_processing/exercises/_alternatives/31_data_processing_stac.ipynb",target:"_blank",rel:"noopener noreferrer"}},[t._v("From the Cubes and Clouds repo"),a("OutboundLink")],1)])]),t._v(" "),a("h2",{attrs:{id:"additional-information"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#additional-information"}},[t._v("#")]),t._v(" Additional Information")]),t._v(" "),a("p",[t._v("Additional information and resources about the openEO Python Client Library:")]),t._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Official openEO Python Client Library Documentation"),a("OutboundLink")],1)]),t._v(" "),a("li",[a("a",{attrs:{href:"https://github.com/openEOPlatform/sample-notebooks",target:"_blank",rel:"noopener noreferrer"}},[t._v("Official openeo.cloud sample notebooks"),a("OutboundLink")],1)]),t._v(" "),a("li",[a("a",{attrs:{href:"https://github.com/Open-EO/openeo-python-client/tree/master/examples",target:"_blank",rel:"noopener noreferrer"}},[t._v("Example Python scripts"),a("OutboundLink")],1)]),t._v(" "),a("li",[a("a",{attrs:{href:"https://github.com/Open-EO/openeo-python-client/tree/master/examples/notebooks",target:"_blank",rel:"noopener noreferrer"}},[t._v("Example Jupyter Notebooks"),a("OutboundLink")],1)]),t._v(" "),a("li",[a("a",{attrs:{href:"https://github.com/Open-EO/openeo-python-client",target:"_blank",rel:"noopener noreferrer"}},[t._v("Repository on GitHub"),a("OutboundLink")],1)]),t._v(" "),a("li",[a("RouterLink",{attrs:{to:"/getting-started/python/shiny.html"}},[t._v("Run openEO processes in a Python Shiny App")])],1)])])}),[],!1,null,null,null);a.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/69.ca466834.js b/assets/js/69.4904b0e4.js similarity index 98% rename from assets/js/69.ca466834.js rename to assets/js/69.4904b0e4.js index 7ad4145da..6d4761873 100644 --- a/assets/js/69.ca466834.js +++ b/assets/js/69.4904b0e4.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[69],{493:function(t,e,o){"use strict";o.r(e);var n=o(4),a=Object(n.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"get-started-with-openeo-platform-in-jupyterlab-python"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#get-started-with-openeo-platform-in-jupyterlab-python"}},[t._v("#")]),t._v(" Get started with openEO Platform in JupyterLab (Python)")]),t._v(" "),e("div",{staticClass:"custom-block danger"},[e("p",{staticClass:"custom-block-title"},[t._v("Important")]),t._v(" "),e("p",[t._v("You need to "),e("a",{attrs:{href:"https://openeo.cloud/#plans",target:"_blank",rel:"noopener noreferrer"}},[t._v("get an openEO Platform account"),e("OutboundLink")],1),t._v(" to access the processing infrastructure.")])]),t._v(" "),e("p",[t._v("A hosted JupyterLab environment for openEO Platform is available at "),e("strong",[e("a",{attrs:{href:"https://lab.openeo.cloud/",target:"_blank",rel:"noopener noreferrer"}},[t._v("lab.openeo.cloud"),e("OutboundLink")],1)]),t._v(".")]),t._v(" "),e("p",[t._v("It has the openEO Python client pre-installed, but it does not support running the R or JavaScript clients.")]),t._v(" "),e("p",[t._v("You need to authenticate before you can use it:")]),t._v(" "),e("ol",[e("li",[t._v('Select from the "Sign in" dropdown menu the "openEO Platform" option')]),t._v(" "),e("li",[t._v("It will start the EGI Authentication workflow for openEO Platform. If you haven't you need to "),e("a",{attrs:{href:"https://openeo.cloud/#plans",target:"_blank",rel:"noopener noreferrer"}},[t._v("get an openEO Platform account"),e("OutboundLink")],1),t._v(" before you proceed.")]),t._v(" "),e("li",[t._v('After you have logged in via EGI, the "Server Options" appear and you are requested to "Select your desired stack". Please choose "openEO Platform Lab" and click "Start".')]),t._v(" "),e("li",[t._v("You are logged in, now. The JupyterLab should be usable like a normal JupyterLab instance that has the openEO Python client and some other tools pre-installed.")]),t._v(" "),e("li",[t._v("You can now open a new Python 3 Notebook and, for example, start to follow the general "),e("RouterLink",{attrs:{to:"/getting-started/python/"}},[t._v("Python Getting Started Guide")]),t._v("."),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("Note")]),t._v(" "),e("p",[t._v('You can skip the "Installation" section in the Getting Started Guide, but unfortunately you need to authenticate with the Python client again! We\'ll try to remove this annoyance in the future.')])])],1)]),t._v(" "),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("Note")]),t._v(" "),e("p",[t._v("You may shut down your device or log out during the job runs on the backend. You can retrieve the status and results later and from any client.")]),t._v(" "),e("p",[t._v("If you require any additional packages to be installed into your JupyterLab environment please refrain from installing them via pip and install them via conda.\n"),e("a",{attrs:{href:"https://docs.anaconda.com/anaconda/user-guide/tasks/install-packages/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Anaconda documentation"),e("OutboundLink")],1)])]),t._v(" "),e("p",[t._v("Please also refer to the the official documentation for the "),e("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/",target:"_blank",rel:"noopener noreferrer"}},[t._v("openEO Python Client"),e("OutboundLink")],1),t._v(" and "),e("a",{attrs:{href:"https://jupyterlab.readthedocs.io/en/stable/getting_started/overview.html",target:"_blank",rel:"noopener noreferrer"}},[t._v("JupyterLab"),e("OutboundLink")],1),t._v(" for more details.")])])}),[],!1,null,null,null);e.default=a.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[69],{496:function(t,e,o){"use strict";o.r(e);var n=o(4),a=Object(n.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"get-started-with-openeo-platform-in-jupyterlab-python"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#get-started-with-openeo-platform-in-jupyterlab-python"}},[t._v("#")]),t._v(" Get started with openEO Platform in JupyterLab (Python)")]),t._v(" "),e("div",{staticClass:"custom-block danger"},[e("p",{staticClass:"custom-block-title"},[t._v("Important")]),t._v(" "),e("p",[t._v("You need to "),e("a",{attrs:{href:"https://openeo.cloud/#plans",target:"_blank",rel:"noopener noreferrer"}},[t._v("get an openEO Platform account"),e("OutboundLink")],1),t._v(" to access the processing infrastructure.")])]),t._v(" "),e("p",[t._v("A hosted JupyterLab environment for openEO Platform is available at "),e("strong",[e("a",{attrs:{href:"https://lab.openeo.cloud/",target:"_blank",rel:"noopener noreferrer"}},[t._v("lab.openeo.cloud"),e("OutboundLink")],1)]),t._v(".")]),t._v(" "),e("p",[t._v("It has the openEO Python client pre-installed, but it does not support running the R or JavaScript clients.")]),t._v(" "),e("p",[t._v("You need to authenticate before you can use it:")]),t._v(" "),e("ol",[e("li",[t._v('Select from the "Sign in" dropdown menu the "openEO Platform" option')]),t._v(" "),e("li",[t._v("It will start the EGI Authentication workflow for openEO Platform. If you haven't you need to "),e("a",{attrs:{href:"https://openeo.cloud/#plans",target:"_blank",rel:"noopener noreferrer"}},[t._v("get an openEO Platform account"),e("OutboundLink")],1),t._v(" before you proceed.")]),t._v(" "),e("li",[t._v('After you have logged in via EGI, the "Server Options" appear and you are requested to "Select your desired stack". Please choose "openEO Platform Lab" and click "Start".')]),t._v(" "),e("li",[t._v("You are logged in, now. The JupyterLab should be usable like a normal JupyterLab instance that has the openEO Python client and some other tools pre-installed.")]),t._v(" "),e("li",[t._v("You can now open a new Python 3 Notebook and, for example, start to follow the general "),e("RouterLink",{attrs:{to:"/getting-started/python/"}},[t._v("Python Getting Started Guide")]),t._v("."),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("Note")]),t._v(" "),e("p",[t._v('You can skip the "Installation" section in the Getting Started Guide, but unfortunately you need to authenticate with the Python client again! We\'ll try to remove this annoyance in the future.')])])],1)]),t._v(" "),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("Note")]),t._v(" "),e("p",[t._v("You may shut down your device or log out during the job runs on the backend. You can retrieve the status and results later and from any client.")]),t._v(" "),e("p",[t._v("If you require any additional packages to be installed into your JupyterLab environment please refrain from installing them via pip and install them via conda.\n"),e("a",{attrs:{href:"https://docs.anaconda.com/anaconda/user-guide/tasks/install-packages/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Anaconda documentation"),e("OutboundLink")],1)])]),t._v(" "),e("p",[t._v("Please also refer to the the official documentation for the "),e("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/",target:"_blank",rel:"noopener noreferrer"}},[t._v("openEO Python Client"),e("OutboundLink")],1),t._v(" and "),e("a",{attrs:{href:"https://jupyterlab.readthedocs.io/en/stable/getting_started/overview.html",target:"_blank",rel:"noopener noreferrer"}},[t._v("JupyterLab"),e("OutboundLink")],1),t._v(" for more details.")])])}),[],!1,null,null,null);e.default=a.exports}}]); \ No newline at end of file diff --git a/assets/js/70.ddf30c7b.js b/assets/js/70.0f145049.js similarity index 99% rename from assets/js/70.ddf30c7b.js rename to assets/js/70.0f145049.js index c36caf386..1fa0cb59d 100644 --- a/assets/js/70.ddf30c7b.js +++ b/assets/js/70.0f145049.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[70],{494:function(t,e,n){"use strict";n.r(e);var a=n(4),o=Object(a.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"get-started-with-the-openeo-python-client"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#get-started-with-the-openeo-python-client"}},[t._v("#")]),t._v(" Get started with the openEO Python Client")]),t._v(" "),e("div",{staticClass:"custom-block danger"},[e("p",{staticClass:"custom-block-title"},[t._v("Important")]),t._v(" "),e("p",[t._v("You need to "),e("a",{attrs:{href:"https://openeo.cloud/#plans",target:"_blank",rel:"noopener noreferrer"}},[t._v("get an openEO Platform account"),e("OutboundLink")],1),t._v(" to access the processing infrastructure.")]),t._v(" "),e("p",[t._v("This Getting Started guide will simply give you an overview of the capabilities of the openEO Python client library.\nMore in-depth information and documentation can be found on the "),e("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/",target:"_blank",rel:"noopener noreferrer"}},[t._v("official documentation"),e("OutboundLink")],1),t._v(" website.")]),t._v(" "),e("p",[t._v("The "),e("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/api.html",target:"_blank",rel:"noopener noreferrer"}},[t._v("High level Interface"),e("OutboundLink")],1),t._v(" of the Python client is designed to provide an opinionated, Pythonic, API to interact with openEO Platform.")])]),t._v(" "),e("h2",{attrs:{id:"installation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#installation"}},[t._v("#")]),t._v(" Installation")]),t._v(" "),e("p",[t._v("The openEO Python client library can easily be installed with a tool like "),e("code",[t._v("pip")]),t._v(", for example:")]),t._v(" "),e("div",{staticClass:"language-shell script extra-class"},[e("pre",{pre:!0,attrs:{class:"language-shell"}},[e("code",[t._v("pip "),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("install")]),t._v(" openeo\n")])])]),e("p",[t._v("The client library is also available on "),e("a",{attrs:{href:"https://anaconda.org/conda-forge/openeo",target:"_blank",rel:"noopener noreferrer"}},[t._v("Conda Forge"),e("OutboundLink")],1),t._v(".")]),t._v(" "),e("p",[t._v("It's recommended to work in a virtual environment of some kind ("),e("code",[t._v("venv")]),t._v(", "),e("code",[t._v("conda")]),t._v(", ...),\ncontaining Python 3.6 or higher.")]),t._v(" "),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("TIP")]),t._v(" "),e("p",[t._v("For more details, alternative installation procedures or troubleshooting tips:\nsee the "),e("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/installation.html",target:"_blank",rel:"noopener noreferrer"}},[t._v("official "),e("code",[t._v("openeo")]),t._v(" package installation documentation"),e("OutboundLink")],1),t._v(".")])]),t._v(" "),e("h2",{attrs:{id:"connect-to-openeo-platform-and-explore"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#connect-to-openeo-platform-and-explore"}},[t._v("#")]),t._v(" Connect to openEO Platform and explore")]),t._v(" "),e("p",[t._v("First, establish a connection to the openEO Platform back-end:")]),t._v(" "),e("div",{staticClass:"language-python extra-class"},[e("pre",{pre:!0,attrs:{class:"language-python"}},[e("code",[e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" openeo\n\nconnection "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" openeo"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("connect"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"openeo.cloud"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("p",[t._v("The "),e("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/api.html#module-openeo.rest.connection",target:"_blank",rel:"noopener noreferrer"}},[e("code",[t._v("Connection")]),t._v(" object"),e("OutboundLink")],1),t._v("\nis your central gateway to")]),t._v(" "),e("ul",[e("li",[t._v("list data collections, available processes, file formats and other capabilities of the back-end")]),t._v(" "),e("li",[t._v("start building your openEO algorithm from the desired data on the back-end")]),t._v(" "),e("li",[t._v("execute and monitor (batch) jobs on the back-end")]),t._v(" "),e("li",[t._v("etc.")])]),t._v(" "),e("h3",{attrs:{id:"collections"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#collections"}},[t._v("#")]),t._v(" Collections")]),t._v(" "),e("p",[t._v('The Earth observation data (the input of your openEO jobs) is organised in so-called collections,\ne.g. fundamental satellite collections like "Sentinel 1" or "Sentinel 2",\nor preprocessed collections like "NDVI".')]),t._v(" "),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("Note")]),t._v(" "),e("p",[t._v('More information on how openEO "collections" relate to terminology used in other systems can be found in\n'),e("a",{attrs:{href:"https://openeo.org/documentation/1.0/glossary.html#eo-data-collections",target:"_blank",rel:"noopener noreferrer"}},[t._v("the openEO glossary"),e("OutboundLink")],1),t._v(".")])]),t._v(" "),e("p",[t._v("While it's recommended to browse the available EO collections on the"),e("br"),t._v(" "),e("RouterLink",{attrs:{to:"/data-collections/"}},[t._v("openEO Platform collections overview webpage")]),t._v(",\nit's possible to list and inspect them programmatically.\nAs a very simple usage example of openEO Python client,\nlet's use the\n"),e("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/api.html#openeo.rest.connection.Connection.list_collection_ids",target:"_blank",rel:"noopener noreferrer"}},[e("code",[t._v("list_collection_ids")]),e("OutboundLink")],1),t._v("\nand "),e("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/api.html#openeo.rest.connection.Connection.describe_collection",target:"_blank",rel:"noopener noreferrer"}},[e("code",[t._v("describe_collection")]),e("OutboundLink")],1),t._v("\nmethods on the "),e("code",[t._v("connection")]),t._v(" object we just created:")],1),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v(">>> # Get all collection ids\n>>> print(connection.list_collection_ids())\n['AGERA5', 'SENTINEL1_GRD', 'SENTINEL2_L2A', ...\n\n>>> # Get metadata of a single collection\n>>> print(connection.describe_collection(\"SENTINEL2_L2A\"))\n{'id': 'SENTINEL2_L2A', 'title': 'Sentinel-2 top of canopy ...', 'stac_version': '0.9.0', ...\n")])])]),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("TIP")]),t._v(" "),e("p",[t._v("The openEO Python client library comes with Jupyter (notebook) integration in a couple of places.\nFor example, put "),e("code",[t._v('connection.describe_collection("SENTINEL2_L2A")')]),t._v(" (without "),e("code",[t._v("print()")]),t._v(")\nas last statement in a notebook cell\nand you'll get a nice graphical rendering of the collection metadata.")])]),t._v(" "),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("TIP")]),t._v(" "),e("p",[t._v("Find out more about data discovery, loading and filtering in the\n"),e("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/data_access.html",target:"_blank",rel:"noopener noreferrer"}},[t._v("official openEO Python client documentation"),e("OutboundLink")],1)])]),t._v(" "),e("h3",{attrs:{id:"processes"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#processes"}},[t._v("#")]),t._v(" Processes")]),t._v(" "),e("p",[t._v('Processes in openEO are operations that can be applied on (EO) data\n(e.g. calculate the mean of an array, or mask out observations outside a given polygon).\nThe output of one process can be used as the input of another process,\nand by doing so, multiple processes can be connected that way in a larger "process graph"\nthat implements a certain algorithm.')]),t._v(" "),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("Note")]),t._v(" "),e("p",[t._v("Check "),e("a",{attrs:{href:"https://openeo.org/documentation/1.0/glossary.html#processes",target:"_blank",rel:"noopener noreferrer"}},[t._v("the openEO glossary"),e("OutboundLink")],1),t._v("\nfor more details on pre-defined, user-defined processes and process graphs.")])]),t._v(" "),e("p",[t._v("Let's list the available pre-defined processes\nwith "),e("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/api.html#openeo.rest.connection.Connection.list_processes",target:"_blank",rel:"noopener noreferrer"}},[e("code",[t._v("list_processes")]),e("OutboundLink")],1),t._v(":")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v(">>> print(connection.list_processes())\n[{'id': 'absolute', 'summary': 'Absolute value', 'description': 'Computes the absolute value of ... \n {'id': 'mean', 'summary': 'Arithmetic mean(average)', ...\n ...\n")])])]),e("p",[t._v("Like with collections, instead of programmatic exploration you'll probably prefer a\nmore graphical, interactive interface.\nUse the Jupyter notebook integration (put "),e("code",[t._v("connection.list_processes()")]),t._v(" without "),e("code",[t._v("print()")]),t._v(" as last statement in a notebook cell)\nor visit a "),e("RouterLink",{attrs:{to:"/processes/"}},[t._v("web-based overview of the available processes on openEO Platform")]),t._v(".")],1),t._v(" "),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("TIP")]),t._v(" "),e("p",[t._v("Find out more about process discovery and usage\n"),e("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/processes.html",target:"_blank",rel:"noopener noreferrer"}},[t._v("official openEO Python client documentation"),e("OutboundLink")],1)])]),t._v(" "),e("h2",{attrs:{id:"authentication"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#authentication"}},[t._v("#")]),t._v(" Authentication")]),t._v(" "),e("p",[t._v("In the code snippets above we did not need to log in as a user\nsince we just queried publicly available back-end information.\nHowever, to run non-trivial processing queries one has to authenticate\nso that permissions, resource usage, etc. can be managed properly.")]),t._v(" "),e("p",[t._v("To handle authentication, openEO leverages "),e("a",{attrs:{href:"https://openid.net/connect/",target:"_blank",rel:"noopener noreferrer"}},[t._v("OpenID Connect (OIDC)"),e("OutboundLink")],1),t._v(".\nIt offers some interesting features (e.g., a user can securely reuse an existing account),\nbut is a fairly complex topic, discussed in more depth on the "),e("RouterLink",{attrs:{to:"/join/free_trial.html"}},[t._v("Free Trial")]),t._v(" page.")],1),t._v(" "),e("p",[t._v("The openEO Python client library tries to make authentication as streamlined as possible.\nIn most cases for example, the following snippet is enough to obtain an authenticated connection:")]),t._v(" "),e("div",{staticClass:"language-python extra-class"},[e("pre",{pre:!0,attrs:{class:"language-python"}},[e("code",[e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" openeo\n\nconnection "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" openeo"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("connect"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"openeo.cloud"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("authenticate_oidc"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("p",[t._v("This statement will automatically reuse a previously authenticated session, when available.\nOtherwise, e.g. the first time you do this, some user interaction is required\nand it will print a web link and a short "),e("em",[t._v("user code")]),t._v(".\nVisit this web page in a browser, log in there with an existing account and enter the user code.\nIf everything goes well, the "),e("code",[t._v("connection")]),t._v(" object in the script will be authenticated\nand the back-end will be able to identify you in subsequent requests.")]),t._v(" "),e("p",[t._v("More detailed information on authentication can be found\n"),e("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/auth.html",target:"_blank",rel:"noopener noreferrer"}},[t._v("in the openEO Python client documentation"),e("OutboundLink")],1),t._v(".")]),t._v(" "),e("h2",{attrs:{id:"working-with-datacubes"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#working-with-datacubes"}},[t._v("#")]),t._v(" Working with Datacubes")]),t._v(" "),e("p",[t._v("Now that we know how to discover the capabilities of the back-end and how to authenticate,\nlet's do some real work and process some EO data in a batch job.\nWe'll first build the desired algorithm by working on so-called \"Datacubes\",\nwhich is the central concept in openEO to represent EO data,\nas "),e("a",{attrs:{href:"https://openeo.org/documentation/1.0/datacubes.html",target:"_blank",rel:"noopener noreferrer"}},[t._v("discussed in great detail here"),e("OutboundLink")],1),t._v(".")]),t._v(" "),e("h3",{attrs:{id:"creating-a-datacube"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#creating-a-datacube"}},[t._v("#")]),t._v(" Creating a Datacube")]),t._v(" "),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("Note")]),t._v(" "),e("p",[t._v("Please note that the following code only creates a process graph representation of your EO analysis and does not take major processing power from you device.")])]),t._v(" "),e("p",[t._v("The first step is loading the desired slice of a data collection\nwith "),e("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/api.html#openeo.rest.connection.Connection.load_collection",target:"_blank",rel:"noopener noreferrer"}},[e("code",[t._v("Connection.load_collection")]),e("OutboundLink")],1),t._v(":")]),t._v(" "),e("div",{staticClass:"language-python extra-class"},[e("pre",{pre:!0,attrs:{class:"language-python"}},[e("code",[t._v("datacube "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" connection"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("load_collection"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SENTINEL1_GRD"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n spatial_extent"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"west"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("16.06")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"south"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("48.06")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"east"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("16.65")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"north"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("48.35")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n temporal_extent"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2017-03-01"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2017-04-01"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n bands"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"VV"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"VH"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("p",[t._v("This results in a "),e("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/api.html#openeo.rest.datacube.DataCube",target:"_blank",rel:"noopener noreferrer"}},[e("code",[t._v("DataCube")]),t._v(" object"),e("OutboundLink")],1),t._v('\ncontaining the "SENTINEL1_GRD" data restricted to the given spatial extent, temporal extent and bands.')]),t._v(" "),e("h3",{attrs:{id:"applying-processes"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#applying-processes"}},[t._v("#")]),t._v(" Applying processes")]),t._v(" "),e("p",[t._v("By applying an openEO process on a datacube, we create a new datacube object that represents the manipulated data.\nThe openEO Python client allows to do this by calling "),e("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/api.html#openeo.rest.datacube.DataCube",target:"_blank",rel:"noopener noreferrer"}},[e("code",[t._v("DataCube")]),t._v(" object methods"),e("OutboundLink")],1),t._v(".\nThe most common or popular openEO processes have a dedicated "),e("code",[t._v("DataCube")]),t._v(" method (e.g. "),e("code",[t._v("mask")]),t._v(", "),e("code",[t._v("aggregate_spatial")]),t._v(", "),e("code",[t._v("filter_bbox")]),t._v(", ...).")]),t._v(" "),e("p",[t._v("There are also some convenience methods that implement\nmore complex openEO processes constructs is a compact, Pythonic interface.\nFor example, the "),e("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/api.html#openeo.rest.datacube.DataCube.min_time",target:"_blank",rel:"noopener noreferrer"}},[e("code",[t._v("DataCube.min_time")]),e("OutboundLink")],1),t._v(" method\nimplements a "),e("code",[t._v("reduce_dimension")]),t._v(" process along the temporal dimension, using the "),e("code",[t._v("min")]),t._v(" process as reducer function:")]),t._v(" "),e("div",{staticClass:"language-python extra-class"},[e("pre",{pre:!0,attrs:{class:"language-python"}},[e("code",[t._v("datacube "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" datacube"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("min_time"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("p",[t._v("This creates a new datacube (we overwrite the existing variable),\nwhere the time dimension is eliminated and for each pixel we just have\nthe minimum value of the corresponding timeseries in the original datacube.")]),t._v(" "),e("p",[t._v("See the "),e("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/api.html#openeo.rest.datacube.DataCube",target:"_blank",rel:"noopener noreferrer"}},[t._v("Python client's "),e("code",[t._v("DataCube")]),t._v(" API documentation"),e("OutboundLink")],1),t._v("\nfor a more complete listing of methods that implement openEO processes.")]),t._v(" "),e("p",[t._v("openEO processes that are not supported by a dedicated "),e("code",[t._v("DataCube")]),t._v(" method\ncan be applied in a generic way with the "),e("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/api.html#openeo.rest.datacube.DataCube.process",target:"_blank",rel:"noopener noreferrer"}},[e("code",[t._v("process")]),t._v(" method"),e("OutboundLink")],1),t._v(", e.g.:")]),t._v(" "),e("div",{staticClass:"language-python extra-class"},[e("pre",{pre:!0,attrs:{class:"language-python"}},[e("code",[t._v("datacube "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" datacube"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("process"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n process_id"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"ndvi"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n arguments"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"data"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" datacube"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"nir"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B8"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"red"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B4"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("p",[t._v("This applies the "),e("RouterLink",{attrs:{to:"/processes/#ndvi"}},[e("code",[t._v("ndvi")]),t._v(" process")]),t._v(' to the datacube with the arguments of "data", "nir" and "red" (This example assumes a datacube with bands '),e("code",[t._v("B8")]),t._v(" and "),e("code",[t._v("B4")]),t._v(").")],1),t._v(" "),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("Note")]),t._v(" "),e("p",[t._v("Still unsure on how to make use of processes with the Python client?\nVisit the "),e("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/processes.html#working-with-processes",target:"_blank",rel:"noopener noreferrer"}},[t._v("official documentation on working with processes"),e("OutboundLink")],1),t._v(".")])]),t._v(" "),e("h3",{attrs:{id:"defining-output-format"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#defining-output-format"}},[t._v("#")]),t._v(" Defining output format")]),t._v(" "),e("p",[t._v("After applying all processes you want to execute, we need to tell the back-end to export the datacube, for example as GeoTiff:")]),t._v(" "),e("div",{staticClass:"language-python extra-class"},[e("pre",{pre:!0,attrs:{class:"language-python"}},[e("code",[t._v("result "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" datacube"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("save_result"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"GTiff"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("TIP")]),t._v(" "),e("p",[t._v("You can list the available file formats using:")]),t._v(" "),e("div",{staticClass:"language-python extra-class"},[e("pre",{pre:!0,attrs:{class:"language-python"}},[e("code",[t._v("connection"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("list_file_formats"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]),t._v(" "),e("h2",{attrs:{id:"execution"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#execution"}},[t._v("#")]),t._v(" Execution")]),t._v(" "),e("p",[t._v("It's important to note that all the datacube processes we applied up to this point\nare not actually executed yet, neither locally nor remotely on the back-end.\nWe just built an abstract representation of the algorithm (input data and processing chain),\nencapsulated in a local "),e("code",[t._v("DataCube")]),t._v(" object (e.g. the "),e("code",[t._v("result")]),t._v(" variable above).\nTo trigger actual execution on the back-end we have to explicitly send this representation\nto the back-end.")]),t._v(" "),e("p",[t._v("openEO defines "),e("a",{attrs:{href:"https://openeo.org/documentation/1.0/glossary.html#data-processing-modes",target:"_blank",rel:"noopener noreferrer"}},[t._v("several processing modes"),e("OutboundLink")],1),t._v(",\nbut for this introduction we'll focus on batch jobs, which is a good default choice.")]),t._v(" "),e("h3",{attrs:{id:"batch-job-execution"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#batch-job-execution"}},[t._v("#")]),t._v(" Batch job execution")]),t._v(" "),e("p",[t._v("The "),e("code",[t._v("result")]),t._v(" datacube object we built above describes the desired input collections, processing steps and output format.\nWe can now just send this description to the back-end to create a batch job with the "),e("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/api.html#openeo.rest.datacube.DataCube.create_job",target:"_blank",rel:"noopener noreferrer"}},[e("code",[t._v("create_job")]),t._v(" method"),e("OutboundLink")],1),t._v(" like this:")]),t._v(" "),e("div",{staticClass:"language-python extra-class"},[e("pre",{pre:!0,attrs:{class:"language-python"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Creating a new job at the back-end by sending the datacube information.")]),t._v("\njob "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" result"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("create_job"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("TIP")]),t._v(" "),e("p",[t._v("It can be annoying to manage and monitor batch jobs via code.\nIf you want to use an interface for your batch jobs (or other resources) that is easier to use, you can also open the "),e("a",{attrs:{href:"https://editor.openeo.cloud",target:"_blank",rel:"noopener noreferrer"}},[t._v("openEO Platform Editor"),e("OutboundLink")],1),t._v('.\nAfter login, you\'ll be able to manage and monitor your batch jobs in a near-realtime interactive environment; Look out for the "Data Processing" tab.')])]),t._v(" "),e("p",[t._v("The batch job, which is referenced by the returned "),e("code",[t._v("job")]),t._v(" object, is only "),e("em",[t._v("created")]),t._v(" at the back-end,\nit is not started yet.\nTo start the job and let your Python script wait until the job has finished then\ndownload it automatically, you can use the "),e("code",[t._v("start_and_wait")]),t._v(" method.")]),t._v(" "),e("div",{staticClass:"language-python extra-class"},[e("pre",{pre:!0,attrs:{class:"language-python"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Starts the job and waits until it finished to download the result.")]),t._v("\njob"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("start_and_wait"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\njob"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("get_results"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("download_files"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"output"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("p",[t._v('When everything completes successfully, the processing result will be downloaded as a GeoTIFF file\nin a folder "output".')]),t._v(" "),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("TIP")]),t._v(" "),e("p",[t._v("You may shut down your device or log out during the job runs on the backend. You can retrieve the status and results later and from any client.")]),t._v(" "),e("p",[t._v("The official openEO Python Client documentation has more information\non "),e("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/batch_jobs.html",target:"_blank",rel:"noopener noreferrer"}},[t._v("batch job management and downloading results"),e("OutboundLink")],1)])]),t._v(" "),e("h2",{attrs:{id:"additional-information"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#additional-information"}},[t._v("#")]),t._v(" Additional Information")]),t._v(" "),e("p",[t._v("Additional information and resources about the openEO Python Client Library:")]),t._v(" "),e("ul",[e("li",[e("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Official openEO Python Client Library Documentation"),e("OutboundLink")],1)]),t._v(" "),e("li",[e("a",{attrs:{href:"https://github.com/openEOPlatform/sample-notebooks",target:"_blank",rel:"noopener noreferrer"}},[t._v("Official openeo.cloud sample notebooks"),e("OutboundLink")],1)]),t._v(" "),e("li",[e("a",{attrs:{href:"https://github.com/Open-EO/openeo-python-client/tree/master/examples",target:"_blank",rel:"noopener noreferrer"}},[t._v("Example Python scripts"),e("OutboundLink")],1)]),t._v(" "),e("li",[e("a",{attrs:{href:"https://github.com/Open-EO/openeo-python-client/tree/master/examples/notebooks",target:"_blank",rel:"noopener noreferrer"}},[t._v("Example Jupyter Notebooks"),e("OutboundLink")],1)]),t._v(" "),e("li",[e("a",{attrs:{href:"https://github.com/Open-EO/openeo-python-client",target:"_blank",rel:"noopener noreferrer"}},[t._v("Repository on GitHub"),e("OutboundLink")],1)]),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/getting-started/python/shiny.html"}},[t._v("Run openEO processes in a Python Shiny App")])],1)])])}),[],!1,null,null,null);e.default=o.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[70],{493:function(t,e,n){"use strict";n.r(e);var a=n(4),o=Object(a.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"get-started-with-the-openeo-python-client"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#get-started-with-the-openeo-python-client"}},[t._v("#")]),t._v(" Get started with the openEO Python Client")]),t._v(" "),e("div",{staticClass:"custom-block danger"},[e("p",{staticClass:"custom-block-title"},[t._v("Important")]),t._v(" "),e("p",[t._v("You need to "),e("a",{attrs:{href:"https://openeo.cloud/#plans",target:"_blank",rel:"noopener noreferrer"}},[t._v("get an openEO Platform account"),e("OutboundLink")],1),t._v(" to access the processing infrastructure.")]),t._v(" "),e("p",[t._v("This Getting Started guide will simply give you an overview of the capabilities of the openEO Python client library.\nMore in-depth information and documentation can be found on the "),e("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/",target:"_blank",rel:"noopener noreferrer"}},[t._v("official documentation"),e("OutboundLink")],1),t._v(" website.")]),t._v(" "),e("p",[t._v("The "),e("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/api.html",target:"_blank",rel:"noopener noreferrer"}},[t._v("High level Interface"),e("OutboundLink")],1),t._v(" of the Python client is designed to provide an opinionated, Pythonic, API to interact with openEO Platform.")])]),t._v(" "),e("h2",{attrs:{id:"installation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#installation"}},[t._v("#")]),t._v(" Installation")]),t._v(" "),e("p",[t._v("The openEO Python client library can easily be installed with a tool like "),e("code",[t._v("pip")]),t._v(", for example:")]),t._v(" "),e("div",{staticClass:"language-shell script extra-class"},[e("pre",{pre:!0,attrs:{class:"language-shell"}},[e("code",[t._v("pip "),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("install")]),t._v(" openeo\n")])])]),e("p",[t._v("The client library is also available on "),e("a",{attrs:{href:"https://anaconda.org/conda-forge/openeo",target:"_blank",rel:"noopener noreferrer"}},[t._v("Conda Forge"),e("OutboundLink")],1),t._v(".")]),t._v(" "),e("p",[t._v("It's recommended to work in a virtual environment of some kind ("),e("code",[t._v("venv")]),t._v(", "),e("code",[t._v("conda")]),t._v(", ...),\ncontaining Python 3.6 or higher.")]),t._v(" "),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("TIP")]),t._v(" "),e("p",[t._v("For more details, alternative installation procedures or troubleshooting tips:\nsee the "),e("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/installation.html",target:"_blank",rel:"noopener noreferrer"}},[t._v("official "),e("code",[t._v("openeo")]),t._v(" package installation documentation"),e("OutboundLink")],1),t._v(".")])]),t._v(" "),e("h2",{attrs:{id:"connect-to-openeo-platform-and-explore"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#connect-to-openeo-platform-and-explore"}},[t._v("#")]),t._v(" Connect to openEO Platform and explore")]),t._v(" "),e("p",[t._v("First, establish a connection to the openEO Platform back-end:")]),t._v(" "),e("div",{staticClass:"language-python extra-class"},[e("pre",{pre:!0,attrs:{class:"language-python"}},[e("code",[e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" openeo\n\nconnection "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" openeo"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("connect"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"openeo.cloud"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("p",[t._v("The "),e("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/api.html#module-openeo.rest.connection",target:"_blank",rel:"noopener noreferrer"}},[e("code",[t._v("Connection")]),t._v(" object"),e("OutboundLink")],1),t._v("\nis your central gateway to")]),t._v(" "),e("ul",[e("li",[t._v("list data collections, available processes, file formats and other capabilities of the back-end")]),t._v(" "),e("li",[t._v("start building your openEO algorithm from the desired data on the back-end")]),t._v(" "),e("li",[t._v("execute and monitor (batch) jobs on the back-end")]),t._v(" "),e("li",[t._v("etc.")])]),t._v(" "),e("h3",{attrs:{id:"collections"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#collections"}},[t._v("#")]),t._v(" Collections")]),t._v(" "),e("p",[t._v('The Earth observation data (the input of your openEO jobs) is organised in so-called collections,\ne.g. fundamental satellite collections like "Sentinel 1" or "Sentinel 2",\nor preprocessed collections like "NDVI".')]),t._v(" "),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("Note")]),t._v(" "),e("p",[t._v('More information on how openEO "collections" relate to terminology used in other systems can be found in\n'),e("a",{attrs:{href:"https://openeo.org/documentation/1.0/glossary.html#eo-data-collections",target:"_blank",rel:"noopener noreferrer"}},[t._v("the openEO glossary"),e("OutboundLink")],1),t._v(".")])]),t._v(" "),e("p",[t._v("While it's recommended to browse the available EO collections on the"),e("br"),t._v(" "),e("RouterLink",{attrs:{to:"/data-collections/"}},[t._v("openEO Platform collections overview webpage")]),t._v(",\nit's possible to list and inspect them programmatically.\nAs a very simple usage example of openEO Python client,\nlet's use the\n"),e("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/api.html#openeo.rest.connection.Connection.list_collection_ids",target:"_blank",rel:"noopener noreferrer"}},[e("code",[t._v("list_collection_ids")]),e("OutboundLink")],1),t._v("\nand "),e("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/api.html#openeo.rest.connection.Connection.describe_collection",target:"_blank",rel:"noopener noreferrer"}},[e("code",[t._v("describe_collection")]),e("OutboundLink")],1),t._v("\nmethods on the "),e("code",[t._v("connection")]),t._v(" object we just created:")],1),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v(">>> # Get all collection ids\n>>> print(connection.list_collection_ids())\n['AGERA5', 'SENTINEL1_GRD', 'SENTINEL2_L2A', ...\n\n>>> # Get metadata of a single collection\n>>> print(connection.describe_collection(\"SENTINEL2_L2A\"))\n{'id': 'SENTINEL2_L2A', 'title': 'Sentinel-2 top of canopy ...', 'stac_version': '0.9.0', ...\n")])])]),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("TIP")]),t._v(" "),e("p",[t._v("The openEO Python client library comes with Jupyter (notebook) integration in a couple of places.\nFor example, put "),e("code",[t._v('connection.describe_collection("SENTINEL2_L2A")')]),t._v(" (without "),e("code",[t._v("print()")]),t._v(")\nas last statement in a notebook cell\nand you'll get a nice graphical rendering of the collection metadata.")])]),t._v(" "),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("TIP")]),t._v(" "),e("p",[t._v("Find out more about data discovery, loading and filtering in the\n"),e("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/data_access.html",target:"_blank",rel:"noopener noreferrer"}},[t._v("official openEO Python client documentation"),e("OutboundLink")],1)])]),t._v(" "),e("h3",{attrs:{id:"processes"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#processes"}},[t._v("#")]),t._v(" Processes")]),t._v(" "),e("p",[t._v('Processes in openEO are operations that can be applied on (EO) data\n(e.g. calculate the mean of an array, or mask out observations outside a given polygon).\nThe output of one process can be used as the input of another process,\nand by doing so, multiple processes can be connected that way in a larger "process graph"\nthat implements a certain algorithm.')]),t._v(" "),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("Note")]),t._v(" "),e("p",[t._v("Check "),e("a",{attrs:{href:"https://openeo.org/documentation/1.0/glossary.html#processes",target:"_blank",rel:"noopener noreferrer"}},[t._v("the openEO glossary"),e("OutboundLink")],1),t._v("\nfor more details on pre-defined, user-defined processes and process graphs.")])]),t._v(" "),e("p",[t._v("Let's list the available pre-defined processes\nwith "),e("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/api.html#openeo.rest.connection.Connection.list_processes",target:"_blank",rel:"noopener noreferrer"}},[e("code",[t._v("list_processes")]),e("OutboundLink")],1),t._v(":")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v(">>> print(connection.list_processes())\n[{'id': 'absolute', 'summary': 'Absolute value', 'description': 'Computes the absolute value of ... \n {'id': 'mean', 'summary': 'Arithmetic mean(average)', ...\n ...\n")])])]),e("p",[t._v("Like with collections, instead of programmatic exploration you'll probably prefer a\nmore graphical, interactive interface.\nUse the Jupyter notebook integration (put "),e("code",[t._v("connection.list_processes()")]),t._v(" without "),e("code",[t._v("print()")]),t._v(" as last statement in a notebook cell)\nor visit a "),e("RouterLink",{attrs:{to:"/processes/"}},[t._v("web-based overview of the available processes on openEO Platform")]),t._v(".")],1),t._v(" "),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("TIP")]),t._v(" "),e("p",[t._v("Find out more about process discovery and usage\n"),e("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/processes.html",target:"_blank",rel:"noopener noreferrer"}},[t._v("official openEO Python client documentation"),e("OutboundLink")],1)])]),t._v(" "),e("h2",{attrs:{id:"authentication"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#authentication"}},[t._v("#")]),t._v(" Authentication")]),t._v(" "),e("p",[t._v("In the code snippets above we did not need to log in as a user\nsince we just queried publicly available back-end information.\nHowever, to run non-trivial processing queries one has to authenticate\nso that permissions, resource usage, etc. can be managed properly.")]),t._v(" "),e("p",[t._v("To handle authentication, openEO leverages "),e("a",{attrs:{href:"https://openid.net/connect/",target:"_blank",rel:"noopener noreferrer"}},[t._v("OpenID Connect (OIDC)"),e("OutboundLink")],1),t._v(".\nIt offers some interesting features (e.g., a user can securely reuse an existing account),\nbut is a fairly complex topic, discussed in more depth on the "),e("RouterLink",{attrs:{to:"/join/free_trial.html"}},[t._v("Free Trial")]),t._v(" page.")],1),t._v(" "),e("p",[t._v("The openEO Python client library tries to make authentication as streamlined as possible.\nIn most cases for example, the following snippet is enough to obtain an authenticated connection:")]),t._v(" "),e("div",{staticClass:"language-python extra-class"},[e("pre",{pre:!0,attrs:{class:"language-python"}},[e("code",[e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" openeo\n\nconnection "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" openeo"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("connect"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"openeo.cloud"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("authenticate_oidc"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("p",[t._v("This statement will automatically reuse a previously authenticated session, when available.\nOtherwise, e.g. the first time you do this, some user interaction is required\nand it will print a web link and a short "),e("em",[t._v("user code")]),t._v(".\nVisit this web page in a browser, log in there with an existing account and enter the user code.\nIf everything goes well, the "),e("code",[t._v("connection")]),t._v(" object in the script will be authenticated\nand the back-end will be able to identify you in subsequent requests.")]),t._v(" "),e("p",[t._v("More detailed information on authentication can be found\n"),e("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/auth.html",target:"_blank",rel:"noopener noreferrer"}},[t._v("in the openEO Python client documentation"),e("OutboundLink")],1),t._v(".")]),t._v(" "),e("h2",{attrs:{id:"working-with-datacubes"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#working-with-datacubes"}},[t._v("#")]),t._v(" Working with Datacubes")]),t._v(" "),e("p",[t._v("Now that we know how to discover the capabilities of the back-end and how to authenticate,\nlet's do some real work and process some EO data in a batch job.\nWe'll first build the desired algorithm by working on so-called \"Datacubes\",\nwhich is the central concept in openEO to represent EO data,\nas "),e("a",{attrs:{href:"https://openeo.org/documentation/1.0/datacubes.html",target:"_blank",rel:"noopener noreferrer"}},[t._v("discussed in great detail here"),e("OutboundLink")],1),t._v(".")]),t._v(" "),e("h3",{attrs:{id:"creating-a-datacube"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#creating-a-datacube"}},[t._v("#")]),t._v(" Creating a Datacube")]),t._v(" "),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("Note")]),t._v(" "),e("p",[t._v("Please note that the following code only creates a process graph representation of your EO analysis and does not take major processing power from you device.")])]),t._v(" "),e("p",[t._v("The first step is loading the desired slice of a data collection\nwith "),e("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/api.html#openeo.rest.connection.Connection.load_collection",target:"_blank",rel:"noopener noreferrer"}},[e("code",[t._v("Connection.load_collection")]),e("OutboundLink")],1),t._v(":")]),t._v(" "),e("div",{staticClass:"language-python extra-class"},[e("pre",{pre:!0,attrs:{class:"language-python"}},[e("code",[t._v("datacube "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" connection"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("load_collection"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SENTINEL1_GRD"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n spatial_extent"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"west"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("16.06")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"south"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("48.06")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"east"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("16.65")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"north"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("48.35")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n temporal_extent"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2017-03-01"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2017-04-01"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n bands"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"VV"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"VH"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("p",[t._v("This results in a "),e("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/api.html#openeo.rest.datacube.DataCube",target:"_blank",rel:"noopener noreferrer"}},[e("code",[t._v("DataCube")]),t._v(" object"),e("OutboundLink")],1),t._v('\ncontaining the "SENTINEL1_GRD" data restricted to the given spatial extent, temporal extent and bands.')]),t._v(" "),e("h3",{attrs:{id:"applying-processes"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#applying-processes"}},[t._v("#")]),t._v(" Applying processes")]),t._v(" "),e("p",[t._v("By applying an openEO process on a datacube, we create a new datacube object that represents the manipulated data.\nThe openEO Python client allows to do this by calling "),e("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/api.html#openeo.rest.datacube.DataCube",target:"_blank",rel:"noopener noreferrer"}},[e("code",[t._v("DataCube")]),t._v(" object methods"),e("OutboundLink")],1),t._v(".\nThe most common or popular openEO processes have a dedicated "),e("code",[t._v("DataCube")]),t._v(" method (e.g. "),e("code",[t._v("mask")]),t._v(", "),e("code",[t._v("aggregate_spatial")]),t._v(", "),e("code",[t._v("filter_bbox")]),t._v(", ...).")]),t._v(" "),e("p",[t._v("There are also some convenience methods that implement\nmore complex openEO processes constructs is a compact, Pythonic interface.\nFor example, the "),e("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/api.html#openeo.rest.datacube.DataCube.min_time",target:"_blank",rel:"noopener noreferrer"}},[e("code",[t._v("DataCube.min_time")]),e("OutboundLink")],1),t._v(" method\nimplements a "),e("code",[t._v("reduce_dimension")]),t._v(" process along the temporal dimension, using the "),e("code",[t._v("min")]),t._v(" process as reducer function:")]),t._v(" "),e("div",{staticClass:"language-python extra-class"},[e("pre",{pre:!0,attrs:{class:"language-python"}},[e("code",[t._v("datacube "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" datacube"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("min_time"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("p",[t._v("This creates a new datacube (we overwrite the existing variable),\nwhere the time dimension is eliminated and for each pixel we just have\nthe minimum value of the corresponding timeseries in the original datacube.")]),t._v(" "),e("p",[t._v("See the "),e("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/api.html#openeo.rest.datacube.DataCube",target:"_blank",rel:"noopener noreferrer"}},[t._v("Python client's "),e("code",[t._v("DataCube")]),t._v(" API documentation"),e("OutboundLink")],1),t._v("\nfor a more complete listing of methods that implement openEO processes.")]),t._v(" "),e("p",[t._v("openEO processes that are not supported by a dedicated "),e("code",[t._v("DataCube")]),t._v(" method\ncan be applied in a generic way with the "),e("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/api.html#openeo.rest.datacube.DataCube.process",target:"_blank",rel:"noopener noreferrer"}},[e("code",[t._v("process")]),t._v(" method"),e("OutboundLink")],1),t._v(", e.g.:")]),t._v(" "),e("div",{staticClass:"language-python extra-class"},[e("pre",{pre:!0,attrs:{class:"language-python"}},[e("code",[t._v("datacube "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" datacube"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("process"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n process_id"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"ndvi"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n arguments"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"data"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" datacube"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"nir"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B8"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"red"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B4"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("p",[t._v("This applies the "),e("RouterLink",{attrs:{to:"/processes/#ndvi"}},[e("code",[t._v("ndvi")]),t._v(" process")]),t._v(' to the datacube with the arguments of "data", "nir" and "red" (This example assumes a datacube with bands '),e("code",[t._v("B8")]),t._v(" and "),e("code",[t._v("B4")]),t._v(").")],1),t._v(" "),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("Note")]),t._v(" "),e("p",[t._v("Still unsure on how to make use of processes with the Python client?\nVisit the "),e("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/processes.html#working-with-processes",target:"_blank",rel:"noopener noreferrer"}},[t._v("official documentation on working with processes"),e("OutboundLink")],1),t._v(".")])]),t._v(" "),e("h3",{attrs:{id:"defining-output-format"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#defining-output-format"}},[t._v("#")]),t._v(" Defining output format")]),t._v(" "),e("p",[t._v("After applying all processes you want to execute, we need to tell the back-end to export the datacube, for example as GeoTiff:")]),t._v(" "),e("div",{staticClass:"language-python extra-class"},[e("pre",{pre:!0,attrs:{class:"language-python"}},[e("code",[t._v("result "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" datacube"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("save_result"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"GTiff"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("TIP")]),t._v(" "),e("p",[t._v("You can list the available file formats using:")]),t._v(" "),e("div",{staticClass:"language-python extra-class"},[e("pre",{pre:!0,attrs:{class:"language-python"}},[e("code",[t._v("connection"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("list_file_formats"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]),t._v(" "),e("h2",{attrs:{id:"execution"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#execution"}},[t._v("#")]),t._v(" Execution")]),t._v(" "),e("p",[t._v("It's important to note that all the datacube processes we applied up to this point\nare not actually executed yet, neither locally nor remotely on the back-end.\nWe just built an abstract representation of the algorithm (input data and processing chain),\nencapsulated in a local "),e("code",[t._v("DataCube")]),t._v(" object (e.g. the "),e("code",[t._v("result")]),t._v(" variable above).\nTo trigger actual execution on the back-end we have to explicitly send this representation\nto the back-end.")]),t._v(" "),e("p",[t._v("openEO defines "),e("a",{attrs:{href:"https://openeo.org/documentation/1.0/glossary.html#data-processing-modes",target:"_blank",rel:"noopener noreferrer"}},[t._v("several processing modes"),e("OutboundLink")],1),t._v(",\nbut for this introduction we'll focus on batch jobs, which is a good default choice.")]),t._v(" "),e("h3",{attrs:{id:"batch-job-execution"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#batch-job-execution"}},[t._v("#")]),t._v(" Batch job execution")]),t._v(" "),e("p",[t._v("The "),e("code",[t._v("result")]),t._v(" datacube object we built above describes the desired input collections, processing steps and output format.\nWe can now just send this description to the back-end to create a batch job with the "),e("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/api.html#openeo.rest.datacube.DataCube.create_job",target:"_blank",rel:"noopener noreferrer"}},[e("code",[t._v("create_job")]),t._v(" method"),e("OutboundLink")],1),t._v(" like this:")]),t._v(" "),e("div",{staticClass:"language-python extra-class"},[e("pre",{pre:!0,attrs:{class:"language-python"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Creating a new job at the back-end by sending the datacube information.")]),t._v("\njob "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" result"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("create_job"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("TIP")]),t._v(" "),e("p",[t._v("It can be annoying to manage and monitor batch jobs via code.\nIf you want to use an interface for your batch jobs (or other resources) that is easier to use, you can also open the "),e("a",{attrs:{href:"https://editor.openeo.cloud",target:"_blank",rel:"noopener noreferrer"}},[t._v("openEO Platform Editor"),e("OutboundLink")],1),t._v('.\nAfter login, you\'ll be able to manage and monitor your batch jobs in a near-realtime interactive environment; Look out for the "Data Processing" tab.')])]),t._v(" "),e("p",[t._v("The batch job, which is referenced by the returned "),e("code",[t._v("job")]),t._v(" object, is only "),e("em",[t._v("created")]),t._v(" at the back-end,\nit is not started yet.\nTo start the job and let your Python script wait until the job has finished then\ndownload it automatically, you can use the "),e("code",[t._v("start_and_wait")]),t._v(" method.")]),t._v(" "),e("div",{staticClass:"language-python extra-class"},[e("pre",{pre:!0,attrs:{class:"language-python"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Starts the job and waits until it finished to download the result.")]),t._v("\njob"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("start_and_wait"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\njob"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("get_results"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("download_files"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"output"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("p",[t._v('When everything completes successfully, the processing result will be downloaded as a GeoTIFF file\nin a folder "output".')]),t._v(" "),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("TIP")]),t._v(" "),e("p",[t._v("You may shut down your device or log out during the job runs on the backend. You can retrieve the status and results later and from any client.")]),t._v(" "),e("p",[t._v("The official openEO Python Client documentation has more information\non "),e("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/batch_jobs.html",target:"_blank",rel:"noopener noreferrer"}},[t._v("batch job management and downloading results"),e("OutboundLink")],1)])]),t._v(" "),e("h2",{attrs:{id:"additional-information"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#additional-information"}},[t._v("#")]),t._v(" Additional Information")]),t._v(" "),e("p",[t._v("Additional information and resources about the openEO Python Client Library:")]),t._v(" "),e("ul",[e("li",[e("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Official openEO Python Client Library Documentation"),e("OutboundLink")],1)]),t._v(" "),e("li",[e("a",{attrs:{href:"https://github.com/openEOPlatform/sample-notebooks",target:"_blank",rel:"noopener noreferrer"}},[t._v("Official openeo.cloud sample notebooks"),e("OutboundLink")],1)]),t._v(" "),e("li",[e("a",{attrs:{href:"https://github.com/Open-EO/openeo-python-client/tree/master/examples",target:"_blank",rel:"noopener noreferrer"}},[t._v("Example Python scripts"),e("OutboundLink")],1)]),t._v(" "),e("li",[e("a",{attrs:{href:"https://github.com/Open-EO/openeo-python-client/tree/master/examples/notebooks",target:"_blank",rel:"noopener noreferrer"}},[t._v("Example Jupyter Notebooks"),e("OutboundLink")],1)]),t._v(" "),e("li",[e("a",{attrs:{href:"https://github.com/Open-EO/openeo-python-client",target:"_blank",rel:"noopener noreferrer"}},[t._v("Repository on GitHub"),e("OutboundLink")],1)]),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/getting-started/python/shiny.html"}},[t._v("Run openEO processes in a Python Shiny App")])],1)])])}),[],!1,null,null,null);e.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/71.16dd0af8.js b/assets/js/71.63712077.js similarity index 99% rename from assets/js/71.16dd0af8.js rename to assets/js/71.63712077.js index af667431b..09baa62a7 100644 --- a/assets/js/71.16dd0af8.js +++ b/assets/js/71.63712077.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[71],{495:function(t,s,n){"use strict";n.r(s);var a=n(4),e=Object(a.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"run-openeo-processes-in-shiny-apps"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#run-openeo-processes-in-shiny-apps"}},[t._v("#")]),t._v(" Run openEO processes in Shiny apps")]),t._v(" "),s("p",[t._v("If one is new to Shiny in Python, a really good documentation can be found "),s("a",{attrs:{href:"https://shiny.rstudio.com/py/docs/get-started.html",target:"_blank",rel:"noopener noreferrer"}},[s("strong",[t._v("here")]),s("OutboundLink")],1),t._v(". This documentation is the source for all main interaction in the Shiny app built here.")]),t._v(" "),s("p",[t._v('As any other Shiny app, there will always be an UI and a Server side. Both can be coded in the same script, but they are quite differently set. The UI defines the interface of the application, and therefore one needs to define data inputs, buttons and tabs here. Below, one can see how the "Time Series Analyser" interface has been built.')]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Tab2 : Time Series Analyser")]),t._v("\nui"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("nav"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Time-Series Analyser"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n \n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# This tab has both a sidebar and panel")]),t._v("\nui"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("layout_sidebar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n \n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Define Sidebar Inputs")]),t._v("\n ui"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("panel_sidebar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n \n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Bounding Box")]),t._v("\n ui"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("input_numeric"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"w"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"xmin (EPSG:4326)"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("10.35")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("min")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" step "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v(".01")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ui"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("input_numeric"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"s"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"ymin (EPSG:4326)"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("46.10")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("min")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" step "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v(".01")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ui"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("input_numeric"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"e"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"xmax (EPSG:4326)"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("12.55")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("min")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" step "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v(".01")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ui"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("input_numeric"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"n"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"ymax (EPSG:4326)"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("47.13")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("min")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" step "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v(".01")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n \n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Temporal Filter")]),t._v("\n ui"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("input_date_range"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"date1date2"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Select timeframe"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n start "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-01-01"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" end "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-12-31"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("min")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-01-01"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("max")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("str")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("date"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("today"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" startview "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"year"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" weekstart "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Map with bbox")]),t._v("\n output_widget"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"map_ts"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n \n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Cloud Cover ")]),t._v("\n ui"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("input_numeric"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"cloud1"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"cloud cover to be considered? (0 to 1 - 0.5 is recommended)"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.5")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("min")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("max")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" step "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v(".1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Submit Button")]),t._v("\n ui"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("input_action_button"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"data1"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Submit"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ui"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("output_text"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"compute"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n \n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n \n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Time Series Plot")]),t._v("\n ui"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("panel_main"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n ui"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("output_plot"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"plot_ts"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n")])])]),s("p",[t._v("Everything in the UI start with defining sidebars, tabs and everything that refers to the layout. This is what is seen by the method "),s("em",[t._v("ui.panel_sidebar")]),t._v('. In the following all inputs (data) are defined for the "Time Series Analyser". Here, the most important is to pay attention to different data types and that each and everyone of them will require a different method. In this dashboard tab, for instance, the '),s("em",[t._v("input_numeric")]),t._v(", "),s("em",[t._v("input_date_range")]),t._v(" and "),s("em",[t._v("input_action_button")]),t._v(" are used. The other part is then the output items. Here the leaflet interactive map ("),s("em",[t._v("output_widget")]),t._v(") and the "),s("em",[t._v("output_plot")]),t._v(" are used. The last one is the one seen before. It refers to the time series plot.")]),t._v(" "),s("p",[t._v("Once some idea is given on how to work with Python's Shiny UI, a lot of questions may come into the mind about how to make these inputs and outputs actually turn into some result. This is where the Server comes into play. The server is again another function, where in this case, the first output to be defined is the leaflet map.")]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("def")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("server")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("input")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" output"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" session"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n \n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Leaft Map for Time Series")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token decorator annotation punctuation"}},[t._v("@output")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token decorator annotation punctuation"}},[t._v("@render_widget")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("def")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("map_ts")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n center_y "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("input")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("s"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("input")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),t._v("\n center_x "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("input")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("w"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("input")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("e"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),t._v("\n m "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" L"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Map"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("center"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("center_y"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" center_x"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" zoom"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("6")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n rectangle "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" L"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Rectangle"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("bounds"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("input")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("input")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("w"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("input")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("s"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("input")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("e"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n m"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("add_layer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("rectangle"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" m\n")])])]),s("p",[t._v("The function here used for plotting the nice bounding box on an interactive map is "),s("em",[t._v("L.Rectangle()")]),t._v(", being L the name through the "),s("em",[t._v("ipyleaflet")]),t._v(" package was imported. It is important to mentioned that a leaflet map has to be defined for each tab, as the coordinates for the bounding box are different for each tab.")]),t._v(" "),s("p",[t._v("After that, the interactions from the first input start being defined. An extent is first defined for the openeo processes:")]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[t._v("\n"),s("span",{pre:!0,attrs:{class:"token decorator annotation punctuation"}},[t._v("@output")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token decorator annotation punctuation"}},[t._v("@render"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("plot")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token decorator annotation punctuation"}},[t._v("@reactive"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("event")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("input")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("data1"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" \n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("async")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("def")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("plot_ts")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("with")]),t._v(" ui"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Progress"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("min")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("max")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("6")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("as")]),t._v(" p"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n \n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Define the Spatial Extent")]),t._v("\n extent "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"type"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Polygon"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"coordinates"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("input")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("w"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("input")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("input")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("e"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("input")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("input")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("e"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("input")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("s"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("input")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("w"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("input")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("s"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("input")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("w"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("input")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n \n p"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("set")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" message"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Local Wrangling"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n \n")])])]),s("p",[t._v("The output is here defined with a "),s("em",[t._v("@reactive.event")]),t._v(" tag, which allows for the inputs to be brought to the server only when the Submit button is hit. A progress bar is also defined, which helps by the fact that the whole process takes a while, and shiny does not naturally give the idea something is running without a progress bar.")]),t._v(" "),s("p",[t._v("After that, the collections are loaded, including the NO2 and the Cloud Cover bands, and the processes above mentioned are run, such as the mask for cloud cover, the interpolation, and the udf. Once the job is sent to backend, the script will wait for it to complete and one can call the files into memory and the rest is standard python and "),s("em",[t._v("matplotlib")]),t._v(" usage. The most relevant thing to remember here is that the specific server function one is manipulating, like here, the "),s("em",[t._v("def map_ts()")]),t._v(" function, is must have a "),s("em",[t._v("return")]),t._v(" call in its end, otherwise no plots will be retrieved from it, obviously enough. Below, one can see how the time series plot is defined, considering the "),s("em",[t._v("ts_df")]),t._v(" as a data frame built from the JSONs read as a dictionary in python.")]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[t._v("fig"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ax "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" plt"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("subplots"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("figsize"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("16")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("12")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nts_df"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("plot"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("ax"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("ax"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nax"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("set_xlabel"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Time'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nax"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("set_ylabel"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Value'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nax"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("set_title"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'NO2 Time Series from SENTINEL 5P'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# plt.show()")]),t._v("\n \np"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("set")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("6")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" message"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Done"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n \n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" fig \n")])])]),s("p",[t._v("As in a dashboard, one will probably work with rendering plots mainly, that should be resourceful enough to let anyone start playing with openEO and Shiny in python together. If there are any doubts, do not hesitate to reach the developers and consider even creating an issue in this repository. Please be aware of openEO backend related issues that do not concern this dashboard developers.")])])}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[71],{494:function(t,s,n){"use strict";n.r(s);var a=n(4),e=Object(a.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"run-openeo-processes-in-shiny-apps"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#run-openeo-processes-in-shiny-apps"}},[t._v("#")]),t._v(" Run openEO processes in Shiny apps")]),t._v(" "),s("p",[t._v("If one is new to Shiny in Python, a really good documentation can be found "),s("a",{attrs:{href:"https://shiny.rstudio.com/py/docs/get-started.html",target:"_blank",rel:"noopener noreferrer"}},[s("strong",[t._v("here")]),s("OutboundLink")],1),t._v(". This documentation is the source for all main interaction in the Shiny app built here.")]),t._v(" "),s("p",[t._v('As any other Shiny app, there will always be an UI and a Server side. Both can be coded in the same script, but they are quite differently set. The UI defines the interface of the application, and therefore one needs to define data inputs, buttons and tabs here. Below, one can see how the "Time Series Analyser" interface has been built.')]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Tab2 : Time Series Analyser")]),t._v("\nui"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("nav"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Time-Series Analyser"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n \n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# This tab has both a sidebar and panel")]),t._v("\nui"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("layout_sidebar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n \n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Define Sidebar Inputs")]),t._v("\n ui"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("panel_sidebar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n \n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Bounding Box")]),t._v("\n ui"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("input_numeric"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"w"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"xmin (EPSG:4326)"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("10.35")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("min")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" step "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v(".01")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ui"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("input_numeric"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"s"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"ymin (EPSG:4326)"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("46.10")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("min")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" step "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v(".01")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ui"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("input_numeric"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"e"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"xmax (EPSG:4326)"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("12.55")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("min")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" step "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v(".01")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ui"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("input_numeric"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"n"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"ymax (EPSG:4326)"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("47.13")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("min")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" step "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v(".01")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n \n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Temporal Filter")]),t._v("\n ui"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("input_date_range"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"date1date2"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Select timeframe"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n start "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-01-01"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" end "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-12-31"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("min")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-01-01"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("max")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("str")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("date"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("today"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" startview "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"year"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" weekstart "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Map with bbox")]),t._v("\n output_widget"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"map_ts"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n \n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Cloud Cover ")]),t._v("\n ui"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("input_numeric"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"cloud1"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"cloud cover to be considered? (0 to 1 - 0.5 is recommended)"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.5")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("min")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("max")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" step "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v(".1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Submit Button")]),t._v("\n ui"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("input_action_button"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"data1"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Submit"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ui"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("output_text"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"compute"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n \n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n \n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Time Series Plot")]),t._v("\n ui"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("panel_main"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n ui"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("output_plot"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"plot_ts"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n")])])]),s("p",[t._v("Everything in the UI start with defining sidebars, tabs and everything that refers to the layout. This is what is seen by the method "),s("em",[t._v("ui.panel_sidebar")]),t._v('. In the following all inputs (data) are defined for the "Time Series Analyser". Here, the most important is to pay attention to different data types and that each and everyone of them will require a different method. In this dashboard tab, for instance, the '),s("em",[t._v("input_numeric")]),t._v(", "),s("em",[t._v("input_date_range")]),t._v(" and "),s("em",[t._v("input_action_button")]),t._v(" are used. The other part is then the output items. Here the leaflet interactive map ("),s("em",[t._v("output_widget")]),t._v(") and the "),s("em",[t._v("output_plot")]),t._v(" are used. The last one is the one seen before. It refers to the time series plot.")]),t._v(" "),s("p",[t._v("Once some idea is given on how to work with Python's Shiny UI, a lot of questions may come into the mind about how to make these inputs and outputs actually turn into some result. This is where the Server comes into play. The server is again another function, where in this case, the first output to be defined is the leaflet map.")]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("def")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("server")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("input")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" output"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" session"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n \n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Leaft Map for Time Series")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token decorator annotation punctuation"}},[t._v("@output")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token decorator annotation punctuation"}},[t._v("@render_widget")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("def")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("map_ts")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n center_y "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("input")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("s"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("input")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),t._v("\n center_x "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("input")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("w"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("input")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("e"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),t._v("\n m "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" L"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Map"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("center"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("center_y"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" center_x"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" zoom"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("6")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n rectangle "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" L"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Rectangle"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("bounds"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("input")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("input")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("w"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("input")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("s"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("input")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("e"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n m"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("add_layer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("rectangle"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" m\n")])])]),s("p",[t._v("The function here used for plotting the nice bounding box on an interactive map is "),s("em",[t._v("L.Rectangle()")]),t._v(", being L the name through the "),s("em",[t._v("ipyleaflet")]),t._v(" package was imported. It is important to mentioned that a leaflet map has to be defined for each tab, as the coordinates for the bounding box are different for each tab.")]),t._v(" "),s("p",[t._v("After that, the interactions from the first input start being defined. An extent is first defined for the openeo processes:")]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[t._v("\n"),s("span",{pre:!0,attrs:{class:"token decorator annotation punctuation"}},[t._v("@output")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token decorator annotation punctuation"}},[t._v("@render"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("plot")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token decorator annotation punctuation"}},[t._v("@reactive"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("event")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("input")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("data1"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" \n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("async")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("def")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("plot_ts")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("with")]),t._v(" ui"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Progress"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("min")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("max")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("6")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("as")]),t._v(" p"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n \n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Define the Spatial Extent")]),t._v("\n extent "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"type"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Polygon"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"coordinates"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("input")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("w"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("input")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("input")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("e"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("input")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("input")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("e"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("input")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("s"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("input")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("w"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("input")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("s"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("input")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("w"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("input")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n \n p"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("set")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" message"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Local Wrangling"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n \n")])])]),s("p",[t._v("The output is here defined with a "),s("em",[t._v("@reactive.event")]),t._v(" tag, which allows for the inputs to be brought to the server only when the Submit button is hit. A progress bar is also defined, which helps by the fact that the whole process takes a while, and shiny does not naturally give the idea something is running without a progress bar.")]),t._v(" "),s("p",[t._v("After that, the collections are loaded, including the NO2 and the Cloud Cover bands, and the processes above mentioned are run, such as the mask for cloud cover, the interpolation, and the udf. Once the job is sent to backend, the script will wait for it to complete and one can call the files into memory and the rest is standard python and "),s("em",[t._v("matplotlib")]),t._v(" usage. The most relevant thing to remember here is that the specific server function one is manipulating, like here, the "),s("em",[t._v("def map_ts()")]),t._v(" function, is must have a "),s("em",[t._v("return")]),t._v(" call in its end, otherwise no plots will be retrieved from it, obviously enough. Below, one can see how the time series plot is defined, considering the "),s("em",[t._v("ts_df")]),t._v(" as a data frame built from the JSONs read as a dictionary in python.")]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[t._v("fig"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ax "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" plt"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("subplots"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("figsize"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("16")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("12")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nts_df"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("plot"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("ax"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("ax"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nax"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("set_xlabel"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Time'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nax"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("set_ylabel"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Value'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nax"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("set_title"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'NO2 Time Series from SENTINEL 5P'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# plt.show()")]),t._v("\n \np"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("set")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("6")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" message"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Done"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n \n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" fig \n")])])]),s("p",[t._v("As in a dashboard, one will probably work with rendering plots mainly, that should be resourceful enough to let anyone start playing with openEO and Shiny in python together. If there are any doubts, do not hesitate to reach the developers and consider even creating an issue in this repository. Please be aware of openEO backend related issues that do not concern this dashboard developers.")])])}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/72.68052926.js b/assets/js/72.bac4b813.js similarity index 99% rename from assets/js/72.68052926.js rename to assets/js/72.bac4b813.js index 37a9c653f..77b315e3f 100644 --- a/assets/js/72.68052926.js +++ b/assets/js/72.bac4b813.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[72],{496:function(t,e,a){"use strict";a.r(e);var s=a(4),n=Object(s.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"get-started-with-the-openeo-r-client"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#get-started-with-the-openeo-r-client"}},[t._v("#")]),t._v(" Get started with the openEO R Client")]),t._v(" "),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("Note")]),t._v(" "),e("p",[t._v("You need to "),e("a",{attrs:{href:"https://openeo.cloud/#plans",target:"_blank",rel:"noopener noreferrer"}},[t._v("get an openEO Platform account"),e("OutboundLink")],1),t._v(" to access the processing infrastructure.")])]),t._v(" "),e("h2",{attrs:{id:"useful-links"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#useful-links"}},[t._v("#")]),t._v(" Useful links")]),t._v(" "),e("ul",[e("li",[e("a",{attrs:{href:"https://open-eo.github.io/openeo-r-client/index.html",target:"_blank",rel:"noopener noreferrer"}},[t._v("Documentation"),e("OutboundLink")],1)]),t._v(" "),e("li",[e("a",{attrs:{href:"https://open-eo.github.io/openeo-r-client/articles/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Vignettes"),e("OutboundLink")],1)]),t._v(" "),e("li",[e("a",{attrs:{href:"https://github.com/Open-EO/openeo-r-client",target:"_blank",rel:"noopener noreferrer"}},[t._v("Code Repository"),e("OutboundLink")],1)]),t._v(" "),e("li",[t._v("for function documentation, use R's "),e("code",[t._v("?")]),t._v(" function or see the "),e("a",{attrs:{href:"https://open-eo.github.io/openeo-r-client/index.html",target:"_blank",rel:"noopener noreferrer"}},[t._v("online documentation"),e("OutboundLink")],1)])]),t._v(" "),e("h2",{attrs:{id:"installation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#installation"}},[t._v("#")]),t._v(" Installation")]),t._v(" "),e("p",[t._v("Before you install the R client module into your R environment, please make sure that you have at least R version 3.6. Older versions might also work, but were not tested.")]),t._v(" "),e("p",[t._v("Stable releases can be installed from CRAN:")]),t._v(" "),e("div",{staticClass:"language-r extra-class"},[e("pre",{pre:!0,attrs:{class:"language-r"}},[e("code",[t._v("install.packages"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"openeo"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("Installing the development version")]),t._v(" "),e("p",[t._v("If you want to install the development version, you can install from GitHub. It may contain more features, but may also be unstable.")]),t._v(" "),e("p",[t._v("You need to have the package 'devtools' installed. If it is not installed use "),e("code",[t._v('install.packages("devtools")')]),t._v(".")]),t._v(" "),e("p",[t._v("Now you can use "),e("code",[t._v("install_github")]),t._v(" from the devtools package to install the development version:")]),t._v(" "),e("div",{staticClass:"language-r extra-class"},[e("pre",{pre:!0,attrs:{class:"language-r"}},[e("code",[t._v("devtools"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("::")]),t._v("install_github"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("repo"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Open-EO/openeo-r-client"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" dependencies"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("TRUE")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ref"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"develop"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("p",[t._v("If this gives you an error, something went wrong with the installation so please check the requirements again.")])]),t._v(" "),e("p",[t._v("If you have still troubles installing the package, feel free to leave an issue at the "),e("a",{attrs:{href:"https://github.com/Open-EO/openeo-r-client/issues",target:"_blank",rel:"noopener noreferrer"}},[t._v("GitHub project"),e("OutboundLink")],1),t._v(".")]),t._v(" "),e("p",[t._v("Now that the installation was successfully finished, we can load the package and connect to openEO Platform.\nIn the following chapters we quickly walk through the main features of the R client.")]),t._v(" "),e("h2",{attrs:{id:"connect-to-openeo-platform-and-explore"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#connect-to-openeo-platform-and-explore"}},[t._v("#")]),t._v(" Connect to openEO Platform and explore")]),t._v(" "),e("p",[t._v("First we need to establish a connection to the openEO Platform back-end,\nwhich is available at connection URL "),e("code",[t._v("https://openeo.cloud")]),t._v(", or just in short:")]),t._v(" "),e("div",{staticClass:"language-r extra-class"},[e("pre",{pre:!0,attrs:{class:"language-r"}},[e("code",[t._v("library"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("openeo"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ncon "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" connect"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("host "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://openeo.cloud"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("p",[t._v("The object stored as variable "),e("code",[t._v("con")]),t._v(" is a connection and resembles the "),e("code",[t._v("OpenEOClient")]),t._v(" - an object, that bundles all information and functions to interact with the back-end. It can be used explicitly in all of the functions to determine which connection has to be used (usually parameter "),e("code",[t._v("con")]),t._v("). If only one connection is active, then you can omit the parameter, because the last active connection is always stored in a package environment and used if no specific connection was present (see "),e("code",[t._v("?active_connection")]),t._v(" in the package documentation).")]),t._v(" "),e("p",[t._v("The capabilities of the back-end and the collections are generally publicly available, unless the data collections are proprietary and licensing issues prevent the back-end provider from publishing the collection. For the publicly available information you do not need to have an account on the back-end for reading them.")]),t._v(" "),e("h3",{attrs:{id:"collections"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#collections"}},[t._v("#")]),t._v(" Collections")]),t._v(" "),e("p",[t._v('The EO data available at a back-end is organised in so-called collections.\nFor example, a back-end might provide fundamental satellite collections like "Sentinel 1" or "Sentinel 2",\nor preprocessed collections like "NDVI".\nCollections are used as input data for your openEO jobs.')]),t._v(" "),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("Note")]),t._v(" "),e("p",[t._v('More information on how openEO "collections" relate to terminology used in other systems can be found in\n'),e("a",{attrs:{href:"https://openeo.org/documentation/1.0/glossary.html#eo-data-collections",target:"_blank",rel:"noopener noreferrer"}},[t._v("the openEO glossary"),e("OutboundLink")],1),t._v(".")])]),t._v(" "),e("p",[t._v("To get the collection list can be indexed by the collections ID to get the more details about the overview information. With the "),e("code",[t._v("describe_collection")]),t._v(" function you can get an even more detailed information about the collection.")]),t._v(" "),e("div",{staticClass:"language-r extra-class"},[e("pre",{pre:!0,attrs:{class:"language-r"}},[e("code",[t._v("collections "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" list_collections"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\n"),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# print an overview of the available collections (printed as data.frame or tibble)")]),t._v("\nprint"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("collections"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\n"),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# to print more of the reduced overview metadata")]),t._v("\nprint"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("collections"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("$")]),t._v("SENTINEL1_GRD"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\n"),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v('# Dictionary of the full metadata of the "SENTINEL1_GRD" collection (dict)')]),t._v("\ns2 "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" describe_collection"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SENTINEL1_GRD"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# or use the collection entry from the list, e.g. collections$SENTINEL1_GRD")]),t._v("\nprint"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("s2"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("p",[t._v("In general all metadata objects are based on lists, so you can use "),e("code",[t._v("str()")]),t._v(" to get the structure of the list and address fields by the "),e("code",[t._v("$")]),t._v(" operator.")]),t._v(" "),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("TIP")]),t._v(" "),e("p",[t._v("If the package is used with RStudio the metadata can also be nicely rendered as a web page in the viewer panel by running "),e("code",[t._v('collection_viewer(x="SENTINEL1_GRD")')]),t._v(".")])]),t._v(" "),e("h3",{attrs:{id:"processes"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#processes"}},[t._v("#")]),t._v(" Processes")]),t._v(" "),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("Note")]),t._v(" "),e("p",[t._v("Please note that the any of this code only creates a process graph representation of your EO analysis and does not take major processing power from you device.")])]),t._v(" "),e("p",[t._v('Processes in openEO are operations that can be applied on (EO) data\n(e.g. calculate the mean of an array, or mask out observations outside a given polygon).\nThe output of one process can be used as the input of another process,\nand by doing so, multiple processes can be connected that way in a larger "process graph":\na new (user-defined) processes that implements a certain algorithm.')]),t._v(" "),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("Note")]),t._v(" "),e("p",[t._v("Check "),e("a",{attrs:{href:"https://openeo.org/documentation/1.0/glossary.html#processes",target:"_blank",rel:"noopener noreferrer"}},[t._v("the openEO glossary"),e("OutboundLink")],1),t._v("\nfor more details on pre-defined, user-defined processes and process graphs.")])]),t._v(" "),e("p",[t._v("The following code snippet shows how to get the available processes:")]),t._v(" "),e("div",{staticClass:"language-r extra-class"},[e("pre",{pre:!0,attrs:{class:"language-r"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# List of available openEO processes with full metadata")]),t._v("\nprocesses "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" list_processes"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\n"),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# List of available openEO processes by identifiers (string)")]),t._v("\nprint"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("names"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("processes"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\n"),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v('# print metadata of the process with ID "load_collection"')]),t._v("\nprint"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("processes"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("$")]),t._v("load_collection"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("p",[t._v("The "),e("code",[t._v("list_processes()")]),t._v(" method returns a list of process metadata objects that the back-end provides.\nEach process list entry is a more complex list object (called 'ProcessInfo') and contains the process identifier and additional metadata about the process, such as expected arguments and return types.")]),t._v(" "),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("TIP")]),t._v(" "),e("p",[t._v("As for the collection, processes can also be rendered as a web page in the viewer panel, if RStudio is used. In order to open the viewer use "),e("code",[t._v("process_viewer()")]),t._v(" with either a particular process ("),e("code",[t._v('process_viewer("load_collection")')]),t._v(") or you can pass on all processes ("),e("code",[t._v("process_viewer(processes)")]),t._v("). When all processes are chosen, there is also a search bar and a category tree.")])]),t._v(" "),e("h2",{attrs:{id:"authentication"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#authentication"}},[t._v("#")]),t._v(" Authentication")]),t._v(" "),e("p",[t._v("In the code snippets above we did not need to log in\nsince we just queried publicly available back-end information.\nHowever, to run non-trivial processing queries one has to authenticate\nso that permissions, resource usage, etc. can be managed properly.")]),t._v(" "),e("p",[t._v("To handle authentication, openEO leverages "),e("a",{attrs:{href:"https://openid.net/connect/",target:"_blank",rel:"noopener noreferrer"}},[t._v("OpenID Connect (OIDC)"),e("OutboundLink")],1),t._v(".\nIt offers some interesting features (e.g., a user can securely reuse an existing account),\nbut is a fairly complex topic, discussed in more depth on the "),e("RouterLink",{attrs:{to:"/join/free_trial.html"}},[t._v("Free Trial")]),t._v(" page.")],1),t._v(" "),e("p",[t._v("The following code snippet shows how to log in via OIDC authentication:")]),t._v(" "),e("div",{staticClass:"language-r extra-class"},[e("pre",{pre:!0,attrs:{class:"language-r"}},[e("code",[t._v("login"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("p",[t._v("Calling this method opens your system web browser, with which you can authenticate yourself on the back-end authentication system.\nAfter that the website will give you the instructions to go back to the R client, where your connection has logged your account in.\nThis means, that every call that comes after that via the connection variable is executed by your user account.")]),t._v(" "),e("h2",{attrs:{id:"creating-a-user-defined-process"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#creating-a-user-defined-process"}},[t._v("#")]),t._v(" Creating a (user-defined) process")]),t._v(" "),e("p",[t._v("Now that we know how to discover the back-end and how to authenticate, lets continue by creating a new batch job to process some data.")]),t._v(" "),e("p",[t._v("First we need to create a process builder object that carries all the available predefined openEO processes of the connected back-end as attached R functions with the parameters stated in the process metadata.")]),t._v(" "),e("div",{staticClass:"language-r extra-class"},[e("pre",{pre:!0,attrs:{class:"language-r"}},[e("code",[t._v("p "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" processes"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("p",[t._v("The functions of the builder return process nodes, which represent a particular result in the workflow. As one of the first steps we need to select the source data collection.")]),t._v(" "),e("div",{staticClass:"language-r extra-class"},[e("pre",{pre:!0,attrs:{class:"language-r"}},[e("code",[t._v("datacube "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" p"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("$")]),t._v("load_collection"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n id "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SENTINEL1_GRD"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n spatial_extent"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("list"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("west "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("16.06")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" south "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("48.06")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" east "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("16.65")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" north "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("48.35")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n temporal_extent"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("c"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2017-03-01"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2017-04-01"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n bands"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("c"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"VV"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"VH"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("p",[t._v("This results in a process node that represents a "),e("a",{attrs:{href:"https://openeo.org/documentation/1.0/glossary.html#spatial-datacubes",target:"_blank",rel:"noopener noreferrer"}},[t._v("datacube"),e("OutboundLink")],1),t._v(' and contains the "SENTINEL1_GRD" data restricted to the given spatial extent, the given temporal extent and the given bands .')]),t._v(" "),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("Sample Data Retrieval")]),t._v(" "),e("p",[t._v("In order to get a better understanding about the processing mechanisms and the data structures used in openEO Platform, it helps to check the actual data from time to time.\nThe function "),e("a",{attrs:{href:"https://open-eo.github.io/openeo-r-client/reference/get_sample.html",target:"_blank",rel:"noopener noreferrer"}},[e("code",[t._v("get_sample")]),e("OutboundLink")],1),t._v(" aids the user in downloading data for a very small spatial extent. It is automatically loaded into R so that you can directly inspect it with "),e("code",[t._v("stars")]),t._v('.\nRead the vignette on "'),e("a",{attrs:{href:"https://open-eo.github.io/openeo-r-client/articles/openeo-02-sample_data.html",target:"_blank",rel:"noopener noreferrer"}},[t._v("Sample Data Retrieval"),e("OutboundLink")],1),t._v('" for more details.')])]),t._v(" "),e("p",[t._v("Having the input data ready, we want to apply a process on the datacube.\nTherefore, we can call the process directly on the datacube object, which then returns a datacube with the process applied.")]),t._v(" "),e("div",{staticClass:"language-r extra-class"},[e("pre",{pre:!0,attrs:{class:"language-r"}},[e("code",[t._v("min_reducer "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("context"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" \n return"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("p"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("$")]),t._v("min"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" data"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\nreduced "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" p"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("$")]),t._v("reduce_dimension"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" datacube"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" reducer "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" min_reducer"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" dimension"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("p",[t._v("The datacube is now reduced by the time dimension named "),e("code",[t._v("t")]),t._v(', by taking the minimum value of the timeseries values. Now the datacube has no time dimension left. Other so called "reducer" processes exist, e.g. for computing maximum and mean values.')]),t._v(" "),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("Note")]),t._v(" "),e("p",[t._v("Everything applied to the datacube at this point is neither executed locally on your machine nor executed on the back-end.\nIt just defines the input data and process chain the back-end needs to apply when it sends the datacube to the back-end and executes it there.\nHow this can be done is the topic of the next chapter.")])]),t._v(" "),e("p",[t._v("After applying all processes you want to execute, we need to tell the back-end to export the datacube, for example as GeoTiff:")]),t._v(" "),e("div",{staticClass:"language-r extra-class"},[e("pre",{pre:!0,attrs:{class:"language-r"}},[e("code",[t._v("formats "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" list_file_formats"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\nresult "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" p"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("$")]),t._v("save_result"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" reduced"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" format "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" formats"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("$")]),t._v("output"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("$")]),t._v("GTIFF"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("p",[t._v("The first line retrieves the back-ends offered input and output formats. The second line creates the result node, which stores the data as a zipped GeoTiff.")]),t._v(" "),e("h2",{attrs:{id:"batch-job-management"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#batch-job-management"}},[t._v("#")]),t._v(" Batch Job Management")]),t._v(" "),e("p",[t._v("After you have finished working on your (user-defined) process, we can now send it to the back-end and start the execution.\nIn openEO, an execution of a (user-defined) process is called a "),e("a",{attrs:{href:"https://openeo.org/documentation/1.0/glossary.html#data-processing-modes",target:"_blank",rel:"noopener noreferrer"}},[t._v("(batch) job"),e("OutboundLink")],1),t._v(".\nTherefore, we need to create a job at the back-end using our datacube, giving it the title "),e("code",[t._v("Example Title")]),t._v(".")]),t._v(" "),e("div",{staticClass:"language-r extra-class"},[e("pre",{pre:!0,attrs:{class:"language-r"}},[e("code",[t._v("job "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" create_job"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("graph"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("result"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" title "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Example Title"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("p",[t._v("The "),e("code",[t._v("create_job")]),t._v(" method sends all necessary information to the back-end and creates a new job, which gets returned.\nAfter this, the job is just created, but has not started the execution at the back-end yet.\nIt needs to be queued for processing explicitly:")]),t._v(" "),e("div",{staticClass:"language-r extra-class"},[e("pre",{pre:!0,attrs:{class:"language-r"}},[e("code",[t._v("start_job"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("job "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" job"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("TIP")]),t._v(" "),e("p",[t._v("It can be annoying to manage and monitor batch jobs via code.\nIf you want to use an interface for your batch jobs (or other resources) that is easier to use, you can also open the "),e("a",{attrs:{href:"https://editor.openeo.cloud",target:"_blank",rel:"noopener noreferrer"}},[t._v("openEO Platform Editor"),e("OutboundLink")],1),t._v('.\nAfter login, you\'ll be able to manage and monitor your batch jobs in a near-realtime interactive environment; Look out for the "Data Processing" tab.\nYou may shut down your device or log out during the job runs on the backend. You can retrieve the status and results later and from any client.')])]),t._v(" "),e("p",[t._v("After the job was executed, status updates can be fetched by using the "),e("code",[t._v("list_jobs()")]),t._v(" function. This function returns a list of job descriptions, which can be indexed with the jobs ID to limit the search results. But remember that only "),e("code",[t._v("list_jobs()")]),t._v(" refreshes this list. So, to monitor a job you have to iteratively call the job ("),e("code",[t._v("describe_job()")]),t._v(") or the job list "),e("code",[t._v("list_jobs()")]),t._v(".")]),t._v(" "),e("div",{staticClass:"language-r extra-class"},[e("pre",{pre:!0,attrs:{class:"language-r"}},[e("code",[t._v("jobs "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" list_jobs"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\njobs "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# printed as a tibble or data.frame, but the object is a list")]),t._v("\n\n"),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# or use the job id (in this example 'cZ2ND0Z5nhBFNQFq') as index to get a particular job overview")]),t._v("\njobs"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("$")]),t._v("cZ2ND0Z5nhBFNQFq\n\n"),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# alternatively request detailed information about the job")]),t._v("\ndescribe_job"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("job "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" job"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("p",[t._v("When the job is finished, calling "),e("code",[t._v("download_results()")]),t._v(" will download the results of a job. Using "),e("code",[t._v("list_results()")]),t._v(" will return an overview about the created files and their download link or it states the error message, in case of an error.")]),t._v(" "),e("div",{staticClass:"language-r extra-class"},[e("pre",{pre:!0,attrs:{class:"language-r"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# list the processed results")]),t._v("\nlist_results"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("job "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" job"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\n"),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# download all the files into a folder on the file system")]),t._v("\ndownload_results"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("job "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" job"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" folder "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"/some/folder/on/filesystem"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("Note")]),t._v(" "),e("p",[t._v("The printing behavior and the actual data structure might differ!")])])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[72],{495:function(t,e,a){"use strict";a.r(e);var s=a(4),n=Object(s.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"get-started-with-the-openeo-r-client"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#get-started-with-the-openeo-r-client"}},[t._v("#")]),t._v(" Get started with the openEO R Client")]),t._v(" "),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("Note")]),t._v(" "),e("p",[t._v("You need to "),e("a",{attrs:{href:"https://openeo.cloud/#plans",target:"_blank",rel:"noopener noreferrer"}},[t._v("get an openEO Platform account"),e("OutboundLink")],1),t._v(" to access the processing infrastructure.")])]),t._v(" "),e("h2",{attrs:{id:"useful-links"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#useful-links"}},[t._v("#")]),t._v(" Useful links")]),t._v(" "),e("ul",[e("li",[e("a",{attrs:{href:"https://open-eo.github.io/openeo-r-client/index.html",target:"_blank",rel:"noopener noreferrer"}},[t._v("Documentation"),e("OutboundLink")],1)]),t._v(" "),e("li",[e("a",{attrs:{href:"https://open-eo.github.io/openeo-r-client/articles/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Vignettes"),e("OutboundLink")],1)]),t._v(" "),e("li",[e("a",{attrs:{href:"https://github.com/Open-EO/openeo-r-client",target:"_blank",rel:"noopener noreferrer"}},[t._v("Code Repository"),e("OutboundLink")],1)]),t._v(" "),e("li",[t._v("for function documentation, use R's "),e("code",[t._v("?")]),t._v(" function or see the "),e("a",{attrs:{href:"https://open-eo.github.io/openeo-r-client/index.html",target:"_blank",rel:"noopener noreferrer"}},[t._v("online documentation"),e("OutboundLink")],1)])]),t._v(" "),e("h2",{attrs:{id:"installation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#installation"}},[t._v("#")]),t._v(" Installation")]),t._v(" "),e("p",[t._v("Before you install the R client module into your R environment, please make sure that you have at least R version 3.6. Older versions might also work, but were not tested.")]),t._v(" "),e("p",[t._v("Stable releases can be installed from CRAN:")]),t._v(" "),e("div",{staticClass:"language-r extra-class"},[e("pre",{pre:!0,attrs:{class:"language-r"}},[e("code",[t._v("install.packages"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"openeo"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("Installing the development version")]),t._v(" "),e("p",[t._v("If you want to install the development version, you can install from GitHub. It may contain more features, but may also be unstable.")]),t._v(" "),e("p",[t._v("You need to have the package 'devtools' installed. If it is not installed use "),e("code",[t._v('install.packages("devtools")')]),t._v(".")]),t._v(" "),e("p",[t._v("Now you can use "),e("code",[t._v("install_github")]),t._v(" from the devtools package to install the development version:")]),t._v(" "),e("div",{staticClass:"language-r extra-class"},[e("pre",{pre:!0,attrs:{class:"language-r"}},[e("code",[t._v("devtools"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("::")]),t._v("install_github"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("repo"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Open-EO/openeo-r-client"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" dependencies"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("TRUE")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ref"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"develop"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("p",[t._v("If this gives you an error, something went wrong with the installation so please check the requirements again.")])]),t._v(" "),e("p",[t._v("If you have still troubles installing the package, feel free to leave an issue at the "),e("a",{attrs:{href:"https://github.com/Open-EO/openeo-r-client/issues",target:"_blank",rel:"noopener noreferrer"}},[t._v("GitHub project"),e("OutboundLink")],1),t._v(".")]),t._v(" "),e("p",[t._v("Now that the installation was successfully finished, we can load the package and connect to openEO Platform.\nIn the following chapters we quickly walk through the main features of the R client.")]),t._v(" "),e("h2",{attrs:{id:"connect-to-openeo-platform-and-explore"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#connect-to-openeo-platform-and-explore"}},[t._v("#")]),t._v(" Connect to openEO Platform and explore")]),t._v(" "),e("p",[t._v("First we need to establish a connection to the openEO Platform back-end,\nwhich is available at connection URL "),e("code",[t._v("https://openeo.cloud")]),t._v(", or just in short:")]),t._v(" "),e("div",{staticClass:"language-r extra-class"},[e("pre",{pre:!0,attrs:{class:"language-r"}},[e("code",[t._v("library"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("openeo"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ncon "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" connect"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("host "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://openeo.cloud"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("p",[t._v("The object stored as variable "),e("code",[t._v("con")]),t._v(" is a connection and resembles the "),e("code",[t._v("OpenEOClient")]),t._v(" - an object, that bundles all information and functions to interact with the back-end. It can be used explicitly in all of the functions to determine which connection has to be used (usually parameter "),e("code",[t._v("con")]),t._v("). If only one connection is active, then you can omit the parameter, because the last active connection is always stored in a package environment and used if no specific connection was present (see "),e("code",[t._v("?active_connection")]),t._v(" in the package documentation).")]),t._v(" "),e("p",[t._v("The capabilities of the back-end and the collections are generally publicly available, unless the data collections are proprietary and licensing issues prevent the back-end provider from publishing the collection. For the publicly available information you do not need to have an account on the back-end for reading them.")]),t._v(" "),e("h3",{attrs:{id:"collections"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#collections"}},[t._v("#")]),t._v(" Collections")]),t._v(" "),e("p",[t._v('The EO data available at a back-end is organised in so-called collections.\nFor example, a back-end might provide fundamental satellite collections like "Sentinel 1" or "Sentinel 2",\nor preprocessed collections like "NDVI".\nCollections are used as input data for your openEO jobs.')]),t._v(" "),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("Note")]),t._v(" "),e("p",[t._v('More information on how openEO "collections" relate to terminology used in other systems can be found in\n'),e("a",{attrs:{href:"https://openeo.org/documentation/1.0/glossary.html#eo-data-collections",target:"_blank",rel:"noopener noreferrer"}},[t._v("the openEO glossary"),e("OutboundLink")],1),t._v(".")])]),t._v(" "),e("p",[t._v("To get the collection list can be indexed by the collections ID to get the more details about the overview information. With the "),e("code",[t._v("describe_collection")]),t._v(" function you can get an even more detailed information about the collection.")]),t._v(" "),e("div",{staticClass:"language-r extra-class"},[e("pre",{pre:!0,attrs:{class:"language-r"}},[e("code",[t._v("collections "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" list_collections"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\n"),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# print an overview of the available collections (printed as data.frame or tibble)")]),t._v("\nprint"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("collections"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\n"),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# to print more of the reduced overview metadata")]),t._v("\nprint"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("collections"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("$")]),t._v("SENTINEL1_GRD"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\n"),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v('# Dictionary of the full metadata of the "SENTINEL1_GRD" collection (dict)')]),t._v("\ns2 "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" describe_collection"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SENTINEL1_GRD"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# or use the collection entry from the list, e.g. collections$SENTINEL1_GRD")]),t._v("\nprint"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("s2"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("p",[t._v("In general all metadata objects are based on lists, so you can use "),e("code",[t._v("str()")]),t._v(" to get the structure of the list and address fields by the "),e("code",[t._v("$")]),t._v(" operator.")]),t._v(" "),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("TIP")]),t._v(" "),e("p",[t._v("If the package is used with RStudio the metadata can also be nicely rendered as a web page in the viewer panel by running "),e("code",[t._v('collection_viewer(x="SENTINEL1_GRD")')]),t._v(".")])]),t._v(" "),e("h3",{attrs:{id:"processes"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#processes"}},[t._v("#")]),t._v(" Processes")]),t._v(" "),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("Note")]),t._v(" "),e("p",[t._v("Please note that the any of this code only creates a process graph representation of your EO analysis and does not take major processing power from you device.")])]),t._v(" "),e("p",[t._v('Processes in openEO are operations that can be applied on (EO) data\n(e.g. calculate the mean of an array, or mask out observations outside a given polygon).\nThe output of one process can be used as the input of another process,\nand by doing so, multiple processes can be connected that way in a larger "process graph":\na new (user-defined) processes that implements a certain algorithm.')]),t._v(" "),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("Note")]),t._v(" "),e("p",[t._v("Check "),e("a",{attrs:{href:"https://openeo.org/documentation/1.0/glossary.html#processes",target:"_blank",rel:"noopener noreferrer"}},[t._v("the openEO glossary"),e("OutboundLink")],1),t._v("\nfor more details on pre-defined, user-defined processes and process graphs.")])]),t._v(" "),e("p",[t._v("The following code snippet shows how to get the available processes:")]),t._v(" "),e("div",{staticClass:"language-r extra-class"},[e("pre",{pre:!0,attrs:{class:"language-r"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# List of available openEO processes with full metadata")]),t._v("\nprocesses "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" list_processes"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\n"),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# List of available openEO processes by identifiers (string)")]),t._v("\nprint"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("names"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("processes"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\n"),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v('# print metadata of the process with ID "load_collection"')]),t._v("\nprint"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("processes"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("$")]),t._v("load_collection"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("p",[t._v("The "),e("code",[t._v("list_processes()")]),t._v(" method returns a list of process metadata objects that the back-end provides.\nEach process list entry is a more complex list object (called 'ProcessInfo') and contains the process identifier and additional metadata about the process, such as expected arguments and return types.")]),t._v(" "),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("TIP")]),t._v(" "),e("p",[t._v("As for the collection, processes can also be rendered as a web page in the viewer panel, if RStudio is used. In order to open the viewer use "),e("code",[t._v("process_viewer()")]),t._v(" with either a particular process ("),e("code",[t._v('process_viewer("load_collection")')]),t._v(") or you can pass on all processes ("),e("code",[t._v("process_viewer(processes)")]),t._v("). When all processes are chosen, there is also a search bar and a category tree.")])]),t._v(" "),e("h2",{attrs:{id:"authentication"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#authentication"}},[t._v("#")]),t._v(" Authentication")]),t._v(" "),e("p",[t._v("In the code snippets above we did not need to log in\nsince we just queried publicly available back-end information.\nHowever, to run non-trivial processing queries one has to authenticate\nso that permissions, resource usage, etc. can be managed properly.")]),t._v(" "),e("p",[t._v("To handle authentication, openEO leverages "),e("a",{attrs:{href:"https://openid.net/connect/",target:"_blank",rel:"noopener noreferrer"}},[t._v("OpenID Connect (OIDC)"),e("OutboundLink")],1),t._v(".\nIt offers some interesting features (e.g., a user can securely reuse an existing account),\nbut is a fairly complex topic, discussed in more depth on the "),e("RouterLink",{attrs:{to:"/join/free_trial.html"}},[t._v("Free Trial")]),t._v(" page.")],1),t._v(" "),e("p",[t._v("The following code snippet shows how to log in via OIDC authentication:")]),t._v(" "),e("div",{staticClass:"language-r extra-class"},[e("pre",{pre:!0,attrs:{class:"language-r"}},[e("code",[t._v("login"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("p",[t._v("Calling this method opens your system web browser, with which you can authenticate yourself on the back-end authentication system.\nAfter that the website will give you the instructions to go back to the R client, where your connection has logged your account in.\nThis means, that every call that comes after that via the connection variable is executed by your user account.")]),t._v(" "),e("h2",{attrs:{id:"creating-a-user-defined-process"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#creating-a-user-defined-process"}},[t._v("#")]),t._v(" Creating a (user-defined) process")]),t._v(" "),e("p",[t._v("Now that we know how to discover the back-end and how to authenticate, lets continue by creating a new batch job to process some data.")]),t._v(" "),e("p",[t._v("First we need to create a process builder object that carries all the available predefined openEO processes of the connected back-end as attached R functions with the parameters stated in the process metadata.")]),t._v(" "),e("div",{staticClass:"language-r extra-class"},[e("pre",{pre:!0,attrs:{class:"language-r"}},[e("code",[t._v("p "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" processes"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("p",[t._v("The functions of the builder return process nodes, which represent a particular result in the workflow. As one of the first steps we need to select the source data collection.")]),t._v(" "),e("div",{staticClass:"language-r extra-class"},[e("pre",{pre:!0,attrs:{class:"language-r"}},[e("code",[t._v("datacube "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" p"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("$")]),t._v("load_collection"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n id "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SENTINEL1_GRD"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n spatial_extent"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("list"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("west "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("16.06")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" south "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("48.06")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" east "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("16.65")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" north "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("48.35")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n temporal_extent"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("c"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2017-03-01"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2017-04-01"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n bands"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("c"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"VV"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"VH"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("p",[t._v("This results in a process node that represents a "),e("a",{attrs:{href:"https://openeo.org/documentation/1.0/glossary.html#spatial-datacubes",target:"_blank",rel:"noopener noreferrer"}},[t._v("datacube"),e("OutboundLink")],1),t._v(' and contains the "SENTINEL1_GRD" data restricted to the given spatial extent, the given temporal extent and the given bands .')]),t._v(" "),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("Sample Data Retrieval")]),t._v(" "),e("p",[t._v("In order to get a better understanding about the processing mechanisms and the data structures used in openEO Platform, it helps to check the actual data from time to time.\nThe function "),e("a",{attrs:{href:"https://open-eo.github.io/openeo-r-client/reference/get_sample.html",target:"_blank",rel:"noopener noreferrer"}},[e("code",[t._v("get_sample")]),e("OutboundLink")],1),t._v(" aids the user in downloading data for a very small spatial extent. It is automatically loaded into R so that you can directly inspect it with "),e("code",[t._v("stars")]),t._v('.\nRead the vignette on "'),e("a",{attrs:{href:"https://open-eo.github.io/openeo-r-client/articles/openeo-02-sample_data.html",target:"_blank",rel:"noopener noreferrer"}},[t._v("Sample Data Retrieval"),e("OutboundLink")],1),t._v('" for more details.')])]),t._v(" "),e("p",[t._v("Having the input data ready, we want to apply a process on the datacube.\nTherefore, we can call the process directly on the datacube object, which then returns a datacube with the process applied.")]),t._v(" "),e("div",{staticClass:"language-r extra-class"},[e("pre",{pre:!0,attrs:{class:"language-r"}},[e("code",[t._v("min_reducer "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("context"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" \n return"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("p"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("$")]),t._v("min"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" data"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\nreduced "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" p"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("$")]),t._v("reduce_dimension"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" datacube"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" reducer "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" min_reducer"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" dimension"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("p",[t._v("The datacube is now reduced by the time dimension named "),e("code",[t._v("t")]),t._v(', by taking the minimum value of the timeseries values. Now the datacube has no time dimension left. Other so called "reducer" processes exist, e.g. for computing maximum and mean values.')]),t._v(" "),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("Note")]),t._v(" "),e("p",[t._v("Everything applied to the datacube at this point is neither executed locally on your machine nor executed on the back-end.\nIt just defines the input data and process chain the back-end needs to apply when it sends the datacube to the back-end and executes it there.\nHow this can be done is the topic of the next chapter.")])]),t._v(" "),e("p",[t._v("After applying all processes you want to execute, we need to tell the back-end to export the datacube, for example as GeoTiff:")]),t._v(" "),e("div",{staticClass:"language-r extra-class"},[e("pre",{pre:!0,attrs:{class:"language-r"}},[e("code",[t._v("formats "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" list_file_formats"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\nresult "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" p"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("$")]),t._v("save_result"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" reduced"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" format "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" formats"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("$")]),t._v("output"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("$")]),t._v("GTIFF"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("p",[t._v("The first line retrieves the back-ends offered input and output formats. The second line creates the result node, which stores the data as a zipped GeoTiff.")]),t._v(" "),e("h2",{attrs:{id:"batch-job-management"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#batch-job-management"}},[t._v("#")]),t._v(" Batch Job Management")]),t._v(" "),e("p",[t._v("After you have finished working on your (user-defined) process, we can now send it to the back-end and start the execution.\nIn openEO, an execution of a (user-defined) process is called a "),e("a",{attrs:{href:"https://openeo.org/documentation/1.0/glossary.html#data-processing-modes",target:"_blank",rel:"noopener noreferrer"}},[t._v("(batch) job"),e("OutboundLink")],1),t._v(".\nTherefore, we need to create a job at the back-end using our datacube, giving it the title "),e("code",[t._v("Example Title")]),t._v(".")]),t._v(" "),e("div",{staticClass:"language-r extra-class"},[e("pre",{pre:!0,attrs:{class:"language-r"}},[e("code",[t._v("job "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" create_job"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("graph"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("result"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" title "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Example Title"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("p",[t._v("The "),e("code",[t._v("create_job")]),t._v(" method sends all necessary information to the back-end and creates a new job, which gets returned.\nAfter this, the job is just created, but has not started the execution at the back-end yet.\nIt needs to be queued for processing explicitly:")]),t._v(" "),e("div",{staticClass:"language-r extra-class"},[e("pre",{pre:!0,attrs:{class:"language-r"}},[e("code",[t._v("start_job"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("job "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" job"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("TIP")]),t._v(" "),e("p",[t._v("It can be annoying to manage and monitor batch jobs via code.\nIf you want to use an interface for your batch jobs (or other resources) that is easier to use, you can also open the "),e("a",{attrs:{href:"https://editor.openeo.cloud",target:"_blank",rel:"noopener noreferrer"}},[t._v("openEO Platform Editor"),e("OutboundLink")],1),t._v('.\nAfter login, you\'ll be able to manage and monitor your batch jobs in a near-realtime interactive environment; Look out for the "Data Processing" tab.\nYou may shut down your device or log out during the job runs on the backend. You can retrieve the status and results later and from any client.')])]),t._v(" "),e("p",[t._v("After the job was executed, status updates can be fetched by using the "),e("code",[t._v("list_jobs()")]),t._v(" function. This function returns a list of job descriptions, which can be indexed with the jobs ID to limit the search results. But remember that only "),e("code",[t._v("list_jobs()")]),t._v(" refreshes this list. So, to monitor a job you have to iteratively call the job ("),e("code",[t._v("describe_job()")]),t._v(") or the job list "),e("code",[t._v("list_jobs()")]),t._v(".")]),t._v(" "),e("div",{staticClass:"language-r extra-class"},[e("pre",{pre:!0,attrs:{class:"language-r"}},[e("code",[t._v("jobs "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" list_jobs"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\njobs "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# printed as a tibble or data.frame, but the object is a list")]),t._v("\n\n"),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# or use the job id (in this example 'cZ2ND0Z5nhBFNQFq') as index to get a particular job overview")]),t._v("\njobs"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("$")]),t._v("cZ2ND0Z5nhBFNQFq\n\n"),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# alternatively request detailed information about the job")]),t._v("\ndescribe_job"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("job "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" job"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("p",[t._v("When the job is finished, calling "),e("code",[t._v("download_results()")]),t._v(" will download the results of a job. Using "),e("code",[t._v("list_results()")]),t._v(" will return an overview about the created files and their download link or it states the error message, in case of an error.")]),t._v(" "),e("div",{staticClass:"language-r extra-class"},[e("pre",{pre:!0,attrs:{class:"language-r"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# list the processed results")]),t._v("\nlist_results"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("job "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" job"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\n"),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# download all the files into a folder on the file system")]),t._v("\ndownload_results"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("job "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" job"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" folder "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"/some/folder/on/filesystem"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("Note")]),t._v(" "),e("p",[t._v("The printing behavior and the actual data structure might differ!")])])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/76.1d441d53.js b/assets/js/76.bea90f5f.js similarity index 99% rename from assets/js/76.1d441d53.js rename to assets/js/76.bea90f5f.js index 7c24b46d7..c2520ed69 100644 --- a/assets/js/76.1d441d53.js +++ b/assets/js/76.bea90f5f.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[76],{502:function(t,a,s){"use strict";s.r(a);var n=s(4),e=Object(n.a)({},(function(){var t=this,a=t._self._c;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"analysis-ready-data-for-sar-sentinel-1"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#analysis-ready-data-for-sar-sentinel-1"}},[t._v("#")]),t._v(" Analysis-Ready Data for SAR (Sentinel-1)")]),t._v(" "),a("p",[t._v("Executable code for this guide can be found in a "),a("a",{attrs:{href:"https://github.com/openEOPlatform/sample-notebooks/blob/main/openEO%20Platform%20-%20Radar%20ARD.ipynb",target:"_blank",rel:"noopener noreferrer"}},[t._v("dedicated notebook"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("h2",{attrs:{id:"backscatter-computation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#backscatter-computation"}},[t._v("#")]),t._v(" Backscatter computation")]),t._v(" "),a("p",[t._v("Data from synthetic aperture radar (SAR) sensors requires significant preprocessing to be calibrated and normalized for terrain.\nThis is referred to as backscatter computation, and provider in openEO Platform by")]),t._v(" "),a("ul",[a("li",[t._v("the "),a("RouterLink",{attrs:{to:"/processes/#sar_backscatter"}},[a("code",[t._v("sar_backscatter")]),t._v(" process")])],1),t._v(" "),a("li",[t._v("and its CARD4L compliant variant, the\n"),a("RouterLink",{attrs:{to:"/processes/#ard_normalized_radar_backscatter"}},[a("code",[t._v("ard_normalized_radar_backscatter")]),t._v(" process")])],1)]),t._v(" "),a("p",[t._v("To perform a backscatter computation, the user has to load an\n"),a("a",{attrs:{href:"/data-collections/?q=GRD"}},[t._v("raw SAR data")]),t._v(" with the "),a("code",[t._v("load_collection")]),t._v(" process\nand immediately apply ône of the processes to it.")]),t._v(" "),a("CodeSwitcher",{scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Load the data. You have to specify a collection ID, spatial_extent and temporal_extent")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" connection"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("load_collection"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Either apply")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("sar_backscatter"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# or ")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("ard_normalized_radar_backscatter"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("p",[t._v("For more details see the Python client documentation for the respective methods:")]),t._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/api.html#openeo.rest.datacube.DataCube.sar_backscatter",target:"_blank",rel:"noopener noreferrer"}},[a("code",[t._v("DataCube.sar_backscatter")]),a("OutboundLink")],1)]),t._v(" "),a("li",[a("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/api.html#openeo.rest.datacube.DataCube.ard_normalized_radar_backscatter",target:"_blank",rel:"noopener noreferrer"}},[a("code",[t._v("DataCube.ard_normalized_radar_backscatter")]),a("OutboundLink")],1)])])]},proxy:!0},{key:"js",fn:function(){return[a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Load the data. You have to specify a collection ID, spatial_extent and temporal_extent")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" builder "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" connection"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("buildProcess")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" datacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("load_collection")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("...")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Either apply")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("sar_backscatter")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// or ")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("ard_normalized_radar_backscatter")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]},proxy:!0}])}),t._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),a("p",[t._v("These correction algorithms are typically tightly coupled with the raw data,\nso it is important they are applied immediately after the "),a("code",[t._v("load_collection")]),t._v(" process.\nIt is recommended to avoid any other operations in between.")])]),t._v(" "),a("h2",{attrs:{id:"reference-implementations"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#reference-implementations"}},[t._v("#")]),t._v(" Reference implementations")]),t._v(" "),a("p",[t._v("This section shows a few working examples for these processes.")]),t._v(" "),a("div",{staticClass:"custom-block tip"},[a("p",{staticClass:"custom-block-title"},[t._v("Note")]),t._v(" "),a("p",[t._v("Please note that you need to connect and authenticate to openEO Platform first before you\ncan execute any of the code snippets below.\nDetails can be found in the corresponding Getting Started guides.")])]),t._v(" "),a("h3",{attrs:{id:"card4l-nrb-for-sentinel1-grd-collection-provided-by-sentinel-hub"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#card4l-nrb-for-sentinel1-grd-collection-provided-by-sentinel-hub"}},[t._v("#")]),t._v(" CARD4L NRB for "),a("code",[t._v("SENTINEL1_GRD")]),t._v(" collection (provided by Sentinel Hub)")]),t._v(" "),a("p",[t._v("When working with the Sentinel Hub based "),a("a",{attrs:{href:"/data-collections/?q=SENTINEL1_GRD"}},[a("code",[t._v("SENTINEL1_GRD")]),t._v(" collection")]),t._v(", both SAR backscatter processes can be used.\nThe underlying implementation is provided by\n"),a("a",{attrs:{href:"https://docs.sentinel-hub.com/api/latest/data/sentinel-1-grd/#processing-options",target:"_blank",rel:"noopener noreferrer"}},[t._v("Sentinel Hub"),a("OutboundLink")],1),t._v(", and offers full CARD4L compliant processing options.")]),t._v(" "),a("CodeSwitcher",{scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("datacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" connection"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("load_collection"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'SENTINEL1_GRD'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n spatial_extent "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'west'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2.59003")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'east'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2.8949")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'south'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("51.069")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'north'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("51.2206")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n temporal_extent "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'2019-10-10'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'2019-10-10'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n bands "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'VH'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'VV'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("ard_normalized_radar_backscatter"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\njob "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("execute_batch"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("format")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'GTiff'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\njob"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("get_results"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("download_files"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"sar-nrb"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" builder "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" connection"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("buildProcess")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" datacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("load_collection")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'SENTINEL1_GRD'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("west")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2.59003")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("east")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2.8949")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("south")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("51.069")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("north")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("51.2206")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'2019-10-10'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'2019-10-10'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'VH'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'VV'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("ard_normalized_radar_backscatter")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" result "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("save_result")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'GTiff'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" job "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" connection"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("createJob")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("result"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Backscatter for Sentinel-1'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]},proxy:!0}])}),t._v(" "),a("h3",{attrs:{id:"orfeo-for-other-grd-collections-provided-by-vito-terrascope"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#orfeo-for-other-grd-collections-provided-by-vito-terrascope"}},[t._v("#")]),t._v(" Orfeo for other GRD collections (provided by VITO / TerraScope)")]),t._v(" "),a("p",[t._v("When working with other GRD data, an "),a("a",{attrs:{href:"https://github.com/Open-EO/openeo-geopyspark-driver/blob/master/openeogeotrellis/collections/s1backscatter_orfeo.py",target:"_blank",rel:"noopener noreferrer"}},[t._v("implementation"),a("OutboundLink")],1),t._v(" based on "),a("a",{attrs:{href:"https://www.orfeo-toolbox.org/CookBook/Applications/app_SARCalibration.html",target:"_blank",rel:"noopener noreferrer"}},[t._v("Orfeo Toolbox"),a("OutboundLink")],1),t._v(" is used.")]),t._v(" "),a("p",[t._v("The Orfeo implementation currently only supports sigma0 computation, and is "),a("strong",[t._v("not CARD4L compliant")]),t._v(".")])],1)}),[],!1,null,null,null);a.default=e.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[76],{503:function(t,a,s){"use strict";s.r(a);var n=s(4),e=Object(n.a)({},(function(){var t=this,a=t._self._c;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"analysis-ready-data-for-sar-sentinel-1"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#analysis-ready-data-for-sar-sentinel-1"}},[t._v("#")]),t._v(" Analysis-Ready Data for SAR (Sentinel-1)")]),t._v(" "),a("p",[t._v("Executable code for this guide can be found in a "),a("a",{attrs:{href:"https://github.com/openEOPlatform/sample-notebooks/blob/main/openEO%20Platform%20-%20Radar%20ARD.ipynb",target:"_blank",rel:"noopener noreferrer"}},[t._v("dedicated notebook"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("h2",{attrs:{id:"backscatter-computation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#backscatter-computation"}},[t._v("#")]),t._v(" Backscatter computation")]),t._v(" "),a("p",[t._v("Data from synthetic aperture radar (SAR) sensors requires significant preprocessing to be calibrated and normalized for terrain.\nThis is referred to as backscatter computation, and provider in openEO Platform by")]),t._v(" "),a("ul",[a("li",[t._v("the "),a("RouterLink",{attrs:{to:"/processes/#sar_backscatter"}},[a("code",[t._v("sar_backscatter")]),t._v(" process")])],1),t._v(" "),a("li",[t._v("and its CARD4L compliant variant, the\n"),a("RouterLink",{attrs:{to:"/processes/#ard_normalized_radar_backscatter"}},[a("code",[t._v("ard_normalized_radar_backscatter")]),t._v(" process")])],1)]),t._v(" "),a("p",[t._v("To perform a backscatter computation, the user has to load an\n"),a("a",{attrs:{href:"/data-collections/?q=GRD"}},[t._v("raw SAR data")]),t._v(" with the "),a("code",[t._v("load_collection")]),t._v(" process\nand immediately apply ône of the processes to it.")]),t._v(" "),a("CodeSwitcher",{scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Load the data. You have to specify a collection ID, spatial_extent and temporal_extent")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" connection"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("load_collection"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Either apply")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("sar_backscatter"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# or ")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("ard_normalized_radar_backscatter"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("p",[t._v("For more details see the Python client documentation for the respective methods:")]),t._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/api.html#openeo.rest.datacube.DataCube.sar_backscatter",target:"_blank",rel:"noopener noreferrer"}},[a("code",[t._v("DataCube.sar_backscatter")]),a("OutboundLink")],1)]),t._v(" "),a("li",[a("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/api.html#openeo.rest.datacube.DataCube.ard_normalized_radar_backscatter",target:"_blank",rel:"noopener noreferrer"}},[a("code",[t._v("DataCube.ard_normalized_radar_backscatter")]),a("OutboundLink")],1)])])]},proxy:!0},{key:"js",fn:function(){return[a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Load the data. You have to specify a collection ID, spatial_extent and temporal_extent")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" builder "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" connection"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("buildProcess")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" datacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("load_collection")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("...")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Either apply")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("sar_backscatter")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// or ")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("ard_normalized_radar_backscatter")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]},proxy:!0}])}),t._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),a("p",[t._v("These correction algorithms are typically tightly coupled with the raw data,\nso it is important they are applied immediately after the "),a("code",[t._v("load_collection")]),t._v(" process.\nIt is recommended to avoid any other operations in between.")])]),t._v(" "),a("h2",{attrs:{id:"reference-implementations"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#reference-implementations"}},[t._v("#")]),t._v(" Reference implementations")]),t._v(" "),a("p",[t._v("This section shows a few working examples for these processes.")]),t._v(" "),a("div",{staticClass:"custom-block tip"},[a("p",{staticClass:"custom-block-title"},[t._v("Note")]),t._v(" "),a("p",[t._v("Please note that you need to connect and authenticate to openEO Platform first before you\ncan execute any of the code snippets below.\nDetails can be found in the corresponding Getting Started guides.")])]),t._v(" "),a("h3",{attrs:{id:"card4l-nrb-for-sentinel1-grd-collection-provided-by-sentinel-hub"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#card4l-nrb-for-sentinel1-grd-collection-provided-by-sentinel-hub"}},[t._v("#")]),t._v(" CARD4L NRB for "),a("code",[t._v("SENTINEL1_GRD")]),t._v(" collection (provided by Sentinel Hub)")]),t._v(" "),a("p",[t._v("When working with the Sentinel Hub based "),a("a",{attrs:{href:"/data-collections/?q=SENTINEL1_GRD"}},[a("code",[t._v("SENTINEL1_GRD")]),t._v(" collection")]),t._v(", both SAR backscatter processes can be used.\nThe underlying implementation is provided by\n"),a("a",{attrs:{href:"https://docs.sentinel-hub.com/api/latest/data/sentinel-1-grd/#processing-options",target:"_blank",rel:"noopener noreferrer"}},[t._v("Sentinel Hub"),a("OutboundLink")],1),t._v(", and offers full CARD4L compliant processing options.")]),t._v(" "),a("CodeSwitcher",{scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("datacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" connection"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("load_collection"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'SENTINEL1_GRD'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n spatial_extent "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'west'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2.59003")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'east'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2.8949")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'south'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("51.069")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'north'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("51.2206")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n temporal_extent "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'2019-10-10'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'2019-10-10'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n bands "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'VH'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'VV'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("ard_normalized_radar_backscatter"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\njob "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("execute_batch"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("format")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'GTiff'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\njob"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("get_results"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("download_files"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"sar-nrb"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" builder "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" connection"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("buildProcess")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" datacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("load_collection")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'SENTINEL1_GRD'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("west")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2.59003")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("east")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2.8949")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("south")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("51.069")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("north")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("51.2206")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'2019-10-10'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'2019-10-10'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'VH'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'VV'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\ndatacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("ard_normalized_radar_backscatter")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" result "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("save_result")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'GTiff'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" job "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" connection"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("createJob")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("result"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Backscatter for Sentinel-1'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]},proxy:!0}])}),t._v(" "),a("h3",{attrs:{id:"orfeo-for-other-grd-collections-provided-by-vito-terrascope"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#orfeo-for-other-grd-collections-provided-by-vito-terrascope"}},[t._v("#")]),t._v(" Orfeo for other GRD collections (provided by VITO / TerraScope)")]),t._v(" "),a("p",[t._v("When working with other GRD data, an "),a("a",{attrs:{href:"https://github.com/Open-EO/openeo-geopyspark-driver/blob/master/openeogeotrellis/collections/s1backscatter_orfeo.py",target:"_blank",rel:"noopener noreferrer"}},[t._v("implementation"),a("OutboundLink")],1),t._v(" based on "),a("a",{attrs:{href:"https://www.orfeo-toolbox.org/CookBook/Applications/app_SARCalibration.html",target:"_blank",rel:"noopener noreferrer"}},[t._v("Orfeo Toolbox"),a("OutboundLink")],1),t._v(" is used.")]),t._v(" "),a("p",[t._v("The Orfeo implementation currently only supports sigma0 computation, and is "),a("strong",[t._v("not CARD4L compliant")]),t._v(".")])],1)}),[],!1,null,null,null);a.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/77.d600039d.js b/assets/js/77.300f3e16.js similarity index 99% rename from assets/js/77.d600039d.js rename to assets/js/77.300f3e16.js index 593566eac..f4eaefe1b 100644 --- a/assets/js/77.d600039d.js +++ b/assets/js/77.300f3e16.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[77],{503:function(t,a,s){"use strict";s.r(a);var n=s(4),e=Object(n.a)({},(function(){var t=this,a=t._self._c;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"crop-classification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#crop-classification"}},[t._v("#")]),t._v(" Crop Classification")]),t._v(" "),a("p",[t._v("The goal of this section is to show how openEO functionality can be integrated into a basic feature engineering pipeline. We will do this using crop classification as an example.")]),t._v(" "),a("p",[t._v("The constantly increasing demand of food has resulted in a highly intensified agricultural production. This intensification on the one hand requires more planning and management, and on the other, threatens ecosystem services that need to be monitored by scientists and decision makers who rely on detailed spatial information of crop cover in agricultural areas.")]),t._v(" "),a("p",[t._v("Crop classification on a large scale is a challenging task, but with the recent advances in satellite sensor technology and the push of a.o. the ESA for higher resolution open satellite data with a frequent revisit time this task has become possible.")]),t._v(" "),a("p",[t._v("There are various approaches to crop classification. One can use basic rule-based classification, or use more sophisticated methods such as one of various machine learning models. In this example, we will show both of these approaches.")]),t._v(" "),a("p",[t._v("Generally, any classification task will contain the following steps:")]),t._v(" "),a("ul",[a("li",[t._v("(1) Preprocessing & feature engineering")]),t._v(" "),a("li",[t._v("(2) Training")]),t._v(" "),a("li",[t._v("(3) Classification & model evaluation")])]),t._v(" "),a("p",[t._v("We will have a more detailed look at all three of these steps, and provide code examples along the way.")]),t._v(" "),a("p",[t._v("To see a fully working example, you can check out "),a("a",{attrs:{href:"https://github.com/openEOPlatform/SRR2_notebooks/blob/main/UC3%20-%20Crop%20type%20feature%20engineering%20(rule-based).ipynb",target:"_blank",rel:"noopener noreferrer"}},[t._v("this Python notebook on rule-based classification"),a("OutboundLink")],1),t._v(" or "),a("a",{attrs:{href:"https://github.com/openEOPlatform/SRR2_notebooks/blob/main/UC3%20-%20Crop%20type%20feature%20engineering%20using%20random%20forest.ipynb",target:"_blank",rel:"noopener noreferrer"}},[t._v("this Python notebook on classification using Random Forest"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("p",[a("img",{attrs:{src:"https://user-images.githubusercontent.com/10434651/138343588-951f9b24-e039-4598-bd31-2d771ce5a615.png",alt:"cropcover_closeup"}})]),t._v(" "),a("h2",{attrs:{id:"preprocessing-feature-engineering"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#preprocessing-feature-engineering"}},[t._v("#")]),t._v(" Preprocessing & feature engineering")]),t._v(" "),a("p",[t._v("Feature engineering refers to extracting a number of discriminative features from a single pixel timeseries or even a time series of EO data tiles. These features can in turn be used for any type of classification, ranging from an expert rule-based decision approach to regular machine learning techniques such as random forest or deep learning techniques based on neural networks.")]),t._v(" "),a("p",[t._v("Concrete examples of such features include basic statistics such as the percentiles or standard deviation of a vegetation index or the mean band value for given month, but can also be more complex such as derivatives of phenology or texture.")]),t._v(" "),a("p",[t._v("In general, data scientists like to explore the usefulness of a given feature set for a use case, or may even define new features. In some cases, the openEO processes will allow computing them, and in others, a 'user defined function' may be used to compute features that are not directly supported in openEO.")]),t._v(" "),a("h3",{attrs:{id:"data-preparation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#data-preparation"}},[t._v("#")]),t._v(" Data preparation")]),t._v(" "),a("p",[t._v('To correctly compute and use statistics over a timeseries, we need gap-free composites at fixed timesteps. The goal of temporal aggregation is to create these gap-free composites at equidistant temporal intervals. This is especially true in the case of optical data, which is often cloudmasked before this step, introducing a lot of gaps ("no-data" values).')]),t._v(" "),a("p",[t._v("Example:")]),t._v(" "),a("CodeSwitcher",{scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Create monthly composite")]),t._v("\ncomposite "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" sentinel2_cube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("aggregate_temporal_period"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n period "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"month"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n reducer "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"mean"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Fill gaps with linear interpolation")]),t._v("\ninterpolated "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" composite"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("apply_dimension"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n dimension "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n process "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"array_interpolate_linear"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Create monthly composite")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("mean")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("data")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("mean")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" composite "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("aggregate_temporal_period")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("sentinel2_cube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"month"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" mean"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Fill gaps with linear interpolation")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" interpolated "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply_dimension")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("composite"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"array_interpolate_linear"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]},proxy:!0}])}),t._v(" "),a("h3",{attrs:{id:"computing-temporal-features"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#computing-temporal-features"}},[t._v("#")]),t._v(" Computing temporal features")]),t._v(" "),a("p",[t._v("For this use case, we will fully reduce the temporal dimension per band by calculating a number of stastics. These stastics are three quantiles, the mean and the standard deviation for each band. After computing the actual features, we have to make sure to rename the bands to reflect what has been calculated.")]),t._v(" "),a("p",[t._v("The effect of setting "),a("code",[t._v("target_dimension")]),t._v(" to "),a("code",[t._v("bands")]),t._v(" is that the 'time' dimension is removed, and replaced by the 'bands' dimension. We will use this same procedure to do band math on temporal features in the chapter "),a("a",{attrs:{href:"#rule-based-classification"}},[t._v('"Rule-based classification"')]),t._v(".")]),t._v(" "),a("CodeSwitcher",{scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" openeo"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("processes "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" ProcessBuilder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" array_concat\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("def")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("compute_features")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("input_timeseries"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" ProcessBuilder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" array_concat"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n input_timeseries"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("quantiles"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("probabilities"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.5")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.9")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("input_timeseries"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("mean"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" input_timeseries"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("sd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\nfeatures "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" interpolated"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("apply_dimension"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n dimension"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'t'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n process"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("compute_features"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n target_dimension"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'bands'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\nnew_band_names "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n band "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"_"')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" stat\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" band "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" interpolated"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("metadata"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("band_names\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" stat "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"p10"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"p50"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"p90"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"mean"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"sd"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\nfeatures "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" features"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("rename_labels"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'bands'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" new_band_names"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Create monthly composite")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("computeFeatures")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("data")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("array_concat")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("quantiles")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.5")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.9")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("mean")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("sd")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" features "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply_dimension")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("interpolated"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" computeFeatures"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'t'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'bands'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" collectionBands "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'B1'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'B2'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("...")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Fill this with the bands you've available in the data cube")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" stats "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"p10"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"p50"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"p90"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"mean"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"sd"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" newBandNames "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" band "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("of")]),t._v(" collectionBands"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" stat "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("of")]),t._v(" stats"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n newBandNames"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("push")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("band "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"_"')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" stat"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\nfeatures "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" features"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("rename_labels")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("features"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'bands'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" newBandNames"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]},proxy:!0}])}),t._v(" "),a("p",[t._v("Now, a complete datacube with features is available for further usage.")]),t._v(" "),a("h2",{attrs:{id:"model-training"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#model-training"}},[t._v("#")]),t._v(" Model training")]),t._v(" "),a("p",[t._v("Crop classification is generally tackled using a form of supervised learning, which requires a set of features with their respective labels. These labels often come in the form of labeled field polygons, however these polygons do not contain any of the features that your model might require. They need to be extracted from the DataCube that you created in the previous section.")]),t._v(" "),a("p",[t._v("In OpenEO, we can perform feature point/polygon extraction using the parameter "),a("code",[t._v("sample_by_feature=True")]),t._v(".")]),t._v(" "),a("CodeSwitcher",{scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("job "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" features"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("filter_spatial"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("barley_points"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("execute_batch"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n title"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Point feature extraction"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n description"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Feature extraction for p10,p50,p90,sd and tsteps"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n out_format"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"netCDF"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n sample_by_feature"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("True")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n job_options"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("job_options"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nresults "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" job"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("get_results"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nresults"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("download_files"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"./data/barley_features"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("p",[a("em",[t._v("No JavaScript code available yet.")])])]},proxy:!0}])}),t._v(" "),a("p",[t._v("This will write the features of DataCube "),a("em",[t._v("features")]),t._v(" of every point in "),a("em",[t._v("barley_points")]),t._v(" to a separate netCDF file. Next we can read in all of these features with their respective label in a pandas dataframe, which can subsequently used for training. Training a model happens outside of openEO and will therefore not be explained in detail here,\nbut you can have a look at the random forest notebook if that is something you need help with.")]),t._v(" "),a("h2",{attrs:{id:"classification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#classification"}},[t._v("#")]),t._v(" Classification")]),t._v(" "),a("h3",{attrs:{id:"rule-based-classification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#rule-based-classification"}},[t._v("#")]),t._v(" Rule-based classification")]),t._v(" "),a("p",[t._v("A simple approach is to define rules based on your features to classify crops. For example, when looking at temporal profiles of corn, we can see that the NDVI of may is smaller than the NDVI of june. By creating and iteratively refining rules for each of these crop types, we can get a first classification result.")]),t._v(" "),a("p",[t._v("However, to do this, we need to be able to do band math on the temporal dimension. Remember "),a("code",[t._v('target_dimension="bands"')]),t._v(" that we used before to calculate the statistics over the temporal dimension? We can use this again to stack the temporal dimension onto the band dimension.")]),t._v(" "),a("CodeSwitcher",{scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("all_bands "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" features"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("apply_dimension"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("dimension"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'t'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" target_dimension"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'bands'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" process"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("lambda")]),t._v(" x"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" x"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nbandnames "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("band "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"_"')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" stat "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" band "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" all_bands"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("metadata"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("band_names "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" stat "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"jan"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"feb"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"mar"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"apr"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"may"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"jun"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"jul"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"aug"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"sep"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"oct"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"nov"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"dec"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\nall_bands "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" all_bands"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("rename_labels"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'bands'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" target"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("bandnames"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" \n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("p",[a("em",[t._v("No JavaScript code available yet.")])])]},proxy:!0}])}),t._v(" "),a("p",[t._v("Next, we can do boolean comparison of features and see whether any given pixel matches the rules you determined.")]),t._v(" "),a("CodeSwitcher",{scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("ndvi_may "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" all_bands"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("band"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"NDVI_may"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nndvi_jun "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" all_bands"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("band"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"NDVI_jun"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nndvi_jul "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" all_bands"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("band"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"NDVI_jul"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nndvi_aug "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" all_bands"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("band"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"NDVI_aug"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\ncorn "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("ndvi_may "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v(" ndvi_jun"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nbarley "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("ndvi_apr "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v(" ndvi_may"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("ndvi_jun "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" ndvi_jul"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("==")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("p",[a("em",[t._v("No JavaScript code available yet.")])])]},proxy:!0}])}),t._v(" "),a("p",[t._v("Each of these rules results in a boolean that can be combined using geometric progression, to obtain a final cube containing all crop type predictions.")]),t._v(" "),a("h3",{attrs:{id:"supervised-classification-using-random-forest"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#supervised-classification-using-random-forest"}},[t._v("#")]),t._v(" Supervised classification using Random Forest")]),t._v(" "),a("p",[t._v("A more sophisticated approach is to use a machine learning model such as Random Forest. As mentioned before, training is done after feature extraction outside of openEO, and you can then pickle your model and store it on a repository.\nNext, you define a UDF that unpickles your model, predicts, and returns a new DataCube instance that contains the predicted values instead of the features.")]),t._v(" "),a("CodeSwitcher",{scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("udf_rf "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token triple-quoted-string string"}},[t._v('"""\nfrom openeo_udf.api.datacube import DataCube\nimport pickle\nimport urllib.request\nimport xarray\nfrom openeo.udf.xarraydatacube import XarrayDataCube\n\ndef apply_datacube(cube: XarrayDataCube, context: dict) -> XarrayDataCube:\n array = cube.get_array()\n stacked_array = array.stack(pixel=("x","y"))\n stacked_array = stacked_array.transpose()\n clf = pickle.load(urllib.request.urlopen("https://artifactory.vgt.vito.be:443/auxdata-public/openeo/rf_model.pkl"))\n pred_array = clf.predict(stacked_array)\n return DataCube(xarray.DataArray(pred_array.reshape(1,*array.shape[1:]), dims=["bands","y","x"]))\n"""')]),t._v("\n\nclf_results "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" features"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("apply_dimension"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("code"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("udf_rf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" runtime"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Python"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" dimension"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"bands"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("rename_labels"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"bands"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"pixel"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("p",[a("em",[t._v("No JavaScript code available yet.")])])]},proxy:!0}])}),t._v(" "),a("p",[t._v("Note that if your labels are strings, you will have to map them to integers.\nYou can then download the classification results and plot it. Congratulations!")]),t._v(" "),a("p",[t._v("To see a fully working example, you can check out "),a("a",{attrs:{href:"https://github.com/openEOPlatform/SRR2_notebooks/blob/main/UC3%20-%20Crop%20type%20feature%20engineering%20(rule-based).ipynb",target:"_blank",rel:"noopener noreferrer"}},[t._v("this Python notebook on rule-based classification"),a("OutboundLink")],1),t._v(" or "),a("a",{attrs:{href:"https://github.com/openEOPlatform/SRR2_notebooks/blob/main/UC3%20-%20Crop%20type%20feature%20engineering%20using%20random%20forest.ipynb",target:"_blank",rel:"noopener noreferrer"}},[t._v("this Python notebook on classification using Random Forest"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("p",[t._v("We ran the code in that notebook for ~120 MGRS tiles to end up with a crop cover map for 5 countries in Europe, which looks like this:")]),t._v(" "),a("p",[a("img",{attrs:{src:"https://user-images.githubusercontent.com/10434651/138342824-32d38fbe-7931-497c-8da3-47bbab7a3870.png",alt:"cropcover_5_countries"}})])],1)}),[],!1,null,null,null);a.default=e.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[77],{502:function(t,a,s){"use strict";s.r(a);var n=s(4),e=Object(n.a)({},(function(){var t=this,a=t._self._c;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"crop-classification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#crop-classification"}},[t._v("#")]),t._v(" Crop Classification")]),t._v(" "),a("p",[t._v("The goal of this section is to show how openEO functionality can be integrated into a basic feature engineering pipeline. We will do this using crop classification as an example.")]),t._v(" "),a("p",[t._v("The constantly increasing demand of food has resulted in a highly intensified agricultural production. This intensification on the one hand requires more planning and management, and on the other, threatens ecosystem services that need to be monitored by scientists and decision makers who rely on detailed spatial information of crop cover in agricultural areas.")]),t._v(" "),a("p",[t._v("Crop classification on a large scale is a challenging task, but with the recent advances in satellite sensor technology and the push of a.o. the ESA for higher resolution open satellite data with a frequent revisit time this task has become possible.")]),t._v(" "),a("p",[t._v("There are various approaches to crop classification. One can use basic rule-based classification, or use more sophisticated methods such as one of various machine learning models. In this example, we will show both of these approaches.")]),t._v(" "),a("p",[t._v("Generally, any classification task will contain the following steps:")]),t._v(" "),a("ul",[a("li",[t._v("(1) Preprocessing & feature engineering")]),t._v(" "),a("li",[t._v("(2) Training")]),t._v(" "),a("li",[t._v("(3) Classification & model evaluation")])]),t._v(" "),a("p",[t._v("We will have a more detailed look at all three of these steps, and provide code examples along the way.")]),t._v(" "),a("p",[t._v("To see a fully working example, you can check out "),a("a",{attrs:{href:"https://github.com/openEOPlatform/SRR2_notebooks/blob/main/UC3%20-%20Crop%20type%20feature%20engineering%20(rule-based).ipynb",target:"_blank",rel:"noopener noreferrer"}},[t._v("this Python notebook on rule-based classification"),a("OutboundLink")],1),t._v(" or "),a("a",{attrs:{href:"https://github.com/openEOPlatform/SRR2_notebooks/blob/main/UC3%20-%20Crop%20type%20feature%20engineering%20using%20random%20forest.ipynb",target:"_blank",rel:"noopener noreferrer"}},[t._v("this Python notebook on classification using Random Forest"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("p",[a("img",{attrs:{src:"https://user-images.githubusercontent.com/10434651/138343588-951f9b24-e039-4598-bd31-2d771ce5a615.png",alt:"cropcover_closeup"}})]),t._v(" "),a("h2",{attrs:{id:"preprocessing-feature-engineering"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#preprocessing-feature-engineering"}},[t._v("#")]),t._v(" Preprocessing & feature engineering")]),t._v(" "),a("p",[t._v("Feature engineering refers to extracting a number of discriminative features from a single pixel timeseries or even a time series of EO data tiles. These features can in turn be used for any type of classification, ranging from an expert rule-based decision approach to regular machine learning techniques such as random forest or deep learning techniques based on neural networks.")]),t._v(" "),a("p",[t._v("Concrete examples of such features include basic statistics such as the percentiles or standard deviation of a vegetation index or the mean band value for given month, but can also be more complex such as derivatives of phenology or texture.")]),t._v(" "),a("p",[t._v("In general, data scientists like to explore the usefulness of a given feature set for a use case, or may even define new features. In some cases, the openEO processes will allow computing them, and in others, a 'user defined function' may be used to compute features that are not directly supported in openEO.")]),t._v(" "),a("h3",{attrs:{id:"data-preparation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#data-preparation"}},[t._v("#")]),t._v(" Data preparation")]),t._v(" "),a("p",[t._v('To correctly compute and use statistics over a timeseries, we need gap-free composites at fixed timesteps. The goal of temporal aggregation is to create these gap-free composites at equidistant temporal intervals. This is especially true in the case of optical data, which is often cloudmasked before this step, introducing a lot of gaps ("no-data" values).')]),t._v(" "),a("p",[t._v("Example:")]),t._v(" "),a("CodeSwitcher",{scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Create monthly composite")]),t._v("\ncomposite "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" sentinel2_cube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("aggregate_temporal_period"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n period "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"month"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n reducer "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"mean"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Fill gaps with linear interpolation")]),t._v("\ninterpolated "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" composite"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("apply_dimension"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n dimension "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n process "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"array_interpolate_linear"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Create monthly composite")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("mean")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("data")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("mean")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" composite "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("aggregate_temporal_period")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("sentinel2_cube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"month"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" mean"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Fill gaps with linear interpolation")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" interpolated "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply_dimension")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("composite"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"array_interpolate_linear"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]},proxy:!0}])}),t._v(" "),a("h3",{attrs:{id:"computing-temporal-features"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#computing-temporal-features"}},[t._v("#")]),t._v(" Computing temporal features")]),t._v(" "),a("p",[t._v("For this use case, we will fully reduce the temporal dimension per band by calculating a number of stastics. These stastics are three quantiles, the mean and the standard deviation for each band. After computing the actual features, we have to make sure to rename the bands to reflect what has been calculated.")]),t._v(" "),a("p",[t._v("The effect of setting "),a("code",[t._v("target_dimension")]),t._v(" to "),a("code",[t._v("bands")]),t._v(" is that the 'time' dimension is removed, and replaced by the 'bands' dimension. We will use this same procedure to do band math on temporal features in the chapter "),a("a",{attrs:{href:"#rule-based-classification"}},[t._v('"Rule-based classification"')]),t._v(".")]),t._v(" "),a("CodeSwitcher",{scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" openeo"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("processes "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" ProcessBuilder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" array_concat\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("def")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("compute_features")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("input_timeseries"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" ProcessBuilder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" array_concat"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n input_timeseries"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("quantiles"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("probabilities"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.5")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.9")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("input_timeseries"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("mean"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" input_timeseries"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("sd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\nfeatures "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" interpolated"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("apply_dimension"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n dimension"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'t'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n process"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("compute_features"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n target_dimension"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'bands'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\nnew_band_names "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n band "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"_"')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" stat\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" band "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" interpolated"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("metadata"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("band_names\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" stat "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"p10"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"p50"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"p90"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"mean"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"sd"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\nfeatures "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" features"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("rename_labels"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'bands'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" new_band_names"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Create monthly composite")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("computeFeatures")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("data")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("array_concat")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("quantiles")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.5")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.9")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("mean")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("sd")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" features "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply_dimension")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("interpolated"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" computeFeatures"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'t'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'bands'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" collectionBands "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'B1'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'B2'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("...")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Fill this with the bands you've available in the data cube")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" stats "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"p10"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"p50"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"p90"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"mean"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"sd"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" newBandNames "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" band "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("of")]),t._v(" collectionBands"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" stat "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("of")]),t._v(" stats"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n newBandNames"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("push")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("band "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"_"')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" stat"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\nfeatures "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" features"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("rename_labels")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("features"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'bands'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" newBandNames"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]},proxy:!0}])}),t._v(" "),a("p",[t._v("Now, a complete datacube with features is available for further usage.")]),t._v(" "),a("h2",{attrs:{id:"model-training"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#model-training"}},[t._v("#")]),t._v(" Model training")]),t._v(" "),a("p",[t._v("Crop classification is generally tackled using a form of supervised learning, which requires a set of features with their respective labels. These labels often come in the form of labeled field polygons, however these polygons do not contain any of the features that your model might require. They need to be extracted from the DataCube that you created in the previous section.")]),t._v(" "),a("p",[t._v("In OpenEO, we can perform feature point/polygon extraction using the parameter "),a("code",[t._v("sample_by_feature=True")]),t._v(".")]),t._v(" "),a("CodeSwitcher",{scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("job "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" features"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("filter_spatial"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("barley_points"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("execute_batch"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n title"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Point feature extraction"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n description"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Feature extraction for p10,p50,p90,sd and tsteps"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n out_format"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"netCDF"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n sample_by_feature"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("True")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n job_options"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("job_options"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nresults "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" job"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("get_results"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nresults"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("download_files"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"./data/barley_features"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("p",[a("em",[t._v("No JavaScript code available yet.")])])]},proxy:!0}])}),t._v(" "),a("p",[t._v("This will write the features of DataCube "),a("em",[t._v("features")]),t._v(" of every point in "),a("em",[t._v("barley_points")]),t._v(" to a separate netCDF file. Next we can read in all of these features with their respective label in a pandas dataframe, which can subsequently used for training. Training a model happens outside of openEO and will therefore not be explained in detail here,\nbut you can have a look at the random forest notebook if that is something you need help with.")]),t._v(" "),a("h2",{attrs:{id:"classification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#classification"}},[t._v("#")]),t._v(" Classification")]),t._v(" "),a("h3",{attrs:{id:"rule-based-classification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#rule-based-classification"}},[t._v("#")]),t._v(" Rule-based classification")]),t._v(" "),a("p",[t._v("A simple approach is to define rules based on your features to classify crops. For example, when looking at temporal profiles of corn, we can see that the NDVI of may is smaller than the NDVI of june. By creating and iteratively refining rules for each of these crop types, we can get a first classification result.")]),t._v(" "),a("p",[t._v("However, to do this, we need to be able to do band math on the temporal dimension. Remember "),a("code",[t._v('target_dimension="bands"')]),t._v(" that we used before to calculate the statistics over the temporal dimension? We can use this again to stack the temporal dimension onto the band dimension.")]),t._v(" "),a("CodeSwitcher",{scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("all_bands "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" features"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("apply_dimension"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("dimension"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'t'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" target_dimension"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'bands'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" process"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("lambda")]),t._v(" x"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" x"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nbandnames "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("band "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"_"')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" stat "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" band "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" all_bands"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("metadata"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("band_names "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" stat "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"jan"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"feb"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"mar"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"apr"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"may"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"jun"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"jul"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"aug"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"sep"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"oct"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"nov"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"dec"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\nall_bands "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" all_bands"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("rename_labels"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'bands'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" target"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("bandnames"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" \n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("p",[a("em",[t._v("No JavaScript code available yet.")])])]},proxy:!0}])}),t._v(" "),a("p",[t._v("Next, we can do boolean comparison of features and see whether any given pixel matches the rules you determined.")]),t._v(" "),a("CodeSwitcher",{scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("ndvi_may "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" all_bands"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("band"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"NDVI_may"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nndvi_jun "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" all_bands"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("band"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"NDVI_jun"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nndvi_jul "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" all_bands"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("band"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"NDVI_jul"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nndvi_aug "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" all_bands"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("band"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"NDVI_aug"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\ncorn "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("ndvi_may "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v(" ndvi_jun"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nbarley "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("ndvi_apr "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v(" ndvi_may"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("ndvi_jun "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" ndvi_jul"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("==")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("p",[a("em",[t._v("No JavaScript code available yet.")])])]},proxy:!0}])}),t._v(" "),a("p",[t._v("Each of these rules results in a boolean that can be combined using geometric progression, to obtain a final cube containing all crop type predictions.")]),t._v(" "),a("h3",{attrs:{id:"supervised-classification-using-random-forest"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#supervised-classification-using-random-forest"}},[t._v("#")]),t._v(" Supervised classification using Random Forest")]),t._v(" "),a("p",[t._v("A more sophisticated approach is to use a machine learning model such as Random Forest. As mentioned before, training is done after feature extraction outside of openEO, and you can then pickle your model and store it on a repository.\nNext, you define a UDF that unpickles your model, predicts, and returns a new DataCube instance that contains the predicted values instead of the features.")]),t._v(" "),a("CodeSwitcher",{scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("udf_rf "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token triple-quoted-string string"}},[t._v('"""\nfrom openeo_udf.api.datacube import DataCube\nimport pickle\nimport urllib.request\nimport xarray\nfrom openeo.udf.xarraydatacube import XarrayDataCube\n\ndef apply_datacube(cube: XarrayDataCube, context: dict) -> XarrayDataCube:\n array = cube.get_array()\n stacked_array = array.stack(pixel=("x","y"))\n stacked_array = stacked_array.transpose()\n clf = pickle.load(urllib.request.urlopen("https://artifactory.vgt.vito.be:443/auxdata-public/openeo/rf_model.pkl"))\n pred_array = clf.predict(stacked_array)\n return DataCube(xarray.DataArray(pred_array.reshape(1,*array.shape[1:]), dims=["bands","y","x"]))\n"""')]),t._v("\n\nclf_results "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" features"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("apply_dimension"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("code"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("udf_rf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" runtime"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Python"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" dimension"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"bands"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("rename_labels"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"bands"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"pixel"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("p",[a("em",[t._v("No JavaScript code available yet.")])])]},proxy:!0}])}),t._v(" "),a("p",[t._v("Note that if your labels are strings, you will have to map them to integers.\nYou can then download the classification results and plot it. Congratulations!")]),t._v(" "),a("p",[t._v("To see a fully working example, you can check out "),a("a",{attrs:{href:"https://github.com/openEOPlatform/SRR2_notebooks/blob/main/UC3%20-%20Crop%20type%20feature%20engineering%20(rule-based).ipynb",target:"_blank",rel:"noopener noreferrer"}},[t._v("this Python notebook on rule-based classification"),a("OutboundLink")],1),t._v(" or "),a("a",{attrs:{href:"https://github.com/openEOPlatform/SRR2_notebooks/blob/main/UC3%20-%20Crop%20type%20feature%20engineering%20using%20random%20forest.ipynb",target:"_blank",rel:"noopener noreferrer"}},[t._v("this Python notebook on classification using Random Forest"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("p",[t._v("We ran the code in that notebook for ~120 MGRS tiles to end up with a crop cover map for 5 countries in Europe, which looks like this:")]),t._v(" "),a("p",[a("img",{attrs:{src:"https://user-images.githubusercontent.com/10434651/138342824-32d38fbe-7931-497c-8da3-47bbab7a3870.png",alt:"cropcover_5_countries"}})])],1)}),[],!1,null,null,null);a.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/80.29521e69.js b/assets/js/80.01701e9e.js similarity index 99% rename from assets/js/80.29521e69.js rename to assets/js/80.01701e9e.js index f612ddb07..962e2ff01 100644 --- a/assets/js/80.29521e69.js +++ b/assets/js/80.01701e9e.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[80],{506:function(e,t,a){"use strict";a.r(t);var r=a(4),o=Object(r.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"large-scale-processing"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#large-scale-processing"}},[e._v("#")]),e._v(" Large scale processing")]),e._v(" "),t("p",[e._v("Processing of larger areas up to global scale is one of the more challenging tasks in earth observation,\nbut certainly one that this platform wants to address. This page describes some best practices based on the example\nof "),t("a",{attrs:{href:"https://github.com/openEOPlatform/openeo-classification",target:"_blank",rel:"noopener noreferrer"}},[e._v("processing a croptype map for all 27 countries in the European Union"),t("OutboundLink")],1),e._v(". We do encourage you to get in touch with backend providers about your\nspecific case, as not every workflow is the same, and some advance planning may be needed to ensure that you get sufficient\nprocessing resources.")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://raw.githubusercontent.com/openEOPlatform/openeo-classification/60aa7a869f9000b1795afe2c9dde0d7977bcdbc6/docs/full_europe.png",alt:"Crop type map for EU27"}}),e._v(" "),t("figcaption",[e._v("EU27 croptype map, processed on openEO platform")])]),e._v(" "),t("p",[e._v("The approach desribed here is based on local files to track the production. This is a low-cost approach that does not require\nspecial IT knowledge, but comes with some risks such as loosing your local files. A more robust approach for production-grade projects\nwould typically rely on some sort of database or STAC catalog service to monitor processing. Such a setup is however quite similar in many aspects.")]),e._v(" "),t("p",[e._v("The basic strategy for processing large areas is to split it up into smaller areas, usually according to a regular tile grid.\nSplitting reduces the size of the area that needs to be processed by one batch job, and avoids running into all kinds of limitations.\nFor instance, when processing in a specific projection, you anyway have to stay within the bounds of that projection. Also the output\nfile size of a job often becomes impractical when working over huge areas. Or you will hit bottlenecks in the backend implementation that\ndo not occur for normally sized jobs. Also, when a smaller job fails or requires reprocessing, the cost will be smaller.")]),e._v(" "),t("h2",{attrs:{id:"relevant-openeo-features"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#relevant-openeo-features"}},[e._v("#")]),e._v(" Relevant openEO features")]),e._v(" "),t("p",[e._v("We want to highlight a few key elements that made us choose openEO for large scale processing:")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://openeo.org/documentation/1.0/developers/backends/performance.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("Performance & scalability"),t("OutboundLink")],1)]),e._v(" "),t("li",[e._v("STAC metadata is generated for you, making your output dissemination ready without becoming a metadata expert yourself.")]),e._v(" "),t("li",[e._v("Where relevant FAIR principles are taken into account automatically, such as providing provenance information.")]),e._v(" "),t("li",[e._v("Cloud optimized file formats are generated by default.")]),e._v(" "),t("li",[e._v("Processing can be distributed over multiple backends.")])]),e._v(" "),t("h2",{attrs:{id:"preparation"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#preparation"}},[e._v("#")]),e._v(" Preparation")]),e._v(" "),t("p",[e._v("The idea is that we first create and persist the list of tiles to produce, with all attributes required to produce that\nspecific tile. This gives us a very good visual overview of the processing that will be performed.")]),e._v(" "),t("p",[e._v("Having job parameters in a file is also useful for debugging afterwards. Determining parameters at runtime means you don't\nhave absolute certainty over the value of a specific argument, as there may be bugs in your code.")]),e._v(" "),t("h2",{attrs:{id:"prepare-tiling-grid"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#prepare-tiling-grid"}},[e._v("#")]),e._v(" Prepare tiling grid")]),e._v(" "),t("p",[e._v("The choice of tiling grid depends on your preferred projection system, which depends on your area of interest.\nFor Europe, the EPSG:3035 projection can be used, while for global processing you may want to work with different projections according\nto UTM zones.")]),e._v(" "),t("p",[e._v("The size of tiles in your grid is also important, and often ranges from 20km to 100km. For relatively light workflows, a 100km grid can work well,\nwhile for more demanding cases, a 20km grid is better. In our example, we choose to work with 20km tiles because the workflow was quite demanding. A smaller\ntile size can also result in less unneeded processing when your target area has an irregular shape, like most countries and continents.")]),e._v(" "),t("p",[e._v("A couple of basic grids can be found here:\n"),t("a",{attrs:{href:"https://artifactory.vgt.vito.be/webapp/#/artifacts/browse/tree/General/auxdata-public/grids",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://artifactory.vgt.vito.be/webapp/#/artifacts/browse/tree/General/auxdata-public/grids"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("The images below illustrate the overlap in the UTM grids versus a regular LAEA grid.")]),e._v(" "),t("table",[t("thead",[t("tr",[t("th",{staticStyle:{"text-align":"center"}},[e._v("UTM 100km")]),e._v(" "),t("th",{staticStyle:{"text-align":"center"}},[e._v("LAEA 100km")])])]),e._v(" "),t("tbody",[t("tr",[t("td",{staticStyle:{"text-align":"center"}},[t("img",{attrs:{src:"https://user-images.githubusercontent.com/5937096/231963581-1c51a512-c240-4d23-b557-30a3577c9027.png",width:"400",height:"300"}})]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("img",{attrs:{src:"https://user-images.githubusercontent.com/5937096/231963750-562b921c-7b5b-4ec1-86ca-cf1fd75e625d.png",width:"400",height:"300"}})])])])]),e._v(" "),t("p",[e._v("A grid can be masked based on the countries we want to load, the following script shows an example:")]),e._v(" "),t("div",{staticClass:"language-python extra-class"},[t("pre",{pre:!0,attrs:{class:"language-python"}},[t("code",[t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("import")]),e._v(" geopandas "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("as")]),e._v(" gpd\neurope "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" gpd"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("read_file"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("(")]),e._v("gpd"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("datasets"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("get_path"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("(")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"naturalearth_lowres"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(")")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(")")]),e._v("\neurope "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" europe"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("europe"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("continent"),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("==")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"Europe"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\ncountries "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" europe"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("europe"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("name"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("isin"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("(")]),e._v("EU27"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(")")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\ndf "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" gpd"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("read_file"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("(")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"https://artifactory.vgt.vito.be/auxdata-public/grids/LAEA-20km.gpkg"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("mask"),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("countries"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(")")]),e._v("\n")])])]),t("h2",{attrs:{id:"prepare-job-attributes"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#prepare-job-attributes"}},[e._v("#")]),e._v(" Prepare job attributes")]),e._v(" "),t("p",[e._v("Next to the tiling grid, we recommend to also determine other properties required by your processing jobs up front. This allows you to properly\nreview those properties before starting to process. Examples include simple things like a job title or tile specific processing parameters, but also an\nattribute to determine processing order.")]),e._v(" "),t("p",[e._v("In this step, you may also want to make sure to already determine the correct tile extent in the coordinate system of your tile grid.\nProviding exact coordinates in the right projection is necessary to ensure pixel-perfect alignment of your tiles.")]),e._v(" "),t("h2",{attrs:{id:"tuning-your-processing-job"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#tuning-your-processing-job"}},[e._v("#")]),e._v(" Tuning your processing job")]),e._v(" "),t("p",[e._v("Before kicking off large processing, you want to be very sure that the correct output is generated, and that you have sufficient credits and resources\navailable to finish your job in time. This can be done by simply running various jobs, and using the statistics reported in the metadata to determine average parameters. (The map production section below shows a way to collect these parameters in a CSV.)")]),e._v(" "),t("p",[e._v("For instance, for the case of processing the EU27 croptype map, consisting of ~11000 20km tiles, we made the following calculations op front:")]),e._v(" "),t("ul",[t("li",[e._v("Average runtime was 30 minutes, which means that it would take ~15 days of continous processing with 15 parallel jobs.")]),e._v(" "),t("li",[e._v("Average cost was below 100 credits, so we would be able to process with a budget of 1100000 credits.")])]),e._v(" "),t("p",[e._v("To achieve these numbers, we did have to optimize batch job settings and also the overall workflow to reduce resource usage!")]),e._v(" "),t("p",[e._v("A common bottleneck to parallellization is the memory consumption, and it can be useful to know the maximum memory allocation on a single machine in\nyour backend of choice. For instance, in a cloud environment with 16GB per machine and 4 cpu's, using slightly less than 4GB per worker is efficient as you can fit 4 parallel workers on a single VM, while requiring 6GB would fit only 2 workers and leave about 4GB unused.")]),e._v(" "),t("p",[e._v("In our example, we used the Geotrellis backends, which has "),t("RouterLink",{attrs:{to:"/federation/#customizing-batch-job-resources-on-terrascope"}},[e._v("these execution options")]),e._v(".")],1),e._v(" "),t("h2",{attrs:{id:"starting-map-production"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#starting-map-production"}},[e._v("#")]),e._v(" Starting map production")]),e._v(" "),t("p",[e._v("The openEO Python client provides a useful tool to run multiple processing jobs in multiple backends:")]),e._v(" "),t("p",[t("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/cookbook/job_manager.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://open-eo.github.io/openeo-python-client/cookbook/job_manager.html"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("This class takes a GeoJSON corresponding to your tile grid and job properties per tiles, and triggers a function provided by you whenever a new\njob needs to be created. You can configure multiple backends, and set the number of parallel jobs per backend.")]),e._v(" "),t("p",[e._v("This class also takes care of error handling, and can be considered more resilient compared to writing a simple loop yourself.")]),e._v(" "),t("p",[e._v("A full example of how we use this can be found "),t("a",{attrs:{href:"https://github.com/openEOPlatform/openeo-classification/blob/main/src/openeo_classification/scripts/cropmap_eu27.py",target:"_blank",rel:"noopener noreferrer"}},[e._v("here"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("This script uses a CSV file to track your jobs, and whenever it is interrupted it can simply resume from that CSV file, making it tolerant to failure.")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/5937096/231968590-f0f0b415-453c-4ab7-9502-82eab795a84e.png",alt:"Tracking jobs by CSV"}})]),e._v(" "),t("h2",{attrs:{id:"errors-during-production"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#errors-during-production"}},[e._v("#")]),e._v(" Errors during production")]),e._v(" "),t("p",[e._v("It is expected to see jobs failing during production, which can be considered normal as long as the failure rate is not too high. We advice to quickly inspect error logs, and if no obvious reason for failure is found, a simple retry might be sufficient. In other cases it may be needed to increase memory.\nWe also see a limited number of cases where for instance issues in the underlying product archive cause failures or artifacts. These are harder to resolve, and may require interaction with the backend to resove!")])])}),[],!1,null,null,null);t.default=o.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[80],{507:function(e,t,a){"use strict";a.r(t);var r=a(4),o=Object(r.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"large-scale-processing"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#large-scale-processing"}},[e._v("#")]),e._v(" Large scale processing")]),e._v(" "),t("p",[e._v("Processing of larger areas up to global scale is one of the more challenging tasks in earth observation,\nbut certainly one that this platform wants to address. This page describes some best practices based on the example\nof "),t("a",{attrs:{href:"https://github.com/openEOPlatform/openeo-classification",target:"_blank",rel:"noopener noreferrer"}},[e._v("processing a croptype map for all 27 countries in the European Union"),t("OutboundLink")],1),e._v(". We do encourage you to get in touch with backend providers about your\nspecific case, as not every workflow is the same, and some advance planning may be needed to ensure that you get sufficient\nprocessing resources.")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://raw.githubusercontent.com/openEOPlatform/openeo-classification/60aa7a869f9000b1795afe2c9dde0d7977bcdbc6/docs/full_europe.png",alt:"Crop type map for EU27"}}),e._v(" "),t("figcaption",[e._v("EU27 croptype map, processed on openEO platform")])]),e._v(" "),t("p",[e._v("The approach desribed here is based on local files to track the production. This is a low-cost approach that does not require\nspecial IT knowledge, but comes with some risks such as loosing your local files. A more robust approach for production-grade projects\nwould typically rely on some sort of database or STAC catalog service to monitor processing. Such a setup is however quite similar in many aspects.")]),e._v(" "),t("p",[e._v("The basic strategy for processing large areas is to split it up into smaller areas, usually according to a regular tile grid.\nSplitting reduces the size of the area that needs to be processed by one batch job, and avoids running into all kinds of limitations.\nFor instance, when processing in a specific projection, you anyway have to stay within the bounds of that projection. Also the output\nfile size of a job often becomes impractical when working over huge areas. Or you will hit bottlenecks in the backend implementation that\ndo not occur for normally sized jobs. Also, when a smaller job fails or requires reprocessing, the cost will be smaller.")]),e._v(" "),t("h2",{attrs:{id:"relevant-openeo-features"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#relevant-openeo-features"}},[e._v("#")]),e._v(" Relevant openEO features")]),e._v(" "),t("p",[e._v("We want to highlight a few key elements that made us choose openEO for large scale processing:")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://openeo.org/documentation/1.0/developers/backends/performance.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("Performance & scalability"),t("OutboundLink")],1)]),e._v(" "),t("li",[e._v("STAC metadata is generated for you, making your output dissemination ready without becoming a metadata expert yourself.")]),e._v(" "),t("li",[e._v("Where relevant FAIR principles are taken into account automatically, such as providing provenance information.")]),e._v(" "),t("li",[e._v("Cloud optimized file formats are generated by default.")]),e._v(" "),t("li",[e._v("Processing can be distributed over multiple backends.")])]),e._v(" "),t("h2",{attrs:{id:"preparation"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#preparation"}},[e._v("#")]),e._v(" Preparation")]),e._v(" "),t("p",[e._v("The idea is that we first create and persist the list of tiles to produce, with all attributes required to produce that\nspecific tile. This gives us a very good visual overview of the processing that will be performed.")]),e._v(" "),t("p",[e._v("Having job parameters in a file is also useful for debugging afterwards. Determining parameters at runtime means you don't\nhave absolute certainty over the value of a specific argument, as there may be bugs in your code.")]),e._v(" "),t("h2",{attrs:{id:"prepare-tiling-grid"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#prepare-tiling-grid"}},[e._v("#")]),e._v(" Prepare tiling grid")]),e._v(" "),t("p",[e._v("The choice of tiling grid depends on your preferred projection system, which depends on your area of interest.\nFor Europe, the EPSG:3035 projection can be used, while for global processing you may want to work with different projections according\nto UTM zones.")]),e._v(" "),t("p",[e._v("The size of tiles in your grid is also important, and often ranges from 20km to 100km. For relatively light workflows, a 100km grid can work well,\nwhile for more demanding cases, a 20km grid is better. In our example, we choose to work with 20km tiles because the workflow was quite demanding. A smaller\ntile size can also result in less unneeded processing when your target area has an irregular shape, like most countries and continents.")]),e._v(" "),t("p",[e._v("A couple of basic grids can be found here:\n"),t("a",{attrs:{href:"https://artifactory.vgt.vito.be/webapp/#/artifacts/browse/tree/General/auxdata-public/grids",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://artifactory.vgt.vito.be/webapp/#/artifacts/browse/tree/General/auxdata-public/grids"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("The images below illustrate the overlap in the UTM grids versus a regular LAEA grid.")]),e._v(" "),t("table",[t("thead",[t("tr",[t("th",{staticStyle:{"text-align":"center"}},[e._v("UTM 100km")]),e._v(" "),t("th",{staticStyle:{"text-align":"center"}},[e._v("LAEA 100km")])])]),e._v(" "),t("tbody",[t("tr",[t("td",{staticStyle:{"text-align":"center"}},[t("img",{attrs:{src:"https://user-images.githubusercontent.com/5937096/231963581-1c51a512-c240-4d23-b557-30a3577c9027.png",width:"400",height:"300"}})]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("img",{attrs:{src:"https://user-images.githubusercontent.com/5937096/231963750-562b921c-7b5b-4ec1-86ca-cf1fd75e625d.png",width:"400",height:"300"}})])])])]),e._v(" "),t("p",[e._v("A grid can be masked based on the countries we want to load, the following script shows an example:")]),e._v(" "),t("div",{staticClass:"language-python extra-class"},[t("pre",{pre:!0,attrs:{class:"language-python"}},[t("code",[t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("import")]),e._v(" geopandas "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("as")]),e._v(" gpd\neurope "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" gpd"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("read_file"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("(")]),e._v("gpd"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("datasets"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("get_path"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("(")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"naturalearth_lowres"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(")")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(")")]),e._v("\neurope "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" europe"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("europe"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("continent"),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("==")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"Europe"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\ncountries "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" europe"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("europe"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("name"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("isin"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("(")]),e._v("EU27"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(")")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\ndf "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" gpd"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("read_file"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("(")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"https://artifactory.vgt.vito.be/auxdata-public/grids/LAEA-20km.gpkg"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("mask"),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("countries"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(")")]),e._v("\n")])])]),t("h2",{attrs:{id:"prepare-job-attributes"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#prepare-job-attributes"}},[e._v("#")]),e._v(" Prepare job attributes")]),e._v(" "),t("p",[e._v("Next to the tiling grid, we recommend to also determine other properties required by your processing jobs up front. This allows you to properly\nreview those properties before starting to process. Examples include simple things like a job title or tile specific processing parameters, but also an\nattribute to determine processing order.")]),e._v(" "),t("p",[e._v("In this step, you may also want to make sure to already determine the correct tile extent in the coordinate system of your tile grid.\nProviding exact coordinates in the right projection is necessary to ensure pixel-perfect alignment of your tiles.")]),e._v(" "),t("h2",{attrs:{id:"tuning-your-processing-job"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#tuning-your-processing-job"}},[e._v("#")]),e._v(" Tuning your processing job")]),e._v(" "),t("p",[e._v("Before kicking off large processing, you want to be very sure that the correct output is generated, and that you have sufficient credits and resources\navailable to finish your job in time. This can be done by simply running various jobs, and using the statistics reported in the metadata to determine average parameters. (The map production section below shows a way to collect these parameters in a CSV.)")]),e._v(" "),t("p",[e._v("For instance, for the case of processing the EU27 croptype map, consisting of ~11000 20km tiles, we made the following calculations op front:")]),e._v(" "),t("ul",[t("li",[e._v("Average runtime was 30 minutes, which means that it would take ~15 days of continous processing with 15 parallel jobs.")]),e._v(" "),t("li",[e._v("Average cost was below 100 credits, so we would be able to process with a budget of 1100000 credits.")])]),e._v(" "),t("p",[e._v("To achieve these numbers, we did have to optimize batch job settings and also the overall workflow to reduce resource usage!")]),e._v(" "),t("p",[e._v("A common bottleneck to parallellization is the memory consumption, and it can be useful to know the maximum memory allocation on a single machine in\nyour backend of choice. For instance, in a cloud environment with 16GB per machine and 4 cpu's, using slightly less than 4GB per worker is efficient as you can fit 4 parallel workers on a single VM, while requiring 6GB would fit only 2 workers and leave about 4GB unused.")]),e._v(" "),t("p",[e._v("In our example, we used the Geotrellis backends, which has "),t("RouterLink",{attrs:{to:"/federation/#customizing-batch-job-resources-on-terrascope"}},[e._v("these execution options")]),e._v(".")],1),e._v(" "),t("h2",{attrs:{id:"starting-map-production"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#starting-map-production"}},[e._v("#")]),e._v(" Starting map production")]),e._v(" "),t("p",[e._v("The openEO Python client provides a useful tool to run multiple processing jobs in multiple backends:")]),e._v(" "),t("p",[t("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/cookbook/job_manager.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://open-eo.github.io/openeo-python-client/cookbook/job_manager.html"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("This class takes a GeoJSON corresponding to your tile grid and job properties per tiles, and triggers a function provided by you whenever a new\njob needs to be created. You can configure multiple backends, and set the number of parallel jobs per backend.")]),e._v(" "),t("p",[e._v("This class also takes care of error handling, and can be considered more resilient compared to writing a simple loop yourself.")]),e._v(" "),t("p",[e._v("A full example of how we use this can be found "),t("a",{attrs:{href:"https://github.com/openEOPlatform/openeo-classification/blob/main/src/openeo_classification/scripts/cropmap_eu27.py",target:"_blank",rel:"noopener noreferrer"}},[e._v("here"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("This script uses a CSV file to track your jobs, and whenever it is interrupted it can simply resume from that CSV file, making it tolerant to failure.")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/5937096/231968590-f0f0b415-453c-4ab7-9502-82eab795a84e.png",alt:"Tracking jobs by CSV"}})]),e._v(" "),t("h2",{attrs:{id:"errors-during-production"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#errors-during-production"}},[e._v("#")]),e._v(" Errors during production")]),e._v(" "),t("p",[e._v("It is expected to see jobs failing during production, which can be considered normal as long as the failure rate is not too high. We advice to quickly inspect error logs, and if no obvious reason for failure is found, a simple retry might be sufficient. In other cases it may be needed to increase memory.\nWe also see a limited number of cases where for instance issues in the underlying product archive cause failures or artifacts. These are harder to resolve, and may require interaction with the backend to resove!")])])}),[],!1,null,null,null);t.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/app.b237f08f.js b/assets/js/app.0638f1c0.js similarity index 90% rename from assets/js/app.b237f08f.js rename to assets/js/app.0638f1c0.js index 4fe475e43..0097c48ee 100644 --- a/assets/js/app.b237f08f.js +++ b/assets/js/app.0638f1c0.js @@ -1,4 +1,4 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[0],[]]);!function(t){function e(e){for(var r,a,s=e[0],c=e[1],l=e[2],p=0,f=[];p=0&&(e=t.slice(r),t=t.slice(0,r));var o=t.indexOf("?");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{path:t,query:n,hash:e}}(i.path||""),f=e&&e.path||"/",d=l.path?C(l.path,f,n||i.append):f,h=function(t,e,n){void 0===e&&(e={});var r,o=n||p;try{r=o(t||"")}catch(t){r={}}for(var i in e){var a=e[i];r[i]=Array.isArray(a)?a.map(u):u(a)}return r}(l.query,i.query,r&&r.options.parseQuery),v=i.hash||l.hash;return v&&"#"!==v.charAt(0)&&(v="#"+v),{_normalized:!0,path:d,query:h,hash:v}}var q,J=function(){},W={name:"RouterLink",props:{to:{type:[String,Object],required:!0},tag:{type:String,default:"a"},custom:Boolean,exact:Boolean,exactPath:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String,ariaCurrentValue:{type:String,default:"page"},event:{type:[String,Array],default:"click"}},render:function(t){var e=this,n=this.$router,r=this.$route,i=n.resolve(this.to,r,this.append),a=i.location,s=i.route,c=i.href,l={},u=n.options.linkActiveClass,p=n.options.linkExactActiveClass,f=null==u?"router-link-active":u,v=null==p?"router-link-exact-active":p,m=null==this.activeClass?f:this.activeClass,g=null==this.exactActiveClass?v:this.exactActiveClass,y=s.redirectedFrom?h(null,H(s.redirectedFrom),null,n):s;l[g]=b(r,y,this.exactPath),l[m]=this.exact||this.exactPath?l[g]:function(t,e){return 0===t.path.replace(d,"/").indexOf(e.path.replace(d,"/"))&&(!e.hash||t.hash===e.hash)&&function(t,e){for(var n in e)if(!(n in t))return!1;return!0}(t.query,e.query)}(r,y);var _=l[g]?this.ariaCurrentValue:null,x=function(t){K(t)&&(e.replace?n.replace(a,J):n.push(a,J))},w={click:K};Array.isArray(this.event)?this.event.forEach((function(t){w[t]=x})):w[this.event]=x;var k={class:l},C=!this.$scopedSlots.$hasNormal&&this.$scopedSlots.default&&this.$scopedSlots.default({href:c,route:s,navigate:x,isActive:l[m],isExactActive:l[g]});if(C){if(1===C.length)return C[0];if(C.length>1||!C.length)return 0===C.length?t():t("span",{},C)}if("a"===this.tag)k.on=w,k.attrs={href:c,"aria-current":_};else{var S=function t(e){var n;if(e)for(var r=0;r-1&&(s.params[f]=n.params[f]);return s.path=V(u.path,s.params),c(u,s,a)}if(s.path){s.params={};for(var d=0;d-1}function St(t,e){return Ct(t)&&t._isRouter&&(null==e||t.type===e)}function Ot(t,e,n){var r=function(o){o>=t.length?n():t[o]?e(t[o],(function(){r(o+1)})):r(o+1)};r(0)}function Pt(t){return function(e,n,r){var o=!1,i=0,a=null;jt(t,(function(t,e,n,s){if("function"==typeof t&&void 0===t.cid){o=!0,i++;var c,l=Tt((function(e){var o;((o=e).__esModule||Et&&"Module"===o[Symbol.toStringTag])&&(e=e.default),t.resolved="function"==typeof e?e:q.extend(e),n.components[s]=e,--i<=0&&r()})),u=Tt((function(t){var e="Failed to resolve async component "+s+": "+t;a||(a=Ct(t)?t:new Error(e),r(a))}));try{c=t(l,u)}catch(t){u(t)}if(c)if("function"==typeof c.then)c.then(l,u);else{var p=c.component;p&&"function"==typeof p.then&&p.then(l,u)}}})),o||r()}}function jt(t,e){return $t(t.map((function(t){return Object.keys(t.components).map((function(n){return e(t.components[n],t.instances[n],t,n)}))})))}function $t(t){return Array.prototype.concat.apply([],t)}var Et="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;function Tt(t){var e=!1;return function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];if(!e)return e=!0,t.apply(this,n)}}var At=function(t,e){this.router=t,this.base=function(t){if(!t)if(G){var e=document.querySelector("base");t=(t=e&&e.getAttribute("href")||"/").replace(/^https?:\/\/[^\/]+/,"")}else t="/";"/"!==t.charAt(0)&&(t="/"+t);return t.replace(/\/$/,"")}(e),this.current=m,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[],this.listeners=[]};function Lt(t,e,n,r){var o=jt(t,(function(t,r,o,i){var a=function(t,e){"function"!=typeof t&&(t=q.extend(t));return t.options[e]}(t,e);if(a)return Array.isArray(a)?a.map((function(t){return n(t,r,o,i)})):n(a,r,o,i)}));return $t(r?o.reverse():o)}function Rt(t,e){if(e)return function(){return t.apply(e,arguments)}}At.prototype.listen=function(t){this.cb=t},At.prototype.onReady=function(t,e){this.ready?t():(this.readyCbs.push(t),e&&this.readyErrorCbs.push(e))},At.prototype.onError=function(t){this.errorCbs.push(t)},At.prototype.transitionTo=function(t,e,n){var r,o=this;try{r=this.router.match(t,this.current)}catch(t){throw this.errorCbs.forEach((function(e){e(t)})),t}var i=this.current;this.confirmTransition(r,(function(){o.updateRoute(r),e&&e(r),o.ensureURL(),o.router.afterHooks.forEach((function(t){t&&t(r,i)})),o.ready||(o.ready=!0,o.readyCbs.forEach((function(t){t(r)})))}),(function(t){n&&n(t),t&&!o.ready&&(St(t,bt.redirected)&&i===m||(o.ready=!0,o.readyErrorCbs.forEach((function(e){e(t)}))))}))},At.prototype.confirmTransition=function(t,e,n){var r=this,o=this.current;this.pending=t;var i,a,s=function(t){!St(t)&&Ct(t)&&(r.errorCbs.length?r.errorCbs.forEach((function(e){e(t)})):console.error(t)),n&&n(t)},c=t.matched.length-1,l=o.matched.length-1;if(b(t,o)&&c===l&&t.matched[c]===o.matched[l])return this.ensureURL(),t.hash&&st(this.router,o,t,!1),s(((a=wt(i=o,t,bt.duplicated,'Avoided redundant navigation to current location: "'+i.fullPath+'".')).name="NavigationDuplicated",a));var u=function(t,e){var n,r=Math.max(t.length,e.length);for(n=0;n0)){var e=this.router,n=e.options.scrollBehavior,r=mt&&n;r&&this.listeners.push(at());var o=function(){var n=t.current,o=Ut(t.base);t.current===m&&o===t._startLocation||t.transitionTo(o,(function(t){r&&st(e,t,n,!0)}))};window.addEventListener("popstate",o),this.listeners.push((function(){window.removeEventListener("popstate",o)}))}},e.prototype.go=function(t){window.history.go(t)},e.prototype.push=function(t,e,n){var r=this,o=this.current;this.transitionTo(t,(function(t){gt(S(r.base+t.fullPath)),st(r.router,t,o,!1),e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this,o=this.current;this.transitionTo(t,(function(t){yt(S(r.base+t.fullPath)),st(r.router,t,o,!1),e&&e(t)}),n)},e.prototype.ensureURL=function(t){if(Ut(this.base)!==this.current.fullPath){var e=S(this.base+this.current.fullPath);t?gt(e):yt(e)}},e.prototype.getCurrentLocation=function(){return Ut(this.base)},e}(At);function Ut(t){var e=window.location.pathname,n=e.toLowerCase(),r=t.toLowerCase();return!t||n!==r&&0!==n.indexOf(S(r+"/"))||(e=e.slice(t.length)),(e||"/")+window.location.search+window.location.hash}var It=function(t){function e(e,n,r){t.call(this,e,n),r&&function(t){var e=Ut(t);if(!/^\/#/.test(e))return window.location.replace(S(t+"/#"+e)),!0}(this.base)||Dt()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setupListeners=function(){var t=this;if(!(this.listeners.length>0)){var e=this.router.options.scrollBehavior,n=mt&&e;n&&this.listeners.push(at());var r=function(){var e=t.current;Dt()&&t.transitionTo(Nt(),(function(r){n&&st(t.router,r,e,!0),mt||zt(r.fullPath)}))},o=mt?"popstate":"hashchange";window.addEventListener(o,r),this.listeners.push((function(){window.removeEventListener(o,r)}))}},e.prototype.push=function(t,e,n){var r=this,o=this.current;this.transitionTo(t,(function(t){Bt(t.fullPath),st(r.router,t,o,!1),e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this,o=this.current;this.transitionTo(t,(function(t){zt(t.fullPath),st(r.router,t,o,!1),e&&e(t)}),n)},e.prototype.go=function(t){window.history.go(t)},e.prototype.ensureURL=function(t){var e=this.current.fullPath;Nt()!==e&&(t?Bt(e):zt(e))},e.prototype.getCurrentLocation=function(){return Nt()},e}(At);function Dt(){var t=Nt();return"/"===t.charAt(0)||(zt("/"+t),!1)}function Nt(){var t=window.location.href,e=t.indexOf("#");return e<0?"":t=t.slice(e+1)}function Ft(t){var e=window.location.href,n=e.indexOf("#");return(n>=0?e.slice(0,n):e)+"#"+t}function Bt(t){mt?gt(Ft(t)):window.location.hash=t}function zt(t){mt?yt(Ft(t)):window.location.replace(Ft(t))}var Vt=function(t){function e(e,n){t.call(this,e,n),this.stack=[],this.index=-1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.push=function(t,e,n){var r=this;this.transitionTo(t,(function(t){r.stack=r.stack.slice(0,r.index+1).concat(t),r.index++,e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this;this.transitionTo(t,(function(t){r.stack=r.stack.slice(0,r.index).concat(t),e&&e(t)}),n)},e.prototype.go=function(t){var e=this,n=this.index+t;if(!(n<0||n>=this.stack.length)){var r=this.stack[n];this.confirmTransition(r,(function(){var t=e.current;e.index=n,e.updateRoute(r),e.router.afterHooks.forEach((function(e){e&&e(r,t)}))}),(function(t){St(t,bt.duplicated)&&(e.index=n)}))}},e.prototype.getCurrentLocation=function(){var t=this.stack[this.stack.length-1];return t?t.fullPath:"/"},e.prototype.ensureURL=function(){},e}(At),Ht=function(t){void 0===t&&(t={}),this.app=null,this.apps=[],this.options=t,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=Z(t.routes||[],this);var e=t.mode||"hash";switch(this.fallback="history"===e&&!mt&&!1!==t.fallback,this.fallback&&(e="hash"),G||(e="abstract"),this.mode=e,e){case"history":this.history=new Mt(this,t.base);break;case"hash":this.history=new It(this,t.base,this.fallback);break;case"abstract":this.history=new Vt(this,t.base);break;default:0}},qt={currentRoute:{configurable:!0}};Ht.prototype.match=function(t,e,n){return this.matcher.match(t,e,n)},qt.currentRoute.get=function(){return this.history&&this.history.current},Ht.prototype.init=function(t){var e=this;if(this.apps.push(t),t.$once("hook:destroyed",(function(){var n=e.apps.indexOf(t);n>-1&&e.apps.splice(n,1),e.app===t&&(e.app=e.apps[0]||null),e.app||e.history.teardown()})),!this.app){this.app=t;var n=this.history;if(n instanceof Mt||n instanceof It){var r=function(t){n.setupListeners(),function(t){var r=n.current,o=e.options.scrollBehavior;mt&&o&&"fullPath"in t&&st(e,t,r,!1)}(t)};n.transitionTo(n.getCurrentLocation(),r,r)}n.listen((function(t){e.apps.forEach((function(e){e._route=t}))}))}},Ht.prototype.beforeEach=function(t){return Wt(this.beforeHooks,t)},Ht.prototype.beforeResolve=function(t){return Wt(this.resolveHooks,t)},Ht.prototype.afterEach=function(t){return Wt(this.afterHooks,t)},Ht.prototype.onReady=function(t,e){this.history.onReady(t,e)},Ht.prototype.onError=function(t){this.history.onError(t)},Ht.prototype.push=function(t,e,n){var r=this;if(!e&&!n&&"undefined"!=typeof Promise)return new Promise((function(e,n){r.history.push(t,e,n)}));this.history.push(t,e,n)},Ht.prototype.replace=function(t,e,n){var r=this;if(!e&&!n&&"undefined"!=typeof Promise)return new Promise((function(e,n){r.history.replace(t,e,n)}));this.history.replace(t,e,n)},Ht.prototype.go=function(t){this.history.go(t)},Ht.prototype.back=function(){this.go(-1)},Ht.prototype.forward=function(){this.go(1)},Ht.prototype.getMatchedComponents=function(t){var e=t?t.matched?t:this.resolve(t).route:this.currentRoute;return e?[].concat.apply([],e.matched.map((function(t){return Object.keys(t.components).map((function(e){return t.components[e]}))}))):[]},Ht.prototype.resolve=function(t,e,n){var r=H(t,e=e||this.history.current,n,this),o=this.match(r,e),i=o.redirectedFrom||o.fullPath;return{location:r,route:o,href:function(t,e,n){var r="hash"===n?"#"+e:e;return t?S(t+"/"+r):r}(this.history.base,i,this.mode),normalizedTo:r,resolved:o}},Ht.prototype.getRoutes=function(){return this.matcher.getRoutes()},Ht.prototype.addRoute=function(t,e){this.matcher.addRoute(t,e),this.history.current!==m&&this.history.transitionTo(this.history.getCurrentLocation())},Ht.prototype.addRoutes=function(t){this.matcher.addRoutes(t),this.history.current!==m&&this.history.transitionTo(this.history.getCurrentLocation())},Object.defineProperties(Ht.prototype,qt);var Jt=Ht;function Wt(t,e){return t.push(e),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}Ht.install=function t(e){if(!t.installed||q!==e){t.installed=!0,q=e;var n=function(t){return void 0!==t},r=function(t,e){var r=t.$options._parentVnode;n(r)&&n(r=r.data)&&n(r=r.registerRouteInstance)&&r(t,e)};e.mixin({beforeCreate:function(){n(this.$options.router)?(this._routerRoot=this,this._router=this.$options.router,this._router.init(this),e.util.defineReactive(this,"_route",this._router.history.current)):this._routerRoot=this.$parent&&this.$parent._routerRoot||this,r(this,this)},destroyed:function(){r(this)}}),Object.defineProperty(e.prototype,"$router",{get:function(){return this._routerRoot._router}}),Object.defineProperty(e.prototype,"$route",{get:function(){return this._routerRoot._route}}),e.component("RouterView",w),e.component("RouterLink",W);var o=e.config.optionMergeStrategies;o.beforeRouteEnter=o.beforeRouteLeave=o.beforeRouteUpdate=o.created}},Ht.version="3.6.5",Ht.isNavigationFailure=St,Ht.NavigationFailureType=bt,Ht.START_LOCATION=m,G&&window.Vue&&window.Vue.use(Ht);var Kt={"components/AlgoliaSearchBox":()=>Promise.all([n.e(0),n.e(38)]).then(n.bind(null,237)),"components/DropdownLink":()=>Promise.all([n.e(0),n.e(28)]).then(n.bind(null,181)),"components/DropdownTransition":()=>Promise.all([n.e(0),n.e(47)]).then(n.bind(null,159)),"components/Home":()=>Promise.all([n.e(0),n.e(31)]).then(n.bind(null,301)),"components/NavLink":()=>n.e(50).then(n.bind(null,157)),"components/NavLinks":()=>Promise.all([n.e(0),n.e(26)]).then(n.bind(null,205)),"components/Navbar":()=>Promise.all([n.e(0),n.e(5),n.e(39)]).then(n.bind(null,453)),"components/Page":()=>Promise.all([n.e(0),n.e(25)]).then(n.bind(null,302)),"components/PageEdit":()=>Promise.all([n.e(0),n.e(32)]).then(n.bind(null,211)),"components/PageNav":()=>Promise.all([n.e(0),n.e(29)]).then(n.bind(null,212)),"components/Sidebar":()=>Promise.all([n.e(0),n.e(24)]).then(n.bind(null,303)),"components/SidebarButton":()=>Promise.all([n.e(0),n.e(48)]).then(n.bind(null,308)),"components/SidebarGroup":()=>Promise.all([n.e(0),n.e(10)]).then(n.bind(null,206)),"components/SidebarLink":()=>Promise.all([n.e(0),n.e(36)]).then(n.bind(null,182)),"components/SidebarLinks":()=>Promise.all([n.e(0),n.e(10)]).then(n.bind(null,177)),"global-components/Badge":()=>Promise.all([n.e(0),n.e(15)]).then(n.bind(null,478)),"global-components/CodeBlock":()=>Promise.all([n.e(0),n.e(16)]).then(n.bind(null,466)),"global-components/CodeGroup":()=>Promise.all([n.e(0),n.e(17)]).then(n.bind(null,467)),"layouts/404":()=>n.e(18).then(n.bind(null,468)),"layouts/Layout":()=>Promise.all([n.e(0),n.e(5),n.e(9),n.e(11)]).then(n.bind(null,465)),NotFound:()=>n.e(18).then(n.bind(null,468)),Layout:()=>Promise.all([n.e(0),n.e(5),n.e(9),n.e(11)]).then(n.bind(null,465))},Gt={"v-4e72e1d8":()=>n.e(56).then(n.bind(null,479)),"v-14e901dc":()=>n.e(57).then(n.bind(null,480)),"v-045b6323":()=>n.e(59).then(n.bind(null,481)),"v-3e291b63":()=>n.e(61).then(n.bind(null,482)),"v-acc004fa":()=>n.e(60).then(n.bind(null,483)),"v-688ffb43":()=>n.e(62).then(n.bind(null,484)),"v-21917184":()=>n.e(58).then(n.bind(null,485)),"v-700f1b88":()=>n.e(63).then(n.bind(null,486)),"v-78536523":()=>n.e(64).then(n.bind(null,487)),"v-7ffae7c8":()=>n.e(51).then(n.bind(null,488)),"v-21de1e8c":()=>n.e(65).then(n.bind(null,489)),"v-76e62a34":()=>n.e(66).then(n.bind(null,490)),"v-adb4d3cc":()=>n.e(67).then(n.bind(null,491)),"v-974804cc":()=>n.e(68).then(n.bind(null,492)),"v-779fe818":()=>n.e(69).then(n.bind(null,493)),"v-23074efc":()=>n.e(70).then(n.bind(null,494)),"v-6b6d7bae":()=>n.e(71).then(n.bind(null,495)),"v-a5deb388":()=>n.e(72).then(n.bind(null,496)),"v-1d4d57b7":()=>n.e(37).then(n.bind(null,497)),"v-a1f70a7a":()=>n.e(49).then(n.bind(null,498)),"v-d4caec3c":()=>n.e(74).then(n.bind(null,499)),"v-02b9217c":()=>n.e(73).then(n.bind(null,500)),"v-0937d47a":()=>n.e(75).then(n.bind(null,501)),"v-c5fcf990":()=>n.e(76).then(n.bind(null,502)),"v-65bcb302":()=>n.e(77).then(n.bind(null,503)),"v-2b5b0ed8":()=>n.e(78).then(n.bind(null,504)),"v-5041b7a0":()=>n.e(79).then(n.bind(null,505)),"v-589f7f88":()=>n.e(80).then(n.bind(null,506)),"v-697f60bc":()=>n.e(52).then(n.bind(null,507))};function Xt(t){const e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}const Yt=/-(\w)/g,Zt=Xt(t=>t.replace(Yt,(t,e)=>e?e.toUpperCase():"")),Qt=/\B([A-Z])/g,te=Xt(t=>t.replace(Qt,"-$1").toLowerCase()),ee=Xt(t=>t.charAt(0).toUpperCase()+t.slice(1));function ne(t,e){if(!e)return;if(t(e))return t(e);return e.includes("-")?t(ee(Zt(e))):t(ee(e))||t(te(e))}const re=Object.assign({},Kt,Gt),oe=t=>re[t],ie=t=>Gt[t],ae=t=>Kt[t],se=t=>r.a.component(t);function ce(t){return ne(ie,t)}function le(t){return ne(ae,t)}function ue(t){return ne(oe,t)}function pe(t){return ne(se,t)}function fe(...t){return Promise.all(t.filter(t=>t).map(async t=>{if(!pe(t)&&ue(t)){const e=await ue(t)();r.a.component(t,e.default)}}))}function de(t,e){"undefined"!=typeof window&&window.__VUEPRESS__&&(window.__VUEPRESS__[t]=e)}var he=n(47),ve=n.n(he),me=n(48),ge=n.n(me),ye={created(){if(this.siteMeta=this.$site.headTags.filter(([t])=>"meta"===t).map(([t,e])=>e),this.$ssrContext){const e=this.getMergedMetaTags();this.$ssrContext.title=this.$title,this.$ssrContext.lang=this.$lang,this.$ssrContext.pageMeta=(t=e)?t.map(t=>{let e="{e+=` ${n}="${ge()(t[n])}"`}),e+">"}).join("\n "):"",this.$ssrContext.canonicalLink=_e(this.$canonicalUrl)}var t},mounted(){this.currentMetaTags=[...document.querySelectorAll("meta")],this.updateMeta(),this.updateCanonicalLink()},methods:{updateMeta(){document.title=this.$title,document.documentElement.lang=this.$lang;const t=this.getMergedMetaTags();this.currentMetaTags=xe(t,this.currentMetaTags)},getMergedMetaTags(){const t=this.$page.frontmatter.meta||[];return ve()([{name:"description",content:this.$description}],t,this.siteMeta,we)},updateCanonicalLink(){be(),this.$canonicalUrl&&document.head.insertAdjacentHTML("beforeend",_e(this.$canonicalUrl))}},watch:{$page(){this.updateMeta(),this.updateCanonicalLink()}},beforeDestroy(){xe(null,this.currentMetaTags),be()}};function be(){const t=document.querySelector("link[rel='canonical']");t&&t.remove()}function _e(t=""){return t?``:""}function xe(t,e){if(e&&[...e].filter(t=>t.parentNode===document.head).forEach(t=>document.head.removeChild(t)),t)return t.map(t=>{const e=document.createElement("meta");return Object.keys(t).forEach(n=>{e.setAttribute(n,t[n])}),document.head.appendChild(e),e})}function we(t){for(const e of["name","property","itemprop"])if(t.hasOwnProperty(e))return t[e]+e;return JSON.stringify(t)}var ke=n(13),Ce=n.n(ke),Se={mounted(){Ce.a.configure({showSpinner:!1}),this.$router.beforeEach((t,e,n)=>{t.path===e.path||r.a.component(t.name)||Ce.a.start(),n()}),this.$router.afterEach(()=>{Ce.a.done(),this.isSidebarOpen=!1})}},Oe=n(49),Pe={mounted(){window.addEventListener("scroll",this.onScroll)},methods:{onScroll:n.n(Oe)()((function(){this.setActiveHash()}),300),setActiveHash(){const t=[].slice.call(document.querySelectorAll(".sidebar-link")),e=[].slice.call(document.querySelectorAll(".header-anchor")).filter(e=>t.some(t=>t.hash===e.hash)),n=Math.max(window.pageYOffset,document.documentElement.scrollTop,document.body.scrollTop),r=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),o=window.innerHeight+n;for(let t=0;t=i.parentElement.offsetTop+10&&(!a||n{this.$nextTick(()=>{this.$vuepress.$set("disableScrollBehavior",!1)})})}}}},beforeDestroy(){window.removeEventListener("scroll",this.onScroll)}},je={props:{parent:Object,code:String,options:{align:String,color:String,backgroundTransition:Boolean,backgroundColor:String,successText:String,staticIcon:Boolean}},data:()=>({success:!1,originalBackground:null,originalTransition:null}),computed:{alignStyle(){let t={};return t[this.options.align]="7.5px",t},iconClass(){return this.options.staticIcon?"":"hover"}},mounted(){this.originalTransition=this.parent.style.transition,this.originalBackground=this.parent.style.background},beforeDestroy(){this.parent.style.transition=this.originalTransition,this.parent.style.background=this.originalBackground},methods:{hexToRgb(t){let e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return e?{r:parseInt(e[1],16),g:parseInt(e[2],16),b:parseInt(e[3],16)}:null},copyToClipboard(t){if(navigator.clipboard)navigator.clipboard.writeText(this.code).then(()=>{this.setSuccessTransitions()},()=>{});else{let t=document.createElement("textarea");document.body.appendChild(t),t.value=this.code,t.select(),document.execCommand("Copy"),t.remove(),this.setSuccessTransitions()}},setSuccessTransitions(){if(clearTimeout(this.successTimeout),this.options.backgroundTransition){this.parent.style.transition="background 350ms";let t=this.hexToRgb(this.options.backgroundColor);this.parent.style.background=`rgba(${t.r}, ${t.g}, ${t.b}, 0.1)`}this.success=!0,this.successTimeout=setTimeout(()=>{this.options.backgroundTransition&&(this.parent.style.background=this.originalBackground,this.parent.style.transition=this.originalTransition),this.success=!1},500)}}},$e=(n(146),n(4)),Ee=Object($e.a)(je,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"code-copy"},[e("svg",{class:t.iconClass,style:t.alignStyle,attrs:{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},on:{click:t.copyToClipboard}},[e("path",{attrs:{fill:"none",d:"M0 0h24v24H0z"}}),t._v(" "),e("path",{attrs:{fill:t.options.color,d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4l6 6v10c0 1.1-.9 2-2 2H7.99C6.89 23 6 22.1 6 21l.01-14c0-1.1.89-2 1.99-2h7zm-1 7h5.5L14 6.5V12z"}})]),t._v(" "),e("span",{class:t.success?"success":"",style:t.alignStyle},[t._v("\n "+t._s(t.options.successText)+"\n ")])])}),[],!1,null,"49140617",null).exports,Te=(n(147),[ye,Se,Pe,{updated(){this.update()},methods:{update(){setTimeout(()=>{document.querySelectorAll('div[class*="language-"] pre').forEach(t=>{if(t.classList.contains("code-copy-added"))return;let e=new(r.a.extend(Ee));e.options={align:"bottom",color:"#27b1ff",backgroundTransition:!0,backgroundColor:"#0075b8",successText:"Copied!",staticIcon:!1},e.code=t.innerText,e.parent=t,e.$mount(),t.classList.add("code-copy-added"),t.appendChild(e.$el)})},100)}}}]),Ae={name:"GlobalLayout",computed:{layout(){const t=this.getLayout();return de("layout",t),r.a.component(t)}},methods:{getLayout(){if(this.$page.path){const t=this.$page.frontmatter.layout;return t&&(this.$vuepress.getLayoutAsyncComponent(t)||this.$vuepress.getVueComponent(t))?t:"Layout"}return"NotFound"}}},Le=Object($e.a)(Ae,(function(){return(0,this._self._c)(this.layout,{tag:"component"})}),[],!1,null,null,null).exports;!function(t,e,n){switch(e){case"components":t[e]||(t[e]={}),Object.assign(t[e],n);break;case"mixins":t[e]||(t[e]=[]),t[e].push(...n);break;default:throw new Error("Unknown option name.")}}(Le,"mixins",Te);const Re=[{name:"v-4e72e1d8",path:"/",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-4e72e1d8").then(n)}},{path:"/index.html",redirect:"/"},{name:"v-14e901dc",path:"/api/",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-14e901dc").then(n)}},{path:"/api/index.html",redirect:"/api/"},{name:"v-045b6323",path:"/federation/accounting.html",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-045b6323").then(n)}},{name:"v-3e291b63",path:"/federation/backends/collections.html",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-3e291b63").then(n)}},{name:"v-acc004fa",path:"/federation/backends/api.html",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-acc004fa").then(n)}},{name:"v-688ffb43",path:"/federation/backends/fileformats.html",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-688ffb43").then(n)}},{name:"v-21917184",path:"/data-collections/",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-21917184").then(n)}},{path:"/data-collections/index.html",redirect:"/data-collections/"},{name:"v-700f1b88",path:"/federation/backends/",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-700f1b88").then(n)}},{path:"/federation/backends/index.html",redirect:"/federation/backends/"},{name:"v-78536523",path:"/federation/backends/processes.html",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-78536523").then(n)}},{name:"v-7ffae7c8",path:"/federation/",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-7ffae7c8").then(n)}},{path:"/federation/index.html",redirect:"/federation/"},{name:"v-21de1e8c",path:"/file-formats/",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-21de1e8c").then(n)}},{path:"/file-formats/index.html",redirect:"/file-formats/"},{name:"v-76e62a34",path:"/getting-started/client-side-processing/",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-76e62a34").then(n)}},{path:"/getting-started/client-side-processing/index.html",redirect:"/getting-started/client-side-processing/"},{name:"v-adb4d3cc",path:"/getting-started/editor/",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-adb4d3cc").then(n)}},{path:"/getting-started/editor/index.html",redirect:"/getting-started/editor/"},{name:"v-974804cc",path:"/getting-started/javascript/",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-974804cc").then(n)}},{path:"/getting-started/javascript/index.html",redirect:"/getting-started/javascript/"},{name:"v-779fe818",path:"/getting-started/jupyterlab/",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-779fe818").then(n)}},{path:"/getting-started/jupyterlab/index.html",redirect:"/getting-started/jupyterlab/"},{name:"v-23074efc",path:"/getting-started/python/",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-23074efc").then(n)}},{path:"/getting-started/python/index.html",redirect:"/getting-started/python/"},{name:"v-6b6d7bae",path:"/getting-started/python/shiny.html",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-6b6d7bae").then(n)}},{name:"v-a5deb388",path:"/getting-started/r/",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-a5deb388").then(n)}},{path:"/getting-started/r/index.html",redirect:"/getting-started/r/"},{name:"v-1d4d57b7",path:"/join/early_adopter.html",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-1d4d57b7").then(n)}},{name:"v-a1f70a7a",path:"/join/free_trial.html",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-a1f70a7a").then(n)}},{name:"v-d4caec3c",path:"/usecases/ard/",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-d4caec3c").then(n)}},{path:"/usecases/ard/index.html",redirect:"/usecases/ard/"},{name:"v-02b9217c",path:"/processes/",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-02b9217c").then(n)}},{path:"/processes/index.html",redirect:"/processes/"},{name:"v-0937d47a",path:"/usecases/ard/msi/",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-0937d47a").then(n)}},{path:"/usecases/ard/msi/index.html",redirect:"/usecases/ard/msi/"},{name:"v-c5fcf990",path:"/usecases/ard/sar/",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-c5fcf990").then(n)}},{path:"/usecases/ard/sar/index.html",redirect:"/usecases/ard/sar/"},{name:"v-65bcb302",path:"/usecases/crop-classification/",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-65bcb302").then(n)}},{path:"/usecases/crop-classification/index.html",redirect:"/usecases/crop-classification/"},{name:"v-2b5b0ed8",path:"/usecases/forest-change-detection/",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-2b5b0ed8").then(n)}},{path:"/usecases/forest-change-detection/index.html",redirect:"/usecases/forest-change-detection/"},{name:"v-5041b7a0",path:"/usecases/landcover/",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-5041b7a0").then(n)}},{path:"/usecases/landcover/index.html",redirect:"/usecases/landcover/"},{name:"v-589f7f88",path:"/usecases/large-scale-processing/",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-589f7f88").then(n)}},{path:"/usecases/large-scale-processing/index.html",redirect:"/usecases/large-scale-processing/"},{name:"v-697f60bc",path:"/usecases/no2-monitoring/",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-697f60bc").then(n)}},{path:"/usecases/no2-monitoring/index.html",redirect:"/usecases/no2-monitoring/"},{path:"*",component:Le}],Me={title:"openEO Platform Documentation",description:"One of the most important properties for a future-oriented platform on earth observation is the orientation towards simple operation, with a special focus on efficiency of evaluation and availability. Complexity is kept hidden in the background to direct your focus on the data. This is done on one hand by the use of an aggregate API to access the infrastructure, but also by improved user-faced graphical processing. For access to the API, the user has the option to incorporate his own preferences, by choosing between several clients.",base:"/",headTags:[],pages:[{title:"Home",frontmatter:{home:!0},regularPath:"/",relativePath:"README.md",key:"v-4e72e1d8",path:"/",lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{frontmatter:{fullpage:!0,stripCSS:!0},regularPath:"/api/",relativePath:"api/index.md",key:"v-14e901dc",path:"/api/",lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"Platform credit usage",frontmatter:{},regularPath:"/federation/accounting.html",relativePath:"federation/accounting.md",key:"v-045b6323",path:"/federation/accounting.html",headers:[{level:2,title:"Platform credit rates",slug:"platform-credit-rates"},{level:2,title:"Estimating resource usage",slug:"estimating-resource-usage"}],lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"Collections",frontmatter:{},regularPath:"/federation/backends/collections.html",relativePath:"federation/backends/collections.md",key:"v-3e291b63",path:"/federation/backends/collections.html",headers:[{level:2,title:"Collection availability",slug:"collection-availability"},{level:3,title:"Requirements for non-experimental collections",slug:"requirements-for-non-experimental-collections"},{level:2,title:"Harmonization",slug:"harmonization"},{level:3,title:"Common naming convention",slug:"common-naming-convention"},{level:3,title:"Sentinel2-L2A",slug:"sentinel2-l2a"},{level:3,title:"Common Properties",slug:"common-properties"}],lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"Federation API",frontmatter:{},regularPath:"/federation/backends/api.html",relativePath:"federation/backends/api.md",key:"v-acc004fa",path:"/federation/backends/api.html",headers:[{level:2,title:"Authentication and authorization",slug:"authentication-and-authorization"},{level:3,title:"Authentication",slug:"authentication"},{level:2,title:"Authorization",slug:"authorization"},{level:3,title:"Entitlements",slug:"entitlements"},{level:3,title:"Credits",slug:"credits"},{level:3,title:"Aggregator rules",slug:"aggregator-rules"},{level:3,title:"Backend rules",slug:"backend-rules"}],lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"File Formats",frontmatter:{},regularPath:"/federation/backends/fileformats.html",relativePath:"federation/backends/fileformats.md",key:"v-688ffb43",path:"/federation/backends/fileformats.html",headers:[{level:2,title:"Best practices file formats",slug:"best-practices-file-formats"},{level:3,title:"Raster Formats",slug:"raster-formats"},{level:2,title:"Federation agreement file formats",slug:"federation-agreement-file-formats"},{level:3,title:"GeoTiff",slug:"geotiff"},{level:3,title:"netCDF",slug:"netcdf"}],lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{frontmatter:{sidebar:!1,stripCSS:!0},regularPath:"/data-collections/",relativePath:"data-collections/index.md",key:"v-21917184",path:"/data-collections/",lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"Federation Contract",frontmatter:{},regularPath:"/federation/backends/",relativePath:"federation/backends/index.md",key:"v-700f1b88",path:"/federation/backends/",lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"Processes",frontmatter:{},regularPath:"/federation/backends/processes.html",relativePath:"federation/backends/processes.md",key:"v-78536523",path:"/federation/backends/processes.html",headers:[{level:2,title:"Core Profile",slug:"core-profile"},{level:3,title:"Data Cubes",slug:"data-cubes"},{level:3,title:"Arrays / Reducers",slug:"arrays-reducers"},{level:3,title:"Math",slug:"math"},{level:3,title:"Statistics / Indices",slug:"statistics-indices"},{level:3,title:"Logic",slug:"logic"}],lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"Federation Aspects and Known Issues",frontmatter:{},regularPath:"/federation/",relativePath:"federation/index.md",key:"v-7ffae7c8",path:"/federation/",headers:[{level:2,title:"Data Collections",slug:"data-collections"},{level:3,title:"Terrascope",slug:"terrascope"},{level:3,title:"Sentinel Hub",slug:"sentinel-hub"},{level:3,title:"EODC",slug:"eodc"},{level:3,title:"Enforce back-end selection for common collections",slug:"enforce-back-end-selection-for-common-collections"},{level:2,title:"Processes",slug:"processes"},{level:2,title:"File formats",slug:"file-formats"},{level:2,title:"On-demand-preview",slug:"on-demand-preview"},{level:2,title:"Batch jobs",slug:"batch-jobs"},{level:3,title:"Managed job splitting",slug:"managed-job-splitting"},{level:3,title:"Validity of signed URLs in batch job results",slug:"validity-of-signed-urls-in-batch-job-results"},{level:3,title:"Customizing batch job resources on Terrascope",slug:"customizing-batch-job-resources-on-terrascope"},{level:3,title:"Batch job results on Sentinel Hub",slug:"batch-job-results-on-sentinel-hub"}],lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{frontmatter:{sidebar:!1,stripCSS:!0},regularPath:"/file-formats/",relativePath:"file-formats/index.md",key:"v-21de1e8c",path:"/file-formats/",lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"Get started with the openEO Python Client Client Side Processing",frontmatter:{},regularPath:"/getting-started/client-side-processing/",relativePath:"getting-started/client-side-processing/index.md",key:"v-76e62a34",path:"/getting-started/client-side-processing/",headers:[{level:2,title:"Background",slug:"background"},{level:2,title:"Installation",slug:"installation"},{level:2,title:"Usage",slug:"usage"},{level:3,title:"STAC Collections and Items",slug:"stac-collections-and-items"},{level:3,title:"Local Collections",slug:"local-collections"},{level:3,title:"Local Processing",slug:"local-processing"},{level:2,title:"Client-Side Processing Example Notebooks",slug:"client-side-processing-example-notebooks"},{level:2,title:"Additional Information",slug:"additional-information"}],lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"Get started with the openEO Platform Editor",frontmatter:{},regularPath:"/getting-started/editor/",relativePath:"getting-started/editor/index.md",key:"v-adb4d3cc",path:"/getting-started/editor/",lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"Get started with the openEO JavaScript Client",frontmatter:{},regularPath:"/getting-started/javascript/",relativePath:"getting-started/javascript/index.md",key:"v-974804cc",path:"/getting-started/javascript/",headers:[{level:2,title:"Installation",slug:"installation"},{level:2,title:"Connecting to openEO Platform",slug:"connecting-to-openeo-platform"},{level:3,title:"Collections",slug:"collections"},{level:3,title:"Processes",slug:"processes"},{level:2,title:"Authentication",slug:"authentication"},{level:2,title:"Creating a (user-defined) process",slug:"creating-a-user-defined-process"},{level:2,title:"Batch Job Management",slug:"batch-job-management"},{level:2,title:"Additional Information",slug:"additional-information"}],lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"Get started with openEO Platform in JupyterLab (Python)",frontmatter:{},regularPath:"/getting-started/jupyterlab/",relativePath:"getting-started/jupyterlab/index.md",key:"v-779fe818",path:"/getting-started/jupyterlab/",lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"Get started with the openEO Python Client",frontmatter:{},regularPath:"/getting-started/python/",relativePath:"getting-started/python/index.md",key:"v-23074efc",path:"/getting-started/python/",headers:[{level:2,title:"Installation",slug:"installation"},{level:2,title:"Connect to openEO Platform and explore",slug:"connect-to-openeo-platform-and-explore"},{level:3,title:"Collections",slug:"collections"},{level:3,title:"Processes",slug:"processes"},{level:2,title:"Authentication",slug:"authentication"},{level:2,title:"Working with Datacubes",slug:"working-with-datacubes"},{level:3,title:"Creating a Datacube",slug:"creating-a-datacube"},{level:3,title:"Applying processes",slug:"applying-processes"},{level:3,title:"Defining output format",slug:"defining-output-format"},{level:2,title:"Execution",slug:"execution"},{level:3,title:"Batch job execution",slug:"batch-job-execution"},{level:2,title:"Additional Information",slug:"additional-information"}],lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"Run openEO processes in Shiny apps",frontmatter:{},regularPath:"/getting-started/python/shiny.html",relativePath:"getting-started/python/shiny.md",key:"v-6b6d7bae",path:"/getting-started/python/shiny.html",lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"Get started with the openEO R Client",frontmatter:{},regularPath:"/getting-started/r/",relativePath:"getting-started/r/index.md",key:"v-a5deb388",path:"/getting-started/r/",headers:[{level:2,title:"Useful links",slug:"useful-links"},{level:2,title:"Installation",slug:"installation"},{level:2,title:"Connect to openEO Platform and explore",slug:"connect-to-openeo-platform-and-explore"},{level:3,title:"Collections",slug:"collections"},{level:3,title:"Processes",slug:"processes"},{level:2,title:"Authentication",slug:"authentication"},{level:2,title:"Creating a (user-defined) process",slug:"creating-a-user-defined-process"},{level:2,title:"Batch Job Management",slug:"batch-job-management"}],lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"How to join the OpenEO Platform Virtual Organization (2 Steps)",frontmatter:{},regularPath:"/join/early_adopter.html",relativePath:"join/early_adopter.md",key:"v-1d4d57b7",path:"/join/early_adopter.html",headers:[{level:2,title:"Preamble: Registration and Login (Authentication)",slug:"preamble-registration-and-login-authentication"},{level:2,title:"Step 1: Connect an existing account",slug:"step-1-connect-an-existing-account"},{level:2,title:"Step 2: Join openEO Platform virtual organization",slug:"step-2-join-openeo-platform-virtual-organization"},{level:2,title:"Working with openEO platform",slug:"working-with-openeo-platform"}],lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"Registration",frontmatter:{},regularPath:"/join/free_trial.html",relativePath:"join/free_trial.md",key:"v-a1f70a7a",path:"/join/free_trial.html",headers:[{level:2,title:"Connect with EGI Check-in",slug:"connect-with-egi-check-in"},{level:2,title:"EOPlaza",slug:"eoplaza"},{level:2,title:"Working with openEO Platform",slug:"working-with-openeo-platform"}],lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"Analysis-Ready Data (ARD)",frontmatter:{},regularPath:"/usecases/ard/",relativePath:"usecases/ard/index.md",key:"v-d4caec3c",path:"/usecases/ard/",lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{frontmatter:{fullpage:!0,stripCSS:!0},regularPath:"/processes/",relativePath:"processes/index.md",key:"v-02b9217c",path:"/processes/",lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"Analysis-Ready Data for Multi-Spectral Imagery (Sentinel-2)",frontmatter:{},regularPath:"/usecases/ard/msi/",relativePath:"usecases/ard/msi/index.md",key:"v-0937d47a",path:"/usecases/ard/msi/",headers:[{level:2,title:"Atmospheric correction",slug:"atmospheric-correction"},{level:3,title:"Reference implementations",slug:"reference-implementations"}],lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"Analysis-Ready Data for SAR (Sentinel-1)",frontmatter:{},regularPath:"/usecases/ard/sar/",relativePath:"usecases/ard/sar/index.md",key:"v-c5fcf990",path:"/usecases/ard/sar/",headers:[{level:2,title:"Backscatter computation",slug:"backscatter-computation"},{level:2,title:"Reference implementations",slug:"reference-implementations"},{level:3,title:"CARD4L NRB for SENTINEL1_GRD collection (provided by Sentinel Hub)",slug:"card4l-nrb-for-sentinel1-grd-collection-provided-by-sentinel-hub"},{level:3,title:"Orfeo for other GRD collections (provided by VITO / TerraScope)",slug:"orfeo-for-other-grd-collections-provided-by-vito-terrascope"}],lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"Crop Classification",frontmatter:{},regularPath:"/usecases/crop-classification/",relativePath:"usecases/crop-classification/index.md",key:"v-65bcb302",path:"/usecases/crop-classification/",headers:[{level:2,title:"Preprocessing & feature engineering",slug:"preprocessing-feature-engineering"},{level:3,title:"Data preparation",slug:"data-preparation"},{level:3,title:"Computing temporal features",slug:"computing-temporal-features"},{level:2,title:"Model training",slug:"model-training"},{level:2,title:"Classification",slug:"classification"},{level:3,title:"Rule-based classification",slug:"rule-based-classification"},{level:3,title:"Supervised classification using Random Forest",slug:"supervised-classification-using-random-forest"}],lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"Forest Change Detection",frontmatter:{},regularPath:"/usecases/forest-change-detection/",relativePath:"usecases/forest-change-detection/index.md",key:"v-2b5b0ed8",path:"/usecases/forest-change-detection/",headers:[{level:2,title:"Data preparation",slug:"data-preparation"},{level:2,title:"Seasonal curve fitting",slug:"seasonal-curve-fitting"},{level:2,title:"Predicting values",slug:"predicting-values"}],lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"Dynamic land cover service",frontmatter:{},regularPath:"/usecases/landcover/",relativePath:"usecases/landcover/index.md",key:"v-5041b7a0",path:"/usecases/landcover/",headers:[{level:2,title:"Methodology",slug:"methodology"},{level:3,title:"Reference data",slug:"reference-data"},{level:3,title:"Input data",slug:"input-data"},{level:3,title:"Preprocessing",slug:"preprocessing"},{level:3,title:"Feature engineering",slug:"feature-engineering"},{level:3,title:"Model",slug:"model"},{level:2,title:"Implementation",slug:"implementation"}],lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"Large scale processing",frontmatter:{},regularPath:"/usecases/large-scale-processing/",relativePath:"usecases/large-scale-processing/index.md",key:"v-589f7f88",path:"/usecases/large-scale-processing/",headers:[{level:2,title:"Relevant openEO features",slug:"relevant-openeo-features"},{level:2,title:"Preparation",slug:"preparation"},{level:2,title:"Prepare tiling grid",slug:"prepare-tiling-grid"},{level:2,title:"Prepare job attributes",slug:"prepare-job-attributes"},{level:2,title:"Tuning your processing job",slug:"tuning-your-processing-job"},{level:2,title:"Starting map production",slug:"starting-map-production"},{level:2,title:"Errors during production",slug:"errors-during-production"}],lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"NO₂ monitoring",frontmatter:{},regularPath:"/usecases/no2-monitoring/",relativePath:"usecases/no2-monitoring/index.md",key:"v-697f60bc",path:"/usecases/no2-monitoring/",headers:[{level:2,title:"Shiny apps (R and Python)",slug:"shiny-apps-r-and-python"},{level:3,title:"Time-Series Analyser",slug:"time-series-analyser"},{level:3,title:"Map Maker for one Snapshot",slug:"map-maker-for-one-snapshot"},{level:3,title:"Spacetime Animation",slug:"spacetime-animation"},{level:2,title:"Basic NO₂ analysis in Python, R and JavaScript",slug:"basic-no2-analysis-in-python-r-and-javascript"},{level:3,title:"1. Load a data cube",slug:"_1-load-a-data-cube"},{level:3,title:"2. Fill gaps",slug:"_2-fill-gaps"},{level:3,title:"3. Smoothen values (optional)",slug:"_3-smoothen-values-optional"},{level:3,title:"4. What do you want to know?",slug:"_4-what-do-you-want-to-know"},{level:3,title:"5. Execute the process",slug:"_5-execute-the-process"},{level:3,title:"Result",slug:"result"}],lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}}],themeConfig:{logo:"https://openeo.cloud/wp-content/themes/openeo_platform/images/logo-pages.svg",editLinks:!0,docsRepo:"openEOPlatform/documentation",docsBranch:"main",algolia:{appId:"AH1DCGL38F",apiKey:"3d026b8a9c3950be6d136a6d0f934029",indexName:"openeo-cloud"},nav:[{text:"Datasets",link:"/data-collections/"},{text:"Get Started",items:[{text:"Free Trial Registration",link:"/join/free_trial.html"},{text:"Data Cubes",link:"https://openeo.org/documentation/1.0/datacubes.html"},{text:"Client Libraries",items:[{text:"JavaScript",link:"/getting-started/javascript/"},{text:"Python",link:"/getting-started/python/"},{text:"R",link:"/getting-started/r/"}]},{text:"Development Environments",items:[{text:"JupyterLab (Python)",link:"/getting-started/jupyterlab/"},{text:"Editor",link:"/getting-started/editor/"}]},{text:"Cookbook",link:"https://openeo.org/documentation/1.0/cookbook/"},{text:"Client-Side Processing (Python)",link:"/getting-started/client-side-processing/"}]},{text:"Clients",items:[{text:"JavaScript",link:"https://open-eo.github.io/openeo-js-client/latest/"},{text:"Python",link:"https://open-eo.github.io/openeo-python-client/"},{text:"R",link:"https://open-eo.github.io/openeo-r-client/"}]},{text:"Use Cases",items:[{text:"Cookbook",link:"https://openeo.org/documentation/1.0/cookbook/"},{text:"Analysis-Ready Data (ARD)",items:[{text:"Overview",link:"/usecases/ard/"},{text:"SAR (Sentinel-1)",link:"/usecases/ard/sar/"},{text:"Multi-Spectral Imagery",link:"/usecases/ard/msi/"}]},{text:"Crop Classification",link:"/usecases/crop-classification/"},{text:"Forest Change Detection",link:"/usecases/forest-change-detection/"},{text:"Land Cover Classification",link:"/usecases/landcover/"},{text:"NO₂ monitoring",link:"/usecases/no2-monitoring/"},{text:"Large scale processing",link:"/usecases/large-scale-processing/"}]},{text:"Processes",items:[{text:"JavaScript & R",link:"/processes/"},{text:"Python",link:"https://open-eo.github.io/openeo-python-client/api.html#module-openeo.rest.datacube"}]},{text:"File Formats",link:"/file-formats/"},{text:"Advanced",items:[{text:"Accounting",link:"/federation/accounting.html"},{text:"Federation Aspects",link:"/federation/index.html"},{text:"Federation Contract",link:"/federation/backends/index.html"},{text:"HTTP API",link:"/api/"}]},{text:"Contact",link:"https://openeo.cloud/contact/"}],sidebar:"auto"}};n(148);r.a.component("ApiSpec",()=>n.e(53).then(n.bind(null,469))),r.a.component("DataCollections",()=>Promise.all([n.e(0),n.e(4),n.e(33)]).then(n.bind(null,462))),r.a.component("FileFormatsSpec",()=>Promise.all([n.e(0),n.e(4),n.e(34)]).then(n.bind(null,463))),r.a.component("ProcessesSpec",()=>n.e(54).then(n.bind(null,470))),r.a.component("Badge",()=>Promise.all([n.e(0),n.e(15)]).then(n.bind(null,478))),r.a.component("CodeBlock",()=>Promise.all([n.e(0),n.e(16)]).then(n.bind(null,466))),r.a.component("CodeGroup",()=>Promise.all([n.e(0),n.e(17)]).then(n.bind(null,467)));n(149),n(150);r.a.component("CodeSwitcher",()=>n.e(55).then(n.bind(null,471)));var Ue=[({router:t,Vue:e})=>{e.config.ignoredElements=["redoc"],t.beforeEach((t,e,n)=>{const r={"/authentication":"/join/free_trial.html","/join/early_adopter.html":"/join/free_trial.html"}[t.path];r?n({path:r}):n()})},{},({Vue:t})=>{t.mixin({computed:{$dataBlock(){return this.$options.__data__block__}}})},{},{},{},{},{},({Vue:t})=>{t.component("CodeCopy",Ee)}],Ie=[];class De extends class{constructor(){this.store=new r.a({data:{state:{}}})}$get(t){return this.store.state[t]}$set(t,e){r.a.set(this.store.state,t,e)}$emit(...t){this.store.$emit(...t)}$on(...t){this.store.$on(...t)}}{}Object.assign(De.prototype,{getPageAsyncComponent:ce,getLayoutAsyncComponent:le,getAsyncComponent:ue,getVueComponent:pe});var Ne={install(t){const e=new De;t.$vuepress=e,t.prototype.$vuepress=e}};function Fe(t,e){const n=e.toLowerCase();return t.options.routes.some(t=>t.path.toLowerCase()===n)}var Be={props:{pageKey:String,slotKey:{type:String,default:"default"}},render(t){const e=this.pageKey||this.$parent.$page.key;return de("pageKey",e),r.a.component(e)||r.a.component(e,ce(e)),r.a.component(e)?t(e):t("")}},ze={functional:!0,props:{slotKey:String,required:!0},render:(t,{props:e,slots:n})=>t("div",{class:["content__"+e.slotKey]},n()[e.slotKey])},Ve={computed:{openInNewWindowTitle(){return this.$themeLocaleConfig.openNewWindowText||"(opens new window)"}}},He=(n(151),n(152),Object($e.a)(Ve,(function(){var t=this._self._c;return t("span",[t("svg",{staticClass:"icon outbound",attrs:{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",x:"0px",y:"0px",viewBox:"0 0 100 100",width:"15",height:"15"}},[t("path",{attrs:{fill:"currentColor",d:"M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"}}),this._v(" "),t("polygon",{attrs:{fill:"currentColor",points:"45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"}})]),this._v(" "),t("span",{staticClass:"sr-only"},[this._v(this._s(this.openInNewWindowTitle))])])}),[],!1,null,null,null).exports),qe={functional:!0,render(t,{parent:e,children:n}){if(e._isMounted)return n;e.$once("hook:mounted",()=>{e.$forceUpdate()})}};r.a.config.productionTip=!1,r.a.use(Jt),r.a.use(Ne),r.a.mixin(function(t,e,n=r.a){!function(t){t.locales&&Object.keys(t.locales).forEach(e=>{t.locales[e].path=e});Object.freeze(t)}(e),n.$vuepress.$set("siteData",e);const o=new(t(n.$vuepress.$get("siteData"))),i=Object.getOwnPropertyDescriptors(Object.getPrototypeOf(o)),a={};return Object.keys(i).reduce((t,e)=>(e.startsWith("$")&&(t[e]=i[e].get),t),a),{computed:a}}(t=>class{setPage(t){this.__page=t}get $site(){return t}get $themeConfig(){return this.$site.themeConfig}get $frontmatter(){return this.$page.frontmatter}get $localeConfig(){const{locales:t={}}=this.$site;let e,n;for(const r in t)"/"===r?n=t[r]:0===this.$page.path.indexOf(r)&&(e=t[r]);return e||n||{}}get $siteTitle(){return this.$localeConfig.title||this.$site.title||""}get $canonicalUrl(){const{canonicalUrl:t}=this.$page.frontmatter;return"string"==typeof t&&t}get $title(){const t=this.$page,{metaTitle:e}=this.$page.frontmatter;if("string"==typeof e)return e;const n=this.$siteTitle,r=t.frontmatter.home?null:t.frontmatter.title||t.title;return n?r?r+" | "+n:n:r||"VuePress"}get $description(){const t=function(t){if(t){const e=t.filter(t=>"description"===t.name)[0];if(e)return e.content}}(this.$page.frontmatter.meta);return t||(this.$page.frontmatter.description||this.$localeConfig.description||this.$site.description||"")}get $lang(){return this.$page.frontmatter.lang||this.$localeConfig.lang||"en-US"}get $localePath(){return this.$localeConfig.path||"/"}get $themeLocaleConfig(){return(this.$site.themeConfig.locales||{})[this.$localePath]||{}}get $page(){return this.__page?this.__page:function(t,e){for(let n=0;nn||(t.hash?!r.a.$vuepress.$get("disableScrollBehavior")&&{selector:decodeURIComponent(t.hash)}:{x:0,y:0})});!function(t){t.beforeEach((e,n,r)=>{if(Fe(t,e.path))r();else if(/(\/|\.html)$/.test(e.path))if(/\/$/.test(e.path)){const n=e.path.replace(/\/$/,"")+".html";Fe(t,n)?r(n):r()}else r();else{const n=e.path+"/",o=e.path+".html";Fe(t,o)?r(o):Fe(t,n)?r(n):r()}})}(n);const o={};try{await Promise.all(Ue.filter(t=>"function"==typeof t).map(e=>e({Vue:r.a,options:o,router:n,siteData:Me,isServer:t})))}catch(t){console.error(t)}return{app:new r.a(Object.assign(o,{router:n,render:t=>t("div",{attrs:{id:"app"}},[t("RouterView",{ref:"layout"}),t("div",{class:"global-ui"},Ie.map(e=>t(e)))])})),router:n}}(!1).then(({app:t,router:e})=>{e.onReady(()=>{t.$mount("#app")})})}]); \ No newline at end of file + */function o(t,e){for(var n in e)t[n]=e[n];return t}var i=/[!'()*]/g,a=function(t){return"%"+t.charCodeAt(0).toString(16)},s=/%2C/g,c=function(t){return encodeURIComponent(t).replace(i,a).replace(s,",")};function l(t){try{return decodeURIComponent(t)}catch(t){0}return t}var u=function(t){return null==t||"object"==typeof t?t:String(t)};function p(t){var e={};return(t=t.trim().replace(/^(\?|#|&)/,""))?(t.split("&").forEach((function(t){var n=t.replace(/\+/g," ").split("="),r=l(n.shift()),o=n.length>0?l(n.join("=")):null;void 0===e[r]?e[r]=o:Array.isArray(e[r])?e[r].push(o):e[r]=[e[r],o]})),e):e}function f(t){var e=t?Object.keys(t).map((function(e){var n=t[e];if(void 0===n)return"";if(null===n)return c(e);if(Array.isArray(n)){var r=[];return n.forEach((function(t){void 0!==t&&(null===t?r.push(c(e)):r.push(c(e)+"="+c(t)))})),r.join("&")}return c(e)+"="+c(n)})).filter((function(t){return t.length>0})).join("&"):null;return e?"?"+e:""}var d=/\/?$/;function h(t,e,n,r){var o=r&&r.options.stringifyQuery,i=e.query||{};try{i=v(i)}catch(t){}var a={name:e.name||t&&t.name,meta:t&&t.meta||{},path:e.path||"/",hash:e.hash||"",query:i,params:e.params||{},fullPath:y(e,o),matched:t?g(t):[]};return n&&(a.redirectedFrom=y(n,o)),Object.freeze(a)}function v(t){if(Array.isArray(t))return t.map(v);if(t&&"object"==typeof t){var e={};for(var n in t)e[n]=v(t[n]);return e}return t}var m=h(null,{path:"/"});function g(t){for(var e=[];t;)e.unshift(t),t=t.parent;return e}function y(t,e){var n=t.path,r=t.query;void 0===r&&(r={});var o=t.hash;return void 0===o&&(o=""),(n||"/")+(e||f)(r)+o}function b(t,e,n){return e===m?t===e:!!e&&(t.path&&e.path?t.path.replace(d,"")===e.path.replace(d,"")&&(n||t.hash===e.hash&&_(t.query,e.query)):!(!t.name||!e.name)&&(t.name===e.name&&(n||t.hash===e.hash&&_(t.query,e.query)&&_(t.params,e.params))))}function _(t,e){if(void 0===t&&(t={}),void 0===e&&(e={}),!t||!e)return t===e;var n=Object.keys(t).sort(),r=Object.keys(e).sort();return n.length===r.length&&n.every((function(n,o){var i=t[n];if(r[o]!==n)return!1;var a=e[n];return null==i||null==a?i===a:"object"==typeof i&&"object"==typeof a?_(i,a):String(i)===String(a)}))}function x(t){for(var e=0;e=0&&(e=t.slice(r),t=t.slice(0,r));var o=t.indexOf("?");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{path:t,query:n,hash:e}}(i.path||""),f=e&&e.path||"/",d=l.path?C(l.path,f,n||i.append):f,h=function(t,e,n){void 0===e&&(e={});var r,o=n||p;try{r=o(t||"")}catch(t){r={}}for(var i in e){var a=e[i];r[i]=Array.isArray(a)?a.map(u):u(a)}return r}(l.query,i.query,r&&r.options.parseQuery),v=i.hash||l.hash;return v&&"#"!==v.charAt(0)&&(v="#"+v),{_normalized:!0,path:d,query:h,hash:v}}var q,J=function(){},W={name:"RouterLink",props:{to:{type:[String,Object],required:!0},tag:{type:String,default:"a"},custom:Boolean,exact:Boolean,exactPath:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String,ariaCurrentValue:{type:String,default:"page"},event:{type:[String,Array],default:"click"}},render:function(t){var e=this,n=this.$router,r=this.$route,i=n.resolve(this.to,r,this.append),a=i.location,s=i.route,c=i.href,l={},u=n.options.linkActiveClass,p=n.options.linkExactActiveClass,f=null==u?"router-link-active":u,v=null==p?"router-link-exact-active":p,m=null==this.activeClass?f:this.activeClass,g=null==this.exactActiveClass?v:this.exactActiveClass,y=s.redirectedFrom?h(null,H(s.redirectedFrom),null,n):s;l[g]=b(r,y,this.exactPath),l[m]=this.exact||this.exactPath?l[g]:function(t,e){return 0===t.path.replace(d,"/").indexOf(e.path.replace(d,"/"))&&(!e.hash||t.hash===e.hash)&&function(t,e){for(var n in e)if(!(n in t))return!1;return!0}(t.query,e.query)}(r,y);var _=l[g]?this.ariaCurrentValue:null,x=function(t){K(t)&&(e.replace?n.replace(a,J):n.push(a,J))},w={click:K};Array.isArray(this.event)?this.event.forEach((function(t){w[t]=x})):w[this.event]=x;var k={class:l},C=!this.$scopedSlots.$hasNormal&&this.$scopedSlots.default&&this.$scopedSlots.default({href:c,route:s,navigate:x,isActive:l[m],isExactActive:l[g]});if(C){if(1===C.length)return C[0];if(C.length>1||!C.length)return 0===C.length?t():t("span",{},C)}if("a"===this.tag)k.on=w,k.attrs={href:c,"aria-current":_};else{var S=function t(e){var n;if(e)for(var r=0;r-1&&(s.params[f]=n.params[f]);return s.path=V(u.path,s.params),c(u,s,a)}if(s.path){s.params={};for(var d=0;d-1}function St(t,e){return Ct(t)&&t._isRouter&&(null==e||t.type===e)}function Ot(t,e,n){var r=function(o){o>=t.length?n():t[o]?e(t[o],(function(){r(o+1)})):r(o+1)};r(0)}function Pt(t){return function(e,n,r){var o=!1,i=0,a=null;jt(t,(function(t,e,n,s){if("function"==typeof t&&void 0===t.cid){o=!0,i++;var c,l=Tt((function(e){var o;((o=e).__esModule||Et&&"Module"===o[Symbol.toStringTag])&&(e=e.default),t.resolved="function"==typeof e?e:q.extend(e),n.components[s]=e,--i<=0&&r()})),u=Tt((function(t){var e="Failed to resolve async component "+s+": "+t;a||(a=Ct(t)?t:new Error(e),r(a))}));try{c=t(l,u)}catch(t){u(t)}if(c)if("function"==typeof c.then)c.then(l,u);else{var p=c.component;p&&"function"==typeof p.then&&p.then(l,u)}}})),o||r()}}function jt(t,e){return $t(t.map((function(t){return Object.keys(t.components).map((function(n){return e(t.components[n],t.instances[n],t,n)}))})))}function $t(t){return Array.prototype.concat.apply([],t)}var Et="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;function Tt(t){var e=!1;return function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];if(!e)return e=!0,t.apply(this,n)}}var At=function(t,e){this.router=t,this.base=function(t){if(!t)if(G){var e=document.querySelector("base");t=(t=e&&e.getAttribute("href")||"/").replace(/^https?:\/\/[^\/]+/,"")}else t="/";"/"!==t.charAt(0)&&(t="/"+t);return t.replace(/\/$/,"")}(e),this.current=m,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[],this.listeners=[]};function Lt(t,e,n,r){var o=jt(t,(function(t,r,o,i){var a=function(t,e){"function"!=typeof t&&(t=q.extend(t));return t.options[e]}(t,e);if(a)return Array.isArray(a)?a.map((function(t){return n(t,r,o,i)})):n(a,r,o,i)}));return $t(r?o.reverse():o)}function Rt(t,e){if(e)return function(){return t.apply(e,arguments)}}At.prototype.listen=function(t){this.cb=t},At.prototype.onReady=function(t,e){this.ready?t():(this.readyCbs.push(t),e&&this.readyErrorCbs.push(e))},At.prototype.onError=function(t){this.errorCbs.push(t)},At.prototype.transitionTo=function(t,e,n){var r,o=this;try{r=this.router.match(t,this.current)}catch(t){throw this.errorCbs.forEach((function(e){e(t)})),t}var i=this.current;this.confirmTransition(r,(function(){o.updateRoute(r),e&&e(r),o.ensureURL(),o.router.afterHooks.forEach((function(t){t&&t(r,i)})),o.ready||(o.ready=!0,o.readyCbs.forEach((function(t){t(r)})))}),(function(t){n&&n(t),t&&!o.ready&&(St(t,bt.redirected)&&i===m||(o.ready=!0,o.readyErrorCbs.forEach((function(e){e(t)}))))}))},At.prototype.confirmTransition=function(t,e,n){var r=this,o=this.current;this.pending=t;var i,a,s=function(t){!St(t)&&Ct(t)&&(r.errorCbs.length?r.errorCbs.forEach((function(e){e(t)})):console.error(t)),n&&n(t)},c=t.matched.length-1,l=o.matched.length-1;if(b(t,o)&&c===l&&t.matched[c]===o.matched[l])return this.ensureURL(),t.hash&&st(this.router,o,t,!1),s(((a=wt(i=o,t,bt.duplicated,'Avoided redundant navigation to current location: "'+i.fullPath+'".')).name="NavigationDuplicated",a));var u=function(t,e){var n,r=Math.max(t.length,e.length);for(n=0;n0)){var e=this.router,n=e.options.scrollBehavior,r=mt&&n;r&&this.listeners.push(at());var o=function(){var n=t.current,o=Ut(t.base);t.current===m&&o===t._startLocation||t.transitionTo(o,(function(t){r&&st(e,t,n,!0)}))};window.addEventListener("popstate",o),this.listeners.push((function(){window.removeEventListener("popstate",o)}))}},e.prototype.go=function(t){window.history.go(t)},e.prototype.push=function(t,e,n){var r=this,o=this.current;this.transitionTo(t,(function(t){gt(S(r.base+t.fullPath)),st(r.router,t,o,!1),e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this,o=this.current;this.transitionTo(t,(function(t){yt(S(r.base+t.fullPath)),st(r.router,t,o,!1),e&&e(t)}),n)},e.prototype.ensureURL=function(t){if(Ut(this.base)!==this.current.fullPath){var e=S(this.base+this.current.fullPath);t?gt(e):yt(e)}},e.prototype.getCurrentLocation=function(){return Ut(this.base)},e}(At);function Ut(t){var e=window.location.pathname,n=e.toLowerCase(),r=t.toLowerCase();return!t||n!==r&&0!==n.indexOf(S(r+"/"))||(e=e.slice(t.length)),(e||"/")+window.location.search+window.location.hash}var It=function(t){function e(e,n,r){t.call(this,e,n),r&&function(t){var e=Ut(t);if(!/^\/#/.test(e))return window.location.replace(S(t+"/#"+e)),!0}(this.base)||Dt()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setupListeners=function(){var t=this;if(!(this.listeners.length>0)){var e=this.router.options.scrollBehavior,n=mt&&e;n&&this.listeners.push(at());var r=function(){var e=t.current;Dt()&&t.transitionTo(Nt(),(function(r){n&&st(t.router,r,e,!0),mt||zt(r.fullPath)}))},o=mt?"popstate":"hashchange";window.addEventListener(o,r),this.listeners.push((function(){window.removeEventListener(o,r)}))}},e.prototype.push=function(t,e,n){var r=this,o=this.current;this.transitionTo(t,(function(t){Bt(t.fullPath),st(r.router,t,o,!1),e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this,o=this.current;this.transitionTo(t,(function(t){zt(t.fullPath),st(r.router,t,o,!1),e&&e(t)}),n)},e.prototype.go=function(t){window.history.go(t)},e.prototype.ensureURL=function(t){var e=this.current.fullPath;Nt()!==e&&(t?Bt(e):zt(e))},e.prototype.getCurrentLocation=function(){return Nt()},e}(At);function Dt(){var t=Nt();return"/"===t.charAt(0)||(zt("/"+t),!1)}function Nt(){var t=window.location.href,e=t.indexOf("#");return e<0?"":t=t.slice(e+1)}function Ft(t){var e=window.location.href,n=e.indexOf("#");return(n>=0?e.slice(0,n):e)+"#"+t}function Bt(t){mt?gt(Ft(t)):window.location.hash=t}function zt(t){mt?yt(Ft(t)):window.location.replace(Ft(t))}var Vt=function(t){function e(e,n){t.call(this,e,n),this.stack=[],this.index=-1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.push=function(t,e,n){var r=this;this.transitionTo(t,(function(t){r.stack=r.stack.slice(0,r.index+1).concat(t),r.index++,e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this;this.transitionTo(t,(function(t){r.stack=r.stack.slice(0,r.index).concat(t),e&&e(t)}),n)},e.prototype.go=function(t){var e=this,n=this.index+t;if(!(n<0||n>=this.stack.length)){var r=this.stack[n];this.confirmTransition(r,(function(){var t=e.current;e.index=n,e.updateRoute(r),e.router.afterHooks.forEach((function(e){e&&e(r,t)}))}),(function(t){St(t,bt.duplicated)&&(e.index=n)}))}},e.prototype.getCurrentLocation=function(){var t=this.stack[this.stack.length-1];return t?t.fullPath:"/"},e.prototype.ensureURL=function(){},e}(At),Ht=function(t){void 0===t&&(t={}),this.app=null,this.apps=[],this.options=t,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=Z(t.routes||[],this);var e=t.mode||"hash";switch(this.fallback="history"===e&&!mt&&!1!==t.fallback,this.fallback&&(e="hash"),G||(e="abstract"),this.mode=e,e){case"history":this.history=new Mt(this,t.base);break;case"hash":this.history=new It(this,t.base,this.fallback);break;case"abstract":this.history=new Vt(this,t.base);break;default:0}},qt={currentRoute:{configurable:!0}};Ht.prototype.match=function(t,e,n){return this.matcher.match(t,e,n)},qt.currentRoute.get=function(){return this.history&&this.history.current},Ht.prototype.init=function(t){var e=this;if(this.apps.push(t),t.$once("hook:destroyed",(function(){var n=e.apps.indexOf(t);n>-1&&e.apps.splice(n,1),e.app===t&&(e.app=e.apps[0]||null),e.app||e.history.teardown()})),!this.app){this.app=t;var n=this.history;if(n instanceof Mt||n instanceof It){var r=function(t){n.setupListeners(),function(t){var r=n.current,o=e.options.scrollBehavior;mt&&o&&"fullPath"in t&&st(e,t,r,!1)}(t)};n.transitionTo(n.getCurrentLocation(),r,r)}n.listen((function(t){e.apps.forEach((function(e){e._route=t}))}))}},Ht.prototype.beforeEach=function(t){return Wt(this.beforeHooks,t)},Ht.prototype.beforeResolve=function(t){return Wt(this.resolveHooks,t)},Ht.prototype.afterEach=function(t){return Wt(this.afterHooks,t)},Ht.prototype.onReady=function(t,e){this.history.onReady(t,e)},Ht.prototype.onError=function(t){this.history.onError(t)},Ht.prototype.push=function(t,e,n){var r=this;if(!e&&!n&&"undefined"!=typeof Promise)return new Promise((function(e,n){r.history.push(t,e,n)}));this.history.push(t,e,n)},Ht.prototype.replace=function(t,e,n){var r=this;if(!e&&!n&&"undefined"!=typeof Promise)return new Promise((function(e,n){r.history.replace(t,e,n)}));this.history.replace(t,e,n)},Ht.prototype.go=function(t){this.history.go(t)},Ht.prototype.back=function(){this.go(-1)},Ht.prototype.forward=function(){this.go(1)},Ht.prototype.getMatchedComponents=function(t){var e=t?t.matched?t:this.resolve(t).route:this.currentRoute;return e?[].concat.apply([],e.matched.map((function(t){return Object.keys(t.components).map((function(e){return t.components[e]}))}))):[]},Ht.prototype.resolve=function(t,e,n){var r=H(t,e=e||this.history.current,n,this),o=this.match(r,e),i=o.redirectedFrom||o.fullPath;return{location:r,route:o,href:function(t,e,n){var r="hash"===n?"#"+e:e;return t?S(t+"/"+r):r}(this.history.base,i,this.mode),normalizedTo:r,resolved:o}},Ht.prototype.getRoutes=function(){return this.matcher.getRoutes()},Ht.prototype.addRoute=function(t,e){this.matcher.addRoute(t,e),this.history.current!==m&&this.history.transitionTo(this.history.getCurrentLocation())},Ht.prototype.addRoutes=function(t){this.matcher.addRoutes(t),this.history.current!==m&&this.history.transitionTo(this.history.getCurrentLocation())},Object.defineProperties(Ht.prototype,qt);var Jt=Ht;function Wt(t,e){return t.push(e),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}Ht.install=function t(e){if(!t.installed||q!==e){t.installed=!0,q=e;var n=function(t){return void 0!==t},r=function(t,e){var r=t.$options._parentVnode;n(r)&&n(r=r.data)&&n(r=r.registerRouteInstance)&&r(t,e)};e.mixin({beforeCreate:function(){n(this.$options.router)?(this._routerRoot=this,this._router=this.$options.router,this._router.init(this),e.util.defineReactive(this,"_route",this._router.history.current)):this._routerRoot=this.$parent&&this.$parent._routerRoot||this,r(this,this)},destroyed:function(){r(this)}}),Object.defineProperty(e.prototype,"$router",{get:function(){return this._routerRoot._router}}),Object.defineProperty(e.prototype,"$route",{get:function(){return this._routerRoot._route}}),e.component("RouterView",w),e.component("RouterLink",W);var o=e.config.optionMergeStrategies;o.beforeRouteEnter=o.beforeRouteLeave=o.beforeRouteUpdate=o.created}},Ht.version="3.6.5",Ht.isNavigationFailure=St,Ht.NavigationFailureType=bt,Ht.START_LOCATION=m,G&&window.Vue&&window.Vue.use(Ht);var Kt={"components/AlgoliaSearchBox":()=>Promise.all([n.e(0),n.e(38)]).then(n.bind(null,237)),"components/DropdownLink":()=>Promise.all([n.e(0),n.e(28)]).then(n.bind(null,181)),"components/DropdownTransition":()=>Promise.all([n.e(0),n.e(47)]).then(n.bind(null,159)),"components/Home":()=>Promise.all([n.e(0),n.e(31)]).then(n.bind(null,301)),"components/NavLink":()=>n.e(50).then(n.bind(null,157)),"components/NavLinks":()=>Promise.all([n.e(0),n.e(26)]).then(n.bind(null,205)),"components/Navbar":()=>Promise.all([n.e(0),n.e(5),n.e(39)]).then(n.bind(null,453)),"components/Page":()=>Promise.all([n.e(0),n.e(25)]).then(n.bind(null,302)),"components/PageEdit":()=>Promise.all([n.e(0),n.e(32)]).then(n.bind(null,211)),"components/PageNav":()=>Promise.all([n.e(0),n.e(29)]).then(n.bind(null,212)),"components/Sidebar":()=>Promise.all([n.e(0),n.e(24)]).then(n.bind(null,303)),"components/SidebarButton":()=>Promise.all([n.e(0),n.e(48)]).then(n.bind(null,308)),"components/SidebarGroup":()=>Promise.all([n.e(0),n.e(10)]).then(n.bind(null,206)),"components/SidebarLink":()=>Promise.all([n.e(0),n.e(36)]).then(n.bind(null,182)),"components/SidebarLinks":()=>Promise.all([n.e(0),n.e(10)]).then(n.bind(null,177)),"global-components/Badge":()=>Promise.all([n.e(0),n.e(15)]).then(n.bind(null,478)),"global-components/CodeBlock":()=>Promise.all([n.e(0),n.e(16)]).then(n.bind(null,466)),"global-components/CodeGroup":()=>Promise.all([n.e(0),n.e(17)]).then(n.bind(null,467)),"layouts/404":()=>n.e(18).then(n.bind(null,468)),"layouts/Layout":()=>Promise.all([n.e(0),n.e(5),n.e(9),n.e(11)]).then(n.bind(null,465)),NotFound:()=>n.e(18).then(n.bind(null,468)),Layout:()=>Promise.all([n.e(0),n.e(5),n.e(9),n.e(11)]).then(n.bind(null,465))},Gt={"v-4e72e1d8":()=>n.e(56).then(n.bind(null,479)),"v-14e901dc":()=>n.e(57).then(n.bind(null,480)),"v-21917184":()=>n.e(58).then(n.bind(null,481)),"v-045b6323":()=>n.e(59).then(n.bind(null,482)),"v-acc004fa":()=>n.e(60).then(n.bind(null,483)),"v-688ffb43":()=>n.e(62).then(n.bind(null,484)),"v-3e291b63":()=>n.e(61).then(n.bind(null,485)),"v-78536523":()=>n.e(64).then(n.bind(null,486)),"v-700f1b88":()=>n.e(63).then(n.bind(null,487)),"v-21de1e8c":()=>n.e(65).then(n.bind(null,488)),"v-76e62a34":()=>n.e(66).then(n.bind(null,489)),"v-7ffae7c8":()=>n.e(51).then(n.bind(null,490)),"v-adb4d3cc":()=>n.e(67).then(n.bind(null,491)),"v-974804cc":()=>n.e(68).then(n.bind(null,492)),"v-23074efc":()=>n.e(70).then(n.bind(null,493)),"v-6b6d7bae":()=>n.e(71).then(n.bind(null,494)),"v-a5deb388":()=>n.e(72).then(n.bind(null,495)),"v-779fe818":()=>n.e(69).then(n.bind(null,496)),"v-1d4d57b7":()=>n.e(37).then(n.bind(null,497)),"v-a1f70a7a":()=>n.e(49).then(n.bind(null,498)),"v-d4caec3c":()=>n.e(74).then(n.bind(null,499)),"v-02b9217c":()=>n.e(73).then(n.bind(null,500)),"v-0937d47a":()=>n.e(75).then(n.bind(null,501)),"v-65bcb302":()=>n.e(77).then(n.bind(null,502)),"v-c5fcf990":()=>n.e(76).then(n.bind(null,503)),"v-2b5b0ed8":()=>n.e(78).then(n.bind(null,504)),"v-5041b7a0":()=>n.e(79).then(n.bind(null,505)),"v-697f60bc":()=>n.e(52).then(n.bind(null,506)),"v-589f7f88":()=>n.e(80).then(n.bind(null,507))};function Xt(t){const e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}const Yt=/-(\w)/g,Zt=Xt(t=>t.replace(Yt,(t,e)=>e?e.toUpperCase():"")),Qt=/\B([A-Z])/g,te=Xt(t=>t.replace(Qt,"-$1").toLowerCase()),ee=Xt(t=>t.charAt(0).toUpperCase()+t.slice(1));function ne(t,e){if(!e)return;if(t(e))return t(e);return e.includes("-")?t(ee(Zt(e))):t(ee(e))||t(te(e))}const re=Object.assign({},Kt,Gt),oe=t=>re[t],ie=t=>Gt[t],ae=t=>Kt[t],se=t=>r.a.component(t);function ce(t){return ne(ie,t)}function le(t){return ne(ae,t)}function ue(t){return ne(oe,t)}function pe(t){return ne(se,t)}function fe(...t){return Promise.all(t.filter(t=>t).map(async t=>{if(!pe(t)&&ue(t)){const e=await ue(t)();r.a.component(t,e.default)}}))}function de(t,e){"undefined"!=typeof window&&window.__VUEPRESS__&&(window.__VUEPRESS__[t]=e)}var he=n(47),ve=n.n(he),me=n(48),ge=n.n(me),ye={created(){if(this.siteMeta=this.$site.headTags.filter(([t])=>"meta"===t).map(([t,e])=>e),this.$ssrContext){const e=this.getMergedMetaTags();this.$ssrContext.title=this.$title,this.$ssrContext.lang=this.$lang,this.$ssrContext.pageMeta=(t=e)?t.map(t=>{let e="{e+=` ${n}="${ge()(t[n])}"`}),e+">"}).join("\n "):"",this.$ssrContext.canonicalLink=_e(this.$canonicalUrl)}var t},mounted(){this.currentMetaTags=[...document.querySelectorAll("meta")],this.updateMeta(),this.updateCanonicalLink()},methods:{updateMeta(){document.title=this.$title,document.documentElement.lang=this.$lang;const t=this.getMergedMetaTags();this.currentMetaTags=xe(t,this.currentMetaTags)},getMergedMetaTags(){const t=this.$page.frontmatter.meta||[];return ve()([{name:"description",content:this.$description}],t,this.siteMeta,we)},updateCanonicalLink(){be(),this.$canonicalUrl&&document.head.insertAdjacentHTML("beforeend",_e(this.$canonicalUrl))}},watch:{$page(){this.updateMeta(),this.updateCanonicalLink()}},beforeDestroy(){xe(null,this.currentMetaTags),be()}};function be(){const t=document.querySelector("link[rel='canonical']");t&&t.remove()}function _e(t=""){return t?``:""}function xe(t,e){if(e&&[...e].filter(t=>t.parentNode===document.head).forEach(t=>document.head.removeChild(t)),t)return t.map(t=>{const e=document.createElement("meta");return Object.keys(t).forEach(n=>{e.setAttribute(n,t[n])}),document.head.appendChild(e),e})}function we(t){for(const e of["name","property","itemprop"])if(t.hasOwnProperty(e))return t[e]+e;return JSON.stringify(t)}var ke=n(13),Ce=n.n(ke),Se={mounted(){Ce.a.configure({showSpinner:!1}),this.$router.beforeEach((t,e,n)=>{t.path===e.path||r.a.component(t.name)||Ce.a.start(),n()}),this.$router.afterEach(()=>{Ce.a.done(),this.isSidebarOpen=!1})}},Oe=n(49),Pe={mounted(){window.addEventListener("scroll",this.onScroll)},methods:{onScroll:n.n(Oe)()((function(){this.setActiveHash()}),300),setActiveHash(){const t=[].slice.call(document.querySelectorAll(".sidebar-link")),e=[].slice.call(document.querySelectorAll(".header-anchor")).filter(e=>t.some(t=>t.hash===e.hash)),n=Math.max(window.pageYOffset,document.documentElement.scrollTop,document.body.scrollTop),r=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),o=window.innerHeight+n;for(let t=0;t=i.parentElement.offsetTop+10&&(!a||n{this.$nextTick(()=>{this.$vuepress.$set("disableScrollBehavior",!1)})})}}}},beforeDestroy(){window.removeEventListener("scroll",this.onScroll)}},je={props:{parent:Object,code:String,options:{align:String,color:String,backgroundTransition:Boolean,backgroundColor:String,successText:String,staticIcon:Boolean}},data:()=>({success:!1,originalBackground:null,originalTransition:null}),computed:{alignStyle(){let t={};return t[this.options.align]="7.5px",t},iconClass(){return this.options.staticIcon?"":"hover"}},mounted(){this.originalTransition=this.parent.style.transition,this.originalBackground=this.parent.style.background},beforeDestroy(){this.parent.style.transition=this.originalTransition,this.parent.style.background=this.originalBackground},methods:{hexToRgb(t){let e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return e?{r:parseInt(e[1],16),g:parseInt(e[2],16),b:parseInt(e[3],16)}:null},copyToClipboard(t){if(navigator.clipboard)navigator.clipboard.writeText(this.code).then(()=>{this.setSuccessTransitions()},()=>{});else{let t=document.createElement("textarea");document.body.appendChild(t),t.value=this.code,t.select(),document.execCommand("Copy"),t.remove(),this.setSuccessTransitions()}},setSuccessTransitions(){if(clearTimeout(this.successTimeout),this.options.backgroundTransition){this.parent.style.transition="background 350ms";let t=this.hexToRgb(this.options.backgroundColor);this.parent.style.background=`rgba(${t.r}, ${t.g}, ${t.b}, 0.1)`}this.success=!0,this.successTimeout=setTimeout(()=>{this.options.backgroundTransition&&(this.parent.style.background=this.originalBackground,this.parent.style.transition=this.originalTransition),this.success=!1},500)}}},$e=(n(146),n(4)),Ee=Object($e.a)(je,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"code-copy"},[e("svg",{class:t.iconClass,style:t.alignStyle,attrs:{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},on:{click:t.copyToClipboard}},[e("path",{attrs:{fill:"none",d:"M0 0h24v24H0z"}}),t._v(" "),e("path",{attrs:{fill:t.options.color,d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4l6 6v10c0 1.1-.9 2-2 2H7.99C6.89 23 6 22.1 6 21l.01-14c0-1.1.89-2 1.99-2h7zm-1 7h5.5L14 6.5V12z"}})]),t._v(" "),e("span",{class:t.success?"success":"",style:t.alignStyle},[t._v("\n "+t._s(t.options.successText)+"\n ")])])}),[],!1,null,"49140617",null).exports,Te=(n(147),[ye,Se,Pe,{updated(){this.update()},methods:{update(){setTimeout(()=>{document.querySelectorAll('div[class*="language-"] pre').forEach(t=>{if(t.classList.contains("code-copy-added"))return;let e=new(r.a.extend(Ee));e.options={align:"bottom",color:"#27b1ff",backgroundTransition:!0,backgroundColor:"#0075b8",successText:"Copied!",staticIcon:!1},e.code=t.innerText,e.parent=t,e.$mount(),t.classList.add("code-copy-added"),t.appendChild(e.$el)})},100)}}}]),Ae={name:"GlobalLayout",computed:{layout(){const t=this.getLayout();return de("layout",t),r.a.component(t)}},methods:{getLayout(){if(this.$page.path){const t=this.$page.frontmatter.layout;return t&&(this.$vuepress.getLayoutAsyncComponent(t)||this.$vuepress.getVueComponent(t))?t:"Layout"}return"NotFound"}}},Le=Object($e.a)(Ae,(function(){return(0,this._self._c)(this.layout,{tag:"component"})}),[],!1,null,null,null).exports;!function(t,e,n){switch(e){case"components":t[e]||(t[e]={}),Object.assign(t[e],n);break;case"mixins":t[e]||(t[e]=[]),t[e].push(...n);break;default:throw new Error("Unknown option name.")}}(Le,"mixins",Te);const Re=[{name:"v-4e72e1d8",path:"/",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-4e72e1d8").then(n)}},{path:"/index.html",redirect:"/"},{name:"v-14e901dc",path:"/api/",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-14e901dc").then(n)}},{path:"/api/index.html",redirect:"/api/"},{name:"v-21917184",path:"/data-collections/",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-21917184").then(n)}},{path:"/data-collections/index.html",redirect:"/data-collections/"},{name:"v-045b6323",path:"/federation/accounting.html",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-045b6323").then(n)}},{name:"v-acc004fa",path:"/federation/backends/api.html",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-acc004fa").then(n)}},{name:"v-688ffb43",path:"/federation/backends/fileformats.html",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-688ffb43").then(n)}},{name:"v-3e291b63",path:"/federation/backends/collections.html",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-3e291b63").then(n)}},{name:"v-78536523",path:"/federation/backends/processes.html",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-78536523").then(n)}},{name:"v-700f1b88",path:"/federation/backends/",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-700f1b88").then(n)}},{path:"/federation/backends/index.html",redirect:"/federation/backends/"},{name:"v-21de1e8c",path:"/file-formats/",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-21de1e8c").then(n)}},{path:"/file-formats/index.html",redirect:"/file-formats/"},{name:"v-76e62a34",path:"/getting-started/client-side-processing/",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-76e62a34").then(n)}},{path:"/getting-started/client-side-processing/index.html",redirect:"/getting-started/client-side-processing/"},{name:"v-7ffae7c8",path:"/federation/",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-7ffae7c8").then(n)}},{path:"/federation/index.html",redirect:"/federation/"},{name:"v-adb4d3cc",path:"/getting-started/editor/",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-adb4d3cc").then(n)}},{path:"/getting-started/editor/index.html",redirect:"/getting-started/editor/"},{name:"v-974804cc",path:"/getting-started/javascript/",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-974804cc").then(n)}},{path:"/getting-started/javascript/index.html",redirect:"/getting-started/javascript/"},{name:"v-23074efc",path:"/getting-started/python/",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-23074efc").then(n)}},{path:"/getting-started/python/index.html",redirect:"/getting-started/python/"},{name:"v-6b6d7bae",path:"/getting-started/python/shiny.html",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-6b6d7bae").then(n)}},{name:"v-a5deb388",path:"/getting-started/r/",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-a5deb388").then(n)}},{path:"/getting-started/r/index.html",redirect:"/getting-started/r/"},{name:"v-779fe818",path:"/getting-started/jupyterlab/",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-779fe818").then(n)}},{path:"/getting-started/jupyterlab/index.html",redirect:"/getting-started/jupyterlab/"},{name:"v-1d4d57b7",path:"/join/early_adopter.html",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-1d4d57b7").then(n)}},{name:"v-a1f70a7a",path:"/join/free_trial.html",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-a1f70a7a").then(n)}},{name:"v-d4caec3c",path:"/usecases/ard/",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-d4caec3c").then(n)}},{path:"/usecases/ard/index.html",redirect:"/usecases/ard/"},{name:"v-02b9217c",path:"/processes/",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-02b9217c").then(n)}},{path:"/processes/index.html",redirect:"/processes/"},{name:"v-0937d47a",path:"/usecases/ard/msi/",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-0937d47a").then(n)}},{path:"/usecases/ard/msi/index.html",redirect:"/usecases/ard/msi/"},{name:"v-65bcb302",path:"/usecases/crop-classification/",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-65bcb302").then(n)}},{path:"/usecases/crop-classification/index.html",redirect:"/usecases/crop-classification/"},{name:"v-c5fcf990",path:"/usecases/ard/sar/",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-c5fcf990").then(n)}},{path:"/usecases/ard/sar/index.html",redirect:"/usecases/ard/sar/"},{name:"v-2b5b0ed8",path:"/usecases/forest-change-detection/",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-2b5b0ed8").then(n)}},{path:"/usecases/forest-change-detection/index.html",redirect:"/usecases/forest-change-detection/"},{name:"v-5041b7a0",path:"/usecases/landcover/",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-5041b7a0").then(n)}},{path:"/usecases/landcover/index.html",redirect:"/usecases/landcover/"},{name:"v-697f60bc",path:"/usecases/no2-monitoring/",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-697f60bc").then(n)}},{path:"/usecases/no2-monitoring/index.html",redirect:"/usecases/no2-monitoring/"},{name:"v-589f7f88",path:"/usecases/large-scale-processing/",component:Le,beforeEnter:(t,e,n)=>{fe("Layout","v-589f7f88").then(n)}},{path:"/usecases/large-scale-processing/index.html",redirect:"/usecases/large-scale-processing/"},{path:"*",component:Le}],Me={title:"openEO Platform Documentation",description:"One of the most important properties for a future-oriented platform on earth observation is the orientation towards simple operation, with a special focus on efficiency of evaluation and availability. Complexity is kept hidden in the background to direct your focus on the data. This is done on one hand by the use of an aggregate API to access the infrastructure, but also by improved user-faced graphical processing. For access to the API, the user has the option to incorporate his own preferences, by choosing between several clients.",base:"/",headTags:[],pages:[{title:"Home",frontmatter:{home:!0},regularPath:"/",relativePath:"README.md",key:"v-4e72e1d8",path:"/",lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{frontmatter:{fullpage:!0,stripCSS:!0},regularPath:"/api/",relativePath:"api/index.md",key:"v-14e901dc",path:"/api/",lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{frontmatter:{sidebar:!1,stripCSS:!0},regularPath:"/data-collections/",relativePath:"data-collections/index.md",key:"v-21917184",path:"/data-collections/",lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"Platform credit usage",frontmatter:{},regularPath:"/federation/accounting.html",relativePath:"federation/accounting.md",key:"v-045b6323",path:"/federation/accounting.html",headers:[{level:2,title:"Platform credit rates",slug:"platform-credit-rates"},{level:2,title:"Estimating resource usage",slug:"estimating-resource-usage"}],lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"Federation API",frontmatter:{},regularPath:"/federation/backends/api.html",relativePath:"federation/backends/api.md",key:"v-acc004fa",path:"/federation/backends/api.html",headers:[{level:2,title:"Authentication and authorization",slug:"authentication-and-authorization"},{level:3,title:"Authentication",slug:"authentication"},{level:2,title:"Authorization",slug:"authorization"},{level:3,title:"Entitlements",slug:"entitlements"},{level:3,title:"Credits",slug:"credits"},{level:3,title:"Aggregator rules",slug:"aggregator-rules"},{level:3,title:"Backend rules",slug:"backend-rules"}],lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"File Formats",frontmatter:{},regularPath:"/federation/backends/fileformats.html",relativePath:"federation/backends/fileformats.md",key:"v-688ffb43",path:"/federation/backends/fileformats.html",headers:[{level:2,title:"Best practices file formats",slug:"best-practices-file-formats"},{level:3,title:"Raster Formats",slug:"raster-formats"},{level:2,title:"Federation agreement file formats",slug:"federation-agreement-file-formats"},{level:3,title:"GeoTiff",slug:"geotiff"},{level:3,title:"netCDF",slug:"netcdf"}],lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"Collections",frontmatter:{},regularPath:"/federation/backends/collections.html",relativePath:"federation/backends/collections.md",key:"v-3e291b63",path:"/federation/backends/collections.html",headers:[{level:2,title:"Collection availability",slug:"collection-availability"},{level:3,title:"Requirements for non-experimental collections",slug:"requirements-for-non-experimental-collections"},{level:2,title:"Harmonization",slug:"harmonization"},{level:3,title:"Common naming convention",slug:"common-naming-convention"},{level:3,title:"Sentinel2-L2A",slug:"sentinel2-l2a"},{level:3,title:"Common Properties",slug:"common-properties"}],lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"Processes",frontmatter:{},regularPath:"/federation/backends/processes.html",relativePath:"federation/backends/processes.md",key:"v-78536523",path:"/federation/backends/processes.html",headers:[{level:2,title:"Core Profile",slug:"core-profile"},{level:3,title:"Data Cubes",slug:"data-cubes"},{level:3,title:"Arrays / Reducers",slug:"arrays-reducers"},{level:3,title:"Math",slug:"math"},{level:3,title:"Statistics / Indices",slug:"statistics-indices"},{level:3,title:"Logic",slug:"logic"}],lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"Federation Contract",frontmatter:{},regularPath:"/federation/backends/",relativePath:"federation/backends/index.md",key:"v-700f1b88",path:"/federation/backends/",lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{frontmatter:{sidebar:!1,stripCSS:!0},regularPath:"/file-formats/",relativePath:"file-formats/index.md",key:"v-21de1e8c",path:"/file-formats/",lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"Get started with the openEO Python Client Client Side Processing",frontmatter:{},regularPath:"/getting-started/client-side-processing/",relativePath:"getting-started/client-side-processing/index.md",key:"v-76e62a34",path:"/getting-started/client-side-processing/",headers:[{level:2,title:"Background",slug:"background"},{level:2,title:"Installation",slug:"installation"},{level:2,title:"Usage",slug:"usage"},{level:3,title:"STAC Collections and Items",slug:"stac-collections-and-items"},{level:3,title:"Local Collections",slug:"local-collections"},{level:3,title:"Local Processing",slug:"local-processing"},{level:2,title:"Client-Side Processing Example Notebooks",slug:"client-side-processing-example-notebooks"},{level:2,title:"Additional Information",slug:"additional-information"}],lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"Federation Aspects and Known Issues",frontmatter:{},regularPath:"/federation/",relativePath:"federation/index.md",key:"v-7ffae7c8",path:"/federation/",headers:[{level:2,title:"Data Collections",slug:"data-collections"},{level:3,title:"Terrascope",slug:"terrascope"},{level:3,title:"Sentinel Hub",slug:"sentinel-hub"},{level:3,title:"EODC",slug:"eodc"},{level:3,title:"Enforce back-end selection for common collections",slug:"enforce-back-end-selection-for-common-collections"},{level:2,title:"Processes",slug:"processes"},{level:2,title:"File formats",slug:"file-formats"},{level:2,title:"On-demand-preview",slug:"on-demand-preview"},{level:2,title:"Batch jobs",slug:"batch-jobs"},{level:3,title:"Managed job splitting",slug:"managed-job-splitting"},{level:3,title:"Validity of signed URLs in batch job results",slug:"validity-of-signed-urls-in-batch-job-results"},{level:3,title:"Customizing batch job resources on Terrascope",slug:"customizing-batch-job-resources-on-terrascope"},{level:3,title:"Batch job results on Sentinel Hub",slug:"batch-job-results-on-sentinel-hub"}],lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"Get started with the openEO Platform Editor",frontmatter:{},regularPath:"/getting-started/editor/",relativePath:"getting-started/editor/index.md",key:"v-adb4d3cc",path:"/getting-started/editor/",lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"Get started with the openEO JavaScript Client",frontmatter:{},regularPath:"/getting-started/javascript/",relativePath:"getting-started/javascript/index.md",key:"v-974804cc",path:"/getting-started/javascript/",headers:[{level:2,title:"Installation",slug:"installation"},{level:2,title:"Connecting to openEO Platform",slug:"connecting-to-openeo-platform"},{level:3,title:"Collections",slug:"collections"},{level:3,title:"Processes",slug:"processes"},{level:2,title:"Authentication",slug:"authentication"},{level:2,title:"Creating a (user-defined) process",slug:"creating-a-user-defined-process"},{level:2,title:"Batch Job Management",slug:"batch-job-management"},{level:2,title:"Additional Information",slug:"additional-information"}],lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"Get started with the openEO Python Client",frontmatter:{},regularPath:"/getting-started/python/",relativePath:"getting-started/python/index.md",key:"v-23074efc",path:"/getting-started/python/",headers:[{level:2,title:"Installation",slug:"installation"},{level:2,title:"Connect to openEO Platform and explore",slug:"connect-to-openeo-platform-and-explore"},{level:3,title:"Collections",slug:"collections"},{level:3,title:"Processes",slug:"processes"},{level:2,title:"Authentication",slug:"authentication"},{level:2,title:"Working with Datacubes",slug:"working-with-datacubes"},{level:3,title:"Creating a Datacube",slug:"creating-a-datacube"},{level:3,title:"Applying processes",slug:"applying-processes"},{level:3,title:"Defining output format",slug:"defining-output-format"},{level:2,title:"Execution",slug:"execution"},{level:3,title:"Batch job execution",slug:"batch-job-execution"},{level:2,title:"Additional Information",slug:"additional-information"}],lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"Run openEO processes in Shiny apps",frontmatter:{},regularPath:"/getting-started/python/shiny.html",relativePath:"getting-started/python/shiny.md",key:"v-6b6d7bae",path:"/getting-started/python/shiny.html",lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"Get started with the openEO R Client",frontmatter:{},regularPath:"/getting-started/r/",relativePath:"getting-started/r/index.md",key:"v-a5deb388",path:"/getting-started/r/",headers:[{level:2,title:"Useful links",slug:"useful-links"},{level:2,title:"Installation",slug:"installation"},{level:2,title:"Connect to openEO Platform and explore",slug:"connect-to-openeo-platform-and-explore"},{level:3,title:"Collections",slug:"collections"},{level:3,title:"Processes",slug:"processes"},{level:2,title:"Authentication",slug:"authentication"},{level:2,title:"Creating a (user-defined) process",slug:"creating-a-user-defined-process"},{level:2,title:"Batch Job Management",slug:"batch-job-management"}],lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"Get started with openEO Platform in JupyterLab (Python)",frontmatter:{},regularPath:"/getting-started/jupyterlab/",relativePath:"getting-started/jupyterlab/index.md",key:"v-779fe818",path:"/getting-started/jupyterlab/",lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"How to join the OpenEO Platform Virtual Organization (2 Steps)",frontmatter:{},regularPath:"/join/early_adopter.html",relativePath:"join/early_adopter.md",key:"v-1d4d57b7",path:"/join/early_adopter.html",headers:[{level:2,title:"Preamble: Registration and Login (Authentication)",slug:"preamble-registration-and-login-authentication"},{level:2,title:"Step 1: Connect an existing account",slug:"step-1-connect-an-existing-account"},{level:2,title:"Step 2: Join openEO Platform virtual organization",slug:"step-2-join-openeo-platform-virtual-organization"},{level:2,title:"Working with openEO platform",slug:"working-with-openeo-platform"}],lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"Registration",frontmatter:{},regularPath:"/join/free_trial.html",relativePath:"join/free_trial.md",key:"v-a1f70a7a",path:"/join/free_trial.html",headers:[{level:2,title:"Connect with EGI Check-in",slug:"connect-with-egi-check-in"},{level:2,title:"EOPlaza",slug:"eoplaza"},{level:2,title:"Working with openEO Platform",slug:"working-with-openeo-platform"}],lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"Analysis-Ready Data (ARD)",frontmatter:{},regularPath:"/usecases/ard/",relativePath:"usecases/ard/index.md",key:"v-d4caec3c",path:"/usecases/ard/",lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{frontmatter:{fullpage:!0,stripCSS:!0},regularPath:"/processes/",relativePath:"processes/index.md",key:"v-02b9217c",path:"/processes/",lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"Analysis-Ready Data for Multi-Spectral Imagery (Sentinel-2)",frontmatter:{},regularPath:"/usecases/ard/msi/",relativePath:"usecases/ard/msi/index.md",key:"v-0937d47a",path:"/usecases/ard/msi/",headers:[{level:2,title:"Atmospheric correction",slug:"atmospheric-correction"},{level:3,title:"Reference implementations",slug:"reference-implementations"}],lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"Crop Classification",frontmatter:{},regularPath:"/usecases/crop-classification/",relativePath:"usecases/crop-classification/index.md",key:"v-65bcb302",path:"/usecases/crop-classification/",headers:[{level:2,title:"Preprocessing & feature engineering",slug:"preprocessing-feature-engineering"},{level:3,title:"Data preparation",slug:"data-preparation"},{level:3,title:"Computing temporal features",slug:"computing-temporal-features"},{level:2,title:"Model training",slug:"model-training"},{level:2,title:"Classification",slug:"classification"},{level:3,title:"Rule-based classification",slug:"rule-based-classification"},{level:3,title:"Supervised classification using Random Forest",slug:"supervised-classification-using-random-forest"}],lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"Analysis-Ready Data for SAR (Sentinel-1)",frontmatter:{},regularPath:"/usecases/ard/sar/",relativePath:"usecases/ard/sar/index.md",key:"v-c5fcf990",path:"/usecases/ard/sar/",headers:[{level:2,title:"Backscatter computation",slug:"backscatter-computation"},{level:2,title:"Reference implementations",slug:"reference-implementations"},{level:3,title:"CARD4L NRB for SENTINEL1_GRD collection (provided by Sentinel Hub)",slug:"card4l-nrb-for-sentinel1-grd-collection-provided-by-sentinel-hub"},{level:3,title:"Orfeo for other GRD collections (provided by VITO / TerraScope)",slug:"orfeo-for-other-grd-collections-provided-by-vito-terrascope"}],lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"Forest Change Detection",frontmatter:{},regularPath:"/usecases/forest-change-detection/",relativePath:"usecases/forest-change-detection/index.md",key:"v-2b5b0ed8",path:"/usecases/forest-change-detection/",headers:[{level:2,title:"Data preparation",slug:"data-preparation"},{level:2,title:"Seasonal curve fitting",slug:"seasonal-curve-fitting"},{level:2,title:"Predicting values",slug:"predicting-values"}],lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"Dynamic land cover service",frontmatter:{},regularPath:"/usecases/landcover/",relativePath:"usecases/landcover/index.md",key:"v-5041b7a0",path:"/usecases/landcover/",headers:[{level:2,title:"Methodology",slug:"methodology"},{level:3,title:"Reference data",slug:"reference-data"},{level:3,title:"Input data",slug:"input-data"},{level:3,title:"Preprocessing",slug:"preprocessing"},{level:3,title:"Feature engineering",slug:"feature-engineering"},{level:3,title:"Model",slug:"model"},{level:2,title:"Implementation",slug:"implementation"}],lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"NO₂ monitoring",frontmatter:{},regularPath:"/usecases/no2-monitoring/",relativePath:"usecases/no2-monitoring/index.md",key:"v-697f60bc",path:"/usecases/no2-monitoring/",headers:[{level:2,title:"Shiny apps (R and Python)",slug:"shiny-apps-r-and-python"},{level:3,title:"Time-Series Analyser",slug:"time-series-analyser"},{level:3,title:"Map Maker for one Snapshot",slug:"map-maker-for-one-snapshot"},{level:3,title:"Spacetime Animation",slug:"spacetime-animation"},{level:2,title:"Basic NO₂ analysis in Python, R and JavaScript",slug:"basic-no2-analysis-in-python-r-and-javascript"},{level:3,title:"1. Load a data cube",slug:"_1-load-a-data-cube"},{level:3,title:"2. Fill gaps",slug:"_2-fill-gaps"},{level:3,title:"3. Smoothen values (optional)",slug:"_3-smoothen-values-optional"},{level:3,title:"4. What do you want to know?",slug:"_4-what-do-you-want-to-know"},{level:3,title:"5. Execute the process",slug:"_5-execute-the-process"},{level:3,title:"Result",slug:"result"}],lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}},{title:"Large scale processing",frontmatter:{},regularPath:"/usecases/large-scale-processing/",relativePath:"usecases/large-scale-processing/index.md",key:"v-589f7f88",path:"/usecases/large-scale-processing/",headers:[{level:2,title:"Relevant openEO features",slug:"relevant-openeo-features"},{level:2,title:"Preparation",slug:"preparation"},{level:2,title:"Prepare tiling grid",slug:"prepare-tiling-grid"},{level:2,title:"Prepare job attributes",slug:"prepare-job-attributes"},{level:2,title:"Tuning your processing job",slug:"tuning-your-processing-job"},{level:2,title:"Starting map production",slug:"starting-map-production"},{level:2,title:"Errors during production",slug:"errors-during-production"}],lastUpdated:"10/24/2023, 1:57:17 PM",lastUpdatedTimestamp:1698155837e3,codeSwitcherOptions:{groups:{default:{py:"Python",js:"JavaScript"}}}}],themeConfig:{logo:"https://openeo.cloud/wp-content/themes/openeo_platform/images/logo-pages.svg",editLinks:!0,docsRepo:"openEOPlatform/documentation",docsBranch:"main",algolia:{appId:"AH1DCGL38F",apiKey:"3d026b8a9c3950be6d136a6d0f934029",indexName:"openeo-cloud"},nav:[{text:"Datasets",link:"/data-collections/"},{text:"Get Started",items:[{text:"Free Trial Registration",link:"/join/free_trial.html"},{text:"Data Cubes",link:"https://openeo.org/documentation/1.0/datacubes.html"},{text:"Client Libraries",items:[{text:"JavaScript",link:"/getting-started/javascript/"},{text:"Python",link:"/getting-started/python/"},{text:"R",link:"/getting-started/r/"}]},{text:"Development Environments",items:[{text:"JupyterLab (Python)",link:"/getting-started/jupyterlab/"},{text:"Editor",link:"/getting-started/editor/"}]},{text:"Cookbook",link:"https://openeo.org/documentation/1.0/cookbook/"},{text:"Client-Side Processing (Python)",link:"/getting-started/client-side-processing/"}]},{text:"Clients",items:[{text:"JavaScript",link:"https://open-eo.github.io/openeo-js-client/latest/"},{text:"Python",link:"https://open-eo.github.io/openeo-python-client/"},{text:"R",link:"https://open-eo.github.io/openeo-r-client/"}]},{text:"Use Cases",items:[{text:"Cookbook",link:"https://openeo.org/documentation/1.0/cookbook/"},{text:"Analysis-Ready Data (ARD)",items:[{text:"Overview",link:"/usecases/ard/"},{text:"SAR (Sentinel-1)",link:"/usecases/ard/sar/"},{text:"Multi-Spectral Imagery",link:"/usecases/ard/msi/"}]},{text:"Crop Classification",link:"/usecases/crop-classification/"},{text:"Forest Change Detection",link:"/usecases/forest-change-detection/"},{text:"Land Cover Classification",link:"/usecases/landcover/"},{text:"NO₂ monitoring",link:"/usecases/no2-monitoring/"},{text:"Large scale processing",link:"/usecases/large-scale-processing/"}]},{text:"Processes",items:[{text:"JavaScript & R",link:"/processes/"},{text:"Python",link:"https://open-eo.github.io/openeo-python-client/api.html#module-openeo.rest.datacube"}]},{text:"File Formats",link:"/file-formats/"},{text:"Advanced",items:[{text:"Accounting",link:"/federation/accounting.html"},{text:"Federation Aspects",link:"/federation/index.html"},{text:"Federation Contract",link:"/federation/backends/index.html"},{text:"HTTP API",link:"/api/"}]},{text:"Contact",link:"https://openeo.cloud/contact/"}],sidebar:"auto"}};n(148);r.a.component("ApiSpec",()=>n.e(53).then(n.bind(null,469))),r.a.component("DataCollections",()=>Promise.all([n.e(0),n.e(4),n.e(33)]).then(n.bind(null,462))),r.a.component("FileFormatsSpec",()=>Promise.all([n.e(0),n.e(4),n.e(34)]).then(n.bind(null,463))),r.a.component("ProcessesSpec",()=>n.e(54).then(n.bind(null,470))),r.a.component("Badge",()=>Promise.all([n.e(0),n.e(15)]).then(n.bind(null,478))),r.a.component("CodeBlock",()=>Promise.all([n.e(0),n.e(16)]).then(n.bind(null,466))),r.a.component("CodeGroup",()=>Promise.all([n.e(0),n.e(17)]).then(n.bind(null,467)));n(149),n(150);r.a.component("CodeSwitcher",()=>n.e(55).then(n.bind(null,471)));var Ue=[({router:t,Vue:e})=>{e.config.ignoredElements=["redoc"],t.beforeEach((t,e,n)=>{const r={"/authentication":"/join/free_trial.html","/join/early_adopter.html":"/join/free_trial.html"}[t.path];r?n({path:r}):n()})},{},({Vue:t})=>{t.mixin({computed:{$dataBlock(){return this.$options.__data__block__}}})},{},{},{},{},{},({Vue:t})=>{t.component("CodeCopy",Ee)}],Ie=[];class De extends class{constructor(){this.store=new r.a({data:{state:{}}})}$get(t){return this.store.state[t]}$set(t,e){r.a.set(this.store.state,t,e)}$emit(...t){this.store.$emit(...t)}$on(...t){this.store.$on(...t)}}{}Object.assign(De.prototype,{getPageAsyncComponent:ce,getLayoutAsyncComponent:le,getAsyncComponent:ue,getVueComponent:pe});var Ne={install(t){const e=new De;t.$vuepress=e,t.prototype.$vuepress=e}};function Fe(t,e){const n=e.toLowerCase();return t.options.routes.some(t=>t.path.toLowerCase()===n)}var Be={props:{pageKey:String,slotKey:{type:String,default:"default"}},render(t){const e=this.pageKey||this.$parent.$page.key;return de("pageKey",e),r.a.component(e)||r.a.component(e,ce(e)),r.a.component(e)?t(e):t("")}},ze={functional:!0,props:{slotKey:String,required:!0},render:(t,{props:e,slots:n})=>t("div",{class:["content__"+e.slotKey]},n()[e.slotKey])},Ve={computed:{openInNewWindowTitle(){return this.$themeLocaleConfig.openNewWindowText||"(opens new window)"}}},He=(n(151),n(152),Object($e.a)(Ve,(function(){var t=this._self._c;return t("span",[t("svg",{staticClass:"icon outbound",attrs:{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",x:"0px",y:"0px",viewBox:"0 0 100 100",width:"15",height:"15"}},[t("path",{attrs:{fill:"currentColor",d:"M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"}}),this._v(" "),t("polygon",{attrs:{fill:"currentColor",points:"45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"}})]),this._v(" "),t("span",{staticClass:"sr-only"},[this._v(this._s(this.openInNewWindowTitle))])])}),[],!1,null,null,null).exports),qe={functional:!0,render(t,{parent:e,children:n}){if(e._isMounted)return n;e.$once("hook:mounted",()=>{e.$forceUpdate()})}};r.a.config.productionTip=!1,r.a.use(Jt),r.a.use(Ne),r.a.mixin(function(t,e,n=r.a){!function(t){t.locales&&Object.keys(t.locales).forEach(e=>{t.locales[e].path=e});Object.freeze(t)}(e),n.$vuepress.$set("siteData",e);const o=new(t(n.$vuepress.$get("siteData"))),i=Object.getOwnPropertyDescriptors(Object.getPrototypeOf(o)),a={};return Object.keys(i).reduce((t,e)=>(e.startsWith("$")&&(t[e]=i[e].get),t),a),{computed:a}}(t=>class{setPage(t){this.__page=t}get $site(){return t}get $themeConfig(){return this.$site.themeConfig}get $frontmatter(){return this.$page.frontmatter}get $localeConfig(){const{locales:t={}}=this.$site;let e,n;for(const r in t)"/"===r?n=t[r]:0===this.$page.path.indexOf(r)&&(e=t[r]);return e||n||{}}get $siteTitle(){return this.$localeConfig.title||this.$site.title||""}get $canonicalUrl(){const{canonicalUrl:t}=this.$page.frontmatter;return"string"==typeof t&&t}get $title(){const t=this.$page,{metaTitle:e}=this.$page.frontmatter;if("string"==typeof e)return e;const n=this.$siteTitle,r=t.frontmatter.home?null:t.frontmatter.title||t.title;return n?r?r+" | "+n:n:r||"VuePress"}get $description(){const t=function(t){if(t){const e=t.filter(t=>"description"===t.name)[0];if(e)return e.content}}(this.$page.frontmatter.meta);return t||(this.$page.frontmatter.description||this.$localeConfig.description||this.$site.description||"")}get $lang(){return this.$page.frontmatter.lang||this.$localeConfig.lang||"en-US"}get $localePath(){return this.$localeConfig.path||"/"}get $themeLocaleConfig(){return(this.$site.themeConfig.locales||{})[this.$localePath]||{}}get $page(){return this.__page?this.__page:function(t,e){for(let n=0;nn||(t.hash?!r.a.$vuepress.$get("disableScrollBehavior")&&{selector:decodeURIComponent(t.hash)}:{x:0,y:0})});!function(t){t.beforeEach((e,n,r)=>{if(Fe(t,e.path))r();else if(/(\/|\.html)$/.test(e.path))if(/\/$/.test(e.path)){const n=e.path.replace(/\/$/,"")+".html";Fe(t,n)?r(n):r()}else r();else{const n=e.path+"/",o=e.path+".html";Fe(t,o)?r(o):Fe(t,n)?r(n):r()}})}(n);const o={};try{await Promise.all(Ue.filter(t=>"function"==typeof t).map(e=>e({Vue:r.a,options:o,router:n,siteData:Me,isServer:t})))}catch(t){console.error(t)}return{app:new r.a(Object.assign(o,{router:n,render:t=>t("div",{attrs:{id:"app"}},[t("RouterView",{ref:"layout"}),t("div",{class:"global-ui"},Ie.map(e=>t(e)))])})),router:n}}(!1).then(({app:t,router:e})=>{e.onReady(()=>{t.$mount("#app")})})}]); \ No newline at end of file diff --git a/data-collections/index.html b/data-collections/index.html index 670088ac1..7aa7a9154 100644 --- a/data-collections/index.html +++ b/data-collections/index.html @@ -8,7 +8,7 @@ - + @@ -145,6 +145,6 @@

Loading data...

Last Updated: 10/24/2023, 1:57:17 PM
- + diff --git a/federation/accounting.html b/federation/accounting.html index b8b3b58da..8718eada3 100644 --- a/federation/accounting.html +++ b/federation/accounting.html @@ -8,7 +8,7 @@ - + @@ -162,6 +162,6 @@ costs a few euros, but then you would also notice that your job is taking multiple hours to run.

In any case, once you've established an initial cost for a small area, you can extrapolate to a larger area. If simple linear extrapolation shows that a larger job is affordable, then run the job on larger areas, like 50ha or up to 100x100km. This will show you how your job scales, and what kind of costs you will be incurring! If at any point the cost appears unreasonable, please contact the platform!

Last Updated: 10/24/2023, 1:57:17 PM
- + diff --git a/federation/backends/api.html b/federation/backends/api.html index 81b83cda4..79d1fbaf3 100644 --- a/federation/backends/api.html +++ b/federation/backends/api.html @@ -8,7 +8,7 @@ - + @@ -147,6 +147,6 @@ (opens new window)

# Federation API

The general contract is the openEO API (opens new window) in the latest stable version of the 1.x branch.

The aggregator that proxies the back-ends in the federation also implements the same API, but it also implements the "Federation Extension" (currently in draft state).

# Authentication and authorization

This important aspect of the federation is standardized by the AARC Blueprint Architecture (opens new window). EGI Check-in is the concrete implementation that is currently in use.

# Authentication

The openEO platform federation standardizes on the use of EGI Check-in (opens new window) as identity provider. Backends have to support the use of openID connect + PKCE, to enable this and register a client with EGI Check-in.

# Authorization

# Entitlements

Users of the federation are organized under the 'vo.openeo.cloud' virtual organization in EGI Check-in. Inside the virtual organization, different roles can be assigned to a user, to indicate that they have a certain subscription, or even on a more fine-grained level are entitled to specific actions or resources. The mechanism to check this, is again supported by EGI Check-in, under the 'eduperson_entitlement' claim: https://docs.egi.eu/providers/check-in/sp/#claims

# Credits

The second criterium for authorization is based on credits that are available to a user. Credits allow the platform to limit the volume of data access and processing operations that a user can perform during a given time frame. The amount of available credits depends on the subscription. When the credit balance of a user goes below zero, processing operations can be blocked.

# Aggregator rules

Based on the subscription and available credits, the aggregator can implement these rules:

  1. Credit checks to block starting of batch jobs, synchronous requests to /result and viewing services.
  2. Rate limiting (TBD)

# Backend rules

Some authorization rules will need to be enforced by the backends themselves:

  1. Basic access and access to user specific resources based on subscription role.
  2. Number of concurrent batch jobs
  3. Available processing resources, batch job priorities
  4. Batch job result data volume
  5. Access to restricted collections
Last Updated: 10/24/2023, 1:57:17 PM
- + diff --git a/federation/backends/collections.html b/federation/backends/collections.html index 1325a8f9a..1221fa7dd 100644 --- a/federation/backends/collections.html +++ b/federation/backends/collections.html @@ -8,7 +8,7 @@ - + @@ -153,6 +153,6 @@ considered non-experimental.

  1. Collections need to indicate the key 'providers' that are responsible for ensuring access to the data and continuity in the case of active missions. The user may depend on the guarantees offered by these providers with respect to the properties (timeliness, completeness,...) of a specific collection. The providers with role 'host' and 'producer' are mandatory.

  2. The collection description and extents needs to specify known limitations with respect to the original collection. For instance, if only a subset of the full archive is available, this should be indicated. Extents can be rough approximations to avoid requiring very detailed geometry in the metadata.

  3. Collections without an end time are assumed to be active missions. By default, 99% of items in these collections should be available within 48 hours after being published by the producer. This gives users a basic guarantee with respect to timeliness of products.

  4. Collection metadata should be valid STAC metadata and must include all extensions in stac_extensions. Tools such as STAC-validator (opens new window) can indicate obvious issues.

  5. FAIR principle R1: (Meta)data are richly described with a plurality of accurate and relevant attributes (opens new window)

  6. Collections have to follow harmonization guidelines specified below, if applicable.

  7. Collections naming (id, dimensions, bands) should remain constant.

  8. Backwards incompatible changes or removal need to be announced with a lead time of 6 months, together with a migration path.

  9. Minimum availability of non-experimental collections is 98% on a monthly basis. The backend availability is used here if availability is not measured per collection.

  10. Availability of a collection means that a simple process graph (e.g. using load_collection) returns a correct result. Collections may have special conditions to work, for instance in the case of commercial data.

# Harmonization

When back-ends offer/mirror the same datasets, it is required to align names and metadata. For the following collections and metadata an agreement has been achieved. These are all Copernicus Missions, and the standard names refer to the archives prepared and distributed by ESA. If it is not possible/desirable to use this name as collection id, a 'common_name' can be added next to the 'id' property to identify the collection as a standard archive.

# Common naming convention

In order to achieve a uniform structure for all collections on the platform and thus make it easier for users to navigate between collections, it is recommended to follow the common naming convention*:

  • Names should be written in capital letters ("all caps")
  • Names should consist of a combination of different optional attributes (see table)
  • The different attributes should be separated by an underscore

Very roughly speaking, collections can be divided into two groups (in reality it is more of a spectrum with all gradations in between):

  • collections containing raw data (or processing levels of that data) measured directly by a satellite (or an other measurement platform) and often distributed by the platform operator (e.g., ESA)
  • derived collections, which are based on (pre-processed) raw data that has been processed to create a collection with a specific purpose (e.g., a land cover map) and are often distributed by the institution (or a service of an institution) that created the collection
Attribute Type Description Examples
Provider string Often used for derived collections produced or order by the listed provider. ESA, CNSE, EMODNET, TERRASCOPE. CAMS, CGLS
Satellite/Platform string Name of the satellite/platform that acquired the data in the collection. SENTINEL2, LANDSAT8, PALSAR2
Processing level string Name of the level to which the data was processed (often processed raw data). L2A, L3, L2_1
Version string Often used for derived collections that are produced in several versions. V1, V2
Resolution string (number + unit or string) Usually added, if the resolution is of particular importance for the collection (e.g., novel product with this resolution) for the collection. 10M, 120M, EUROPE, GLOBAL
Product Description string Human readable description of the data within the collection. Can also be an abbreviation or acronym. LAND_COVER_MAP, WORLDCOVER, NDVI, LAI
Year number Often used for derived products that where updated in the specified year or created based on data of the specified year. 2022

Collections containing raw data or processing levels of that data often use a combination of satellite/platform and processing level (e.g., SENTINEL2_L1C ). Derived collections often use a combination of provider and product description (e.g., CNES_LAND_COVER_MAP).

*Some existing collections may not strictly follow this naming convention as they were added to the platform prior to this agreement.

# Sentinel2-L2A

The common name for this collection is 'SENTINEL2_L2A'. It refers to the L2A products generated by the Sen2Cor software, which can be configured to be compatible with the ESA generated products. Note that the products in the ESA archive were also processed with different versions of Sen2Cor, so it is not possible to specify a very specific version or configuration of the processing chain.

# Bands

Band names for spectral bands follow the Bxx naming convention used by ESA. For example: B01, B02, B03, B08, B8A, B12

  • SCL = the Sen2Cor scene classification band
  • approximateViewAzimuth = collective term for the mean and accurate viewing azimuth angle. Depending on which backend is processing the data, the mean angle (for Sentinel Hub) or the accurate angle (for Terrascope) is used. If the accurate angle (viewAzimuthAngles) or the mean angle (viewAzimuthMean) is explicitly specified, the data is processed on the backend that holds the specified band.
  • viewZenithMean = collective term for the mean and accurate viewing zenith angle. Depending on which backend is processing the data, the mean angle (for Sentinel Hub) or the accurate angle (for Terrascope) is used. If the accurate angle (viewZenithMean) or the mean angle (viewZenithAngles) is explicitly specified, the data is processed on the backend that holds those bands.
  • sunAzimuthAngles/sunZenithAngles = collective term for the exact sun azimuth and sun zenith angle.

# Common Properties

We list here a set of common properties, that can be relevant for multiple collections. Collections are strongly encouraged to use these properties instead of using a different name for the same property.

# Common

# Optical instruments

# SAR instruments

Last Updated: 10/24/2023, 1:57:17 PM
- + diff --git a/federation/backends/fileformats.html b/federation/backends/fileformats.html index 090d9b408..4b799cde0 100644 --- a/federation/backends/fileformats.html +++ b/federation/backends/fileformats.html @@ -8,7 +8,7 @@ - + @@ -149,6 +149,6 @@
  • georeferenced (x/y dimensions)
  • can store multiple bands (band dimension)
  • can store multiple timestamps (time dimension)
  • self-describing, portable and scalable
  • GeoTiff: ideal for storing several bands in one file in cloud optimized format
    • georeferenced
    • can store multiple bands
    • a single GeoTiff corresponds to one timestamp (in combination with STAC, multi-temporal collections can be supported)
    • cloud optimized
  • # Federation agreement file formats

    If back-ends offer/mirror the same file formats for both import and export, it is required to align them.

    For file export through save_result for example, the output parameters and the structure of the data that is written to storage needs to be defined. For the following file formats an agreement has been achieved:

    • GeoTiff
    • netCDF

    The idea of these guidelines is to align with what the formats and corresponding toolchains support as much as possible.

    # GeoTiff

    Defaults:

    # netCDF

    Defaults:

    • The full datacube is written to a single netCDF.
    • The openEO dimension metadata is preserved in the netCDF file.
    • CF conventions (https://cfconventions.org/) are used where applicable.
    • Data is chunked and compressed

    More information on all supported file formats, can be found here.

    Last Updated: 10/24/2023, 1:57:17 PM
    - + diff --git a/federation/backends/index.html b/federation/backends/index.html index dbdda1182..4b14fe4ac 100644 --- a/federation/backends/index.html +++ b/federation/backends/index.html @@ -8,7 +8,7 @@ - + @@ -152,6 +152,6 @@ the provider is expected to stop working on new features and improve reliability, or to mark the component as experimental. Reverting a 'stable' feature to 'experimental' should be considered a backwards incompatible change, requiring communication towards the user and proper consideration of the impact.

    Note

    To join the federation, it is required to (mostly) fulfill these requirements and document differences for users in the "Federation Aspects and Known Issues". Nevertheless, these requirements are negotiable if there are good arguments for a change as the current state of the "contract" is just the compromise that the existing providers have agreed upon and if a new back-end joins the federation new compromises may need to be made.

    Last Updated: 10/24/2023, 1:57:17 PM
    - + diff --git a/federation/backends/processes.html b/federation/backends/processes.html index 014dc263b..b4148ff7e 100644 --- a/federation/backends/processes.html +++ b/federation/backends/processes.html @@ -8,7 +8,7 @@ - + @@ -146,6 +146,6 @@ Contact (opens new window)

    # Processes

    # Core Profile

    As the openEO project defines a lot of processes, we need to define a core profile (i.e. a subset) that needs to be implemented on each back-end. All processes specifications can be found at https://processes.openeo.org (opens new window)

    # Data Cubes

    • add_dimension: Add a new dimension
    • aggregate_spatial: Zonal statistics for geometries
    • aggregate_temporal: Temporal aggregations
    • aggregate_temporal_period: Temporal aggregations based on calendar hierarchies
    • apply: Apply a process to each pixel
    • apply_dimension: Apply a process to pixels along a dimension
    • apply_kernel: Apply a spatial convolution with a kernel
    • dimension_labels: Get the dimension labels
    • drop_dimension: Remove a dimension
    • filter_bands: Filter the bands by names
    • filter_bbox: Spatial filter using a bounding box
    • filter_spatial: Spatial filter using geometries
    • filter_temporal: Temporal filter for temporal intervals
    • load_collection: Load a collection
    • load_result: Load batch job results - experimental
    • mask: Apply a raster mask
    • mask_polygon: Apply a polygon mask
    • merge_cubes: Merge two data cubes
    • reduce_dimension: Reduce dimensions
    • rename_dimension: Rename a dimension
    • rename_labels: Rename dimension labels -> needed often for apply_dimension
    • resample_cube_spatial: Resample the spatial dimensions to match a target data cube
    • resample_cube_temporal: Resample temporal dimensions to match a target data cube - experimental
    • resample_spatial: Resample and warp the spatial dimensions
    • save_result: Save processed data

    # Arrays / Reducers

    • array_append: Append a value to an array - experimental
    • array_apply: Apply a process to each array element
    • array_concat: Merge two arrays - experimental
    • array_contains: Check whether the array contains a given value
    • array_create: Create an array - experimental
    • array_element: Get an element from an array
    • array_filter: Filter an array based on a condition
    • array_find: Get the index for a value in an array
    • array_interpolate_linear: One-dimensional linear interpolation for arrays - experimental
    • array_labels: Get the labels for an array
    • array_modify: Change the content of an array (insert, remove, update) - experimental
    • count: Count the number of elements
    • extrema: Minimum and maximum values
    • first: First element
    • last: Last element
    • max: Maximum value
    • mean: Arithmetic mean (average)
    • median: Statistical median
    • min: Minimum value
    • order: Create a permutation
    • product: Compute the product by multiplying numbers
    • rearrange: Rearrange an array based on a permutation
    • sort: Sort data
    • sum: Compute the sum by adding up numbers

    # Math

    • absolute: Absolute value
    • add: Addition of two numbers
    • arccos: Inverse cosine
    • arcosh: Inverse hyperbolic cosine
    • arcsin: Inverse sine
    • arctan: Inverse tangent
    • arctan2: Inverse tangent of two numbers
    • arsinh: Inverse hyperbolic sine
    • artanh: Inverse hyperbolic tangent
    • ceil: Round fractions up
    • clip: Clip a value between a minimum and a maximum
    • constant: Define a constant value -> pretty easy implementation
    • cos: Cosine
    • cosh: Hyperbolic cosine
    • divide: Division of two numbers
    • e: Euler's number
    • exp: Exponentiation to the base e
    • floor: Round fractions down
    • int: Integer part of a number
    • linear_scale_range: Linear transformation between two ranges
    • ln: Natural logarithm
    • log: Logarithm to a base
    • mod: Modulo
    • multiply: Multiplication of two numbers
    • nan - Not a Number - experimental
    • pi: Pi
    • power: Exponentiation
    • round: Round to a specified precision
    • sgn: Signum
    • sin: Sine
    • sinh: Hyperbolic sine
    • sqrt: Square root
    • subtract: Subtraction of two numbers
    • tan: Tangent
    • tanh: Hyperbolic tangent

    # Statistics / Indices

    • ndvi: Normalized Difference Vegetation Index
    • normalized_difference: Normalized difference
    • quantiles: Quantiles
    • sd: Standard deviation
    • variance: Variance

    # Logic

    • and: Logical AND
    • all: Are all of the values true?
    • any: Is at least one value true?
    • between: Between comparison
    • eq: Equal to comparison
    • gt: Greater than comparison
    • gte: Greater than or equal to comparison
    • if: If-Then-Else conditional
    • is_infinite: Value is an infinite number - experimental
    • is_nan: Value is not a number
    • is_nodata: Value is a no-data value
    • is_valid: Value is valid data
    • lt: Less than comparison
    • lte: Less than or equal to comparison
    • neq: Not equal to comparison
    • not: Inverting a boolean
    • or: Logical OR
    • xor: Logical XOR (exclusive or)
    Last Updated: 10/24/2023, 1:57:17 PM
    - + diff --git a/federation/index.html b/federation/index.html index 05af183b0..2b53e4d34 100644 --- a/federation/index.html +++ b/federation/index.html @@ -8,7 +8,7 @@ - + @@ -250,6 +250,6 @@

    This is a short overview of the various options:

    • executor-memory: memory assigned to your workers, for the JVM that executes most predefined processes
    • executor-memoryOverhead: memory assigned on top of the JVM, for instance to run UDF's
    • executor-cores: number of CPUs per worker (executor). The number of parallel tasks is executor-cores/task-cpus
    • task-cpus: CPUs assigned to a single task. UDF's using libraries like Tensorflow can benefit from further parallellization on the level of individual tasks.
    • executor-request-cores: this settings is only relevant for Kubernetes based backends, allows to overcommit CPU
    • max-executors: the maximum number of workers assigned to your job. Maximum number of parallel tasks is max-executors*executor-cores/task-cpus. Increasing this can inflate your costs, while not necessarily improving performance!
    • driver-memory: memory assigned to the spark 'driver' JVM that controls execution of your batch job
    • driver-memoryOverhead: memory assigned to the spark 'driver' on top of JVM memory, for Python processes.
    • logging-threshold: the threshold for logging, set to 'info' by default, can be set to 'debug' to generate much more logging
    • udf-dependency-archives: an array of urls pointing to zip files with extra dependencies, see below

    # Custom UDF dependencies

    User defined functions often depend on (specific versions of) libraries or require small auxiliary data files. The UDF specifications do not yet define a standardized manner to provide this other than having the ability of selecting from a predefined set of 'runtimes' that than again have a predefined configuration.

    The Terrascope/Geotrellis backends solve this via the udf-dependency-archives job option, that allows to specify a list of zip files that should be included in the working directory of the UDF.

    This enables the following example workflow for Python UDF's:

    1. Create a Python 'virtualenv' with your dependencies
    2. Based on the 'site-packages' directory of the virtualenv, create a zip file with all dependencies
    3. Upload the zip to a url that can be reached by the backend.
    4. In job options, add "udf-dependency-archives": ['https://yourhost.com/myEnv.zip#tmp/mydir'] The #tmp/mydir suffix indicates where you want to unzip your files, relative to the working directory.
    5. In your UDF, before trying to import libraries, add your directory to the Python path: sys.path.insert(0, 'tmp/mydir')
    6. Now your libraries should be loaded before anything else!

    Known limitations:

    • Your dependencies need to be compatible with the Python version of the backend, currently 3.8.
    • Your dependencies need to be compatible with the OS of the backend, currently AlmaLinux 8.
    • The backend has a limited set of Python dependences that are preloaded, and cannot be changed, such as numpy.

    # Learning more

    The topic of resource optimization is a complex one, and here we just give a short summary. The goal of openEO is to hide most of these details from the user, but we realize that advanced users sometimes want to have a bit more insight, so in the spirit of being open, we give some hints.

    To learn more about these options, we point to the piece of code that handles this:

    https://github.com/Open-EO/openeo-geopyspark-driver/blob/faf5d5364a82e870e42efd2a8aee9742f305da9f/openeogeotrellis/backend.py#L1213

    Most memory related options are translated to Apache Spark configuration settings, which are documented here:

    https://spark.apache.org/docs/3.3.1/configuration.html#application-properties

    # Batch job results on Sentinel Hub

    If you are processing data and the underlying back-end is Sentinel Hub, the output extent of your batch job results is currently larger than your input extent because Sentinel Hub processes whole tiles (this may change in the future and the data will be cropped to your input extent).

    Last Updated: 10/24/2023, 1:57:17 PM
    - + diff --git a/file-formats/index.html b/file-formats/index.html index ebaeaa490..98152fa8f 100644 --- a/file-formats/index.html +++ b/file-formats/index.html @@ -8,7 +8,7 @@ - + @@ -145,6 +145,6 @@

    Loading data...

    Last Updated: 10/24/2023, 1:57:17 PM
    - + diff --git a/getting-started/client-side-processing/index.html b/getting-started/client-side-processing/index.html index f699ec9c4..743560441 100644 --- a/getting-started/client-side-processing/index.html +++ b/getting-started/client-side-processing/index.html @@ -8,7 +8,7 @@ - + @@ -245,6 +245,6 @@ ndvi_median = ndvi.reduce_dimension(dimension="time", reducer="median") result_ndvi = ndvi_median.execute()

    # Client-Side Processing Example Notebooks

    # Additional Information

    Additional information and resources about the openEO Python Client Library:

    Last Updated: 10/24/2023, 1:57:17 PM
    - + diff --git a/getting-started/editor/index.html b/getting-started/editor/index.html index 471749af0..66c17d9b5 100644 --- a/getting-started/editor/index.html +++ b/getting-started/editor/index.html @@ -8,7 +8,7 @@ - + @@ -145,6 +145,6 @@

    # Get started with the openEO Platform Editor

    Note

    You need to get an openEO Platform account (opens new window) to access the processing infrastructure.

    The openEO Platform Editor (also called Web Editor) is a browser-based graphical user interface for openEO Platform. It allows to use the openEO Platform services without any coding experience. You can explore the service offerings such as data collections and processes, but also create and run custom processes on our infrastructure and then visualize the results. Result visualization is still a bit limited, but all other features of the Platform are supported.

    The Editor is available at https://editor.openeo.cloud (opens new window) and loads up in "Discovery mode" by default, which means you can explore the service offerings without being logged in. On the left side you can find the service offerings like data collections and processes and on the right side the process editor is shown.

    To enable more functionality, e.g. to compute something in a batch job, you have to login. Hover over the button with the text "Guest" in the top right corner and it will show you a "Login" button. Once you clicked on it, the login screen shows up. Here you can simply click the "Log in with EGI Check-in" button and the login procedure will start. See the chapters on the Free Tier or the available plans (opens new window) for more details on the procedure to register and log in.

    After you've completed this the login procedure, the Editor shows up again and you'll notice that a new area in the lower middle part of the Editor aprears. This is the user workspace, where you can see all your stored data, e.g. batch jobs or uploaded files.

    If you need any more help you can always click the "Help" button in the top right area of the Editor and you'll start a guided tour through the Editor. If there are any additional questions, please contact us.

    Last Updated: 10/24/2023, 1:57:17 PM
    - + diff --git a/getting-started/javascript/index.html b/getting-started/javascript/index.html index 98ccc37d8..8752b9152 100644 --- a/getting-started/javascript/index.html +++ b/getting-started/javascript/index.html @@ -8,7 +8,7 @@ - + @@ -246,6 +246,6 @@

    There's also the method downloadResults to download the results directly. Unfortunately, you can only download files from a Node.js environment where file access to your local drive is possible. In a Browser environment, it is also an option to download the STAC Item or Collection for the results using the getResultsAsStac method and point a STAC client (opens new window) to it for downloading.

    # Additional Information

    Last Updated: 10/24/2023, 1:57:17 PM
    - + diff --git a/getting-started/jupyterlab/index.html b/getting-started/jupyterlab/index.html index 1d9784c7d..a04779e4b 100644 --- a/getting-started/jupyterlab/index.html +++ b/getting-started/jupyterlab/index.html @@ -8,7 +8,7 @@ - + @@ -146,6 +146,6 @@ Contact (opens new window)

    # Get started with openEO Platform in JupyterLab (Python)

    Important

    You need to get an openEO Platform account (opens new window) to access the processing infrastructure.

    A hosted JupyterLab environment for openEO Platform is available at lab.openeo.cloud (opens new window).

    It has the openEO Python client pre-installed, but it does not support running the R or JavaScript clients.

    You need to authenticate before you can use it:

    1. Select from the "Sign in" dropdown menu the "openEO Platform" option
    2. It will start the EGI Authentication workflow for openEO Platform. If you haven't you need to get an openEO Platform account (opens new window) before you proceed.
    3. After you have logged in via EGI, the "Server Options" appear and you are requested to "Select your desired stack". Please choose "openEO Platform Lab" and click "Start".
    4. You are logged in, now. The JupyterLab should be usable like a normal JupyterLab instance that has the openEO Python client and some other tools pre-installed.
    5. You can now open a new Python 3 Notebook and, for example, start to follow the general Python Getting Started Guide.

      Note

      You can skip the "Installation" section in the Getting Started Guide, but unfortunately you need to authenticate with the Python client again! We'll try to remove this annoyance in the future.

    Note

    You may shut down your device or log out during the job runs on the backend. You can retrieve the status and results later and from any client.

    If you require any additional packages to be installed into your JupyterLab environment please refrain from installing them via pip and install them via conda. Anaconda documentation (opens new window)

    Please also refer to the the official documentation for the openEO Python Client (opens new window) and JupyterLab (opens new window) for more details.

    Last Updated: 10/24/2023, 1:57:17 PM
    - + diff --git a/getting-started/python/index.html b/getting-started/python/index.html index 789cf27b1..c59d00e82 100644 --- a/getting-started/python/index.html +++ b/getting-started/python/index.html @@ -8,7 +8,7 @@ - + @@ -253,6 +253,6 @@

    When everything completes successfully, the processing result will be downloaded as a GeoTIFF file in a folder "output".

    TIP

    You may shut down your device or log out during the job runs on the backend. You can retrieve the status and results later and from any client.

    The official openEO Python Client documentation has more information on batch job management and downloading results (opens new window)

    # Additional Information

    Additional information and resources about the openEO Python Client Library:

    Last Updated: 10/24/2023, 1:57:17 PM
    - + diff --git a/getting-started/python/shiny.html b/getting-started/python/shiny.html index d77d97aee..2aa0efe56 100644 --- a/getting-started/python/shiny.html +++ b/getting-started/python/shiny.html @@ -8,7 +8,7 @@ - + @@ -228,6 +228,6 @@ return fig

    As in a dashboard, one will probably work with rendering plots mainly, that should be resourceful enough to let anyone start playing with openEO and Shiny in python together. If there are any doubts, do not hesitate to reach the developers and consider even creating an issue in this repository. Please be aware of openEO backend related issues that do not concern this dashboard developers.

    Last Updated: 10/24/2023, 1:57:17 PM
    - + diff --git a/getting-started/r/index.html b/getting-started/r/index.html index dc014c93f..f26ef2aae 100644 --- a/getting-started/r/index.html +++ b/getting-started/r/index.html @@ -8,7 +8,7 @@ - + @@ -230,6 +230,6 @@ # download all the files into a folder on the file system download_results(job = job, folder = "/some/folder/on/filesystem")

    Note

    The printing behavior and the actual data structure might differ!

    Last Updated: 10/24/2023, 1:57:17 PM
    - + diff --git a/index.html b/index.html index f6fbeb080..60fca2e5c 100644 --- a/index.html +++ b/index.html @@ -8,7 +8,7 @@ - + @@ -164,6 +164,6 @@

    You can also go back to the project website at openeo.cloud to find the less technical details.

    - + diff --git a/join/early_adopter.html b/join/early_adopter.html index 2a60cbee6..56131b68b 100644 --- a/join/early_adopter.html +++ b/join/early_adopter.html @@ -8,7 +8,7 @@ - + @@ -181,6 +181,6 @@ https://openeo.cloud and then authenticate through EGI Check-in with the account used above.

    Tip

    For your own convenience, we advise you to always log in with the same identity provider you originally registered with. Otherwise, you run the risk of creating a separate new EGI account, which in turn will have to go through the openEO Platform virtual organization acceptance process again. It is possible to link multiple accounts from multiple identity providers to the same EGI account. However, this must be done before you use these accounts to log in, as explained in the EGI documentation (opens new window).

    See the getting started guides to find out more about how to use the clients for this:

    Last Updated: 10/24/2023, 1:57:17 PM
    - + diff --git a/join/free_trial.html b/join/free_trial.html index 2a60cbee6..56131b68b 100644 --- a/join/free_trial.html +++ b/join/free_trial.html @@ -8,7 +8,7 @@ - + @@ -181,6 +181,6 @@ https://openeo.cloud and then authenticate through EGI Check-in with the account used above.

    Tip

    For your own convenience, we advise you to always log in with the same identity provider you originally registered with. Otherwise, you run the risk of creating a separate new EGI account, which in turn will have to go through the openEO Platform virtual organization acceptance process again. It is possible to link multiple accounts from multiple identity providers to the same EGI account. However, this must be done before you use these accounts to log in, as explained in the EGI documentation (opens new window).

    See the getting started guides to find out more about how to use the clients for this:

    Last Updated: 10/24/2023, 1:57:17 PM
    - + diff --git a/processes/index.html b/processes/index.html index 1d1bd7983..9d3893da3 100644 --- a/processes/index.html +++ b/processes/index.html @@ -8,7 +8,7 @@ - + @@ -145,6 +145,6 @@
    - + diff --git a/usecases/ard/index.html b/usecases/ard/index.html index d47f2516a..5a0e860d7 100644 --- a/usecases/ard/index.html +++ b/usecases/ard/index.html @@ -8,7 +8,7 @@ - + @@ -150,6 +150,6 @@ There are also variants with a default parametrization that results in data that is compliant with CEOS CARD4L specifications (opens new window).

    We should note that these operations can be computationally expensive, so certainly affect overall processing time and cost of your final algorithm. Hence, make sure to make an informed decision when you decide to use these methods.

    Examples:

    Last Updated: 10/24/2023, 1:57:17 PM
    - + diff --git a/usecases/ard/msi/index.html b/usecases/ard/msi/index.html index e95e02981..2ddbbb210 100644 --- a/usecases/ard/msi/index.html +++ b/usecases/ard/msi/index.html @@ -8,7 +8,7 @@ - + @@ -216,6 +216,6 @@ var result = builder.save_result(datacube, 'GTiff'); var job = await connection.createJob(result, 'Atmospherically corrected Sentinel-2 MSI');
    Last Updated: 10/24/2023, 1:57:17 PM
    - + diff --git a/usecases/ard/sar/index.html b/usecases/ard/sar/index.html index 517717e38..828952a67 100644 --- a/usecases/ard/sar/index.html +++ b/usecases/ard/sar/index.html @@ -8,7 +8,7 @@ - + @@ -191,6 +191,6 @@ var result = builder.save_result(datacube, 'GTiff'); var job = await connection.createJob(result, 'Backscatter for Sentinel-1');

    # Orfeo for other GRD collections (provided by VITO / TerraScope)

    When working with other GRD data, an implementation (opens new window) based on Orfeo Toolbox (opens new window) is used.

    The Orfeo implementation currently only supports sigma0 computation, and is not CARD4L compliant.

    Last Updated: 10/24/2023, 1:57:17 PM
    - + diff --git a/usecases/crop-classification/index.html b/usecases/crop-classification/index.html index 3634b9365..1cfe117f1 100644 --- a/usecases/crop-classification/index.html +++ b/usecases/crop-classification/index.html @@ -8,7 +8,7 @@ - + @@ -251,6 +251,6 @@ clf_results = features.apply_dimension(code=udf_rf, runtime="Python", dimension="bands").rename_labels("bands",["pixel"])

    Note that if your labels are strings, you will have to map them to integers. You can then download the classification results and plot it. Congratulations!

    To see a fully working example, you can check out this Python notebook on rule-based classification (opens new window) or this Python notebook on classification using Random Forest (opens new window).

    We ran the code in that notebook for ~120 MGRS tiles to end up with a crop cover map for 5 countries in Europe, which looks like this:

    cropcover_5_countries

    Last Updated: 10/24/2023, 1:57:17 PM
    - + diff --git a/usecases/forest-change-detection/index.html b/usecases/forest-change-detection/index.html index 157405ca1..6728cb3bb 100644 --- a/usecases/forest-change-detection/index.html +++ b/usecases/forest-change-detection/index.html @@ -8,7 +8,7 @@ - + @@ -175,6 +175,6 @@

    The difference between the training data and the predicted values following the seasonal model is a key information, which is used to perform the change detection with new data. Please have a look at the reference notebook (opens new window) for the complete pipeline.

    Last Updated: 10/24/2023, 1:57:17 PM
    - + diff --git a/usecases/landcover/index.html b/usecases/landcover/index.html index e72772fc4..518ed4bef 100644 --- a/usecases/landcover/index.html +++ b/usecases/landcover/index.html @@ -8,7 +8,7 @@ - + @@ -195,6 +195,6 @@ inf_job = predicted.execute_batch(out_format="GTiff") inf_job.get_results().download_files(str(base_path / "prediction"))

    tile31UFS

    Last Updated: 10/24/2023, 1:57:17 PM
    - + diff --git a/usecases/large-scale-processing/index.html b/usecases/large-scale-processing/index.html index 0bd13344d..999e235ab 100644 --- a/usecases/large-scale-processing/index.html +++ b/usecases/large-scale-processing/index.html @@ -8,7 +8,7 @@ - + @@ -174,6 +174,6 @@ your backend of choice. For instance, in a cloud environment with 16GB per machine and 4 cpu's, using slightly less than 4GB per worker is efficient as you can fit 4 parallel workers on a single VM, while requiring 6GB would fit only 2 workers and leave about 4GB unused.

    In our example, we used the Geotrellis backends, which has these execution options.

    # Starting map production

    The openEO Python client provides a useful tool to run multiple processing jobs in multiple backends:

    https://open-eo.github.io/openeo-python-client/cookbook/job_manager.html (opens new window)

    This class takes a GeoJSON corresponding to your tile grid and job properties per tiles, and triggers a function provided by you whenever a new job needs to be created. You can configure multiple backends, and set the number of parallel jobs per backend.

    This class also takes care of error handling, and can be considered more resilient compared to writing a simple loop yourself.

    A full example of how we use this can be found here (opens new window).

    This script uses a CSV file to track your jobs, and whenever it is interrupted it can simply resume from that CSV file, making it tolerant to failure.

    Tracking jobs by CSV

    # Errors during production

    It is expected to see jobs failing during production, which can be considered normal as long as the failure rate is not too high. We advice to quickly inspect error logs, and if no obvious reason for failure is found, a simple retry might be sufficient. In other cases it may be needed to increase memory. We also see a limited number of cases where for instance issues in the underlying product archive cause failures or artifacts. These are harder to resolve, and may require interaction with the backend to resove!

    Last Updated: 10/24/2023, 1:57:17 PM
    - + diff --git a/usecases/no2-monitoring/index.html b/usecases/no2-monitoring/index.html index 3f581a57d..0dedd1540 100644 --- a/usecases/no2-monitoring/index.html +++ b/usecases/no2-monitoring/index.html @@ -8,7 +8,7 @@ - + @@ -310,6 +310,6 @@

    # Result

    If you'd visualize the results of running the timeseries analysis for mean, min and max could results in such a chart:

    min/max/mean NO2 chart

    Last Updated: 10/24/2023, 1:57:17 PM
    - +