med-material / trail-it-analysis

data analysis of trail it
0 stars 0 forks source link

Dashboard: Performance Session View #2

Open bastianilso opened 2 years ago

bastianilso commented 2 years ago

dashboard-performance-session

Code for the heatmap (use string replace to insert the right colors and reaction times in the right spots).

<svg xmlns="http://www.w3.org/2000/svg" width="554.4" height="336.8" viewBox="0 0 146.7 89.1">
  <g transform="translate(-36 -90.3)">
    <rect width="76.8" height="122.7" x="-173.2" y="42.7" fill="none" stroke="#a7a7a7" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.7" rx="2.7" ry="2.7" transform="rotate(-90)"/>
    <circle cx="173" cy="134.2" r="3.6" fill="none" stroke="#a7a7a7" stroke-linejoin="round" stroke-width="1.1"/>
    <rect width="87.6" height="145.2" x="-178.6" y="36.8" fill="none" stroke="#a7a7a7" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" rx="2.7" ry="2.7" transform="rotate(-90)"/>
    <path fill="#a4f9cd" stroke="#a7a7a7" stroke-linecap="round" stroke-linejoin="round" stroke-width=".9" d="M42.2 96.5h40.9V135H42.2z"/>
    <path fill="#a4f1f9" stroke="#a7a7a7" stroke-linecap="round" stroke-linejoin="round" stroke-width=".9" d="M42.2 135.1h40.9v38.5H42.2z"/>
    <path fill="#f9d6a4" stroke="#a7a7a7" stroke-linecap="round" stroke-linejoin="round" stroke-width=".9" d="M83.5 96.5h40.9V135H83.5z"/>
    <path fill="#acf9a4" stroke="#a7a7a7" stroke-linecap="round" stroke-linejoin="round" stroke-width=".9" d="M83.5 135.1h40.9v38.5H83.5z"/>
    <path fill="#6955dc" fill-opacity=".5" stroke="#a7a7a7" stroke-linecap="round" stroke-linejoin="round" stroke-width=".9" d="M124.2 96.5h40.9V135h-40.9z"/>
    <path fill="none" stroke="#a7a7a7" stroke-linecap="round" stroke-linejoin="round" stroke-width=".9" d="M124.2 135.1h40.9v38.5h-40.9z"/>
    <text xml:space="preserve" x="62.1" y="118.6" fill="#767676" stroke-width=".3" font-family="Source Sans Pro" font-size="6.4" letter-spacing="0" style="line-height:1.25;-inkscape-font-specification:'Source Sans Pro, Normal';text-align:center" text-anchor="middle" word-spacing="0"><tspan x="62.1" y="118.6">{1}</tspan></text>
    <text xml:space="preserve" x="103.9" y="117.8" fill="#767676" stroke-width=".3" font-family="Source Sans Pro" font-size="6.4" letter-spacing="0" style="line-height:1.25;-inkscape-font-specification:'Source Sans Pro, Normal';text-align:center" text-anchor="middle" word-spacing="0"><tspan x="103.9" y="117.8">{2}</tspan></text>
    <path fill="#f9a4a4" stroke="#a7a7a7" stroke-linecap="round" stroke-linejoin="round" stroke-width=".9" d="M124.2 135.1h40.9v38.5h-40.9z"/>
    <text xml:space="preserve" x="144.7" y="156.4" fill="#767676" stroke-width=".3" font-family="Source Sans Pro" font-size="6.4" letter-spacing="0" style="line-height:1.25;-inkscape-font-specification:'Source Sans Pro, Normal';text-align:center" text-anchor="middle" word-spacing="0"><tspan x="144.7" y="156.4">{6}</tspan></text>
    <text xml:space="preserve" x="103.9" y="156.4" fill="#767676" stroke-width=".3" font-family="Source Sans Pro" font-size="6.4" letter-spacing="0" style="line-height:1.25;-inkscape-font-specification:'Source Sans Pro, Normal';text-align:center" text-anchor="middle" word-spacing="0"><tspan x="103.9" y="156.4">{5}</tspan></text>
    <text xml:space="preserve" x="62.7" y="156.4" fill="#767676" stroke-width=".3" font-family="Source Sans Pro" font-size="6.4" letter-spacing="0" style="line-height:1.25;-inkscape-font-specification:'Source Sans Pro, Normal';text-align:center" text-anchor="middle" word-spacing="0"><tspan x="62.7" y="156.4">{4}</tspan></text>
    <text xml:space="preserve" x="144.7" y="117.8" fill="#767676" stroke-width=".3" font-family="Source Sans Pro" font-size="6.4" letter-spacing="0" style="line-height:1.25;-inkscape-font-specification:'Source Sans Pro, Normal';text-align:center" text-anchor="middle" word-spacing="0"><tspan x="144.7" y="117.8">{3}</tspan></text>
  </g>
