+ Reply to Thread
Results 1 to 12 of 12

Identifying Peaks in Data

  1. #1
    Registered User
    Join Date
    05-05-2009
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    16

    Identifying Peaks in Data

    Hi,

    I've collected some data from a GPS logger regarding the speed of an athlete. I want to calculate how many sprints this particular athlete undertook during a training session.

    Sprinting is defined as a speed of > 20 kph.

    One sprint would be the attainment of one peak >20 kph before decreasing below 20 kph.

    It's easy to identify the 3 peaks and thus sprints from the xy scatterplot in the attached file, but I'm struggling to find a way to calculate this.

    Any help would be much appreciated.

    Thanks in advance.
    Attached Files Attached Files

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Identifying Peaks in Data

    Try this in C column

    =IF(AND(B2>20;B3<=20);"Sprint";"")

    This will give you Sprint at the end of the sprint.. But I hope you don't mind it?!

    (Chane ; to , if needed)

    Edit: and in C1 you can add: =COUNTIF(C2:C1000;"Sprint")
    wich will give you number of sprints
    Last edited by zbor; 05-05-2009 at 11:03 AM.

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Identifying Peaks in Data

    It's not clear to me at least what you want to output...

    Total Number of Sprints in one cell: =SUMPRODUCT(--(B2:B1000>=20),--(B1:B999<20))

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Identifying Peaks in Data

    Well, I couldn't figure this out so I write it with fancy Sprint version

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Identifying Peaks in Data

    If using 2007 you may be able to use COUNTIFS (note: not available pre XL2007)

    =COUNTIFS(B2:B1000,">=20",B1:B999,"<20")

  6. #6
    Valued Forum Contributor squiggler47's Avatar
    Join Date
    02-17-2009
    Location
    Littleborough, UK
    MS-Off Ver
    Excel 3.0 to 2007+2010! (couldnt get 2.1 working)
    Posts
    1,013

    Re: Identifying Peaks in Data

    I'm thinking this might not answer the question

    I am assuming a "Sprint" would be identified by a peak abouve 20, but either side of that peek would be less IE

    10 21 10 - sprint

    10 21 21 24 21 10 - sprint

    10 21 21 21 21 21 21 10 - sprint
    Regards
    Darren

    Update 12-Nov-2010 Still job hunting!

    If you are happy with the results, please add to our reputation by clicking the blue scales icon in the blue bar of the post.

    Learn something new each day, Embrace change do not fear it, evolve and do not become extinct!


  7. #7
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Identifying Peaks in Data

    and in all 3 cases answer is 1?

    That's it

  8. #8
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Identifying Peaks in Data

    Not entirely sure I follow re: problem... the examples provided thus far would count correctly... the only anomaly would be

    10,15,22,23,24,17,15,20,21,24,25 End

    ie as to whether or not the last trend should be ignored given there is no sub-sprint value post 20 increase ... I would expect the answer to be 2 peaks which is what the formulae provided would both return.

    Am I missing something ?

  9. #9
    Registered User
    Join Date
    05-05-2009
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: Identifying Peaks in Data

    Hi,

    Thanks for all your replies.

    The formula provided by zbor does work in the example I provided. But may not in relation to DonkeyOte post.

    I'm not sure it will be a problem DonkeyOte beacuse after a sprint an athlete must decelerate thus at some point speed will drop below the cut off point.

    Another interesting point is a "sprint within a sprint". Ie. 20, 23, 26, 23, 20.5, 24, 25, 26, 18, 15, 12.

    I think I would class that as one sprint. But is there a way to mark that up as another sprint?

    Thanks again,

    P.S. I have some more interesting questions. I'm just working out the best way to articulate them to you!

  10. #10
    Valued Forum Contributor squiggler47's Avatar
    Join Date
    02-17-2009
    Location
    Littleborough, UK
    MS-Off Ver
    Excel 3.0 to 2007+2010! (couldnt get 2.1 working)
    Posts
    1,013

    Re: Identifying Peaks in Data

    this will identify peaks above 20


    Please Login or Register  to view this content.
    will allow a minimum change by changing tol to 0.1 will allow for minor variations

    =
    Please Login or Register  to view this content.
    used in conjunction with donkeys will give you sprints within sprints

    Mini sprints

    Please Login or Register  to view this content.
    identifies the 1 minisprint

    (sorry donkey i see logic now, brain fried just spent 2 hours cleaning house!!)
    Last edited by squiggler47; 05-05-2009 at 11:47 AM.

  11. #11
    Registered User
    Join Date
    05-05-2009
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: Identifying Peaks in Data

    Dear all,

    Thanks for all your help.

    I would now like to identify a "sprint" by using another method.

    The rate of change in speed over 1-second.

    A sprint should be identified by a change of 5 kph over the last second. I've attached an example with my poor effort.

    The problem with my countif formula is that it counts any cell in the range over 5. You can see that in cells D78 and D79 that the values are over 5 and so the the formula counts "2 sprints" when in reality it is part of the same singular sprint.

    Any additional help would be much appreciated.

    Thanks in advance (again)
    Attached Files Attached Files

  12. #12
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Identifying Peaks in Data

    Actually... I'm not sure what I've got... But better something than nothing )

    Please, try this formula and see is this ok?

    =IF(B2>C1;IF(B2-C1>=5;"Sprint";C1);B2)

    Also.. in C1 MUST BE =B2
    and in C2 and down write formula

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1