Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

How to present benchmark results?

  • RudischerMC
  • RudischerMC's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 11 months ago #197554 by RudischerMC
How to present benchmark results? was created by RudischerMC
I have built an assessment tool in LimeSurvey comprising a question group for each dimension to be assessed. In each question gruop I use a hidden equation question to calculate a score from the answers in that group. At the end of the survey the results are shown as a table, one dimension with the appropriate score on each line. All of this works fine.

Now I would like to do two things:
1. Include average scores of all previous responses in the table as a benchmark. Can this be done dynamically in LimeSurvey (calculate average scores from all responses in the database and show as a number in a "text display" question) or do I need to update static benchmark results manually?
2. Display the results not as numbers in a table, but as a radar (spider) chart. I have seen LimeSurvey can do these charts for statistics on a single question, but I would need one that combines results from diffent questions for a single respondent and again integrate it in a "text display"-type question.

Thanks for any suggestions on how to accomplish this,
Chris
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 11 months ago #197568 by holch
Replied by holch on topic How to present benchmark results?
Out of the box, you can not access other answers in Limesurvey from within a survey.

However, Denis has a plugin called "getStatInSurvey":
gitlab.com/SondagesPro/ExportAndStats/getStatInSurvey

I have never used it, but it should allow you to create Stats from the same survey and show it in a table in a text display question next to the response of the current respondent.

From what I understand, you are calculating a score based on various questions. So I assume this score is stored in an equation type question?

I am not sure if Denis' solution can give you the average of equation questions. You'll have to test.

As for displaying the results in a chart: if you can get the data into your survey somehow, you probably can use a chart library to display the data on a radar/spider chart. But let's find a solution to the first problem, because you'll need it to solve the second one anyway. ;-)

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The following user(s) said Thank You: RudischerMC
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 11 months ago - 3 years 11 months ago #197569 by Joffm
Replied by Joffm on topic How to present benchmark results?
Hi, to answer your first question:
1. You may try Denis' plugin (holch was one minute earlier with that)
gitlab.com/SondagesPro/ExportAndStats/getStatInSurvey
to display some statistical values of the entire survey.

2. You may do it by an ajax call to a remote script that queries the database either directly or by the API and returns the desired values.

And your second question:
Maybe you find something here:
www.limesurvey.org/forum/can-i-do-this-w...e-of-chartjs-library

or here
www.limesurvey.org/forum/can-i-do-this-w...ibrary-loader#157664

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 3 years 11 months ago by Joffm.
The following user(s) said Thank You: RudischerMC
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 11 months ago #197570 by holch
Replied by holch on topic How to present benchmark results?
By the way, the plugin seems to be tested for these versions of LS:

This plugin is tested with LimeSurvey 2.06,2.65 and 3.15.5


So if you are on LS4, it might work, but it might also not work.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 11 months ago #197592 by DenisChenu
Replied by DenisChenu on topic How to present benchmark results?

holch wrote: By the way, the plugin seems to be tested for these versions of LS:

This plugin is tested with LimeSurvey 2.06,2.65 and 3.15.5


So if you are on LS4, it might work, but it might also not work.

This one surely not work ……

All questions and answers database are totally updated (more than QestionTheme ;)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The following user(s) said Thank You: holch
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 11 months ago #197594 by DenisChenu
Replied by DenisChenu on topic How to present benchmark results?

RudischerMC wrote: 2. Display the results not as numbers in a table, but as a radar (spider) chart. I have seen LimeSurvey can do these charts for statistics on a single question, but I would need one that combines results from diffent questions for a single respondent and again integrate it in a "text display"-type question.

gitlab.com/SondagesPro/ExportAndStats/generateGraphQuestion

But ame than previous one : 3.X , not 4.X compatible

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The following user(s) said Thank You: RudischerMC
The topic has been locked.
  • RudischerMC
  • RudischerMC's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 11 months ago #197820 by RudischerMC
Replied by RudischerMC on topic How to present benchmark results?
Just an update: Denis' generateGraphQuestion plugin works fine (I'm still on LS 2.62). I'll try tweaking the code a bit to show two polygons on the same chart.
The getStatInSurvey plugin I haven't tried yet.

Thanks for all your help!
The topic has been locked.
  • RudischerMC
  • RudischerMC's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 11 months ago - 3 years 11 months ago #198098 by RudischerMC
Replied by RudischerMC on topic How to present benchmark results?
Hi again, and thanks once more for your help so far.
Both my original questions have been solved individually using a plugin for each one, but the combination turns out to be tricky: The "getStatInSurvey" plugin allows to display the average values I need in texts. However, I would now need to assign them to variables in order to use them as input parameters for the generateGraphQuestion plugin.

Is there a way of accessing the php code from the "getStatInSurvey" plugin (which works fine to calculate the statistics from the database) from EM and using it to calculate the result of an equation question instead of just having it replace text that is displayed?

Or are there other possible approaches to assigning average values from other responses to a variable? I assume the AJAX approach suggested by Joffm could also only display the results as text, not assign them to variables?

I am using LS 2.62.

I truly appreciate your support,
Chris
Last edit: 3 years 11 months ago by RudischerMC. Reason: clarification of original question
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 11 months ago #198099 by holch
Replied by holch on topic How to present benchmark results?
Couldn't you just read the values you generate by getStatinSurvey into an equation type question (not sure if this is possible, but it is worth a test.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • RudischerMC
  • RudischerMC's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 11 months ago #198100 by RudischerMC
Replied by RudischerMC on topic How to present benchmark results?
That's what I tried, but the getStatsInSurvey placehoders ('[Q01.moy]' and the like) are not evaluated because getStatsInSurvey only uses the beforeQuestionRender event to replace them by the actual values. So the value of the equation question remains '[Q01.moy]'. It gets replaced each time it is displayed, but that does not help with the graph plugin.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 11 months ago #198101 by holch
Replied by holch on topic How to present benchmark results?
Ok, sorry, then I am out of ideas. Maybe Denis has one. Let's see tomorrow.

Ideally we would be able to do all this from within Expression Manager/Script. I have seen an interesting line in the release notes of 4.2.0. It reads like it is what I am describing, but not sure. Need to test it:

+New feature #13175: Ability to show calculated values based on all users (Denis Chenu)


I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The following user(s) said Thank You: RudischerMC
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 11 months ago #198106 by Joffm
Replied by Joffm on topic How to present benchmark results?

I assume the AJAX approach suggested by Joffm could also only display the results as text, not assign them to variables?

No, an ajax call writes the result into variables (e.g. a question of type "short text"). These you may access by EM.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: RudischerMC
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose