Generate statistics on data loaded on the environment


#1

The DataStatisticsReporter type can be very handy when it comes to find out which metric or is missing data.

var report = DataStatisticsReporter.getMetricDataPathStatisticsForType({typeName: 'Facility'})
c3Table(report.dataStatistics)

This will gives the following huge statistics table with SimpleMetric on type Facility, for each one the data path and the count of objects:

|path                                                  |typeRef.moduleName|typeRef.typeName|count|simpleMetrics.0.id                                             |
|------------------------------------------------------|------------------|----------------|-----|---------------------------------------------------------------|
|pointMeasurements                                     |-type-Facility    |Facility        |0    |                                                               |
|pointMeasurements.data                                |-type-Facility    |Facility        |0    |ActualRevenue_Facility                                         |
|characteristicMap                                     |-type-Facility    |Facility        |0    |AirConditionerBuildingChar_Facility                            |
|rootOrg                                               |-type-Facility    |Facility        |321  |                                                               |
|rootOrg.weatherMeasurements                           |-type-Facility    |Facility        |0    |AverageDailyTempBackup_Facility                                |
|projects                                              |-type-Facility    |Facility        |0    |Cost_Facility                                                  |
|disaggModels                                          |-type-Facility    |Facility        |0    |DisaggAirConditioningCoefficientVentilationElectricity_Facility|
|measurements                                          |-type-Facility    |Facility        |0    |ElectricityConsumptionSavingPlan_Facility                      |
|servicePoints                                         |-type-Facility    |Facility        |0    |SmartMeterMeasurementAvgOverObjsAvgOverTime_Facility           |
|servicePoints.services                                |-type-Facility    |Facility        |0    |                                                               |
|servicePoints.services.ratePlanSet                    |-type-Facility    |Facility        |0    |                                                               |
|servicePoints.services.ratePlanSet.to                 |-type-Facility    |Facility        |0    |                                                               |
|servicePoints.services.ratePlanSet.to.mapping         |-type-Facility    |Facility        |0    |                                                               |
|servicePoints.services.ratePlanSet.to.mapping.ratePlan|-type-Facility    |Facility        |0    |ElectricityRate_Facility                                       |
|excludedPerEmailHistory                               |-type-Facility    |Facility        |0    |ExcludedPerEmail_Facility                                      |
|excludedPerOccupancyRuleHistory                       |-type-Facility    |Facility        |0    |ExcludedPerOccupancy_Facility                                  |
|servicePoints.services.serviceAgreement               |-type-Facility    |Facility        |0    |                                                               |
|servicePoints.services.serviceAgreement.parent        |-type-Facility    |Facility        |0    |IsCommercial_Facility                                          |
|billingAccounts                                       |-type-Facility    |Facility        |0    |MemberCountDistribution_Facility                               |
|rootOrg.conversionFactorHistory                       |-type-Facility    |Facility        |0    |NaturalGasConversionFactor_Facility                            |
|notificationLogs                                      |-type-Facility    |Facility        |0    |NotificationLogEventCount_Facility                             |
|applicationAlertSourcePreferences                     |-type-Facility    |Facility        |0    |PeakDemandAlertThreshold_Facility                              |
|grossFloorAreaHistory                                 |-type-Facility    |Facility        |0    |RawGrossFloorArea_Facility                                     |
|TotalCount                                            |-type-Facility    |Facility        |4364 |                                                               |