W&S-National DSS Documentation
DSS has two sides to it. One being the process in which the Data is pooled to ElasticSearch and the other being the way it is fetched, aggregated, computed, transformed and sent across.
As this revolves around a variety of Data Set, there is a need for making this configurable. So that, tomorrow, given a new scenario is introduced, then it is just a configuration away from getting the newly introduced scenario involved in this flow of process.
This document explains the steps on how to define the configurations for Analytics Side Of DSS for W&S.
What is analytics?
Analytics : Micro Service which is responsible for building, fetching, aggregating and computing the Data on ElasticSearch to a consumable Data Response. Which shall be later used for visualizations and graphical representations.
Analytics Configurations:
Analytics contains multiple configurations. we need to add the changes related to fsm in this dashboard-analytics.
Here is the location : https://github.com/egovernments/configs/tree/qa/egov-dss-dashboards/dashboard-analytics
Below is a list of configurations that need to be changed to run fsm successfully.
Chart API Configuration
Master Dashboard Configuration
Role Dashboard Mappings Configuration
Description :
Chart API Configuration :
Each Visualization has its own properties. Each Visualization comes from different data sources (Sometimes it is a combination of different data sources)
In order to configure each visualization and their properties, we have a Chart API Configuration Document.
In this, Visualization Code, which happens to be the key, will be having its properties configured as a part of configuration and are easily changeable.
Here is the sample ChartApiConfiguration.json data for the W&S.
"_comment": "National Dashboard-WS Revenue Tab configs start here-------------------------------", "nssWsTodaysCollection": { "chartName": "NSS_WS_TODAYS_COLLECTION", "queries": [ { "module": "WS", "indexName": "ws-national-dashboard", "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must\":[{\"range\":{\"date\":{\"gt\":\"now-1d\/d\",\"lte\":\"now\"}}}]}},\"aggs\":{\"todaysDate\":{\"terms\":{\"field\":\"date\",\"order\":{\"_term\":\"desc\"},\"size\":1},\"aggs\":{\"Todays Collection\":{\"sum\":{\"field\":\"todaysCollectionForPaymentChannelType\"}}}},\"lastUpdatedTime\":{\"terms\":{\"field\":\"lastModifiedTime\",\"order\":{\"_term\":\"desc\"},\"size\":1}}}}}}", "requestQueryMap": "{\"module\" : \"module.keyword\", \"state\" : \"state.keyword\", \"ulb\" : \"ulb.keyword\"}", "dateRefField": "" } ], "chartType": "metric", "valueType": "amount", "drillChart": "none", "documentType": "nss", "action": "", "TodaysCollection":true, "aggregationPaths": [ "Todays Collection" ], "insight": { }, "_comment": " NSS W&S today's collections" }, "nssWsTotalCollection": { "chartName": "NSS_WS_TOTAL_COLLECTION", "queries": [ { "module": "WS", "requestQueryMap": "{\"module\" : \"module.keyword\", \"ulb\" : \"ulb.keyword\",\"state\" : \"state.keyword\"}", "dateRefField": "date", "indexName": "ws-national-dashboard", "aggrQuery": "{\"aggs\":{\"Total Collection\":{\"sum\":{\"field\":\"todaysCollectionForPaymentChannelType\"}}}}" } ], "translateTenantCode": false, "chartType": "metric", "valueType": "amount", "action": "", "drillChart": "none", "aggregationPaths": [ "Total Collection" ], "insight": { "chartResponseMap" : "nssWsTotalCollection", "action" : "differenceOfNumbers", "upwardIndicator" : "positive", "downwardIndicator" : "negative", "textMessage" : "$indicator$value% than last $insightInterval", "colorCode" : "#228B22", "insightInterval" : "year" }, "_comment": "W&S total collections " }, "nssWsTargetCollection": { "chartName": "NSS_WS_TARGET_COLLECTION", "queries": [ { "module": "WS", "requestQueryMap": "{\"state\" : \"state.keyword\",\"ulb\" : \"ulb.keyword\"}", "dateRefField": "date", "indexName": "master-national-dashboard", "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"term\":{\"module.keyword\":\"WS\"}},\"aggs\":{\"Target Collection\":{\"terms\":{\"field\":\"state.keyword\",\"size\":\"200\",\"order\":{\"Sum\":\"desc\"}},\"aggs\":{\"Sum\":{\"sum\":{\"field\":\"budgetProposedForMunicipalCorporation\"}}}}}}}}" } ], "chartType": "metric", "valueType": "amount", "action": "", "drillChart": "none", "documentType": "nss", "aggregationPaths": [ "Target Collection" ], "isDayUnit": true, "postAggregationTheory" : "repsonseToDifferenceOfDates", "insight": { "chartResponseMap" : "nssWsTargetCollection", "action" : "differenceOfNumbers", "upwardIndicator" : "positive", "downwardIndicator" : "negative", "textMessage" : "$indicator$value% than last $insightInterval", "colorCode" : "#228B22", "insightInterval" : "year" }, "_comment": "NSS W&S Target Collection " }, "nssWsTargetAchieved": { "chartName": "NSS_WS_TARGET_ACHIEVED", "queries": [ { "module": "COMMON", "requestQueryMap": "{\"module\" : \"module.keyword\", \"ulb\" : \"ulb.keyword\",\"state\" : \"state.keyword\"}", "dateRefField": "date", "indexName": "ws-national-dashboard", "aggrQuery": "{\"aggs\":{\"Total Collection\":{\"sum\":{\"field\":\"todaysCollectionForPaymentChannelType\"}}}}" }, { "module": "WS", "requestQueryMap": "{\"state\" : \"state.keyword\",\"ulb\" : \"ulb.keyword\"}", "dateRefField": "date", "indexName": "master-national-dashboard", "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"term\":{\"module.keyword\":\"WS\"}},\"aggs\":{\"Target Collection\":{\"terms\":{\"field\":\"state.keyword\",\"size\":\"200\",\"order\":{\"Sum\":\"desc\"}},\"aggs\":{\"Sum\":{\"sum\":{\"field\":\"budgetProposedForMunicipalCorporation\"}}}}}}}}" } ], "chartType": "metric", "valueType": "percentage", "drillChart": "none", "documentType": "nss", "action": "percentage", "aggregationPaths": [ "Total Collection", "Target Collection" ], "insight": { "chartResponseMap" : "nssWsTargetAchieved", "action" : "differenceOfNumbers", "upwardIndicator" : "positive", "downwardIndicator" : "negative", "textMessage" : "$indicator$value% than last $insightInterval", "colorCode" : "#228B22", "insightInterval" : "year" }, "_comment": " " }, "nssWsCumulativeCollections": { "chartName": "NSS_WS_TOTAL_CUMULATIVE_COLLECTION", "queries": [ { "module": "WS", "dateRefField": "date", "requestQueryMap": "{\"ulb\" : \"ulb.keyword\",\"ward\" : \"ward.keyword\"}", "indexName": "ws-national-dashboard", "aggrQuery": "{\"aggs\":{\"Water Collections\":{\"date_histogram\":{\"field\":\"date\",\"interval\":\"intervalvalue\"},\"aggs\":{\"Water\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"connectionType.keyword\":[\"WATER.NONMETERED\",\"WATER.METERED\"]}}]}},\"aggs\":{\"Sum\":{\"sum\":{\"field\":\"todaysCollectionForConnectionType\"}}}}}},\"Sewerage Collections\":{\"date_histogram\":{\"field\":\"date\",\"interval\":\"intervalvalue\"},\"aggs\":{\"Sewerage\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"connectionType.keyword\":[\"SEWERAGE\"]}}]}},\"aggs\":{\"Count\":{\"sum\":{\"field\":\"todaysCollectionForConnectionType\"}}}}}}}}" } ], "translateTenantCode": false, "chartType": "line", "valueType": "amount", "action": "", "drillChart": "none", "documentType": "_doc", "aggregationPaths": [ "Water Collections", "Sewerage Collections" ], "isCumulative": true, "interval": "month", "insight": { }, "_comment": " " }, "nssWsTopPerformingUlbs": { "chartName": "NSS_WS_TOP_3_PERFORMING_STATES", "queries": [ { "module": "COMMON", "requestQueryMap": "{\"state\" : \"state.keyword\",\"ulb\" : \"ulb.keyword\"}", "dateRefField": "date", "indexName": "master-national-dashboard", "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"term\":{\"module.keyword\":\"WS\"}},\"aggs\":{\"Target Collection\":{\"terms\":{\"field\":\"state.keyword\",\"size\":\"200\"},\"aggs\":{\"Sum\":{\"sum\":{\"field\":\"budgetProposedForMunicipalCorporation\"}}}}}}}}" }, { "module": "WS", "requestQueryMap": "{\"state\" : \"state.keyword\",\"ulb\" : \"ulb.keyword\"}", "dateRefField": "date", "indexName": "ws-national-dashboard", "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{}},\"aggs\":{\"Total Collection\":{\"terms\":{\"field\":\"state.keyword\",\"size\":\"200\"},\"aggs\":{\"Sum\":{\"sum\":{\"field\":\"todaysCollectionForPaymentChannelType\"}}}}}}}}" } ], "isMdmsEnabled": false, "isPostResponseHandler": true, "chartType": "perform", "valueType": "percentage", "drillChart": "none", "documentType": "_doc", "action": "percentage", "plotLabel": "NSS_WS_TOP_3_PERFORMING_STATES", "order": "desc", "limit": 3, "aggregationPaths": [ "Total Collection","Target Collection" ], "insight": { }, "_comment": " Top Performing Ulbs for target achieved" }, "nssWsBottomPerformingUlbs": { "chartName": "NSS_WS_BOTTOM_3_PERFORMING_STATES", "queries": [ { "module": "COMMON", "requestQueryMap": "{\"state\" : \"state.keyword\",\"module\" : \"module.keyword\", \"ulb\" : \"ulb.keyword\"}", "dateRefField": "date", "indexName": "master-national-dashboard", "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"term\":{\"module.keyword\":\"WS\"}},\"aggs\":{\"Target Collection\":{\"terms\":{\"field\":\"state.keyword\",\"size\":\"200\"},\"aggs\":{\"Sum\":{\"sum\":{\"field\":\"budgetProposedForMunicipalCorporation\"}}}}}}}}" }, { "module": "WS", "requestQueryMap": "{\"state\" : \"state.keyword\",\"ulb\" : \"ulb.keyword\"}", "dateRefField": "date", "indexName": "ws-national-dashboard", "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{}},\"aggs\":{\"Total Collection\":{\"terms\":{\"field\":\"state.keyword\",\"size\":\"200\"},\"aggs\":{\"Sum\":{\"sum\":{\"field\":\"todaysCollectionForPaymentChannelType\"}}}}}}}}" } ], "isMdmsEnabled": false, "isPostResponseHandler": true, "chartType": "perform", "valueType": "percentage", "drillChart": "none", "documentType": "_doc", "action": "percentage", "plotLabel": "NSS_WS_BOTTOM_3_PERFORMING_STATES", "order": "asc", "limit": 3, "aggregationPaths": [ "Total Collection", "Target Collection" ], "insight": { }, "_comment": " Bottom Performing States for target achieved" }, "nssWsCollectionByUsage": { "chartName": "NSS_WS_COLLECTION_BY_USAGE", "queries": [ { "module": "WS", "dateRefField": "date", "requestQueryMap": "{\"tenantId\" : \"tenantId.keyword\",\"state\" : \"state.keyword\",\"ulb\" : \"ulb.keyword\",\"ward\" : \"ward.keyword\"}", "indexName": "ws-national-dashboard", "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{}},\"aggs\":{\"Collection by Usage Type\":{\"terms\":{\"field\":\"usageType.keyword\",\"size\":200},\"aggs\":{\"Amount Paid\":{\"sum\":{\"field\":\"todaysCollectionForUsageType\"}}}}}}}}" } ], "translateTenantCode": true, "chartType": "pie", "valueType": "amount", "action": "", "documentType": "_doc", "drillChart": "none", "aggregationPaths": [ "Collection by Usage Type" ], "insight": { }, "_comment": " " }, "nssWsCollectionByChannel": { "chartName": "NSS_WS_COLLECTION_BY_CHANNEL", "queries": [ { "module": "WS", "dateRefField": "date", "requestQueryMap": "{\"tenantId\" : \"tenantId.keyword\",\"state\" : \"state.keyword\",\"ulb\" : \"ulb.keyword\",\"ward\" : \"ward.keyword\"}", "indexName": "ws-national-dashboard", "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{}},\"aggs\":{\"Collection by Channel Type\":{\"terms\":{\"field\":\"paymentChannelType.keyword\",\"size\":200},\"aggs\":{\"Amount Paid\":{\"sum\":{\"field\":\"todaysCollectionForPaymentChannelType\"}}}}}}}}" } ], "translateTenantCode": true, "chartType": "pie", "valueType": "amount", "action": "", "documentType": "_doc", "drillChart": "none", "aggregationPaths": [ "Collection by Channel Type" ], "insight": { }, "_comment": " " }, "nssWsFinancialIndicatorState": { "chartName": "NSS_WS_KEY_FY_INDICATORS", "queries": [ { "module": "COMMON", "requestQueryMap": "{\"state\" : \"state.keyword\",\"module\" : \"module.keyword\"}", "dateRefField": "date", "indexName": "master-national-dashboard", "aggrQuery": "{\"aggs\":{\"state \":{\"terms\":{\"field\":\"state.keyword\",\"size\":200},\"aggs\":{\"Target_Collection\":{\"filter\":{\"term\":{\"module.keyword\":\"WS\"}},\"aggs\":{\"sum\":{\"sum\":{\"field\":\"budgetProposedForMunicipalCorporation\"}}}}}}}}" }, { "module": "WS", "dateRefField": "date", "requestQueryMap": "{\"state\" : \"state.keyword\",\"ward\" : \"ward.keyword\"}", "indexName": "ws-national-dashboard", "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{}},\"aggs\":{\"State\":{\"terms\":{\"field\":\"state.keyword\",\"size\":\"200\",\"order\":{\"Total_Connections\":\"desc\"}},\"aggs\":{\"Total_Connections\":{\"sum\":{\"field\":\"connectionsCreatedForConnectionType\"}},\"Ws_Total_Collection\":{\"sum\":{\"field\":\"todaysCollectionForPaymentChannelType\"}},\"Total_Transactions\":{\"avg\":{\"field\":\"transactions\"}}}}}}}}" } ], "filterKeys": [ { "key": "state","column": "State" } ], "isPostResponseHandler": true, "postAggregationTheory": "repsonseToDifferenceOfDates", "chartType": "xtable", "valueType": "number", "drillChart": "nssWsFinancialIndicatorTenant", "documentType": "_doc", "action": "", "plotLabel": "State", "aggregationPaths": [ "Target_Collection", "Ws_Total_Collection", "Total_Transactions", "Total_Connections" ], "computedFields": [ { "postAggregationTheory" : "", "actionName": "PercentageComputedField", "fields" : ["Ws_Total_Collection","Target_Collection"], "newField" : "Target_Achieved", "_comments": "fields are field names picked from its aggregation query to use post aggregation newField value with given new field name " } ], "pathDataTypeMapping": [ { "Ws_Total_Collection": "amount" }, { "Total_Transactions": "number" }, { "Total_Connections": "number" }, { "Target_Collection": "amount" }, { "Target_Achieved": "percentage" } ], "insight": { }, "_comment": " " }, "nssWsFinancialIndicatorTenant": { "chartName": "NSS_WS_DEMAND_COLLECTION_BOUNDARY", "queries": [ { "module": "COMMON", "requestQueryMap": "{\"state\" : \"state.keyword\",\"ulb\" : \"ulb.keyword\",\"module\" : \"module.keyword\"}", "dateRefField": "date", "indexName": "master-national-dashboard", "aggrQuery": "{\"aggs\":{\"state \":{\"terms\":{\"field\":\"ulb.keyword\",\"size\":200},\"aggs\":{\"Target_Collection\":{\"filter\":{\"term\":{\"module.keyword\":\"WS\"}},\"aggs\":{\"sum\":{\"sum\":{\"field\":\"budgetProposedForMunicipalCorporation\"}}}}}}}}" }, { "module": "WS", "dateRefField": "date", "requestQueryMap": "{\"state\" : \"state.keyword\",\"ulb\" : \"ulb.keyword\",\"ward\" : \"ward.keyword\"}", "indexName": "ws-national-dashboard", "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{}},\"aggs\":{\"ULB\":{\"terms\":{\"field\":\"ulb.keyword\",\"size\":\"200\",\"order\":{\"Total_Connections\":\"desc\"}},\"aggs\":{\"Total_Connections\":{\"sum\":{\"field\":\"connectionsCreatedForConnectionType\"}},\"Ws_Total_Collection\":{\"sum\":{\"field\":\"todaysCollectionForPaymentChannelType\"}},\"Total_Transactions\":{\"avg\":{\"field\":\"transactions\"}}}}}}}}" } ], "filterKeys": [ { "key": "ulb","column": "ULB" } ], "postAggregationTheory": "repsonseToDifferenceOfDates", "chartType": "xtable", "valueType": "number", "drillChart": "nssWsFinancialIndicatorWard", "documentType": "_doc", "action": "", "plotLabel": "ULB", "aggregationPaths": [ "Target_Collection", "Ws_Total_Collection", "Total_Transactions", "Total_Connections" ], "computedFields": [ { "postAggregationTheory" : "", "actionName": "PercentageComputedField", "fields" : ["Ws_Total_Collection","Target_Collection"], "newField" : "Target_Achieved", "_comments": "fields are field names picked from its aggregation query to use post aggregation newField value with given new field name " } ], "pathDataTypeMapping": [ { "Ws_Total_Collection": "amount" }, { "Total_Transactions": "number" }, { "Total_Connections": "number" }, { "Target_Collection": "amount" }, { "Target_Achieved": "percentage" } ], "insight": {}, "_comment": "" }, "nssWsFinancialIndicatorWard": { "chartName": "", "queries": [ { "module": "COMMON", "requestQueryMap": "{\"state\" : \"state.keyword\",\"ulb\" : \"ulb.keyword\",\"ward\" : \"ward.keyword\"}", "dateRefField": "date", "indexName": "master-national-dashboard", "aggrQuery": "{\"aggs\":{\"state \":{\"terms\":{\"field\":\"ward.keyword\",\"size\":200},\"aggs\":{\"Target_Collection\":{\"filter\":{\"term\":{\"module.keyword\":\"WS\"}},\"aggs\":{\"sum\":{\"sum\":{\"field\":\"budgetProposedForMunicipalCorporation\"}}}}}}}}" }, { "module": "WS", "dateRefField": "date", "requestQueryMap": "{\"state\" : \"state.keyword\",\"ulb\" : \"ulb.keyword\",\"ward\" : \"ward.keyword\"}", "indexName": "ws-national-dashboard", "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{}},\"aggs\":{\"Ward\":{\"terms\":{\"field\":\"ward.keyword\",\"size\":\"200\",\"order\":{\"Total_Connections\":\"desc\"}},\"aggs\":{\"Total_Connections\":{\"sum\":{\"field\":\"connectionsCreatedForConnectionType\"}},\"Ws_Total_Collection\":{\"sum\":{\"field\":\"todaysCollectionForPaymentChannelType\"}},\"Total_Transactions\":{\"avg\":{\"field\":\"transactions\"}}}}}}}}" } ], "isMdmsEnabled": false, "filterKeys": [ ], "postAggregationTheory": "repsonseToDifferenceOfDates", "chartType": "xtable", "valueType": "number", "drillChart": "", "documentType": "_doc", "action": "", "plotLabel": "Ward", "aggregationPaths": [ "Target_Collection", "Ws_Total_Collection", "Total_Transactions", "Total_Connections" ], "computedFields": [ { "postAggregationTheory" : "", "actionName": "PercentageComputedField", "fields" : ["Ws_Total_Collection","Target_Collection"], "newField" : "Target_Achieved", "_comments": "fields are field names picked from its aggregation query to use post aggregation newField value with given new field name " } ], "pathDataTypeMapping": [ { "Ws_Total_Collection": "amount" }, { "Total_Transactions": "number" }, { "Total_Connections": "number" }, { "Target_Collection": "amount" }, { "Target_Achieved": "percentage" } ], "insight": { }, "_comment": "" }, "nssWsTaxHeadState": { "chartName": "NSS_WS_TAX_HEAD_BOUNDARY", "queries": [ { "module": "WS", "dateRefField": "date", "requestQueryMap": "{\"state\" : \"state.keyword\",\"ward\" : \"ward.keyword\"}", "indexName": "ws-national-dashboard", "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{}},\"aggs\":{\"State \":{\"terms\":{\"field\":\"state.keyword\",\"size\":200},\"aggs\":{\"Interest\":{\"filter\":{\"terms\":{\"taxHeads.keyword\":[\"INTEREST\"]}},\"aggs\":{\"amount\":{\"sum\":{\"field\":\"todaysCollectionForTaxHeads\"}}}},\"Late_Charges\":{\"filter\":{\"terms\":{\"taxHeads.keyword\":[\"LATE.CHARGES\"]}},\"aggs\":{\"amount\":{\"sum\":{\"field\":\"todaysCollectionForTaxHeads\"}}}},\"Arrear_Charges\":{\"filter\":{\"terms\":{\"taxHeads.keyword\":[\"ARREAR.CHARGES\"]}},\"aggs\":{\"amount\":{\"sum\":{\"field\":\"todaysCollectionForTaxHeads\"}}}},\"Advance\":{\"filter\":{\"terms\":{\"taxHeads.keyword\":[\"ADVANCE\"]}},\"aggs\":{\"amount\":{\"sum\":{\"field\":\"todaysCollectionForTaxHeads\"}}}},\"Current_Charges\":{\"filter\":{\"terms\":{\"taxHeads.keyword\":[\"CURRENT.CHARGES\"]}},\"aggs\":{\"amount\":{\"sum\":{\"field\":\"todaysCollectionForTaxHeads\"}}}},\"Ws_Total_Collection\":{\"sum\":{\"field\":\"todaysCollectionForTaxHeads\"}}}}}}}}" } ], "isMdmsEnabled": false, "filterKeys": [ {"key": "state", "column": "State"} ], "chartType": "table", "valueType": "amount", "drillChart": "nssWsTaxHeadTenant", "action": "", "plotLabel": "State", "postAggregationTheory" : "", "aggregationPaths": [ "Ws_Total_Collection", "Late_Charges", "Interest", "Advance", "Current_Charges", "Arrear_Charges" ], "pathDataTypeMapping": [ { "Ws_Total_Collection": "amount" }, { "Late_Charges": "amount" }, { "Interest": "amount" }, { "Advance": "amount" }, { "Current_Charges": "amount" }, { "Arrear_Charges": "amount" } ], "insight": { }, "_comment": "" }, "nssWsTaxHeadTenant": { "chartName": "NSS_WS_TAX_HEAD_BOUNDARY", "queries": [ { "module": "WS", "dateRefField": "date", "requestQueryMap": "{\"state\" : \"state.keyword\",\"ulb\" : \"ulb.keyword\",\"ward\" : \"ward.keyword\"}", "indexName": "ws-national-dashboard", "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{}},\"aggs\":{\"ULB \":{\"terms\":{\"field\":\"ulb.keyword\",\"size\":200},\"aggs\":{\"Interest\":{\"filter\":{\"terms\":{\"taxHeads.keyword\":[\"INTEREST\"]}},\"aggs\":{\"amount\":{\"sum\":{\"field\":\"todaysCollectionForTaxHeads\"}}}},\"Late_Charges\":{\"filter\":{\"terms\":{\"taxHeads.keyword\":[\"LATE.CHARGES\"]}},\"aggs\":{\"amount\":{\"sum\":{\"field\":\"todaysCollectionForTaxHeads\"}}}},\"Arrear_Charges\":{\"filter\":{\"terms\":{\"taxHeads.keyword\":[\"ARREAR.CHARGES\"]}},\"aggs\":{\"amount\":{\"sum\":{\"field\":\"todaysCollectionForTaxHeads\"}}}},\"Advance\":{\"filter\":{\"terms\":{\"taxHeads.keyword\":[\"ADVANCE\"]}},\"aggs\":{\"amount\":{\"sum\":{\"field\":\"todaysCollectionForTaxHeads\"}}}},\"Current_Charges\":{\"filter\":{\"terms\":{\"taxHeads.keyword\":[\"CURRENT.CHARGES\"]}},\"aggs\":{\"amount\":{\"sum\":{\"field\":\"todaysCollectionForTaxHeads\"}}}},\"Ws_Total_Collection\":{\"sum\":{\"field\":\"todaysCollectionForTaxHeads\"}}}}}}}}" } ], "translateTenantCode": false, "isMdmsEnabled": false, "filterKeys": [ {"key": "ulb", "column": "ULB"} ], "chartType": "table", "valueType": "amount", "drillChart": "nssWsTaxHeadWard", "action": "", "plotLabel": "ULB", "postAggregationTheory" : "", "aggregationPaths": [ "Ws_Total_Collection", "Late_Charges", "Interest", "Advance", "Current_Charges", "Arrear_Charges" ], "pathDataTypeMapping": [ { "Ws_Total_Collection": "amount" }, { "Late_Charges": "amount" }, { "Interest": "amount" }, { "Advance": "amount" }, { "Current_Charges": "amount" }, { "Arrear_Charges": "amount" } ], "insight": { }, "_comment": "" }, "nssWsTaxHeadWard": { "chartName": "", "queries": [ { "module": "WS", "dateRefField": "date", "requestQueryMap": "{\"state\" : \"state.keyword\",\"ulb\" : \"ulb.keyword\",\"ward\" : \"ward.keyword\"}", "indexName": "ws-national-dashboard", "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{}},\"aggs\":{\"Ward \":{\"terms\":{\"field\":\"ward.keyword\",\"size\":200},\"aggs\":{\"Interest\":{\"filter\":{\"terms\":{\"taxHeads.keyword\":[\"INTEREST\"]}},\"aggs\":{\"amount\":{\"sum\":{\"field\":\"todaysCollectionForTaxHeads\"}}}},\"Late_Charges\":{\"filter\":{\"terms\":{\"taxHeads.keyword\":[\"LATE.CHARGES\"]}},\"aggs\":{\"amount\":{\"sum\":{\"field\":\"todaysCollectionForTaxHeads\"}}}},\"Arrear_Charges\":{\"filter\":{\"terms\":{\"taxHeads.keyword\":[\"ARREAR.CHARGES\"]}},\"aggs\":{\"amount\":{\"sum\":{\"field\":\"todaysCollectionForTaxHeads\"}}}},\"Advance\":{\"filter\":{\"terms\":{\"taxHeads.keyword\":[\"ADVANCE\"]}},\"aggs\":{\"amount\":{\"sum\":{\"field\":\"todaysCollectionForTaxHeads\"}}}},\"Current_Charges\":{\"filter\":{\"terms\":{\"taxHeads.keyword\":[\"CURRENT.CHARGES\"]}},\"aggs\":{\"amount\":{\"sum\":{\"field\":\"todaysCollectionForTaxHeads\"}}}},\"Ws_Total_Collection\":{\"sum\":{\"field\":\"todaysCollectionForTaxHeads\"}}}}}}}}" } ], "isMdmsEnabled": false, "translateTenantCode": false, "filterKeys": [ ], "chartType": "table", "valueType": "amount", "drillChart": "none", "action": "", "plotLabel": "Ward", "postAggregationTheory" : "", "aggregationPaths": [ "Ws_Total_Collection", "Late_Charges", "Interest", "Advance", "Current_Charges", "Arrear_Charges" ], "pathDataTypeMapping": [ { "Ws_Total_Collection": "amount" }, { "Late_Charges": "amount" }, { "Interest": "amount" }, { "Advance": "amount" }, { "Current_Charges": "amount" }, { "Arrear_Charges": "amount" } ], "insight": { }, "_comment": "" }, "_comment": "National Dashboard-WS- Service Tab- all cards configs start here", "nssWsTotalApplications": { "chartName": "NSS_WS_TOTAL_APPLICATIONS", "queries": [ { "module": "WS", "dateRefField": "date", "requestQueryMap": "{\"state\" : \"state.keyword\",\"ulb\" : \"ulb.keyword\",\"ward\" : \"ward.keyword\"}", "indexName": "ws-national-dashboard", "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{}},\"aggs\":{\"intermediateAggr\":{\"terms\":{\"field\":\"date\"},\"aggs\":{\"applications\":{\"avg\":{\"field\":\"todaysTotalApplications\"}}}},\"Total Applications\":{\"sum_bucket\":{\"buckets_path\":\"intermediateAggr.applications\"}}}}}}" } ], "translateTenantCode": false, "chartType": "metric", "valueType": "number", "action": "", "drillChart": "none", "aggregationPaths": [ "Total Applications" ], "insight": { "chartResponseMap" : "nssWsTotalApplications", "action" : "differenceOfNumbers", "upwardIndicator" : "positive", "downwardIndicator" : "negative", "textMessage" : "$indicator$value% than last $insightInterval", "colorCode" : "#228B22", "insightInterval" : "year" }, "_comment": " " }, "nssWsTotalConnection": { "chartName": "NSS_WS_ACTIVE_CONNECTIONS", "queries": [ { "module": "WS", "dateRefField": "date", "requestQueryMap": "{\"state\" : \"state.keyword\",\"ulb\" : \"ulb.keyword\",\"ward\" : \"ward.keyword\"}", "indexName": "ws-national-dashboard", "aggrQuery": "{\"aggs\":{\"Connections\":{\"filter\":{\"bool\":{}},\"aggs\":{\"Count\":{\"sum\":{\"field\":\"connectionsCreatedForConnectionType\"}}}}}}" } ], "translateTenantCode": false, "chartType": "metric", "valueType": "number", "action": "", "drillChart": "none", "aggregationPaths": [ "Connections" ], "insight": { }, "_comment": " " }, "nssWsSLACompliance": { "chartName": "NSS_WS_SLA_COMPLIANCE", "queries": [ { "module": "WS", "dateRefField": "date", "requestQueryMap": "{\"state\" : \"state.keyword\",\"ulb\" : \"ulb.keyword\",\"ward\" : \"ward.keyword\"}", "indexName": "ws-national-dashboard", "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"ulb.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"SLA Compliance\":{\"avg\":{\"field\":\"slaCompliance\"}}}}}}" } ], "translateTenantCode": false, "chartType": "metric", "valueType": "percentage", "action": "", "drillChart": "none", "aggregationPaths": [ "SLA Compliance" ], "insight": { "chartResponseMap" : "nssWsSLACompliance", "action" : "differenceOfNumbers", "upwardIndicator" : "positive", "downwardIndicator" : "negative", "textMessage" : "$indicator$value% than last $insightInterval", "colorCode" : "#228B22", "insightInterval" : "year" }, "_comment": "WS SLA Compliance" }, "nssWsActiveMeteredWaterConnection": { "chartName": "NSS_WS_ACTIVE_METERED_WATER_CONNECTIONS", "queries": [ { "module": "WS", "indexName": "ws-national-dashboard", "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"connectionType.keyword\":[\"WATER.METERED\"]}}]}},\"aggs\":{\"Active Metered Water Connections\":{\"sum\":{\"field\":\"connectionsCreatedForConnectionType\"}}}}}}", "requestQueryMap": "{\"module\" : \"module.keyword\", \"ulb\" : \"ulb.keyword\",\"state\" : \"state.keyword\",\"ward\" : \"ward.keyword\"}", "dateRefField": "date" } ], "translateTenantCode": false, "chartType": "metric", "valueType": "number", "action": "", "drillChart": "none", "aggregationPaths": [ "Active Metered Water Connections" ], "insight": { "chartResponseMap" : "nssWsActiveMeteredWaterConnection", "action" : "differenceOfNumbers", "upwardIndicator" : "positive", "downwardIndicator" : "negative", "textMessage" : "$indicator$value% than last $insightInterval", "colorCode" : "#228B22", "insightInterval" : "year" }, "_comment": "active metered water connections" }, "nssWsActiveNonMeteredWaterConnection": { "chartName": "NSS_WS_ACTIVE_NON_METERED_WATER_CONNECTIONS", "queries": [ { "module": "WS", "indexName": "ws-national-dashboard", "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"connectionType.keyword\":[\"WATER.NONMETERED\"]}}]}},\"aggs\":{\"Active Non-Metered Water Connections\":{\"sum\":{\"field\":\"connectionsCreatedForConnectionType\"}}}}}}", "requestQueryMap": "{\"module\" : \"module.keyword\", \"ulb\" : \"ulb.keyword\",\"state\" : \"state.keyword\",\"ward\" : \"ward.keyword\"}", "dateRefField": "date" } ], "translateTenantCode": false, "chartType": "metric", "valueType": "number", "action": "", "drillChart": "none", "aggregationPaths": [ "Active Non-Metered Water Connections" ], "insight": { "chartResponseMap" : "nssWsActiveNonMeteredWaterConnection", "action" : "differenceOfNumbers", "upwardIndicator" : "positive", "downwardIndicator" : "negative", "textMessage" : "$indicator$value% than last $insightInterval", "colorCode" : "#228B22", "insightInterval" : "year" }, "_comment": "active non-metered water connections" }, "nssWsActiveSewerageConnection": { "chartName": "NSS_WS_ACTIVE_SEWERAGE_CONNECTIONS", "queries": [ { "module": "WS", "indexName": "ws-national-dashboard", "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"connectionType.keyword\":[\"SEWERAGE\"]}}]}},\"aggs\":{\"Active Sewerage Connections\":{\"sum\":{\"field\":\"connectionsCreatedForConnectionType\"}}}}}}", "requestQueryMap": "{\"module\" : \"module.keyword\", \"ulb\" : \"ulb.keyword\",\"state\" : \"state.keyword\"}", "dateRefField": "date" } ], "translateTenantCode": false, "chartType": "metric", "valueType": "number", "action": "", "drillChart": "none", "aggregationPaths": [ "Active Sewerage Connections" ], "insight": { "chartResponseMap" : "nssWsActiveSewerageConnection", "action" : "differenceOfNumbers", "upwardIndicator" : "positive", "downwardIndicator" : "negative", "textMessage" : "$indicator$value% than last $insightInterval", "colorCode" : "#228B22", "insightInterval" : "year" }, "_comment": "active sewerage connections " }, "nssWsCumulativeConnections": { "chartName": "NSS_WS_CUMULATIVE_CONNECTION", "queries": [ { "module": "WS", "dateRefField": "date", "requestQueryMap": "{\"state\" : \"state.keyword\",\"ulb\" : \"ulb.keyword\",\"ward\" : \"ward.keyword\"}", "indexName": "ws-national-dashboard", "aggrQuery": "{\"aggs\":{\"Water Connections\":{\"date_histogram\":{\"field\":\"date\",\"interval\":\"intervalvalue\"},\"aggs\":{\"Water\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"connectionType.keyword\":[\"WATER.NONMETERED\",\"WATER.METERED\"]}}]}},\"aggs\":{\"Sum\":{\"sum\":{\"field\":\"connectionsCreatedForConnectionType\"}}}}}},\"Sewerage Connections\":{\"date_histogram\":{\"field\":\"date\",\"interval\":\"intervalvalue\"},\"aggs\":{\"Sewerage\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"connectionType.keyword\":[\"SEWERAGE\"]}}]}},\"aggs\":{\"Count\":{\"sum\":{\"field\":\"connectionsCreatedForConnectionType\"}}}}}}}}" } ], "translateTenantCode": false, "chartType": "line", "valueType": "number", "action": "", "drillChart": "none", "documentType": "_doc", "aggregationPaths": [ "Water Connections", "Sewerage Connections" ], "isCumulative": true, "interval": "month", "insight": { }, "_comment": " " }, "nssWsWaterConnectionByUsageType": { "chartName": "NSS_WS_WATER_CONNECTION_BY_USAGE", "queries": [ { "module": "WS", "dateRefField": "date", "requestQueryMap": "{\"tenantId\" : \"tenantId.keyword\",\"state\" : \"state.keyword\",\"ulb\" : \"ulb.keyword\",\"ward\" : \"ward.keyword\"}", "indexName": "ws-national-dashboard", "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{}},\"aggs\":{\"Connection by Usage Type\":{\"terms\":{\"field\":\"usageType.keyword\",\"size\":200},\"aggs\":{\"Water Connections\":{\"sum\":{\"field\":\"waterConnectionsForUsageType\"}}}}}}}}" } ], "translateTenantCode": false, "chartType": "pie", "valueType": "number", "action": "", "documentType": "_doc", "drillChart": "none", "aggregationPaths": [ "Connection by Usage Type" ], "insight": { }, "_comment": " " }, "nssWsSewerageConnectionByUsageType": { "chartName": "NSS_WS_SEWERAGE_CONNECTION_BY_USAGE", "queries": [ { "module": "WS", "dateRefField": "date", "requestQueryMap": "{\"tenantId\" : \"tenantId.keyword\",\"state\" : \"state.keyword\",\"ulb\" : \"ulb.keyword\",\"ward\" : \"ward.keyword\"}", "indexName": "ws-national-dashboard", "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{}},\"aggs\":{\"Connection by Usage Type\":{\"terms\":{\"field\":\"usageType.keyword\",\"size\":200},\"aggs\":{\"Sewerage Connections\":{\"sum\":{\"field\":\"sewerageConnectionsForUsageType\"}}}}}}}}" } ], "translateTenantCode": false, "chartType": "pie", "valueType": "number", "action": "", "documentType": "nss", "drillChart": "none", "aggregationPaths": [ "Connection by Usage Type" ], "insight": { }, "_comment": " " }, "nssWsConnectionByChannelType": { "chartName": "NSS_WS_CONNECTION_BY_CHANNEL", "queries": [ { "module": "WS", "dateRefField": "date", "requestQueryMap": "{\"state\" : \"state.keyword\",\"ulb\" : \"ulb.keyword\",\"ward\" : \"ward.keyword\"}", "indexName": "ws-national-dashboard", "aggrQuery": "{\"aggs\":{\"Connection by Channel Type\":{\"terms\":{\"field\":\"channelType.keyword\",\"size\":200},\"aggs\":{\"Total Connections\":{\"sum\":{\"field\":\"connectionsCreatedForChannelType\"}}}}}}" } ], "translateTenantCode": false, "chartType": "pie", "valueType": "number", "action": "", "documentType": "_doc", "drillChart": "none", "aggregationPaths": [ "Connection by Channel Type" ], "insight": { }, "_comment": " " }, "nssWsConnectionAgeingState": { "chartName": "NSS_WS_CONNECTION_AGEING", "queries": [ { "module": "WS", "dateRefField": "date", "requestQueryMap": "{\"state\" : \"state.keyword\",\"ward\" : \"ward.keyword\"}", "indexName": "ws-national-dashboard", "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{}},\"aggs\":{\"State \":{\"terms\":{\"field\":\"state.keyword\",\"size\":200},\"aggs\":{\"Pending_from_0_to_3_days\":{\"filter\":{\"terms\":{\"duration.keyword\":[\"0to3Days\"]}},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"pendingConnectionsForDuration\"}}}},\"Pending_from_3_to_7_days\":{\"filter\":{\"terms\":{\"duration.keyword\":[\"3to7Days\"]}},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"pendingConnectionsForDuration\"}}}},\"Pending_from_7_to_15_days\":{\"filter\":{\"terms\":{\"duration.keyword\":[\"7to15Days\"]}},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"pendingConnectionsForDuration\"}}}},\"Pending_from_more_than_15_days\":{\"filter\":{\"terms\":{\"duration.keyword\":[\"MoreThan15Days\"]}},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"pendingConnectionsForDuration\"}}}},\"Total Connection\":{\"sum\":{\"field\":\"pendingConnectionsForDuration\"}}}}}}}}" } ], "isMdmsEnabled": false, "filterKeys": [ {"key": "state", "column": "State"} ], "chartType": "xtable", "valueType": "number", "drillChart": "nssWsConnectionAgeingULB", "action": "", "plotLabel": "State", "postAggregationTheory" : "", "isPostResponseHandler": true, "aggregationPaths": [ "Pending_from_0_to_3_days", "Pending_from_3_to_7_days", "Pending_from_7_to_15_days", "Pending_from_more_than_15_days" ], "computedFields": [ { "postAggregationTheory" : "", "actionName": "AdditiveComputedField", "fields" : ["Pending_from_0_to_3_days","Pending_from_3_to_7_days","Pending_from_7_to_15_days","Pending_from_more_than_15_days"], "newField" : "Total_Pending", "_comments": "fields are field names picked from its aggregation query to use post aggregation newField value with given new field name " } ], "insight": { }, "_comment": "" }, "nssWsConnectionAgeingULB": { "chartName": "NSS_WS_CONNECTION_AGEING", "queries": [ { "module": "WS", "dateRefField": "date", "requestQueryMap": "{\"state\" : \"state.keyword\",\"ulb\" : \"ulb.keyword\"}", "indexName": "ws-national-dashboard", "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{}},\"aggs\":{\"ULB \":{\"terms\":{\"field\":\"ulb.keyword\",\"size\":200},\"aggs\":{\"Pending_from_0_to_3_days\":{\"filter\":{\"terms\":{\"duration.keyword\":[\"0to3Days\"]}},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"pendingConnectionsForDuration\"}}}},\"Pending_from_3_to_7_days\":{\"filter\":{\"terms\":{\"duration.keyword\":[\"3to7Days\"]}},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"pendingConnectionsForDuration\"}}}},\"Pending_from_7_to_15_days\":{\"filter\":{\"terms\":{\"duration.keyword\":[\"7to15Days\"]}},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"pendingConnectionsForDuration\"}}}},\"Pending_from_more_than_15_days\":{\"filter\":{\"terms\":{\"duration.keyword\":[\"MoreThan15Days\"]}},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"pendingConnectionsForDuration\"}}}},\"Total Connection\":{\"sum\":{\"field\":\"pendingConnectionsForDuration\"}}}}}}}}" } ], "isMdmsEnabled": false, "filterKeys": [ {"key": "ulb", "column": "ULB"} ], "chartType": "xtable", "valueType": "number", "drillChart": "nssWsConnectionAgeingWard", "action": "", "plotLabel": "ULB", "postAggregationTheory" : "", "isPostResponseHandler": true, "aggregationPaths": [ "Pending_from_0_to_3_days", "Pending_from_3_to_7_days", "Pending_from_7_to_15_days", "Pending_from_more_than_15_days" ], "computedFields": [ { "postAggregationTheory" : "", "actionName": "AdditiveComputedField", "fields" : ["Pending_from_0_to_3_days","Pending_from_3_to_7_days","Pending_from_7_to_15_days","Pending_from_more_than_15_days"], "newField" : "Total_Pending", "_comments": "fields are field names picked from its aggregation query to use post aggregation newField value with given new field name " } ], "insight": { }, "_comment": "" }, "nssWsConnectionAgeingWard": { "chartName": "", "queries": [ { "module": "WS", "dateRefField": "date", "requestQueryMap": "{\"state\" : \"state.keyword\",\"ulb\" : \"ulb.keyword\",\"ward\" : \"ward.keyword\"}", "indexName": "ws-national-dashboard", "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{}},\"aggs\":{\"Ward \":{\"terms\":{\"field\":\"ward.keyword\",\"size\":200},\"aggs\":{\"Pending_from_0_to_3_days\":{\"filter\":{\"terms\":{\"duration.keyword\":[\"0to3Days\"]}},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"pendingConnectionsForDuration\"}}}},\"Pending_from_3_to_7_days\":{\"filter\":{\"terms\":{\"duration.keyword\":[\"3to7Days\"]}},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"pendingConnectionsForDuration\"}}}},\"Pending_from_7_to_15_days\":{\"filter\":{\"terms\":{\"duration.keyword\":[\"7to15Days\"]}},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"pendingConnectionsForDuration\"}}}},\"Pending_from_more_than_15_days\":{\"filter\":{\"terms\":{\"duration.keyword\":[\"MoreThan15Days\"]}},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"pendingConnectionsForDuration\"}}}},\"Total Connection\":{\"sum\":{\"field\":\"pendingConnectionsForDuration\"}}}}}}}}" } ], "isMdmsEnabled": false, "filterKeys": [ ], "chartType": "xtable", "valueType": "number", "drillChart": "none", "action": "", "plotLabel": "Ward", "isPostResponseHandler": true, "postAggregationTheory" : "", "aggregationPaths": [ "Pending_from_0_to_3_days", "Pending_from_3_to_7_days", "Pending_from_7_to_15_days", "Pending_from_more_than_15_days" ], "computedFields": [ { "postAggregationTheory" : "", "actionName": "AdditiveComputedField", "fields" : ["Pending_from_0_to_3_days","Pending_from_3_to_7_days","Pending_from_7_to_15_days","Pending_from_more_than_15_days"], "newField" : "Total_Pending", "_comments": "fields are field names picked from its aggregation query to use post aggregation newField value with given new field name " } ], "insight": { }, "_comment": "" },
Click here to check the complete configuration
Master Dashboard Configuration:
Master Dashboard Configuration is the main configuration which defines as which are the Dashboards which are to be painted on screen.
It includes all the Visualizations, their groups, the charts which comes within them and even their dimensions as what should be their height and width.
{ "name": "NSS_WS_DASHBOARD", "id": "national-ws", "isActive": "", "style": "linear", "visualizations": [ { "row": 1, "name": "NSS_REVENUE", "vizArray": [ { "id": 211, "name": "NSS_OVERVIEW", "dimensions": { "height": 350, "width": 5 }, "vizType": "metric-collection", "noUnit": true, "isCollapsible": false, "label": "NSS_OVERVIEW", "charts": [ { "id": "nssWsTodaysCollection", "name": "NSS_WS_TODAYS_COLLECTION", "code": "", "chartType": "metric", "filter": "{"title": "TODAY"}", "headers": [] }, { "id": "nssWsTotalCollection", "name": "NSS_WS_TOTAL_COLLECTION", "code": "", "chartType": "metric", "filter": "", "headers": [] }, { "id": "nssWsTargetCollection", "name": "NSS_WS_TARGET_COLLECTION", "code": "", "chartType": "metric", "filter": "", "headers": [] }, { "id": "nssWsTargetAchieved", "name": "NSS_WS_TARGET_ACHIEVED", "code": "", "chartType": "metric", "filter": "", "headers": [] } ] }, { "id": "212", "name": "NSS_WS_TOTAL_CUMULATIVE_COLLECTION", "dimensions": { "height": 350, "width": 7 }, "vizType": "chart", "noUnit": true, "isCollapsible": false, "charts": [ { "id": "nssWsCumulativeCollections", "name": "Monthly", "code": "", "chartType": "line", "filter": "", "headers": [] } ] } ] }, { "row": 2, "name": "NSS_REVENUE", "vizArray": [ { "id": 221, "name": "NSS_WS_TOP_3_PERFORMING_STATES", "dimensions": { "height": 250, "width": 4 }, "vizType": "performing-metric", "noUnit": false, "isCollapsible": false, "label": "", "charts": [ { "id": "nssWsTopPerformingUlbs", "name": "NSS_WS_TOP_3_PERFORMING_STATES", "code": "", "chartType": "bar", "filter": "", "headers": [] } ] }, { "id": 222, "name": "NSS_WS_BOTTOM_3_PERFORMING_STATES", "dimensions": { "height": 250, "width": 4 }, "vizType": "performing-metric", "noUnit": false, "isCollapsible": false, "charts": [ { "id": "nssWsBottomPerformingUlbs", "name": "NSS_WS_BOTTOM_3_PERFORMING_STATES", "code": "", "chartType": "bar", "filter": "", "headers": [] } ] } ] }, { "row": 3, "name": "NSS_REVENUE", "vizArray": [ { "id": 223, "name": "NSS_WS_COLLECTION_BY_USAGE", "dimensions": { "height": 250, "width": 4 }, "vizType": "chart", "noUnit": true, "isCollapsible": false, "charts": [ { "id": "nssWsCollectionByUsage", "name": "NSS_WS_COLLECTION_BY_USAGE", "code": "", "chartType": "donut", "filter": "", "headers": [] } ] }, { "id": 224, "name": "NSS_WS_COLLECTION_BY_CHANNEL", "dimensions": { "height": 250, "width": 4 }, "vizType": "chart", "noUnit": true, "isCollapsible": false, "charts": [ { "id": "nssWsCollectionByChannel", "name": "NSS_WS_COLLECTION_BY_CHANNEL", "code": "", "chartType": "donut", "filter": "", "headers": [] } ] } ] }, { "row": 4, "name": "NSS_REVENUE", "vizArray": [ { "id": 231, "name": "NSS_WS_KEY_FY_INDICATORS", "dimensions": { "height": 350, "width": 12 }, "vizType": "chart", "noUnit": false, "isCollapsible": false, "charts": [ { "id": "nssWsFinancialIndicatorState", "name": "NSS_WS_DEMAND_COLLECTION_BOUNDARY", "code": "", "chartType": "table", "filter": "", "headers": [], "tabName": "Boundary" } ] } ] }, { "row": 5, "name": "NSS_REVENUE", "vizArray": [ { "id": 231, "name": "NSS_WS_TAX_HEAD_BOUNDARY", "dimensions": { "height": 350, "width": 12 }, "vizType": "chart", "label": "", "noUnit": false, "isCollapsible": true, "charts": [ { "id": "nssWsTaxHeadState", "name": "NSS_WS_TAX_HEAD_BOUNDARY", "code": "", "chartType": "table", "filter": "", "headers": [], "tabName": "Boundary" } ] } ] }, { "row": 7, "name": "NSS_SERVICE", "vizArray": [ { "id": 231, "name": "NSS_OVERVIEW", "dimensions": { "height": 350, "width": 12 }, "vizType": "metric-collection", "label": "", "noUnit": false, "isCollapsible": true, "charts": [ { "id": "nssWsTotalApplications", "name": "NSS_WS_TOTAL_APPLICATIONS", "code": "", "chartType": "metric", "filter": "", "headers": [] }, { "id": "nssWsSLACompliance", "name": "NSS_WS_SLA_COMPLIANCE", "code": "", "chartType": "metric", "filter": "", "headers": [] }, { "id": "nssWsTotalConnection", "name": "NSS_WS_ACTIVE_CONNECTIONS", "code": "", "chartType": "metric", "filter": "", "headers": [] }, { "id": "nssWsActiveMeteredWaterConnection", "name": "NSS_WS_ACTIVE_METERED_WATER_CONNECTIONS", "code": "", "chartType": "metric", "filter": "", "headers": [] }, { "id": "nssWsActiveNonMeteredWaterConnection", "name": "NSS_WS_ACTIVE_NON_METERED_WATER_CONNECTIONS", "code": "", "chartType": "metric", "filter": "", "headers": [] }, { "id": "nssWsActiveSewerageConnection", "name": "NSS_WS_ACTIVE_SEWERAGE_CONNECTIONS", "code": "", "chartType": "metric", "filter": "", "headers": [] } ] }, { "id": 232, "name": "NSS_WS_CUMULATIVE_CONNECTION", "dimensions": { "height": 350, "width": 7 }, "vizType": "chart", "isCollapsible": false, "charts": [ { "id": "nssWsCumulativeConnections", "name": "Monthly", "code": "", "chartType": "line", "filter": "", "headers": [] } ] } ] }, { "row": 8, "name": "NSS_SERVICE", "vizArray": [ { "id": 231, "name": "NSS_WS_WATER_CONNECTION_BY_USAGE", "dimensions": { "height": 350, "width": 12 }, "vizType": "chart", "label": "", "noUnit": false, "isCollapsible": true, "charts": [ { "id": "nssWsWaterConnectionByUsageType", "name": "", "code": "", "chartType": "donut", "filter": "", "headers": [] } ] }, { "id": 232, "name": "NSS_WS_SEWERAGE_CONNECTION_BY_USAGE", "dimensions": { "height": 350, "width": 12 }, "vizType": "chart", "label": "", "noUnit": false, "isCollapsible": true, "charts": [ { "id": "nssWsSewerageConnectionByUsageType", "name": "", "code": "", "chartType": "donut", "filter": "", "headers": [] } ] }, { "id": 233, "name": "NSS_WS_CONNECTION_BY_CHANNEL", "dimensions": { "height": 350, "width": 12 }, "vizType": "chart", "label": "", "noUnit": false, "isCollapsible": true, "charts": [ { "id": "nssWsConnectionByChannelType", "name": "NSS_WS_CONNECTION_BY_CHANNEL", "code": "", "chartType": "donut", "filter": "", "headers": [] } ] } ] }, { "row": 9, "name": "NSS_SERVICE", "vizArray": [ { "id": 231, "name": "NSS_WS_CONNECTION_AGEING", "dimensions": { "height": 350, "width": 12 }, "vizType": "chart", "label": "", "noUnit": false, "isCollapsible": true, "charts": [ { "id": "nssWsConnectionAgeingState", "name": "NSS_WS_CONNECTION_AGEING", "code": "", "chartType": "table", "filter": "", "headers": [], "tabName": "Boundary" } ] } ] } ] }
Click here for the complete configuration
Role Dashboard Mappings Configuration:
Master Dashboard Configuration which was explained earlier hold the list of Dashboards which are available.
Given the instance where Role Action Mapping is not maintained in the Application Service, this configuration will act as Role - Dashboard Mapping Configuration
In this, each Role is mapped against the Dashboard which they are authorized to see
This was used earlier when the Role Action Mapping of eGov was not integrated.
Later, when the Role Action Mapping started controlling the Dashboards to be seen on the client side, this configuration was just used to enable the Dashboards for viewing.
{ "_comment": "Holds mapping for each role with and its associated dashboards", "roles" : [ { "_comment":"This role is super role which can access all the available dashboards: [other/new roles are suppose to be added]", "roleId": 6, "roleName" : "Admin", "isSuper" : "", "orgId": "", "dashboards": [ { "name": "National Water & Sewerage", "id": "national-ws" } ] } ] }
Click here to check the configuration
MDMS Configuration to be added:
common-masters/uiCommonConstants.json
"national-ws": { "routePath": "/dashboard/national-ws", "isOrigin": true }
Click here to check the complete configuration
roleaction.json
{ "rolecode": "STADMIN", "actionid": {{PlaceHolder1}}, "actioncode": "", "tenantId": "pb" } { "rolecode": "STADMIN", "actionid": {{PlaceHolder2}}, "actioncode": "", "tenantId": "pb" }, { "rolecode": "EMPLOYEE", "actionid": {{PlaceHolder2}}, "actioncode": "", "tenantId": "pb" }, { "rolecode": "UC_EMP", "actionid": {{PlaceHolder2}}, "actioncode": "", "tenantId": "pb" },
Click here to check the complete configuration
Action test.json:
{ "id": {{PlaceHolder1}}, "name": "NSS Dashboard Config Water & Sewerage", "url": "/dashboard-analytics/dashboard/getDashboardConfig/national-ws", "parentModule": "", "displayName": "NSS", "orderNumber": 0, "enabled": false, "serviceCode": "NSS", "code": "null", "path": "" }, { "id": {{PlaceHolder2}}, "name": "National Dashboard Water & Sewerage", "url": "url", "displayName": "National Water & Sewerage", "orderNumber": 4, "parentModule": "ndss-dashboard", "enabled": true, "serviceCode": "NDSS", "code": "null", "path": "NatDashboard.Water&Sewerage", "navigationURL": "/digit-ui/employee/dss/dashboard/national-ws", "leftIcon": "places:business-center", "rightIcon": "" }
Click here to check the complete configuration
W&S-National DSS Consists of multiple graphs which represent the data of W&S. Each graph has its own configuration which will describe the chart and its type.
National DSS Consists of following charts in W&S:
Revenue Tab :
Overview
Total Cumulative Collection
Top ULB By Performance
Bottom ULB by Performance
W&S Collection by Usage Type
W&S Collection by Channel Type
W&S Key Financial Indicators
W&S Tax Heads
Service Tab :
Overview
Total Cumulative Connection
Water Connection By Usage
Sewerage Connections By Usage
Connection By Channel
W&S Connection Ageing
Revenue Tab :
Overview:
Overview graph contains multiple data information as below in the selected time period.
Today’s Collection : This represents the today’s collection amount for Water and Sewerage Application Fee + Consumption Charges.
Total Collection : This represents the total collection amount for Water and Sewerage Application Fee + Consumption Charges.
Target Collection : This represents the target collection amount for the Water and Sewerage connections.
Target Achievement : This represents the target achieved in percentage. This is calculated by formula- (Total Collection/Target Collection)*100%
Total Cumulative Collection:
This Graph contains the Water and Sewerage collection amount information in the monthly base as a cumulative line graph for each water and sewerage collection separately. This will change as per the denomination amount filter selection.
line - this graph/chart is data representation on date histograms or date groupings.
Top State By Performance:
This graph represents the States based on the Target achieved in bar chart representation with the % of target achieved in descending order.
Bottom State by Performance:
This graph represents the States based on the target achieved in bar chart representation with the % of target achieved in ascending order.
W&S Collection by Usage Type:
This graph shows the collection amount based on the usage/property type and this amount will change as per the denomination filter change.
W&S Collection by Channel Type:
This graph shows the collection amount based on the collection channel type(eg-online, counter, etc) and this amount will change as per the denomination filter change.
W&S Key Financial Indicators:
This tabular chart representation graph shows multiple W&S information like Target Collection, Total Collection, Total Transactions, Total Connections and Target Achievement (in %). And this table shows the data in district level and also has the drill down chart for each district to ulb and from ulb to ward level data for the same.
xtable type allows to add multiple computed fields with the aggregated fields dynamically added.
To add multiple computed columns, computedFields [] where actionName (IComputedField<T> interface), fields [] names as in exist in query key, newField as name to appear for computation must be defined.
On click of any district name will enter into drill down charts, which will represents that specific District data.
On click of the ULB will navigate to wards under that specific ULB and each ward shows the specific data regarding that ward.
W&S Tax Heads:
This tabular chart representation graph shows multiple W&S information like Total Collection, Penalty, Interest and Target Collection. And this table shows the data in district level and also has the drill down chart for each district to ulb and from ulb to ward level data for the same.
table type allows to add multiple aggregated fields.
On click of any district name will enter into drill down charts, which will represents that specific District data.
On click of the ULB will navigate to wards under that specific ULB and each ward shows the specific data regarding that ward.
Service Tab :
Overview:
Overview graph contains multiple data information as below in the selected time period.
Total Applications : This represents the total number of applications for new, modify, and disconnections requests.
SLA Compliance : This represents the total SLA achieved in percentage.
Total Active Connections : This represents the total active water and sewerage connections.
Water-Metered Connections : This represents the total active metered water connections.
Water-Non Metered Connections : This represents the total active non-metered water connections.
Sewerage Connections : This represents the total active sewerage connections.
Total Cumulative Connections:
This Graph contains the Water and Sewerage connections information in the monthly base as a cumulative line graph for each water and sewerage connections separately.
line - this graph/chart is data representation on date histograms or date groupings.
Water Connections by Usage Type:
This graph shows the active Water connections based on the usage/property type.
Sewerage Connections by Usage Type:
This graph shows the active Sewerage connections based on the usage/property type.
W&S Connections by Channel Type:
This graph shows the active water and sewerage connections by channel type(eg-online, counter, etc).
W&S Connection Ageing:
This tabular chart representation graph shows W&S applications that have been submitted and have been pending to be worked on. The information like Pending from 0 to 3 days, Pending from 3 to 7 days, Pending from 7 to 15 days, Pending for more than 15 days, and Total Pending Applications is shown in the chart. And this table shows the data in district level and also has the drill down chart for each State to ulb and from ulb to ward level data for the same.
xtable type allows to add multiple computed fields with the aggregated fields dynamically added.
To add multiple computed columns, computedFields [] where actionName (IComputedField<T> interface), fields [] names as in exist in query key, newField as name to appear for computation must be defined.
On click of any district name will enter into drill down charts, which will represents that specific District data.
On click of the ULB will navigate to wards under that specific ULB and each ward shows the specific data regarding that ward.
Newly introduced property:
isRoundOff: This property is introduced to round off the decimal values. Ex: if the value is 25.43 by using isRoundOff property in configuration we will get it as 25. if value is 22.56 round of value will be 23.
This can be used for insights configuration as well for overview graph.
Common Properties available:
Key(eg: fsmTotalrequest) : This is the Visualization Code. This key will be referred to in further visualization configurations.
This is the key which will be used by the client application to indicate which visualization is needed for display.
chartName : The name of the Chart which has to be used as a label on the Dashboard. The name of the Chart will be a detailed name.
In this configuration, the Name of the Chart will be the code of Localization which will be used by Client Side.
queries : Some visualizations are derived from a specific data source. While some others are derived from different data sources and are combined together to get a meaningful representation.
The queries of aggregation which are to be used to fetch out the right data in the right aggregated format are configured here.
queries.module : The module / domain level, on which the query should be applied on. Water and sewerage is W&S.
queries.indexName : The name of the index upon which the query has to be executed is configured here.
queries.aggrQuery : The aggregation query in itself is added here. Based on the Module and the Index name specified, this query is attached to the filter part of the complete search request and then executed against that index
queries.requestQueryMap : Client Request would carry certain fields which are to be filtered. The parameters specified in the Client Request are different from the parameters in each of these indexed documents.
In order to map the parameters of the request to the parameters of the ElasticSearch Document, this mapping is maintained.
queries.dateRefField : Each of these modules have separate indexes. And all of them have their own date fields.
When there is a date filter applied against these visualizations, each of them has to apply it against their own date reference fields.
In order to maintain what is the date field in which index, we have this configured in this configuration parameter.
chartType : As there are different types of visualizations, this field defines what is the type of chart / visualization that this data should be used to represent.
Chart types available are:
metric - this represents the aggregated amount/value for records filter by the aggregate es query
pie - this represents the aggregated data on grouping. This is can be used to represent any line graph, bar graph, pie chart or donuts
line - this graph/chart is data representation on date histograms or date groupings
perform - this chart represents groping data as performance wise.
table - represents a form of plots and value with headers as grouped on and list of its key, values pairs.
xtable - represents a advanced feature of table, it has addition capabilities for dynamic adding header values.
valueType : In any case of data, the values which are sent to plot, might be a percentage, sometimes an amount and sometimes it is just a count.
In order to represent them and differentiate the numbers from amount from percentage, this field is used to indicate the type of value that this Visualization will be sending.
action : Some of the visualizations are not just aggregation on data source. There might be some cases where we have to do a post aggregation computation.
For Example, in the case of Top 3 Performing ULBs, the Target and Total Collection is obtained and then the percentage is calculated. In these kinds of cases, what is the action that has to be performed on that data obtained is defined in this parameter.
documentType : The type of document upon which the query has to be executed is defined here.
drillChart : If there is a drill down on the visualization, then the code of the Drill Down Visualization is added here. This will be used by Client Service to manage drill downs.
aggregationPaths : All the queries will be having Aggregation names in it. In order to fetch the value out of each Aggregation Responses, the name of the aggregation in the query will be an easy bet. These aggregation paths will have the names of Aggregation in it.
insights : It is to show the data with the comparison of last year with arrow symbols, it will show the data in how much % is increased or decreased.
_comment : In order to display information on the “i” symbol of each visualization, Visualization Information is maintained in this field.
Index Properties of National W&S- Dss:
The index that contains data for National-W&S is- ws-national-dashboard
The mapping for this index is:
{ "properties": { "ulb": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "state": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "ward": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "region": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "tenantId": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "module": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "date": { "type": "date", "format": "dd-MM-yyyy HH:mm:ss||dd-MM-yyyy||epoch_millis||dd-MM-yyyy'T'HH:mm:ss.SSSZ" }, "transactions": { "type": "long" }, "connectionType": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "connectionsCreatedForConnectionType": { "type": "long" }, "channelType": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "connectionsCreatedForChannelType": { "type": "long" }, "sewerageConnectionsForChannelType": { "type": "long" }, "waterConnectionsForChannelType": { "type": "long" }, "usageType": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "todaysCollectionForUsageType": { "type": "long" }, "sewerageConnectionsForUsageType": { "type": "long" }, "waterConnectionsForUsageType": { "type": "long" }, "paymentChannelType": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "todaysCollectionForChannelType": { "type": "long" }, "todaysCollectionForConnectionType": { "type": "long" }, "taxHeads": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "todaysCollectionForTaxHeads": { "type": "long" }, "meterType": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "waterConnectionsForMeterType": { "type": "long" }, "duration": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "pendingConnectionsForDuration": { "type": "long" }, "todaysTotalApplications": { "type": "long" }, "todaysClosedApplications": { "type": "long" }, "todaysCompletedApplicationsWithinSLA": { "type": "long" }, "slaCompliance": { "type": "long" } } }
The following is the table that describes the properties mentioned above:
Attributes | Definition | Breakup |
ulb | The district or region for which the data is ingested | Nil |
state | The ULB name for which the data is ingested | Nil |
ward | The ward for which the data is ingested | Nil |
transactions | Number of transactions related to WS/SW module on a given date | Nil |
connectionsCreated | Number of connections related to WS/SW module on a given date | Breakup by channel type and connection type has to be provided |
todaysCollection | Total collection related to WS/SW module on a given date | Breakup by usage type, channel type and tax head has to be provided |
waterConnections | new connections created on the given date | Breakup by meter type,usage and channel |
sewerageConnections | new sewreage connections created on the given date | Breakup by usage and channel |
pendingConnections | pending connections on the given date | Breakup by duration |
slaCompliance | Percentage of complaints that are resolved within SLA till the given date. | Nil |
todaysTotalApplications | # of Applications created on the given date | Nil |
todaysClosedApplications | # of Applications closed on the given date | Nil |
todaysCompletedApplicationsWithinSLA | # of Applications closed on the given date within SLA | Nil |
Postman collection for National W&S- Dss: https://www.getpostman.com/collections/5d3bb33f27dc4528c103