-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathice_cube.jsonld
More file actions
122 lines (122 loc) · 3.64 KB
/
ice_cube.jsonld
File metadata and controls
122 lines (122 loc) · 3.64 KB
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
{
"@context" : "https://esipfed.org/mixology",
"@type" : "cookbook",
"name" : "Ice Cube",
"sources" :
[
{
"@type" : "source",
"name" : "arb_influxdb",
"url" : "../example/arb_influxdb.jsonld"
}
],
"destinations" :
[
{
"@type" : "destination",
"name" : "out_influxdb",
"url" : "../example/out_influxdb.jsonld"
}
],
"ingredients" :
[
{
"@type" : "influxDBDataset",
"source" : "arb_influxdb",
"field" : "value",
"measurement" : "maxbotix_depth",
"tags" : {"node_id" : "ARB021"},
"@as" : "maxbotix_depth"
}
],
"recipe" :
[
{
"@type" : "query",
"select" : "maxbotix_depth",
"where" :
{
"and" :
[
{ ">" : ["maxbotix_depth", 500] },
{ "<" : ["maxbotix_depth", 9999] }
]
},
"@as" : "maxbotix_depth"
},
{
"@type" : "query",
"select" : "maxbotix_depth",
"where" : { ">" : ["maxbotix_depth.index", "2017-08-26 00:00:00"] },
"@as" : "maxbotix_depth"
},
{
"@type" : "repeat",
"iterations" : 2,
"tasks" :
[
{
"@type" : "transformation",
"description" : "Find instances where central discrete difference is less than threshold",
"do" :
{
"@type" : "fillna",
"args" :
[
{
"@type" : "fabs",
"args" :
[
{
"@type" : "diff",
"args" :
[
{
"@type" : "diff",
"args" : ["maxbotix_depth"]
},
-1
]
}
]
},
0
]
},
"@as" : "maxbotix_depth_diff"
},
{
"@type" : "aggregation",
"description" : "Compute spike threshold.",
"do" :
{
"@type" : "percentile",
"args" : ["maxbotix_depth_diff", 99]
},
"@as" : "spike_threshold"
},
{
"@type" : "query",
"select" : "maxbotix_depth",
"where" : { "<" : ["maxbotix_depth_diff", "spike_threshold"] },
"@as" : "maxbotix_depth"
}
]
}
],
"servings" :
[
{
"@type" : "influxdb",
"destination" : "out_influxdb",
"measurement" : "WaterDepth",
"fields" : "maxbotix_depth",
"field_names" : "value",
"global_tags" :
{
"node_id" : "ARB021",
"site_name" : "ice_cube"
}
}
]
}