forked from Open-EO/openeo-processes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
median.json
82 lines (82 loc) · 2.49 KB
/
median.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
{
"id": "median",
"summary": "Statistical median",
"description": "The statistical median of an array of numbers is the value separating the higher half from the lower half of the data.\n\n**Remarks:**\n\n* For a symmetric arrays, the result is equal to the ``mean()``.\n* The median can also be calculated by computing the quantile (see process ``quantiles()``) with the probability of *0.5*: `quantiles(data, [0.5])`.\n* An empty input array returns `null`.",
"categories": [
"math",
"reducer"
],
"parameter_order": ["data", "ignore_nodata"],
"parameters": {
"data": {
"description": "An array of numbers. An empty array resolves always with `null`.",
"schema": {
"type": "array",
"items": {
"type": [
"number",
"null"
]
}
},
"required": true
},
"ignore_nodata": {
"description": "Indicates whether no-data values are ignored or not. Ignores them by default. Setting this flag to `false` considers no-data values so that `null` is returned if any value is such a value.",
"schema": {
"type": "boolean",
"default": true
}
}
},
"returns": {
"description": "The computed statistical median.",
"schema": {
"type": [
"number",
"null"
]
}
},
"examples": [
{
"arguments": {
"data": [1,3,3,6,7,8,9]
},
"returns": 6
},
{
"arguments": {
"data": [1,2,3,4,5,6,8,9]
},
"returns": 4.5
},
{
"arguments": {
"data": [-1,-0.5,null,1]
},
"returns": -0.5
},
{
"arguments": {
"data": [-1,0,null,1],
"ignore_nodata": false
},
"returns": null
},
{
"description": "The input array is empty: return `null`.",
"arguments": {
"data": []
},
"returns": null
}
],
"links": [
{
"rel": "about",
"href": "http://mathworld.wolfram.com/StatisticalMedian.html",
"title": "Statistical Median explained by Wolfram MathWorld"
}
]
}