</svg>
Jules-CLERC commented 2 years ago
Capture d’écran 2021-11-08 à 10 37 55

Should the field shown on the screenshot be replaced by a value? Or does it only serve as a title?

bastianilso commented 2 years ago

Should the field shown on the screenshot be replaced by a value? Or does it only serve as a title? Put the value next to "Reaction Time:" fx. Reaction Time: 0.53s

Jules-CLERC commented 2 years ago

Should the field shown on the screenshot be replaced by a value? Or does it only serve as a title? Put the value next to "Reaction Time:" fx. Reaction Time: 0.53s

image

Alright, so what's the difference between "Reaction Time", "Best", "Median" and "Worst" ? Because I have only 3 columns for the reaction time in the database, and 4 in your preview. It's just a mistake ?

bastianilso commented 2 years ago

aaaaah, you're right. OK, in that case, Reaction time is the title. and best, worst, median are the places where we put values like i described above

Reaction Time Best: 0.2s Median: 0.4s Worst: 3.4s

Jules-CLERC commented 2 years ago
Capture d’écran 2021-11-09 à 08 38 19 Capture d’écran 2021-11-09 à 08 38 27

the R shiny page currently looks like this, do you want any changes?

bastianilso commented 2 years ago

Thanks jules, looks good. 🚲

Some quick notes:

Jules-CLERC commented 2 years ago

About the heat map

Currently I use something like this :

if the reaction time of the patient is in the first 50% of the histogram :
 the color is green
if the reaction time of the patient is in the second 50% of the histogram :
 the color is orange
else :
 the color is red
image

the graph below (Cumulative Histogram) represents the MPC sessionMedianReactionTime for this settings : circleAmount=12, gameType=A, sessionLength=2

We can use something similar to select the color of the iPad (see above). -> For example :

if the reaction time of the patient is in the first 50% of the histogram :
 the color is green
if the reaction time of the patient is in the second 50% of the histogram :
 the color is orange
else :
 the color is red

The problem is when the patient's session does not match with the game settings of MPC players, what are we supposed to compare ?

I can suggest you to use the MPC data when it's possible, and when it's not possible to use what I used before. I can add parameters so that the user can modify the range of colors as he wish.

what do you think of that ?

bastianilso commented 2 years ago

Hi Jules,

This is a good point. We don't know how much the reaction time will change, when we increase circleAmount from 12 to 18, to 30. We would need to collect data about this, in order to have a complete reference data set.

Perhaps you can ask some students here at CREATE to play Trail it for 2 minutes, in the other 2 difficulty settings? I think we can get a nice reaction time estimate if we can find 12 players.

If you need consent forms, they should be in my office.

Jules-CLERC commented 2 years ago

so you would like to do that in these difficulties ?

So this also means that we assume that the session length does not influence the reaction time?

bastianilso commented 2 years ago

The main influence I would expect from session length would be:

We can probably overcome these effects by averaging across the whole session. Secondly, since the heatmap is a spatial visualization, I think it is less important in this context.

@Jules-CLERC What does the dashboard say? :-) If you plot reaction time, for each level, can you observe these effects?

Jules-CLERC commented 2 years ago
image

I don't know exactly what to conclude from this, the reaction time doesn't seem to change especially in the first levels, Regarding the last levels, it is normal that the reaction time is shorter, because only the best players reach these levels.

bastianilso commented 2 years ago

@Jules-CLERC Thanks! I would show the y-axis from 0 to 1 second here - this is a bit too zoomed in (if you look at the y-axis, the difference is max ~150ms from the best to the worst reaction time, which is not all that much).

So yea, not that much difference, therefore we don't need to worry too much about the session length right now.