...
Here is an example of a Simple Metric:
Code Block | ||
---|---|---|
| ||
sample_met = c3.SimpleMetric({ ' id': 'SampleMetric_SampleType='JHU_ConfirmedCases2_OutbreakLocation', ' name': 'SampleMetric='JHU_ConfirmedCases2', ' srcType=': OutbreakLocation'SampleType', 'path': 'timeseriesValues', 'expression': ' path="aggregateMeasurements.(measurementType == 'confirmed' && origin == " "'Johns Hopkins University')", tsDecl='interpolate(avg(avg(normalized.data.xvalue)), "PREVIOUS", "MISSING")' }) |
To learn more about Simple Metrics, please see the C3.ai Developer Documentation here:
...
Code Block | ||
---|---|---|
| ||
var metrics = SmartBulbOutbreakLocation.listMetrics() c3Grid(metrics) |
...
Code Block | ||
---|---|---|
| ||
pd.DataFrame(c3.SmartBulbOutbreakLocation.listMetrics().toJson()) |
DTI Members using the Covid-19 DataLake: While listMetrics does return a list, this is fairly bare bones if the 'description' field of a given metric isn't filled in. The Covid-19 DataLake API documentation provides an extensive list of production-ready metrics along with detailed descriptions and usage examples. Please see that documentation here: https://c3.ai/covid-19-api-documentation/
...