SussexPsychologySoftware / DoggoNogo

Gamified response inhibition reaction time tasks
https://sussexpsychologysoftware.github.io/DoggoNogo/?datapipe=AlXXHjfLwVP3&p=John%20Smith&s=Original%20Study&l1n=60
2 stars 2 forks source link

Data formatting #3

Closed DominiqueMakowski closed 3 weeks ago

DominiqueMakowski commented 3 weeks ago

I just made a test with the following URL:

https://sussex-psychology-software-team.github.io/DoggoNogo/?datapipe=Vqb57uxj5LaN&p=dupa&s=DoggoNogoValidation&l1n=30

to send this to this repo: image

But I haven't received the data. Might be a bug in the sending?

Max-Lovell commented 3 weeks ago

Turn off the data validation, it's filtering anything out without a trial_type field.

DominiqueMakowski commented 3 weeks ago

It will make it easier to select the according data files in the future if we need

DominiqueMakowski commented 3 weeks ago

image

to clarify, start is the full start date, and trialsStart is the start of lvl1? And so trialsStart-startDate is the duration of the introduction?

DominiqueMakowski commented 3 weeks ago

Also, isn't it weird that userAgentString prints all browsers? Like for in my example it's "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 Edg/130.0.0.0"

DominiqueMakowski commented 3 weeks ago

image

DominiqueMakowski commented 3 weeks ago

image

It's much easier to have everything at the same level to easily put it in dataframe format

Max-Lovell commented 3 weeks ago

screenSize_width is surely an ultimate naming sin - do you want the names camel case or snake_case? Looks like camel is more typical generally but underscores more typical in python: https://stackoverflow.com/questions/5543490/json-naming-convention-snake-case-camelcase-or-pascalcase. I've done camel for now keeping with startL1 etc.

Yeah it's a weird format, suffers from legacy issues I think. Put "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 Edg/130.0.0.0" into here: https://explore.whatismybrowser.com/useragents/parse/#parse-useragent and you get "Edge 130 on Windows 10". More info: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent.

Rest is done, will push by EOD

DominiqueMakowski commented 3 weeks ago

image

Works great. Interestingly, the canvas size / screen size is 0 for early presses, is that expected?

do you want the names camel case or snake_case?

I prefer snake_case but it's fine haha I'll rename in the preprocessing script no woz

DominiqueMakowski commented 3 weeks ago

WAIT haha, I think we forgot to save the RT ^^ that's rather important

Max-Lovell commented 3 weeks ago

oops - should be fixed UwU. Screen size is recorded on early trials now, not canvas but not sure what the use would be as there's no bone position yet.

DominiqueMakowski commented 3 weeks ago

Just tried it again now, but the data seems to be the same (i.e., no responseTime and screen size sill 0 for early trials. Maybe it didn't update correctly?

image

Max-Lovell commented 3 weeks ago

Oops I see - c# can't serialise a nullable field (i.e. can't store it in my JSONable dict) apparently - which happens as I wanted rt to be null on a missed trial. Making that happen is a massive pain in c#. We have 3 options for how rt can be saved for a missed trial: 1) save the rt as is - obviously there is no reaction to time, but there is still an 'rt' (i.e. the time recorded by the timer when the trial was ended, which is basically equal to the maxRT). 2) Store all rts as a string and save 'null' as a string too, which can be converted to numeric at analysis 3) Use a code for the missed rt in the correct data type as e.g. -999

lmk which you prefer. I'd opt for going with option 1 and letting people handle it themselves.

Max-Lovell commented 3 weeks ago

Also for screen size I just tested and it looks fine in my data: https://osf.io/c7gwv

DominiqueMakowski commented 3 weeks ago

for RT, yeah 1 is good, cheers

DominiqueMakowski commented 3 weeks ago

I dont like codes like -999 and i don't particularly saving it as a string either it looks hacky so 1 is the best

Max-Lovell commented 3 weeks ago

okay done, build in progress

DominiqueMakowski commented 3 weeks ago

Cheers, I think it all works! I'll run a couple of pilots and will confirm that it all works as expected and then we can push a release