Wiki
Clone wikiENMA / modules / detailed_io
EMPOWERING Analytical Modules / ETL - Detailed input / output description
The detailed input and output description for the analytic modules and the ETL (Extract Load and Transform) functions are explained above.
The input description defines the data model for the initial configuration dictionary needed for the setting of every module.
The output description defines the data model for the module results stored in the short term database.
Residential Modules
OT101
Last month comparison of your monthly consumption with the average consumption of most efficient neighbours and with average of all neighbours
Input OT101
{ "companyId": 1111111111, "ts_to": datetime(2015,6,30,23,59,59), "num_months": 1, "eff_users": 30, "criteria": ['power__1000','postalCode','postalCode + tariffId','criteria_1'], "triggerValue": 10, Minimum number of customers for every comparative group criteria "type" 'electricityConsumption', "quantile_min": 0.15, "quantile_max": 0.997, "timezone":"Europe/Madrid", "setupId": ObjectId() }
Field | Python type | Description |
---|---|---|
companyId | int | Company identificator |
ts_to | datetime | Datetime of the last instant of the period calculation (e.g. For monthly results modules, last instant of the month in calculation) |
num_months | int | Number of months of historical recalculation (min: 1, max:24) |
type | str | Type of consumption |
timezone | str | Timezone of the company customers |
setupId | ObjectId | Setup identificator |
criteria | list | List of criterias to select similar neighbours |
triggerValue | int | Minimum number of customers to select the most similar group criteria. |
eff_users | int | Percentage of customers with less consumption considered for the average efficient consumption calculation |
quantile_min | float [0-1] | Quantile to select the minimum consumption considered for every group criteria average consumption calculation |
quantile_max | float [0-1] | Quantile to select the maximum consumption considered for every group criteria average consumption calculation |
Output OT101
{ "contractId": "123457ABC", "companyId": 1111111111, "month": 201307, "setupId": 52234e386cb9fea66d5b2511, "consumption": 216.65, "averageEffConsumption": 65.46, "averageConsumption": 151.75, "diffAverageEffConsumption": 230.93, "diffAverageConsumption": 42.76, "numberCustomersEff": 141, "numberCustomers": 602, "criteriaSelected": "postalCode + tariffId" "consumptionNumberOfDays": 31 }
Field | Type | Description |
---|---|---|
contractId | string | Contract identificator |
companyId | int | Company identificator |
month | int | [yyyyMM] Calculated month |
setupId | ObjectId | Setup identificator |
consumption | float | The customer consumption over the current month |
averageEffConsumption | float | Average consumption of the efficient customers over the current month |
averageConsumption | float | Average consumption of the customers over the current month |
diffAverageEffConsumption | float | Percentage increment of the consumption over averageEffConsumption [(act-avgEff)/avgEff] |
diffAverageConsumption | float | Percentage increment of the consumption over averageConsumption [(act-avg)/avg] |
numberCustomersEff | int | Number of customers considered for the average efficient consumption |
numberCustomers | int | Number of customers considered for the average consumption |
criteriaSelected | string | Criteria selected for the consumption comparative |
consumptionNumberOfDays | int | Number of days with consumption measures for this contractId and month |
OT201
Comparison of your consumption last month compared to the consumption of the same month from the previous year
Input OT201
{ 'companyId': 0000000000, 'ts_to': datetime(2014,9,30,23,59), 'num_months':24, 'type': 'electricityConsumption', 'timezone':"Europe/Madrid", 'setupId': ObjectId() }
Output OT201
{ "companyId" : 0000000000, "month" : 201511, "previousConsumption" : 322.507, "numberOfDaysConsidered" : 30, "diffConsumption" : -14.15, "actualConsumption" : 276.87302, "setupId" : ObjectId(), "contractId" : "XXXXXX4444" }
Field | Type | Description |
---|---|---|
contractId | string | Contract identificator |
companyId | int | Company identificator |
month | string | [yyyyMM] Calculated month |
actualConsumption | number | The customer consumption over the current month |
previousConsumption | number | The customer consumption over the last month |
diffConsumption | number | [%] increment of the actualConsumption over previousConsumption [(act-pre)/pre] |
numberOfDaysConsidered | number | The number of days considered for the comparative |
OT301
Detailed consumption depending the tariff timeSlots contracted by the client.
Input OT301
{ 'companyId': 0000000000 'ts_to': datetime(2015,2,28,23,59), 'num_months':36, 'flatRate_unit': 'euros/year', # 'euros/year','euros/day','euros/(day*power[w])' 'monthly_summary_calculation': True, 'type': 'electricityConsumption', 'setupId': ObjectId(), 'timezone':'Europe/Vienna' }
Output OT301
{ "setupId" : ObjectId(), "companyId" : 0000000000, "summary" : [ { "min" : 0.026, "max" : 0.156, "sum" : 2.117, "timeSlot" : "green", "price" : 0.13036, "mean" : 0.058806 }, { "min" : 0.026, "max" : 0.317, "sum" : 2.018, "timeSlot" : "yellow", "price" : 0.13461, "mean" : 0.1009 }, { "min" : 0.022, "max" : 0.679, "sum" : 7.022, "timeSlot" : "red", "price" : 0.58853, "mean" : 0.17555 }, { "min" : 0.022, "max" : 0.679, "sum" : 11.157, "timeSlot" : "total", "price" : 0.85351, "mean" : 0.11622 } ], "contractId" : "XXXXXX11", "day" : 20141121, "hourlyStats" : [ { "hour" : "00:00", "consumption" : 0.045, "timeSlot" : "green" }, { "hour" : "00:15", "consumption" : 0.029, "timeSlot" : "green" }, { ... }, { "hour" : "23:30", "consumption" : 0.026, "timeSlot" : "green" }, { "hour" : "23:45", "consumption" : 0.057, "timeSlot" : "green" } ]
}
OT501
Detailed consumption joined with their related weather information (Air temperature).
Input OT501
{ 'companyId': 0000000000, 'ts_to': datetime(2015,1,31,23,59,59), 'type': 'electricityConsumption', 'weather_type': 'temperatureAir', 'num_months': 12, 'monthly_summary_calculation': True, 'setupId': ObjectId(), 'timezone':'Europe/Vienna', 'timezone_meteo': 'Europe/Vienna', 'relation_contract_weatherStation': True }
Output OT501
{ "companyId" : 0000000000, "setupId" : ObjectId("5639c54b3425d93c9fcce916"), "meanTemperature" : 16.639166, "totalConsumption" : 5.285, "contractId" : "XXXX22222", "day" : 20130511, "hourlyStats" : [ { "temperature" : 19.92, "consumption" : 0.036, "hour" : "18:45" }, { "temperature" : 20.76, "consumption" : 0.064, "hour" : "16:15" }, { "temperature" : 21.06, "consumption" : 0.056, "hour" : "16:30" }, { "temperature" : 12.9, "consumption" : 0.035, "hour" : "04:00" }, { "temperature" : 13.48, "consumption" : 0.057, "hour" : "00:15" }, ... ] }
OT703
Alert on cumulated consumption during the year
Input OT703
- ::
- {
- 'companyId': 0000000000, 'ts_to': datetime(2015,12,31,23,59), 'num_months': 12, 'type': 'estimatedElectricityConsumption', 'setupId': ObjectId(), 'timezone': 'UTC'
}
Output OT703
{ "companyId" : 0000000000, "month" : 201510, "previousConsumption" : 2049.046, "setupId" : ObjectId(), "actualConsumption" : 2027.39, "difference" : -1.05688208073414, "contractId" : "C_V20274580" }
Field | Type | Description |
---|---|---|
contractId | string | Contract identificator |
companyId | int | Company identificator |
month | string | [yyyyMM] Calculated month |
previousConsumption | float | Previous consumption until the same month the previous year |
actualConsumption | float | Consumption until this month this year |
difference | float | [%] Difference between actual and previous year |
Updated