olivierfriard / BORIS

Behavioral Observation Research Interactive Software
http://www.boris.unito.it
GNU General Public License v3.0
174 stars 34 forks source link

importing observations from Excel #576

Open kyl10 opened 1 year ago

kyl10 commented 1 year ago

Hi Olivier,

Is it possible to import observations into Boris from Excel (mainly the values for independent variables of observations)? Or is it possible to copy values of independent variables to a new observation? I often have a number of observations with the same values for the independent variables.

I'm using Boris 7.13.9 for Windows

olivierfriard commented 1 year ago

Hi, It is not possible yet but it could be an interesting feature to add.

My advice is also to use a more recent version. v.8 had great improvements!

dprotter commented 1 year ago

hi, just following up on this. I have a plain text csv file of all the different events that happen in our behavior boxes (tones, doors, etc). It would be super useful to load those events into boris so that scorers could quickly skip to them and observe behavior there.

Is it possible for me to achieve this by creating a file that is formatted the same as an observation file, and then importing that?

olivierfriard commented 1 year ago

Hi, you have 2 ways to import event from a CSV file into BORIS:

1) format your CSV file following the events table format and copy paste it into BORIS:

0.000 Himal Tear Branches NA 0.000 Sharky Tear Branches NA 1.359 Nautilus Tear Branches NA 25.776 Nautilus Tear Branches NA 25.777 Nautilus Carry objects Branches NA 27.732 Nautilus Carry objects Branches NA 30.688 Sharky Tear Branches NA 30.689 Sharky Locomotion Walk NA 31.819 Sharky Locomotion Walk NA 33.898 Himal Tear Branches NA 33.899 Himal Locomotion NA 34.470 Himal Locomotion NA

2) convert your CSV file into a JSON file to mimic a BORIS project file. You can use an online JSON editor to check how a project file is structured (see https://jsoneditoronline.org for example - do not forget to format your file) Import observations from your JSON file or open it as a project

Olivier

dprotter commented 1 year ago

Thanks, this is very helpful. I'll give it a try!

dprotter commented 1 year ago

Could you elaborate a bit on what you mean by: 1) format your CSV file following the events table format and copy paste it into BORIS

How exactly should it be pasted? (IE which pane should I click, at what stage in the observation, etc)

Is it ok to format as follows (by just selecting empty cells in excel/openoffice):

Thanks!
olivierfriard commented 1 year ago

You have to copy the events from your CSV file and paste them into an empty Events table (right-click > Paste) of a new observation

zchilds96 commented 1 year ago

Hi, we are running into an issue where the copy and paste of events into BORIS is only working on one computer. The only difference is that the computer that successfully pastes events is running on Boris Version: 7.13.6. The other systems are all on v. 8.21.8 or 8.20.3 and they do not allow the pasting of events. Version 8 systems give the attached error when trying to paste events, while the same csv file is able to be pasted into the version 7 boris. Copy Paste Error

Is there anything we can do to get the version 8 boris to allow pasting events? Thank You!

zchilds96 commented 1 year ago

Just an update on my previous comment, Found a solution to the copy and paste issue. If you go into the BORIS archive and download V. 7.13.6 you can copy and paste csv into events section.

olivierfriard commented 1 year ago

Hi, It is not recommended to use very old versions as they contain bugs. I will work on this issue as soon as possible to add a reproducible way to import observations from CSV/TSV files

-- Research technician Dept of Life Sciences and Systems Biology University of Torino tel: +39 011 6704542 http://penelope.unito.it/friard/ GitHub: olivierfriard https://github.com/olivierfriard ORCID: 0000-0002-0374-9872 http://orcid.org/0000-0002-0374-9872 Web of Science ResearcherID: ABG-2435-2021 https://publons.com/researcher/4857666/olivier-friard/ Scopus Author ID: 10639803800 https://www.scopus.com/authid/detail.uri?authorId=10639803800