@@ -309,7 +309,8 @@ def query_all_points_by_range(
309309 move_df : DataFrame ,
310310 minimum_meters : Optional [float ] = 100 ,
311311 minimum_time : Optional [timedelta ] = timedelta (minutes = 2 ),
312- datetime_label : Optional [Text ] = DATETIME ):
312+ datetime_label : Optional [Text ] = DATETIME
313+ ):
313314 """
314315 Queries closest point within a spatial range based on meters and a temporal range.
315316
@@ -360,18 +361,13 @@ def query_all_points_by_range(
360361 result = pd .DataFrame ([])
361362 total = traj1 .shape [0 ]
362363 count = 0
363- for _ , row in traj1 .iterrows ():
364- clear_output (wait = True )
365- print ('{} de {}' .format (count , total ))
366- print ('{:.2f}%' .format ((count * 100 / total )))
364+ for _ , row in progress_bar (
365+ traj1 .iterrows (), desc = "Querying all points by temporal and spatial distance" , total = traj1 .shape [0 ]
366+ ):
367367 coinc_points = _meters_filter (row , move_df , minimum_meters )
368368 coinc_points = _datetime_filter (row , coinc_points , minimum_time )
369369 result = coinc_points .append (result )
370370
371371 count += 1
372372
373- clear_output (wait = True )
374- print ('{} de {}' .format (count , total ))
375- print ('{:.2f}%' .format ((count * 100 / total )))
376-
377373 return result
0 commit comments