I'm helping a friend create an internal questionnaire that a company will use to test its own CSRs.
Secret testers will call or email a certain CSR and fill out a 40-question questionnaire.
The company has 5 regions worldwide and many CSRs.
In the end they want to see graph data that compares (at least) the total scores of all 5 regions over a year, divided by month.
So I'm thinking that over 5 years or so, there could be something like 500+ individual documents in the Tests collection.
Each document/test would have a:
totalScore
maxPossibleScore
regionId
dateCreated
csrId
What's the best practice to query for and aggregate all that data into an object so that it can be displayed on something like Highcharts?
http://www.highcharts.com/demo/bar-basic
Say that I'm displaying a chart showing all scores for all regions in the year 2014.
On the page load, I can query for all tests that have a dateCreated of 2014 and return the totalScore, maxPossibleScore, regionId. That will give me back an array of objects and I can loop through that to get the info necessary to display the chart.
BUT would querying through 500+ individual documents and bring back all this data be really time-consuming?
Secret testers will call or email a certain CSR and fill out a 40-question questionnaire.
The company has 5 regions worldwide and many CSRs.
In the end they want to see graph data that compares (at least) the total scores of all 5 regions over a year, divided by month.
So I'm thinking that over 5 years or so, there could be something like 500+ individual documents in the Tests collection.
Each document/test would have a:
totalScore
maxPossibleScore
regionId
dateCreated
csrId
What's the best practice to query for and aggregate all that data into an object so that it can be displayed on something like Highcharts?
http://www.highcharts.com/demo/bar-basic
Say that I'm displaying a chart showing all scores for all regions in the year 2014.
On the page load, I can query for all tests that have a dateCreated of 2014 and return the totalScore, maxPossibleScore, regionId. That will give me back an array of objects and I can loop through that to get the info necessary to display the chart.
BUT would querying through 500+ individual documents and bring back all this data be really time-consuming?