Prototype a Simple Metric - Console Commands or Source

PHOTO EMBED

Wed Nov 09 2022 23:01:28 GMT+0000 (Coordinated Universal Time)

Saved by @hcflores

var s_metric = SimpleMetric.make({
    "id": "MyMetric_MyType",
    "name": "MyMetric",
    "srcType": "MyType",  
    "path": "myPath.myField",
    "expression": "avg(avg(normalized.data.myDataField))"
});

var s_spec = EvalMetricsSpec.make({
  ids: ["myID1"],
  expressions: ["MyMetric"],
  start: "2015-01-01",
  end: "2019-06-01",
  interval: "DAY"
});

c3Viz(MyType.evalMetricsWithMetadata(s_spec,[s_metric]));
content_copyCOPY