Solved

calculating arrival order

  • 4 February 2021
  • 3 replies
  • 2 views

We have a dataset of 911 calls by unit and are trying to calculate a response order for the unit by call. The dataset contains the fields ReportNumber(Unique Call ID), Unit, UnitType, UnitDispatch(Date/Time), UnitEnroute(Date/Time), UnitOnscean(Date/Time), and ArrivalOrder(Numeric).

 

My goal is to calculate a field ArrivalOrder so that if 3 units are assigned to the same ReportNumber I can tell which unit was the first on scene, second, ETC. The dispatch database only gives me the first unit but doesn't give me the running order if multiple units are involved. I've gotten to the point that I need to group them by ReportNumber and now I'm stuck.

 

Has anyone tried to calculate something silitar and had any success? I thought maybe StaticsCalculator might work but wasn't giving me the order per line. Thanks.

icon

Best answer by markatsafe 4 February 2021, 23:22

View original

3 replies

Userlevel 1
Badge +10

I might be misunderstanding, but once you have them ordered by on scene time, you should just be able to use a counter to assign the arrival order, with Counter Name of the Report Number (this acts as a group by so each count is independent for each report number)

Badge +2

@nicholas110​ If your dates are in the standard FME date format, you should be able to sort by the ReportNumber and then UnitOnScene date (Sorter). Then the Counter with the:

Count Output Attribute: ArrivalOrder and the

Counter Name set to ReportNumber - This will ensure you start a new count sequence with each report (in older versions of FME you might have to type @Value(ReportNumber))

@nicholas110​ If your dates are in the standard FME date format, you should be able to sort by the ReportNumber and then UnitOnScene date (Sorter). Then the Counter with the:

Count Output Attribute: ArrivalOrder and the

Counter Name set to ReportNumber - This will ensure you start a new count sequence with each report (in older versions of FME you might have to type @Value(ReportNumber))

@Mark Stoakes​ and @ebygomm​ yes a quick test on some 2021 data came out with the proper order. Looks like the counting tool was exactly what I needed!! A little more tweaking (filtering out units assigned that didn't arrive) and this should be exactly what the department is looking for.Thank you so much, you both got me on the right track.

Reply