topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Wednesday December 11, 2024, 10:46 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: I input a CSV file and you tell me if X is within the range of Y.  (Read 4727 times)

vevola

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 104
  • VeVoLa
    • View Profile
    • Donate to Member
I have huge CSV files with numerical values and I want to see if there are any overlaps within a range.

1) I have ONsetX and I want to see if it's within the range of ONsetY and OFFsetY. If yes, let me see the pair.
2) I have ONsetX and OFFsetY, and I want to see if there's any overlap between ONsetY and OFFsetY. If yes, let me see the pair.

I don't even see how to do this within Excel. Can anyone help?

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 11,190
    • View Profile
    • Donate to Member
Re: I input a CSV file and you tell me if X is within the range of Y.
« Reply #1 on: September 09, 2015, 07:29 AM »
You can try my XLDataAnalyzer: https://www.donation...dex.php?topic=6816.0

Caveats: It's old, and I don't have the source.  I don't even have the docs anymore to help you use it.  But I do know it helped for a friend that needed to do a similar thing for thesis research.

vevola

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 104
  • VeVoLa
    • View Profile
    • Donate to Member
Re: I input a CSV file and you tell me if X is within the range of Y.
« Reply #2 on: September 09, 2015, 08:13 AM »
Thanks! but I think it's not quite I needed (although probably the word "range" peaked your attention!).

I want to see if one number or a range "fits" into another number within a range.

But I can see how your app could be useful depending on what you're doing.

Target

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,832
    • View Profile
    • Donate to Member
Re: I input a CSV file and you tell me if X is within the range of Y.
« Reply #3 on: September 09, 2015, 04:36 PM »
can you provide some dummy data sets? and the 'matching' criteria?

vevola

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 104
  • VeVoLa
    • View Profile
    • Donate to Member
Re: I input a CSV file and you tell me if X is within the range of Y.
« Reply #4 on: September 10, 2015, 09:47 AM »
Below I provide a mockup what the UI might look like, and here's a breakdown of what I'd like (ideally).
First I want to a) create subsets (i.e. all rows having a certain value in the cells of a column) and then b) compare subsets.

I provide a CSV file to be processed by your program, which would allow me to create subsets (extracting rows based on conditions I set).
Then the program compares the subsets, matches columns of numbers (timestamps) against two other columns (also timestamps of beginning and end, indicating a range) and then compile a CSV file.

Example:
1) I have timestamps of when people are looking at each other
2) I have timestamps of when these people move
I want to see, when people were looking at one person, if that person was moving.

The data are various labels and things, but more importantly they have timestamps of beginnings and endings of things. I want to see when there are timestamps of things that are
a) contained in other timestamps,
b) overlapping, or
c) near each other (depending on my threshold).

Here is a sample of the data: https://docs.google....h3o/edit?usp=sharing

The output can be a simple CSV file.

The interface would include the options included below and could be something like this:

====================================

Create SUBSETS from CSV file, either based on an entire column or based on the contents of a cell.

1. Subset Name: _______ (*create a name for the subset)
Column: [dropdown list] (*with the column headers or number, or "ALL")
Cell: _______ (*type in text to find or leave blank)


2. Subset Name: _______
Column: [dropdown list]
Cell: _______

   
3. Subset Name: _______
Column: [dropdown list]
Cell: _______

[ADD SUBSET]

[Import subset]
[Export subsets] (*as CSV files)
___________________________________________________________

Choose what to match.

TEMPORAL MATCHES: Only columns with numeric data can be compared.
 
   This [SUBSET_NameX]: [COLUMN_list] (to [COLUMN_list] ) (*if you select just the first than it's a point, if you also select the second then it's understood as a time range)
   
   within [SUBSET_NameX] from [COLUMN_list] to [COLUMN_list]
   
   [] AND [] OR within [SUBSET_NameX] from [COLUMN_list] to [COLUMN_list]
   
   [ADD ADDITIONAL CONSTRAINT]

[] Containing (*both onset or offset are within the range)
[] Overlapping (*either onset or offset is within the range)   
[] Threshold: ___ms before;  ___ms after


====================================


A note on the sample data. https://docs.google....h3o/edit?usp=sharing

Note that what you have here is already a subset of the original data, which would have been made by

Subset: All gaze_to_p1
Column: label
Cell: gaze_to_p1

AND

Subset: All P1
Column: participant
Cell: p1


A query on this table might be to compare if the onset (just the beginning) of "gaze_to_P1" is within the range of all P1 "head_face" and all "upper_body":

Subset1: All gaze_to_P1
Column: label
Cell: gaze_to_p1

(NB: This could have also been Column:ALL and it would have given the same subset, but in this case maybe selecting the column would make it less processing intensive?)

Subset2: All P1
Column: participant
Cell: p1


The output could be a simple CSV file with an added column providing the match (or NA). Eventually, it might be interesting for this column to have the cells giving something like "gaze_to_P1 | head_face", "gaze_to_P1 | upper_body", i.e. I get to choose how the result is shown, specifically grabbing the cell content of the first and second member of the match.


---

Possible?