Attribute Expression to show duration of at least 10 consecutive speeding events using only one Timestamp field

133
2
3 weeks ago
Labels (1)
eallan
by
Emerging Contributor

I am very new to Arcade and trying to figure out how to make a Pop-Up Arcade expression that will show the DURATION of at least 10 consecutive speeding events for specific vehicles during specific event ID's. 

Does anyone know how I could get started with that? I have spent a couple hours looking online, and so far, I've only seen examples that use TWO fields that are time stamps.

I created a map that shows speeding events >= 85 mph. I want to add in the Pop-Ups the duration of a speeding event (at least 10 consecutive events again).

This is an example of a speeding event in my map, which I put into an Instant App (Reporter):

Screenshot 2025-04-03 115840.jpg

 

I can single out this speeding event using the "Unit Per ID field".

The time stamp field we have has dd/mm/yyyy hh:mm:ss, like this:

Screenshot 2025-04-03 120501.jpg

 

Thank you for any help or suggestions on how I can get started on this.

0 Kudos
2 Replies
KenBuja
MVP Esteemed Contributor

Can you provide more detail about your data, like a sample of some of the records in it?

eallan
by
Emerging Contributor

Here is a data example (not the same data as above) but very similar.

Again, I am trying to show the time DURATION of at least 10 consecutive speeding events for specific vehicles during specific Event ID's (Event ID format is #######)

timestampspeed
2:01:06 PM85
2:01:03 PM87
2:01:00 PM85
2:00:51 PM85
1:40:52 PM86
1:40:49 PM87
1:40:46 PM88
1:40:43 PM86
1:40:40 PM85
1:40:34 PM86
1:40:31 PM86
1:40:13 PM86
1:40:09 PM86
1:39:47 PM85
1:39:42 PM86
1:39:39 PM87
1:39:36 PM85
1:39:33 PM85
1:39:18 PM85
1:39:15 PM85
1:39:12 PM86
1:39:09 PM86
1:39:06 PM89
1:39:03 PM87
1:39:00 PM88
1:38:57 PM87
1:38:54 PM86
1:38:51 PM87
1:38:48 PM87
1:38:45 PM88
1:38:42 PM86
1:38:39 PM87
1:38:36 PM88
1:38:33 PM87
1:38:30 PM86
1:38:27 PM86
1:38:24 PM86
1:38:18 PM85
0 Kudos