Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Jspsych csv export no newline

We are using Jspsych to collect data in our lab and we host the experiments on JATOS 3.8.1. The default data format is json, however we use the following function in the jspsych script:

jatos.endStudy(jsPsych.data.get().csv());

This makes a finished worker save a datafile (actually a .txt file, but i can just rename it to .csv) that is seemingly in a csv format. However neither the exported file, nor the previewed data has any new lines between data rows, which makes regular functions read it as one huge row.

I did a python script with regex stuff to fix the files and append newlines to the end of the rows, but it's specific to the data structure we have in our study. Maybe I am missing something in the jspsych script, or the JATOS settings, but I couldn't find out how to fix it before exporting data.

In the meantime I will stick to json format, however it'd be really convenient to save and export data into csv.


Thank you,

Miklos Bognar

Comments

  • Have you tried the latest version of JATOS. There was a bug in a recent version removing line breaks and it was fixed.

    Best

    Kristian

  • Ah you are right, we stuck to 3.8.1 and did not update it but I can see it in the changelogs now. Thanks you Kristian for the quick response!

Sign In or Register to comment.