Background
The portal landing pages should serve dashboards with relevant metrics in order to communicate the reach and impact of the DIKSHA program. The dashboards are required for the MHRD launch in Jan 2019.
Problem Statement
The dashboard requires various static and dynamically computed metrics. This design brainstorm needs to define a JSON data structure to serve the data for the various requirements for the dashboard. The metrics that need to be computed for the portal dashboards are defined below:. Also, the dashboard metrics will have to support drill down by State to which the data belongs to.
- Total number of unique devices till date across portal and mobile app that have access Diksha.
- Total number of content play sessions till date across portal and mobile app.
- Total time spent on Diksha (i.e. total session time) till date across portal and mobile app.
Solution
Daily Summaries
A data product needs to be created to compute the daily summary of the metrics defined above to serve the portal dashboards. The JSON data structure to capture all the metrics required is defined below. We can use the logic specified below to compute the required metrics.
...
Code Block | ||
---|---|---|
| ||
{
"eid":"ME_DASHBOARD_SUMMARY",
"ets":1535417736822,
"syncts":1535390695986,
"ver":"1.0",
"mid":"25791B1E895129968CBECD7A39C0822E",
"context":{
"pdata":{
"id":"AnalyticsDataPipeline",
"ver":"1.0",
"model":"DashboardSummary"
},
"granularity":"DAY",
"date_range":{
"from":1535390585259,
"to":1535390684744
}
},
"dimensions":{
"pdata":{
"id":"prod.diksha.app"
},
"state": "TamilNadu"
},
"edata":{
"eks":{
"start_time":1535390585259,
"end_time":1535390684744,
"noOfUniqueDevices":100,
"totalDigitalContentPublished": 10,
"totalContentPlaySessions":200,
"totalTimeSpent":500.96,
"telemetryVersion":"3.0"
}
}
} |
Cumulative Summaries
Cumulative summaries can be generated by using the data from the workflow_usage_summary_fact cassandra table.
...
Code Block | ||
---|---|---|
| ||
{
"eid":"ME_DASHBOARD_CUMULATIVE_SUMMARY",
"ets":1535417736822,
"syncts":1535390695986,
"ver":"1.0",
"mid":"25791B1E895129968CBECD7A39C0822E",
"context":{
"pdata":{
"id":"AnalyticsDataPipeline",
"ver":"1.0",
"model":"DashboardSummary"
},
"granularity":"CUMULATIVE"
},
"dimensions":{
"state": "TamilNadu"
},
"edata":{
"eks":{
"noOfUniqueDevices":100,
"totalDigitalContentPublished": 400,
"totalContentPlaySessions":200,
"totalTimeSpent":500.96,
"telemetryVersion":"3.0"
}
}
} |
...