In [1]:
import emission.storage.decorations.location_queries as lq

In [2]:
reload(lq)


Out[2]:
<module 'emission.storage.decorations.location_queries' from '/Users/shankari/e-mission/e-mission-server/emission/storage/decorations/location_queries.pyc'>

In [3]:
import logging
logging.getLogger().setLevel(logging.DEBUG)

In [4]:
import emission.analysis.classification.cleaning.location_smoothing as ls

In [5]:
%matplotlib inline

In [6]:
lq.get_uuid_list()


Out[6]:
[UUID('0763de67-f61e-3f5d-90e7-518e69793954'),
 UUID('f955cff1-8fb8-3b42-8776-6d8874e5b90a'),
 UUID('b0d937d0-70ef-305e-9563-440369012b39')]

In [7]:
import datetime as pydt

In [8]:
import pytz

In [9]:
get_jan_dt = lambda date: pydt.datetime(2015,7,date,tzinfo=pytz.timezone("America/Los_Angeles"))

In [10]:
get_jul_dt = lambda date: pydt.datetime(2015,7,date,tzinfo=pytz.timezone("America/Los_Angeles"))

In [11]:
get_aug_dt = lambda date: pydt.datetime(2015,8,date,tzinfo=pytz.timezone("America/Los_Angeles"))

In [12]:
import emission.analysis.plotting.leaflet_osm.our_plotter as lo

In [13]:
reload(lo)


Out[13]:
<module 'emission.analysis.plotting.leaflet_osm.our_plotter' from '/Users/shankari/e-mission/e-mission-server/emission/analysis/plotting/leaflet_osm/our_plotter.pyc'>

In [14]:
import emission.core.get_database as edb

In [15]:
from attrdict import AttrDict

In [16]:
import pandas as pd

In [17]:
import emission.analysis.plotting.leaflet_osm.ipython_helper as ipy

In the previous data collection, it looks like the last entries before a trip end detection all had high accuracies. This means that simply filtering by accuracy is not good enough. Let us take a look at the newer data to see if we still see that behavior.


In [18]:
import emission.core.get_database as edb
from uuid import UUID
import attrdict as ad
import datetime as pydt
import emission.analysis.point_features as pf

In [19]:
myUUID = UUID('0763de67-f61e-3f5d-90e7-518e69793954')

In [20]:
tomUUID = UUID('b0d937d0-70ef-305e-9563-440369012b39')

In [21]:
reload(lq)


Out[21]:
<module 'emission.storage.decorations.location_queries' from '/Users/shankari/e-mission/e-mission-server/emission/storage/decorations/location_queries.pyc'>

Our algorithm:

  1. Remove all low accuracy points
  2. Remove all points that are identical to the previous one (distance == 0 meters)
  3. Get all points in the past 5 mins, and the last 10 points
  4. Pick the set with the oldest point
  5. See if all points in the set are within 100m of the last point
  6. If so, end trip, otherwise continue trip

In [22]:
import emission.analysis.classification.segmentation.trip_segmentation as ts

In [23]:
reload(ts)


Out[23]:
<module 'emission.analysis.classification.segmentation.trip_segmentation' from '/Users/shankari/e-mission/e-mission-server/emission/analysis/classification/segmentation/trip_segmentation.pyc'>

In [24]:
import emission.analysis.classification.segmentation.section_segmentation as ss

In [25]:
reload(ss)


Out[25]:
<module 'emission.analysis.classification.segmentation.section_segmentation' from '/Users/shankari/e-mission/e-mission-server/emission/analysis/classification/segmentation/section_segmentation.pyc'>

In [26]:
import emission.analysis.classification.cleaning.speed_outlier_detection as cso
import emission.analysis.classification.cleaning.jump_smoothing as cjs

In [27]:
reload(cjs)


Out[27]:
<module 'emission.analysis.classification.cleaning.jump_smoothing' from '/Users/shankari/e-mission/e-mission-server/emission/analysis/classification/cleaning/jump_smoothing.pyc'>

In [28]:
my_points_time_df_aug_23 = lq.get_plottable_df(myUUID, "time", get_aug_dt(23), get_aug_dt(24))


final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1440316800000.0}}, {'data.mTime': {'$lt': 1440403200000.0}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 

In [29]:
my_segment_points_aug_23 = ts.segment_into_trips(my_points_time_df_aug_23)


DEBUG:root:filtering points Int64Index([59, 60, 61, 62, 64, 66, 68, 91, 92, 93, 98, 99, 102, 107, 112, 113, 115, 137, 138, 140, 143, 144, 145, 146, 148], dtype='int64')
DEBUG:root:after accuracy filtering, filtered list size went from (163, 29) to (138, 29)
DEBUG:root:timeDelta = 0, distanceDelta = %s, returning speed = 0
------------------------------2015-08-23 09:45:55------------------------------
last5MinsDistances = [] with length 0
last10PointsDistances = [ 0.] with length 1, shape (1,)
len(last10PointsDistances) = 1, len(last5MinsDistances) = 0
Too few points to make a decision, continuing
------------------------------2015-08-23 09:46:00------------------------------
last5MinsDistances = [ 66.79779872] with length 1
last10PointsDistances = [ 66.79779872   0.        ] with length 2, shape (2,)
len(last10PointsDistances) = 2, len(last5MinsDistances) = 1
Too few points to make a decision, continuing
------------------------------2015-08-23 09:46:05------------------------------
last5MinsDistances = [ 124.09863727   58.32046423] with length 2
last10PointsDistances = [ 124.09863727   58.32046423    0.        ] with length 3, shape (3,)
len(last10PointsDistances) = 3, len(last5MinsDistances) = 2
Too few points to make a decision, continuing
------------------------------2015-08-23 09:46:11------------------------------
last5MinsDistances = [ 204.89697644  139.80678195   81.50451959] with length 3
last10PointsDistances = [ 204.89697644  139.80678195   81.50451959    0.        ] with length 4, shape (4,)
len(last10PointsDistances) = 4, len(last5MinsDistances) = 3
Too few points to make a decision, continuing
------------------------------2015-08-23 09:46:16------------------------------
last5MinsDistances = [ 262.54721824  196.53392211  138.46920654   58.99034002] with length 4
last10PointsDistances = [ 262.54721824  196.53392211  138.46920654   58.99034002    0.        ] with length 5, shape (5,)
len(last10PointsDistances) = 5, len(last5MinsDistances) = 4
Too few points to make a decision, continuing
------------------------------2015-08-23 09:46:22------------------------------
last5MinsDistances = [ 301.2590054   237.08617626  178.91401423   97.59198789   50.62909342] with length 5
last10PointsDistances = [ 301.2590054   237.08617626  178.91401423   97.59198789   50.62909342
    0.        ] with length 6, shape (6,)
len(last10PointsDistances) = 6, len(last5MinsDistances) = 5
Too few points to make a decision, continuing
------------------------------2015-08-23 09:46:27------------------------------
last5MinsDistances = [ 312.25138253  254.29468583  199.92607644  128.20146112  106.84554407
   66.95556141] with length 6
last10PointsDistances = [ 312.25138253  254.29468583  199.92607644  128.20146112  106.84554407
   66.95556141    0.        ] with length 7, shape (7,)
len(last10PointsDistances) = 7, len(last5MinsDistances) = 6
Too few points to make a decision, continuing
------------------------------2015-08-23 09:46:32------------------------------
last5MinsDistances = [ 344.28970759  294.82006807  247.13435933  188.53205953  179.11811185
  141.12786316   74.25715749] with length 7
last10PointsDistances = [ 344.28970759  294.82006807  247.13435933  188.53205953  179.11811185
  141.12786316   74.25715749    0.        ] with length 8, shape (8,)
len(last10PointsDistances) = 8, len(last5MinsDistances) = 7
Too few points to make a decision, continuing
------------------------------2015-08-23 09:46:38------------------------------
last5MinsDistances = [ 399.19565634  358.00536887  316.58001796  267.06233049  262.26965746
  224.16324215  157.51440857   83.39845725] with length 8
last10PointsDistances = [ 399.19565634  358.00536887  316.58001796  267.06233049  262.26965746
  224.16324215  157.51440857   83.39845725    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 8
last5MinsDistances.max() = 399.195656345, last10PointsDistance.max() = 399.195656345
------------------------------2015-08-23 09:46:43------------------------------
last5MinsDistances = [ 453.57579088  417.91711232  380.42415736  335.68042945  332.72685772
  294.38898432  227.90313531  153.88090375   70.49570788] with length 9
last10PointsDistances = [ 417.91711232  380.42415736  335.68042945  332.72685772  294.38898432
  227.90313531  153.88090375   70.49570788    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 9
last5MinsDistances.max() = 453.575790881, last10PointsDistance.max() = 417.917112324
------------------------------2015-08-23 09:46:48------------------------------
last5MinsDistances = [ 492.55469167  460.23181048  425.06967832  383.03806379  381.19416757
  342.8910036   276.44351117  202.42037603  119.02649721   48.54469552] with length 10
last10PointsDistances = [ 425.06967832  383.03806379  381.19416757  342.8910036   276.44351117
  202.42037603  119.02649721   48.54469552    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 10
last5MinsDistances.max() = 492.55469167, last10PointsDistance.max() = 425.069678321
------------------------------2015-08-23 09:46:54------------------------------
last5MinsDistances = [ 514.45858911  483.52451203  449.28109604  408.19249118  406.58663585
  368.15745398  301.76836846  227.78372056  144.39792385   73.90358799
   25.39430618] with length 11
last10PointsDistances = [ 408.19249118  406.58663585  368.15745398  301.76836846  227.78372056
  144.39792385   73.90358799   25.39430618    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 11
last5MinsDistances.max() = 514.458589109, last10PointsDistance.max() = 408.192491184
------------------------------2015-08-23 09:46:59------------------------------
last5MinsDistances = [ 514.63535876  483.57202941  449.21776082  407.95097159  406.19334647
  367.67864979  301.3157282   227.35595922  143.97956501   73.48430891
   25.03271269    1.09539082] with length 12
last10PointsDistances = [ 406.19334647  367.67864979  301.3157282   227.35595922  143.97956501
   73.48430891   25.03271269    1.09539082    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 12
last5MinsDistances.max() = 514.635358757, last10PointsDistance.max() = 406.193346466
------------------------------2015-08-23 09:47:04------------------------------
last5MinsDistances = [ 514.34933725  483.46857893  449.27130777  408.25763427  406.7163331
  368.32396121  301.92379168  227.92879431  144.53976385   74.04789277
   25.52243984    0.45659471    1.55092814] with length 13
last10PointsDistances = [ 368.32396121  301.92379168  227.92879431  144.53976385   74.04789277
   25.52243984    0.45659471    1.55092814    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 13
last5MinsDistances.max() = 514.349337252, last10PointsDistance.max() = 368.323961213
------------------------------2015-08-23 09:47:10------------------------------
last5MinsDistances = [ 544.34974114  515.82377962  483.2877199   444.23877216  443.66449857
  405.50995009  339.06581008  265.01484124  181.6163973   111.16277337
   62.62543596   37.39747096   37.93972935   37.21187497] with length 14
last10PointsDistances = [ 339.06581008  265.01484124  181.6163973   111.16277337   62.62543596
   37.39747096   37.93972935   37.21187497    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 14
last5MinsDistances.max() = 544.349741136, last10PointsDistance.max() = 339.065810076
------------------------------2015-08-23 09:47:15------------------------------
last5MinsDistances = [ 597.52653347  571.8315962   541.16894878  504.05132083  504.11070499
  465.89005722  399.4983643   325.47013359  242.07195718  171.6033361
  123.05875305   97.73776826   98.21146265   97.57737045   60.46051469] with length 15
last10PointsDistances = [ 325.47013359  242.07195718  171.6033361   123.05875305   97.73776826
   98.21146265   97.57737045   60.46051469    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 15
last5MinsDistances.max() = 597.526533468, last10PointsDistance.max() = 325.47013359
------------------------------2015-08-23 09:47:20------------------------------
last5MinsDistances = [ 660.50127586  637.7733251   609.09063496  574.05545971  574.92626996
  536.78608071  470.40100726  396.36076808  312.9624288   242.50300335
  193.95917531  168.6402763   169.10928211  168.48060925  131.34634858
   70.90331086] with length 16
last10PointsDistances = [ 312.9624288   242.50300335  193.95917531  168.6402763   169.10928211
  168.48060925  131.34634858   70.90331086    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 16
last5MinsDistances.max() = 660.501275861, last10PointsDistance.max() = 312.962428796
------------------------------2015-08-23 09:47:25------------------------------
last5MinsDistances = [ 725.47952129  705.29877271  678.30783391  645.0309826   646.60193899
  608.56000203  542.17018608  468.1143967   384.71748148  314.26892451
  265.72674749  240.4140297   240.88377961  240.25350435  203.10732946
  142.67634385   71.77450173] with length 17
last10PointsDistances = [ 314.26892451  265.72674749  240.4140297   240.88377961  240.25350435
  203.10732946  142.67634385   71.77450173    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 17
last5MinsDistances.max() = 725.479521286, last10PointsDistance.max() = 314.268924506
------------------------------2015-08-23 09:47:30------------------------------
last5MinsDistances = [ 792.72576288  774.66463863  749.06130438  717.17966891  719.27129363
  681.28167424  614.89584463  540.83396376  457.43823786  386.9940024
  338.45233561  313.13963337  313.60798926  312.97941814  275.83176498
  215.40213032  144.49944557   72.72605303] with length 18
last10PointsDistances = [ 338.45233561  313.13963337  313.60798926  312.97941814  275.83176498
  215.40213032  144.49944557   72.72605303    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 18
last5MinsDistances.max() = 792.725762882, last10PointsDistance.max() = 338.452335606
------------------------------2015-08-23 09:47:36------------------------------
last5MinsDistances = [ 878.51191134  862.3680624   837.95816219  807.14252833  809.47899
  771.3837635   705.04681816  631.01009589  547.61216854  477.1532941
  428.60893508  403.27906139  403.73722962  403.12302915  365.99711453
  305.55034797  234.65110531  162.90005559   90.20828251] with length 19
last10PointsDistances = [ 403.27906139  403.73722962  403.12302915  365.99711453  305.55034797
  234.65110531  162.90005559   90.20828251    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 19
last5MinsDistances.max() = 878.511911343, last10PointsDistance.max() = 403.73722962
------------------------------2015-08-23 09:47:41------------------------------
last5MinsDistances = [ 955.99431995  941.16823171  917.55103592  887.38290748  889.79381222
  851.56483097  785.28118851  711.2750136   627.87668127  557.40481818
  508.86044806  483.5164222   483.96552795  483.36417303  446.26109827
  385.80499234  314.91860507  243.1955086   170.53384742   80.33331433] with length 20
last10PointsDistances = [ 483.96552795  483.36417303  446.26109827  385.80499234  314.91860507
  243.1955086   170.53384742   80.33331433    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 20
last5MinsDistances.max() = 955.994319952, last10PointsDistance.max() = 483.965527949
------------------------------2015-08-23 09:47:47------------------------------
last5MinsDistances = [ 1045.90926032  1031.85014     1008.57352116   978.41119307   980.41487236
   941.7914268    875.64659464   801.73375146   718.34705349   647.85424144
   599.32174154   573.95068173   574.37871279   573.80740728   536.77190545
   476.31471355   405.49149967   333.87704299   261.35201552   171.26990302
    91.09827532] with length 21
last10PointsDistances = [ 573.80740728  536.77190545  476.31471355  405.49149967  333.87704299
  261.35201552  171.26990302   91.09827532    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 21
last5MinsDistances.max() = 1045.90926032, last10PointsDistance.max() = 573.807407284
------------------------------2015-08-23 09:47:52------------------------------
last5MinsDistances = [ 1092.74596597  1079.62786482  1056.99775875  1027.54636476  1029.91787412
   991.42718583   925.24455244   851.30010186   767.90716023   697.4193216
   648.88083342   623.51773454   623.95259287   623.37147913   586.31022398
   525.84984055   454.99651338   383.32614781   310.7161498    220.53723953
   140.2118414     49.73630065] with length 22
last10PointsDistances = [ 586.31022398  525.84984055  454.99651338  383.32614781  310.7161498
  220.53723953  140.2118414    49.73630065    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 22
last5MinsDistances.max() = 1092.74596597, last10PointsDistance.max() = 586.310223983
------------------------------2015-08-23 09:47:57------------------------------
last5MinsDistances = [ 1102.72201456  1089.9172357   1067.52025997  1038.35960408  1040.91944634
  1002.51998682   936.30926393   862.34389752   778.94811878   708.46485046
   659.92354457   634.56623422   635.00557041   634.41804237   597.3415601
   536.88132714   466.0135779    394.31775516   321.67439981   231.47446991
   151.14173008    60.99976833    11.40124908] with length 23
last10PointsDistances = [ 536.88132714  466.0135779   394.31775516  321.67439981  231.47446991
  151.14173008   60.99976833   11.40124908    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 23
last5MinsDistances.max() = 1102.72201456, last10PointsDistance.max() = 536.881327144
------------------------------2015-08-23 09:48:02------------------------------
last5MinsDistances = [ 1108.59894894  1096.066803    1073.88073973  1044.99734052  1047.75033363
  1009.45137335   943.2098354    869.22230628   785.8245902    715.34747787
   666.80406915   641.45360379   641.89780721   641.30331039   604.21128449
   543.75298812   472.87257086   401.15388992   328.48219758   238.27404902
   157.95840044    68.21419813    18.88342612     7.55470794] with length 24
last10PointsDistances = [ 472.87257086  401.15388992  328.48219758  238.27404902  157.95840044
   68.21419813   18.88342612    7.55470794    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 24
last5MinsDistances.max() = 1108.59894894, last10PointsDistance.max() = 472.872570863
------------------------------2015-08-23 09:48:07------------------------------
last5MinsDistances = [ 1143.89465097  1131.94389542  1110.1490156   1081.67716231  1084.62383168
  1046.38490706   980.12881322   906.12912916   822.73082803   752.25791702
   703.7137486    678.36742305   678.8142861    678.2159576    641.11528842
   580.65903507   509.77228694   438.04093631   365.35301335   275.14674912
   194.8541938    105.08016693    55.40587916    44.08166202    36.95679743] with length 25
last10PointsDistances = [ 438.04093631  365.35301335  275.14674912  194.8541938   105.08016693
   55.40587916   44.08166202   36.95679743    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 25
last5MinsDistances.max() = 1143.89465097, last10PointsDistance.max() = 438.040936311
------------------------------2015-08-23 09:48:13------------------------------
last5MinsDistances = [ 1217.75495606  1206.8016039   1185.66009605  1157.83847883  1161.05122593
  1122.8696026   1056.6034242    982.5931949    899.19473947   828.72602527
   780.1814634    754.8388375    755.28787577   754.68638874   717.57836664
   657.12450795   586.23298343   514.49141541   441.79078496   351.5916865
   271.32247732   181.42279088   131.68663667   120.46441254   113.43759128
    76.48838258] with length 26
last10PointsDistances = [ 441.79078496  351.5916865   271.32247732  181.42279088  131.68663667
  120.46441254  113.43759128   76.48838258    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 26
last5MinsDistances.max() = 1217.75495606, last10PointsDistance.max() = 441.79078496
------------------------------2015-08-23 09:48:18------------------------------
last5MinsDistances = [ 1282.44926724  1272.26794288  1251.63084455  1224.30700345  1227.72025826
  1189.58022963  1123.30716834  1049.28961595   965.89128213   895.42568526
   846.88100404   821.54095108   821.99144143   821.38784345   784.27502286
   723.82305002   652.92885563   581.18152259   508.47437615   418.28172781
   338.02645724   248.07841973   198.34583845   187.15347435   180.14840369
   143.20103089    66.71268311] with length 27
last10PointsDistances = [ 418.28172781  338.02645724  248.07841973  198.34583845  187.15347435
  180.14840369  143.20103089   66.71268311    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 27
last5MinsDistances.max() = 1282.44926724, last10PointsDistance.max() = 418.281727815
------------------------------2015-08-23 09:48:24------------------------------
last5MinsDistances = [ 1361.14174122  1351.5886134   1331.32351208  1304.2878407   1307.72544519
  1269.52131552  1203.27360443  1129.27009111  1045.87164755   975.40100559
   926.85662111   901.51168917   901.95898874   901.35992323   864.25542965
   803.80060797   732.9106013    661.17039623   588.4692949    498.27071729
   417.99618746   327.86158464   278.15594287   267.01724924   260.07034126
   223.14479123   146.67903256    80.01638936] with length 28
last10PointsDistances = [ 417.99618746  327.86158464  278.15594287  267.01724924  260.07034126
  223.14479123  146.67903256   80.01638936    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 28
last5MinsDistances.max() = 1361.14174122, last10PointsDistance.max() = 417.996187463
------------------------------2015-08-23 09:48:29------------------------------
last5MinsDistances = [ 1426.63269696  1417.40814457  1397.30323773  1370.31481178  1373.64229007
  1335.31817221  1269.11201751  1195.13432639  1111.7368345   1041.25829679
   992.71535428   967.36259979   967.80457594   967.21310335   930.12392789
   869.66548361   798.78471937   727.05959461   654.3724819    564.16659637
   483.86729444   393.55481427   343.89261631   332.80414845   325.91265669
   289.01985274   212.60585606   146.01477689    66.03533259] with length 29
last10PointsDistances = [ 393.55481427  343.89261631  332.80414845  325.91265669  289.01985274
  212.60585606  146.01477689   66.03533259    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 29
last5MinsDistances.max() = 1426.63269696, last10PointsDistance.max() = 393.554814274
------------------------------2015-08-23 09:48:35------------------------------
last5MinsDistances = [ 1492.4167186   1483.65545518  1463.83268142  1437.0800464   1440.45484841
  1402.10527904  1335.91124401  1261.93964802  1178.54252736  1108.06255956
  1059.52006431  1034.16573802  1034.60652392  1034.01673339   996.93072267
   936.47180674   865.59289956   793.87014151   721.18460599   630.97833116
   550.67668347   460.32533277   410.6784238    399.6020212    392.72032952
   355.83166285   279.41783035   212.8078935    132.79949143    66.81310989] with length 30
last10PointsDistances = [ 410.6784238   399.6020212   392.72032952  355.83166285  279.41783035
  212.8078935   132.79949143   66.81310989    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 30
last5MinsDistances.max() = 1492.4167186, last10PointsDistance.max() = 410.678423798
------------------------------2015-08-23 09:48:40------------------------------
last5MinsDistances = [ 1526.9664201   1518.58202661  1499.02257968  1472.56281321  1476.09662908
  1437.81151857  1371.59928059  1297.61431375  1214.21633131  1143.74017857
  1095.19666713  1069.84614083  1070.28953108  1069.69600487  1032.60179138
   972.14440883   901.26000729   829.52812272   756.83350625   666.63084889
   586.34141163   496.04790494   446.38679947   435.294773     428.39273705
   391.48821441   315.04540478   248.39091251   168.37624752   102.49432186
    35.78629144] with length 31
last10PointsDistances = [ 435.294773    428.39273705  391.48821441  315.04540478  248.39091251
  168.37624752  102.49432186   35.78629144    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 31
last5MinsDistances.max() = 1526.9664201, last10PointsDistance.max() = 435.294773003
------------------------------2015-08-23 09:48:45------------------------------
last5MinsDistances = [ 1538.57606713  1530.30563424  1510.82462112  1484.44974233  1488.02726496
  1449.7586115   1383.54191298  1309.55362156  1226.15548966  1155.68036742
  1107.13664925  1081.78710398  1082.23114447  1081.63668482  1044.54045016
   984.08353474   913.19786058   841.4638118    768.76707816   678.5656195
   598.27951023   507.99976233   458.33570687   447.24021628   440.33351909
   403.42557784   326.97700876   260.31403415   180.30251328   114.44497333
    47.74679205    11.96170882] with length 32
last10PointsDistances = [ 440.33351909  403.42557784  326.97700876  260.31403415  180.30251328
  114.44497333   47.74679205   11.96170882    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 32
last5MinsDistances.max() = 1538.57606713, last10PointsDistance.max() = 440.333519087
------------------------------2015-08-23 09:48:50------------------------------
last5MinsDistances = [ 1564.94372823  1556.74861881  1537.29335474  1510.89644462  1514.41010959
  1476.08694613  1409.88869264  1335.91208096  1252.51453919  1182.0361115
  1133.49316455  1108.14032825  1108.58208694  1107.99088483  1070.90137967
  1010.44308435   939.56156395   867.8340745    795.14332545   704.93890362
   624.64351129   534.30765997   484.65983089   473.57972403   466.69012196
   429.79316635   353.36056766   286.71607268   206.6999641    140.77781551
    73.98237979    38.33441288    26.46985831] with length 33
last10PointsDistances = [ 429.79316635  353.36056766  286.71607268  206.6999641   140.77781551
   73.98237979   38.33441288   26.46985831    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 33
last5MinsDistances.max() = 1564.94372823, last10PointsDistance.max() = 429.793166353
------------------------------2015-08-23 09:48:55------------------------------
last5MinsDistances = [ 1606.88566873  1599.08129345  1579.89588804  1553.79247861  1557.45907058
  1519.19461552  1452.98022868  1378.99166942  1295.59349876  1225.11862898
  1176.57487375  1151.22546783  1151.6695323   1151.07502113  1113.97831303
  1053.52155538   982.63543102   910.90025736   838.20205535   748.00156102
   667.71727057   577.42867794   527.7697119    516.67742504   509.77189499
   472.86318281   396.41131715   329.74060872   249.73392164   183.87709782
   117.11582635    81.38310329    69.43838797    43.16467405] with length 34
last10PointsDistances = [ 396.41131715  329.74060872  249.73392164  183.87709782  117.11582635
   81.38310329   69.43838797   43.16467405    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 34
last5MinsDistances.max() = 1606.88566873, last10PointsDistance.max() = 396.411317153
------------------------------2015-08-23 09:49:00------------------------------
last5MinsDistances = [ 1660.66120489  1653.33966701  1634.48944495  1608.75310355  1612.61376446
  1574.42582148  1508.19055292  1434.18689639  1350.78843919  1280.31861837
  1231.77419212  1206.42936041  1206.87636467  1206.27763533  1169.17208576
  1108.71784918  1037.82671288   966.08293153   893.37676668   803.18288842
   722.91382663   632.68375901   583.0125091    571.9062943    564.98261672
   528.06210405   451.59374475   384.90239254   304.91771422   239.13088455
   172.40637917   136.64665849   124.6896825     98.47823681    55.31386564] with length 35
last10PointsDistances = [ 384.90239254  304.91771422  239.13088455  172.40637917  136.64665849
  124.6896825    98.47823681   55.31386564    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 35
last5MinsDistances.max() = 1660.66120489, last10PointsDistance.max() = 384.90239254
------------------------------2015-08-23 09:49:14------------------------------
last5MinsDistances = [ 1846.77220113  1840.91988299  1823.09297383  1798.47849854  1802.9345531
  1764.98539495  1698.68719227  1624.63990149  1541.24418676  1470.79288638
  1422.24887817  1396.91896824  1397.37468737  1396.76345316  1359.63380426
  1299.19067969  1228.28988491  1156.52737673  1083.80602192   993.64061753
   913.42227981   823.35409958   773.65651805   762.5172028    755.55011255
   718.60800436   642.12038799   575.40811954   495.50202718   429.86084134
   363.2051312    327.42699953   315.46551974   289.3084888    246.14475419
   190.8310541 ] with length 36
last10PointsDistances = [ 495.50202718  429.86084134  363.2051312   327.42699953  315.46551974
  289.3084888   246.14475419  190.8310541     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 36
last5MinsDistances.max() = 1846.77220113, last10PointsDistance.max() = 495.502027177
------------------------------2015-08-23 09:49:20------------------------------
last5MinsDistances = [ 1917.88987014  1912.83988746  1895.61767781  1871.74874434  1876.68427468
  1838.97761391  1772.61426719  1698.5266301   1615.13905541  1544.71121652
  1496.17127224  1470.85834562  1471.32288469  1470.69901596  1433.54847262
  1373.12165624  1302.21841739  1230.44611611  1157.72006494  1067.59412349
   987.43640794   897.55300248   847.83354825   836.66094302   829.65187272
   792.69816395   716.21533423   649.50993711   569.70423555   504.23018211
   437.6913825    401.90519748   389.94570518   363.90033703   320.75924912
   265.47589034    75.02990987] with length 37
last10PointsDistances = [ 504.23018211  437.6913825   401.90519748  389.94570518  363.90033703
  320.75924912  265.47589034   75.02990987    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 37
last5MinsDistances.max() = 1917.88987014, last10PointsDistance.max() = 504.230182106
------------------------------2015-08-23 09:49:25------------------------------
last5MinsDistances = [ 1990.59856793  1985.88438594  1968.87883773  1945.21294094  1950.22165855
  1912.52555622  1846.16166386  1772.07291215  1688.6857138   1618.25858246
  1569.71876203  1544.40612528  1544.87075864  1544.2467451   1507.09585636
  1446.66938027  1375.76615587  1303.99376894  1231.267716    1141.14208757
  1060.98330586   971.0854825    921.36816599   910.19895142   903.19342529
   866.24027567   789.75637225   723.04959486   643.23118965   577.72306471
   511.1465138    475.36079876   463.3997705    437.30841669   394.15300862
   338.84825225   148.07879917    73.54797036] with length 38
last10PointsDistances = [ 511.1465138   475.36079876  463.3997705   437.30841669  394.15300862
  338.84825225  148.07879917   73.54797036    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 38
last5MinsDistances.max() = 1990.59856793, last10PointsDistance.max() = 511.146513796
------------------------------2015-08-23 09:49:30------------------------------
last5MinsDistances = [ 2053.72164251  2049.09854793  2032.11633172  2008.4003028   2013.30637124
  1975.52539002  1909.1865342   1835.11190431  1751.72113277  1681.28489815
  1632.74313273  1607.42393552  1607.88523848  1607.2659842   1570.12242359
  1509.6893097   1438.78615117  1367.01638606  1294.29093222  1204.14934848
  1123.96564166  1033.98324301   984.27616436   973.12260051   966.1359163
   929.18702944   852.69918159   785.9875153    706.12195144   640.52664697
   573.88091171   538.1023854    526.14083545   499.97729282   456.81267743
   401.49914903   210.67578581   136.65595447    63.23750546] with length 39
last10PointsDistances = [ 538.1023854   526.14083545  499.97729282  456.81267743  401.49914903
  210.67578581  136.65595447   63.23750546    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 39
last5MinsDistances.max() = 2053.72164251, last10PointsDistance.max() = 538.102385405
------------------------------2015-08-23 09:49:35------------------------------
last5MinsDistances = [ 2072.61027917  2066.63456237  2048.50211431  2023.14151085  2026.7818222
  1988.2734122   1922.15510646  1848.22174424  1764.82808162  1694.34105309
  1645.8020467   1620.43952083  1620.87372418  1620.29324042  1583.22543613
  1522.7650219   1451.89713995  1380.18749686  1307.51055212  1217.30286501
  1136.99203027  1046.50877121   996.92179857   985.88446308   979.03377997
   942.15887918   865.74815228   799.1106549    719.09467322   653.14504483
   586.33196055   550.72076069   538.80392797   512.39471782   469.40113434
   414.38840734   225.83818824   156.7438126     90.00993554    45.64750063] with length 40
last10PointsDistances = [ 538.80392797  512.39471782  469.40113434  414.38840734  225.83818824
  156.7438126    90.00993554   45.64750063    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 40
last5MinsDistances.max() = 2072.61027917, last10PointsDistance.max() = 538.803927968
------------------------------2015-08-23 09:49:41------------------------------
last5MinsDistances = [ 2137.29305288  2129.44685721  2109.70367859  2081.99539282  2083.7742754
  2044.21817603  1978.49054734  1904.84085971  1821.53332409  1751.05441835
  1702.58081977  1677.18787767  1677.58153091  1677.0590016   1640.1535187
  1579.74078404  1509.03647484  1437.53885795  1365.07138413  1274.96219842
  1194.66595487  1103.72037217  1054.4691925   1043.63674227  1037.00462801
  1000.36953924   924.37951753   858.16196367   778.38768192   712.400447
   645.91409407   610.8742662    599.14151963   572.6988046    530.47309243
   476.67552164   295.61741942   234.02301123   174.57421109   130.37614851
    86.97306202] with length 41
last10PointsDistances = [ 572.6988046   530.47309243  476.67552164  295.61741942  234.02301123
  174.57421109  130.37614851   86.97306202    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 41
last5MinsDistances.max() = 2137.29305288, last10PointsDistance.max() = 572.698804595
------------------------------2015-08-23 09:49:46------------------------------
last5MinsDistances = [ 2230.40606546  2221.89191633  2201.52820117  2172.84365898  2173.78500335
  2133.75187139  2068.2343426   1994.74692179  1911.51548092  1841.07348943
  1792.65400037  1767.26044231  1767.6354398   1767.13954524  1730.32733769
  1669.97006542  1599.3813979   1528.02371949  1455.69828446  1365.70147804
  1285.481819    1194.43438484  1145.37902611  1134.64331832  1128.10783492
  1091.61313986  1015.88697374   949.92432866   870.36914523   804.49434124
   738.26636155   703.4979107    691.85271759   665.46846927   623.58950438
   570.28000089   390.88244331   328.93620823   266.60800292   214.91480439
   176.74606635    95.35226876] with length 42
last10PointsDistances = [ 623.58950438  570.28000089  390.88244331  328.93620823  266.60800292
  214.91480439  176.74606635   95.35226876    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 42
last5MinsDistances.max() = 2230.40606546, last10PointsDistance.max() = 623.589504381
------------------------------2015-08-23 09:49:51------------------------------
last5MinsDistances = [ 2302.65681053  2292.19959028  2270.18279125  2239.09650624  2238.1027064
  2197.04764442  2132.04764526  2058.98662105  1976.00626204  1905.72108846
  1857.47647481  1832.11121649  1832.44429712  1832.0082151   1795.44838477
  1735.29148937  1665.05783462  1594.11989653  1522.23094832  1432.64691059
  1352.75806892  1261.68189702  1213.18916865  1202.70097512  1196.40362342
  1160.32902549  1085.43436153  1020.28403187   941.53787302   876.20319963
   810.91014846   776.99004217   765.62666225   739.53554568   698.79610343
   647.15215964   475.63303937   418.61464442   360.31454322   311.37713765
   271.36440905   185.8846046     97.46024059] with length 43
last10PointsDistances = [ 647.15215964  475.63303937  418.61464442  360.31454322  311.37713765
  271.36440905  185.8846046    97.46024059    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 43
last5MinsDistances.max() = 2302.65681053, last10PointsDistance.max() = 647.152159636
------------------------------2015-08-23 09:49:57------------------------------
last5MinsDistances = [ 2397.59016127  2384.41129918  2360.10789733  2325.71339874  2322.02153859
  2279.62136579  2215.47021995  2143.15421951  2060.70749001  1990.80779455
  1942.92664954  1917.66710941  1917.94169452  1917.58897727  1881.47485371
  1821.76340797  1752.22771924  1682.09220266  1611.04735027  1522.36418624
  1443.25854124  1352.57850327  1305.08414038  1294.97924959  1289.03006606
  1253.70960453  1180.35161287  1116.6835539   1039.55181526   975.4395181
   911.91364845   879.37568482   868.47391606   843.01709858   804.10663157
   755.05195855   594.63511835   543.50371891   489.88877361   444.15815426
   402.56760268   315.79123916   232.04015063   134.80183663] with length 44
last10PointsDistances = [ 594.63511835  543.50371891  489.88877361  444.15815426  402.56760268
  315.79123916  232.04015063  134.80183663    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 44
last5MinsDistances.max() = 2397.59016127, last10PointsDistance.max() = 594.635118347
------------------------------2015-08-23 09:50:02------------------------------
last5MinsDistances = [ 2507.92086708  2492.69176939  2466.66549576  2429.75527289  2423.95663027
  2380.56241592  2317.18391142  2245.57402776  2163.69093237  2094.22327774
  2046.71825743  2021.59221402  2021.82133289  2021.53332749  1985.83712285
  1926.59690752  1857.75181491  1788.39244973  1718.16262591  1630.39365646
  1552.10093575  1462.01174278  1415.40045868  1405.60396505  1399.92222949
  1365.26371475  1293.25889391  1230.86455049  1155.15226098  1092.14473531
  1030.0652634    998.55361551   987.99154349   963.05762259   925.44266123
   878.13369627   724.02876382   675.33793403   623.11763242   577.75149613
   536.10535503   449.26679793   365.05365309   267.59823532   133.59823911] with length 45
last10PointsDistances = [ 675.33793403  623.11763242  577.75149613  536.10535503  449.26679793
  365.05365309  267.59823532  133.59823911    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 45
last5MinsDistances.max() = 2507.92086708, last10PointsDistance.max() = 675.337934031
------------------------------2015-08-23 09:50:08------------------------------
last5MinsDistances = [ 2671.28890005  2654.4179639   2626.99380074  2588.00194238  2580.40055449
  2536.19067915  2473.55617186  2402.63830043  2321.33610687  2252.32259943
  2205.19590654  2180.21542937  2180.40643845  2180.17261655  2144.8722098
  2086.10372647  2017.92166188  1949.2906868   1879.81553317  1792.90018109
  1715.36072047  1625.87718377  1580.00046627  1570.44529007  1564.96632782
  1530.84378887  1459.91370059  1398.49013732  1323.83302878  1261.62364586
  1200.50534204  1169.62009378  1159.25944022  1134.64371613  1097.74126279
  1051.30257951   899.18121507   850.31746444   797.05296406   750.00732572
   709.26502033   622.73069561   535.73774259   438.66663312   307.25313865
   175.19848769] with length 46
last10PointsDistances = [ 797.05296406  750.00732572  709.26502033  622.73069561  535.73774259
  438.66663312  307.25313865  175.19848769    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 46
last5MinsDistances.max() = 2671.28890005, last10PointsDistance.max() = 797.052964056
------------------------------2015-08-23 09:50:13------------------------------
last5MinsDistances = [ 2809.68490485  2791.99384541  2763.85703833  2723.77910947  2715.20645047
  2670.56934314  2608.36979771  2537.85822704  2456.90413956  2388.16354257
  2341.25787595  2316.36547527  2316.53658536  2316.33103354  2281.25289223
  2222.75552859  2154.94329616  2086.70960043  2017.63829239  1931.17472356
  1854.0254664   1764.86308303  1719.33492446  1709.88945156  1704.50067994
  1670.62243561  1600.16545473  1539.14504024  1464.90005123  1402.98024732
  1342.17375571  1311.46734532  1301.16005191  1276.62524357  1239.87634505
  1193.56571829  1040.90665386   991.0265421    936.3527715    887.70887828
   847.88346432   761.79920731   672.85979304   576.58109606   447.52353702
   316.95709551   142.29434103] with length 47
last10PointsDistances = [ 887.70887828  847.88346432  761.79920731  672.85979304  576.58109606
  447.52353702  316.95709551  142.29434103    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 47
last5MinsDistances.max() = 2809.68490485, last10PointsDistance.max() = 887.708878275
------------------------------2015-08-23 09:50:19------------------------------
last5MinsDistances = [ 2981.04109903  2962.37167039  2933.39389006  2892.04347573  2882.33108403
  2837.21062023  2775.54542539  2705.53719721  2625.02204601  2556.62733076
  2509.997814    2485.21798511  2485.36597526  2485.19325405  2450.38722939
  2392.22791414  2324.87080677  2257.12278189  2188.54359107  2102.63233532
  2025.95919749  1937.19717999  1892.08204595  1882.76459317  1877.48022433
  1843.8914304   1773.99544916  1713.45259657  1639.69895382  1578.12731504
  1517.69769449  1487.21087433  1476.97033342  1452.53900041  1415.99373773
  1369.88025178  1217.02773904  1166.39340012  1110.63385475  1060.75763344
  1021.71280813   936.0772778    845.86885138   750.38883893   623.0349854
   493.27053487   318.70999294   176.43004215] with length 48
last10PointsDistances = [ 1021.71280813   936.0772778    845.86885138   750.38883893   623.0349854
   493.27053487   318.70999294   176.43004215     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 48
last5MinsDistances.max() = 2981.04109903, last10PointsDistance.max() = 1021.71280813
------------------------------2015-08-23 09:50:24------------------------------
last5MinsDistances = [ 3134.04226729  3114.55708337  3084.88392978  3042.48641919  3031.83277349
  2986.32731132  2925.12332046  2855.55246034  2775.42423487  2707.33545438
  2660.94711332  2636.26742104  2636.39651322  2636.25061497  2601.67793781
  2543.81290574  2476.84726478  2409.51417521  2341.35379132  2255.91322855
  2179.64456589  2091.22817524  2046.45416562  2037.24091232  2032.04085507
  1998.69055975  1929.25616268  1869.10457607  1795.753995    1734.46845769
  1674.34737074  1644.04066598  1633.85528635  1609.5105362   1573.13725933
  1527.19920349  1374.36192253  1323.30027272  1266.90148803  1216.29885
  1177.74638938  1092.41466723  1001.54845789   906.58695351   780.14653844
   650.716189     476.1528086    333.88857789   157.46409742] with length 49
last10PointsDistances = [ 1092.41466723  1001.54845789   906.58695351   780.14653844   650.716189
   476.1528086    333.88857789   157.46409742     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 49
last5MinsDistances.max() = 3134.04226729, last10PointsDistance.max() = 1092.41466723
------------------------------2015-08-23 09:50:29------------------------------
last5MinsDistances = [ 3287.10984669  3266.9321545   3236.66869305  3193.38017395  3181.91824512
  3136.09136876  3075.29907472  3006.11965077  2926.34052091  2858.5277368
  2812.35449771  2787.76518386  2787.87829485  2787.75507034  2753.38712998
  2695.78262486  2629.15941674  2562.18606323  2494.38610091  2409.34881095
  2333.4237297   2245.30239651  2200.80863678  2191.67967522  2186.54727633
  2153.39056788  2084.32685863  2024.48392492  1951.44565795  1890.37704372
  1830.48244641  1800.30338159  1790.15632957  1765.87110146  1729.61094832
  1683.7774535   1530.80204044  1479.3284254   1422.36940823  1371.16112255
  1333.03624596  1247.98402037  1156.61316405  1062.10469838   936.42388992
   807.29982513   632.78261874   490.51530284   314.08651873   156.6298145 ] with length 50
last10PointsDistances = [ 1156.61316405  1062.10469838   936.42388992   807.29982513   632.78261874
   490.51530284   314.08651873   156.6298145      0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 50
last5MinsDistances.max() = 3287.10984669, last10PointsDistance.max() = 1156.61316405
------------------------------2015-08-23 09:50:35------------------------------
last5MinsDistances = [ 3464.63937484  3443.59328309  3412.60196488  3368.22903678  3355.78837956
  3309.58688056  3249.3086726   3180.62196418  3101.28797228  3033.82881696
  2987.92947272  2963.45679775  2963.5505047   2963.45480069  2929.34511197
  2872.07353189  2805.88599565  2739.37049117  2672.03071249  2587.51252448
  2512.03240779  2424.30029953  2380.1687892   2371.14836381  2366.10283878
  2333.19977256  2264.62813972  2205.20262016  2132.59882946  2071.84250198
  2012.28690518  1982.30884114  1972.224491    1948.0400635   1911.98515608
  1866.38119579  1713.77599258  1662.17180086  1604.92076891  1553.34740407
  1515.49263175  1430.60934014  1338.96401325  1244.72497909  1119.37274221
   990.24259108   815.62990675   673.39691838   496.98771915   339.52824024
   182.97523933] with length 51
last10PointsDistances = [ 1244.72497909  1119.37274221   990.24259108   815.62990675   673.39691838
   496.98771915   339.52824024   182.97523933     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 51
last5MinsDistances.max() = 3464.63937484, last10PointsDistance.max() = 1244.72497909
------------------------------2015-08-23 09:50:40------------------------------
last5MinsDistances = [ 3594.04467136  3571.59545288  3539.47742355  3493.48689477  3479.62491056
  3432.91342234  3373.40406952  3305.47006753  3226.83489874  3159.94015032
  3114.47851727  3090.19637105  3090.26071543  3090.20664     3056.50948386
  2999.78324655  2934.31414141  2868.56522007  2802.01170059  2718.40691214
  2643.73214568  2556.73634263  2513.28321467  2504.46698174  2499.58483904
  2467.17739624  2399.60448104  2341.07043627  2269.45686765  2209.46404527
  2150.79508726  2121.38156142  2111.48202843  2087.60888314  2052.22896706
  2007.500183    1857.90994257  1807.59954495  1751.36536078  1700.54280275
  1662.1736081   1576.8837403   1485.8855618   1391.05147987  1264.23991734
  1133.88926238   958.79420073   817.02693821   641.21528511   484.46918326
   329.602458     150.57866871] with length 52
last10PointsDistances = [ 1264.23991734  1133.88926238   958.79420073   817.02693821   641.21528511
   484.46918326   329.602458     150.57866871     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 52
last5MinsDistances.max() = 3594.04467136, last10PointsDistance.max() = 1264.23991734
------------------------------2015-08-23 09:50:45------------------------------
last5MinsDistances = [ 3717.07669715  3693.06067686  3659.70108526  3611.94044493  3596.51500673
  3549.27585067  3490.6594722   3423.60876052  3345.8076656   3279.59085356
  3234.65066267  3210.59949927  3210.6313239   3210.62332292  3177.41091146
  3121.33674298  3056.72041155  2991.8798136   2926.25927554  2843.74693822
  2770.03908196  2683.94786292  2641.29463775  2632.71533035  2628.02076212
  2596.2001272   2529.8149095   2472.34292358  2401.91993277  2342.85327474
  2285.25309371  2256.51482523  2246.83710683  2223.34510492  2188.77829883
  2145.10864769  1999.23421518  1950.55958852  1895.6591381   1845.85541562
  1806.83344367  1721.08633698  1630.98763073  1535.48771249  1407.08644321
  1275.59004376  1100.41520661   959.59622248   785.13925036   630.00334141
   477.76617629   302.53992331   152.49388616] with length 53
last10PointsDistances = [ 1275.59004376  1100.41520661   959.59622248   785.13925036   630.00334141
   477.76617629   302.53992331   152.49388616     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 53
last5MinsDistances.max() = 3717.07669715, last10PointsDistance.max() = 1275.59004376
------------------------------2015-08-23 09:50:50------------------------------
last5MinsDistances = [ 3838.95713803  3813.44632376  3778.9128381   3729.482318    3712.56601821
  3664.8551055   3607.13920748  3540.98577641  3464.04311254  3398.52658298
  3354.12028963  3330.30902533  3330.30982767  3330.34574907  3297.62257993
  3242.21584534  3178.46486399  3114.54212375  3049.86290156  2968.45697292
  2895.72828174  2810.56845717  2768.70696752  2760.35818142  2755.84410103
  2724.60384166  2659.39357713  2602.96856938  2533.72258234  2475.57376457
  2419.02064666  2390.93552594  2381.47238777  2358.35521748  2324.57260463
  2281.92117963  2139.59500963  2092.46306163  2038.82887382  1989.99562457
  1950.39865265  1864.29726697  1775.08316019  1679.06828227  1549.4102503
  1417.12534949  1242.23049884  1102.52165883   929.61842876   776.18298408
   626.22319315   453.5127943    303.80923131   151.34237469] with length 54
last10PointsDistances = [ 1242.23049884  1102.52165883   929.61842876   776.18298408   626.22319315
   453.5127943    303.80923131   151.34237469     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 54
last5MinsDistances.max() = 3838.95713803, last10PointsDistance.max() = 1242.23049884
------------------------------2015-08-23 09:50:55------------------------------
last5MinsDistances = [ 3937.33230059  3901.68471521  3850.67190203  3832.3269127   3784.19313248
  3727.38609855  3662.14361483  3586.08164021  3521.28529563  3477.42379482
  3453.86014809  3453.8312442   3453.90919673  3421.67894166  3366.95238822
  3304.07640214  3241.07785078  3177.34452927  3097.05301462  3025.30958127
  2941.09874803  2900.0174537   2891.89239782  2887.55174578  2856.8825492
  2792.82773894  2737.42824997  2669.33664949  2612.08884673  2556.55267919
  2529.09452197  2519.83729048  2497.08468521  2464.05185594  2422.37030876
  2283.39405907  2237.69684706  2185.2435968   2137.31528164  2097.21968489
  2010.85111438  1922.482451    1826.07681525  1695.43112013  1562.61538817
  1388.19929072  1249.62292368  1078.24857746   926.37008916   778.24976498
   607.28021958   457.80294312   305.35892638   154.01977944] with length 54
last10PointsDistances = [ 1249.62292368  1078.24857746   926.37008916   778.24976498   607.28021958
   457.80294312   305.35892638   154.01977944     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 54
last5MinsDistances.max() = 3937.33230059, last10PointsDistance.max() = 1249.62292368
------------------------------2015-08-23 09:51:01------------------------------
last5MinsDistances = [ 4052.21471557  3999.75824004  3980.08944699  3931.58904757  3875.66663955
  3811.31254283  3736.11425913  3672.02340815  3628.69077661  3605.36939897
  3605.31328895  3605.42971046  3573.67136312  3519.6006878   3457.56012548
  3395.43735631  3332.59501851  3253.34995316  3182.52584826  3099.20453049
  3058.83133754  3050.90617108  3046.71896602  3016.56418702  2953.54404619
  2899.0531365   2831.97717835  2775.51611085  2720.85296928  2693.9239135
  2684.83970538  2662.39587953  2629.98577416  2589.09960276  2452.77237166
  2408.14999782  2356.55607423  2309.26560758  2268.84111227  2182.31701759
  2094.54962664  1997.91801661  1866.66733203  1733.5703843   1559.59199803
  1421.82910993  1251.45664023  1100.44993013   953.08709134   782.22712323
   632.50837179   480.01449858   328.74800034   175.05426593] with length 54
last10PointsDistances = [ 1251.45664023  1100.44993013   953.08709134   782.22712323   632.50837179
   480.01449858   328.74800034   175.05426593     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 54
last5MinsDistances.max() = 4052.21471557, last10PointsDistance.max() = 1251.45664023
------------------------------2015-08-23 09:51:34------------------------------
last5MinsDistances = [ 4653.74063113  4591.53321357  4549.57912568  4526.89160811  4526.77113083
  4526.97846532  4496.40955342  4443.99089595  4383.9946731   4323.95448887
  4263.17135238  4186.27598015  4117.44272615  4036.00179179  3997.02822128
  3989.48440834  3985.58463204  3956.40254636  3895.26261245  3842.32844651
  3776.88779028  3721.60916229  3668.15298913  3641.89788854  3633.02525046
  3610.95122885  3579.23179958  3539.1296141   3404.43530635  3359.90375208
  3308.04023822  3260.28958647  3220.13255864  3133.70819927  3045.46006852
  2949.03379849  2818.17008464  2685.18239892  2510.99478912  2372.60051409
  2200.86098653  2047.80235871  1896.85102694  1719.58582512  1569.1838942
  1419.10337341  1271.62325422  1122.97761939   951.77084341] with length 49
last10PointsDistances = [ 2047.80235871  1896.85102694  1719.58582512  1569.1838942   1419.10337341
  1271.62325422  1122.97761939   951.77084341     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 49
last5MinsDistances.max() = 4653.74063113, last10PointsDistance.max() = 2047.80235871
------------------------------2015-08-23 09:54:04------------------------------
last5MinsDistances = [ 6524.58461901  6480.89157797  6429.33249941  6381.53948011  6341.43664993
  6255.013223    6166.68406178  6070.31630898  5939.45329368  5806.41317564
  5632.29496375  5493.83188786  5321.65280376  5167.81981022  5015.52014933
  4836.20316539  4686.49018706  4538.05875333  4392.04955213  4244.23949634
  4072.85085578  3121.30644379] with length 22
last10PointsDistances = [ 5015.52014933  4836.20316539  4686.49018706  4538.05875333  4392.04955213
  4244.23949634  4072.85085578  3121.30644379     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 22
last5MinsDistances.max() = 6524.58461901, last10PointsDistance.max() = 5015.52014933
------------------------------2015-08-23 09:55:04------------------------------
last5MinsDistances = [ 5704.6080959   5563.95318654  5389.17468673  5233.02888069  5078.09645653
  4896.20531321  4748.68271946  4604.3571355   4463.07708036  4320.53658279
  4153.94914287  3207.20115884   456.86627018] with length 13
last10PointsDistances = [ 4896.20531321  4748.68271946  4604.3571355   4463.07708036  4320.53658279
  4153.94914287  3207.20115884   456.86627018     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 13
last5MinsDistances.max() = 5704.6080959, last10PointsDistance.max() = 4896.20531321
------------------------------2015-08-23 09:56:04------------------------------
last5MinsDistances = [ 3464.32083272   711.81128254   302.85970815] with length 3
last10PointsDistances = [ 4992.01724625  4849.62927468  4710.50367498  4570.30334167  4405.934354
  3464.32083272   711.81128254   302.85970815     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 3
last5MinsDistances.max() = 3464.32083272, last10PointsDistance.max() = 4992.01724625
------------------------------2015-08-23 09:57:04------------------------------
last5MinsDistances = [ 723.94876451  346.60330853   71.96073637] with length 3
last10PointsDistances = [ 4915.9799173   4776.50687659  4635.91194152  4471.1469452   3528.45337573
   723.94876451   346.60330853    71.96073637     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 3
last5MinsDistances.max() = 723.948764511, last10PointsDistance.max() = 4915.9799173
------------------------------2015-08-23 09:57:35------------------------------
last5MinsDistances = [ 723.88601391  346.51713027   71.88481912    0.0895175 ] with length 4
last10PointsDistances = [ 4776.4183827   4635.82327513  4471.05812635  3528.36423681   723.88601391
   346.51713027    71.88481912     0.0895175      0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 4
last5MinsDistances.max() = 723.886013914, last10PointsDistance.max() = 4776.4183827
------------------------------2015-08-23 09:58:35------------------------------
last5MinsDistances = [ 723.93728543  346.55484425   71.88260003    0.07833714    0.05305669] with length 5
last10PointsDistances = [ 4635.84288509  4471.07837495  3528.38609335   723.93728543   346.55484425
    71.88260003     0.07833714     0.05305669     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 5
last5MinsDistances.max() = 723.937285427, last10PointsDistance.max() = 4635.84288509
------------------------------2015-08-23 09:59:35------------------------------
last5MinsDistances = [ 415.04896193  158.94698812   87.14681727   87.22672417   87.22413156] with length 5
last10PointsDistances = [ 4553.31631197  3609.65842853   755.02594784   415.04896193   158.94698812
    87.14681727    87.22672417    87.22413156     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 5
last5MinsDistances.max() = 415.048961932, last10PointsDistance.max() = 4553.31631197
------------------------------2015-08-23 10:00:05------------------------------
last5MinsDistances = [ 156.6487425    84.906585     84.98711482   84.98369203    2.61504644] with length 5
last10PointsDistances = [ 3608.03598019   755.3306947    413.94877858   156.6487425     84.906585
    84.98711482    84.98369203     2.61504644     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 5
last5MinsDistances.max() = 156.648742495, last10PointsDistance.max() = 3608.03598019
------------------------------2015-08-23 10:00:35------------------------------
last5MinsDistances = [ 165.64212833   94.22919196   94.29638944   94.30719565   24.03901973
   25.80821228] with length 6
last10PointsDistances = [ 735.15373247  405.61677083  165.64212833   94.22919196   94.29638944
   94.30719565   24.03901973   25.80821228    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 6
last5MinsDistances.max() = 165.642128325, last10PointsDistance.max() = 735.153732469
------------------------------2015-08-23 10:01:05------------------------------
last5MinsDistances = [ 108.07824033  108.15288556  108.15649911   23.81438307   26.42871472
   19.56750517] with length 6
last10PointsDistances = [ 425.15542678  180.02343316  108.07824033  108.15288556  108.15649911
   23.81438307   26.42871472   19.56750517    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 6
last5MinsDistances.max() = 108.156499107, last10PointsDistance.max() = 425.155426784
------------------------------2015-08-23 10:01:35------------------------------
last5MinsDistances = [ 91.45322558  91.52289074  91.53146664  19.32360434  21.01340415
   4.84531127  19.08478609] with length 7
last10PointsDistances = [ 163.11860486   91.45322558   91.52289074   91.53146664   19.32360434
   21.01340415    4.84531127   19.08478609    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 7
last5MinsDistances.max() = 91.5314666368, last10PointsDistance.max() = 163.118604863
------------------------------2015-08-23 10:02:05------------------------------
last5MinsDistances = [ 69.51324122  69.53431639  39.49619023  39.20115472  29.73544429
  48.52701882  29.45704381] with length 7
last10PointsDistances = [ 69.45938326  69.51324122  69.53431639  39.49619023  39.20115472
  29.73544429  48.52701882  29.45704381   0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 7
last5MinsDistances.max() = 69.5343163851, last10PointsDistance.max() = 69.5343163851
Found trip end at 2015-08-23 09:57:04
------------------------------2015-08-23 11:38:29------------------------------
last5MinsDistances = [] with length 0
last10PointsDistances = [ 0.] with length 1, shape (1,)
len(last10PointsDistances) = 1, len(last5MinsDistances) = 0
Too few points to make a decision, continuing
------------------------------2015-08-23 11:39:01------------------------------
last5MinsDistances = [ 1.34450921] with length 1
last10PointsDistances = [ 1.34450921  0.        ] with length 2, shape (2,)
len(last10PointsDistances) = 2, len(last5MinsDistances) = 1
Too few points to make a decision, continuing
------------------------------2015-08-23 11:39:31------------------------------
last5MinsDistances = [ 74.10538103  73.06308876] with length 2
last10PointsDistances = [ 74.10538103  73.06308876   0.        ] with length 3, shape (3,)
len(last10PointsDistances) = 3, len(last5MinsDistances) = 2
Too few points to make a decision, continuing
------------------------------2015-08-23 11:40:01------------------------------
last5MinsDistances = [ 101.62430588  100.72552856   30.65196853] with length 3
last10PointsDistances = [ 101.62430588  100.72552856   30.65196853    0.        ] with length 4, shape (4,)
len(last10PointsDistances) = 4, len(last5MinsDistances) = 3
Too few points to make a decision, continuing
------------------------------2015-08-23 11:40:31------------------------------
last5MinsDistances = [ 127.90552331  127.01136519   56.04127358   26.28899543] with length 4
last10PointsDistances = [ 127.90552331  127.01136519   56.04127358   26.28899543    0.        ] with length 5, shape (5,)
len(last10PointsDistances) = 5, len(last5MinsDistances) = 4
Too few points to make a decision, continuing
------------------------------2015-08-23 11:41:01------------------------------
last5MinsDistances = [ 137.26257375  136.34026192   64.56999037   35.73659769   10.06762063] with length 5
last10PointsDistances = [ 137.26257375  136.34026192   64.56999037   35.73659769   10.06762063
    0.        ] with length 6, shape (6,)
len(last10PointsDistances) = 6, len(last5MinsDistances) = 5
Too few points to make a decision, continuing
------------------------------2015-08-23 11:41:31------------------------------
last5MinsDistances = [ 126.36565204  125.46378005   54.32899383   24.74251359    1.82671535
   11.22040876] with length 6
last10PointsDistances = [ 126.36565204  125.46378005   54.32899383   24.74251359    1.82671535
   11.22040876    0.        ] with length 7, shape (7,)
len(last10PointsDistances) = 7, len(last5MinsDistances) = 6
Too few points to make a decision, continuing
------------------------------2015-08-23 11:45:01------------------------------
last5MinsDistances = [ 55.90101607  51.29296502  57.7248467 ] with length 3
last10PointsDistances = [ 176.38788171  175.69352768  109.62973544   79.00954122   55.90101607
   51.29296502   57.7248467     0.        ] with length 8, shape (8,)
len(last10PointsDistances) = 8, len(last5MinsDistances) = 3
Too few points to make a decision, continuing
------------------------------2015-08-23 11:45:31------------------------------
last5MinsDistances = [ 51.30856192  57.74718345   0.04421391] with length 3
last10PointsDistances = [ 176.42418452  175.72966468  109.65926974   79.03858096   55.92328428
   51.30856192   57.74718345    0.04421391    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 3
last5MinsDistances.max() = 57.7471834509, last10PointsDistance.max() = 176.424184522
------------------------------2015-08-23 11:52:40------------------------------
last5MinsDistances = [] with length 0
last10PointsDistances = [ 2503.7122603   2543.62152171  2545.68622634  2556.76846997  2564.36536672
  2556.95629689  2548.47297252  2548.50774943     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 0
Too few points to make a decision, continuing
------------------------------2015-08-23 11:53:10------------------------------
last5MinsDistances = [ 304.472441] with length 1
last10PointsDistances = [ 2820.89072241  2821.49957185  2831.41331449  2838.67811244  2831.68958308
  2820.36599411  2820.39933054   304.472441       0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 1
last5MinsDistances.max() = 304.472441001, last10PointsDistance.max() = 2838.67811244
------------------------------2015-08-23 11:54:10------------------------------
last5MinsDistances = [ 759.45699729  469.24404141] with length 2
last10PointsDistances = [ 3290.66151874  3300.49024004  3307.72523583  3300.77382095  3289.14260989
  3289.17574583   759.45699729   469.24404141     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 2
last5MinsDistances.max() = 759.456997292, last10PointsDistance.max() = 3307.72523583
------------------------------2015-08-23 11:54:40------------------------------
last5MinsDistances = [ 1298.26501429  1010.83316477   541.64190877] with length 3
last10PointsDistances = [ 3841.65667384  3848.84590331  3841.95167821  3829.89591791  3829.92879679
  1298.26501429  1010.83316477   541.64190877     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 3
last5MinsDistances.max() = 1298.26501429, last10PointsDistance.max() = 3848.84590331
------------------------------2015-08-23 11:55:10------------------------------
last5MinsDistances = [ 1843.90354994  1558.52545456  1089.29001224   547.74266158] with length 4
last10PointsDistances = [ 4396.53940471  4389.65972333  4377.46733732  4377.50011713  1843.90354994
  1558.52545456  1089.29001224   547.74266158     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 4
last5MinsDistances.max() = 1843.90354994, last10PointsDistance.max() = 4396.53940471
------------------------------2015-08-23 11:55:40------------------------------
last5MinsDistances = [ 2382.24259801  2098.45166139  1629.20941058  1087.79393465   540.09633273] with length 5
last10PointsDistances = [ 4929.74185027  4917.5572066   4917.58996949  2382.24259801  2098.45166139
  1629.20941058  1087.79393465   540.09633273     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 5
last5MinsDistances.max() = 2382.24259801, last10PointsDistance.max() = 4929.74185027
------------------------------2015-08-23 11:56:40------------------------------
last5MinsDistances = [ 3744.0652221   3460.43271955  2991.19813026  2449.61796741  1901.90826526
  1362.16625986] with length 6
last10PointsDistances = [ 6278.52412221  6278.556578    3744.0652221   3460.43271955  2991.19813026
  2449.61796741  1901.90826526  1362.16625986     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 6
last5MinsDistances.max() = 3744.0652221, last10PointsDistance.max() = 6278.556578
------------------------------2015-08-23 11:57:10------------------------------
last5MinsDistances = [ 3809.72535265  3526.22269656  3056.98534218  2515.4151122   1967.69725342
  1427.91311849    65.87020315] with length 7
last10PointsDistances = [ 6344.4055461   3809.72535265  3526.22269656  3056.98534218  2515.4151122
  1967.69725342  1427.91311849    65.87020315     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 7
last5MinsDistances.max() = 3809.72535265, last10PointsDistance.max() = 6344.4055461
------------------------------2015-08-23 11:57:40------------------------------
last5MinsDistances = [ 3547.91762286  3078.67555135  2537.13291655  1989.39992205  1449.53363676
    88.20138136    23.13496819] with length 7
last10PointsDistances = [ 3831.16694649  3547.91762286  3078.67555135  2537.13291655  1989.39992205
  1449.53363676    88.20138136    23.13496819     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 7
last5MinsDistances.max() = 3547.91762286, last10PointsDistance.max() = 3831.16694649
------------------------------2015-08-23 11:58:10------------------------------
last5MinsDistances = [ 3078.21958765  2536.6558106   1988.93354156  1449.12674851    87.18416724
    21.33096186     6.05638493] with length 7
last10PointsDistances = [ 3547.45839101  3078.21958765  2536.6558106   1988.93354156  1449.12674851
    87.18416724    21.33096186     6.05638493     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 7
last5MinsDistances.max() = 3078.21958765, last10PointsDistance.max() = 3547.45839101
------------------------------2015-08-23 12:00:10------------------------------
last5MinsDistances = [ 3210.98428124  1853.22870563  1788.3275893   1767.85869476  1767.52066065] with length 5
last10PointsDistances = [ 4836.47270522  4295.13210264  3748.58576615  3210.98428124  1853.22870563
  1788.3275893   1767.85869476  1767.52066065     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 5
last5MinsDistances.max() = 3210.98428124, last10PointsDistance.max() = 4836.47270522
------------------------------2015-08-23 12:01:10------------------------------
last5MinsDistances = [ 2192.66703381  2127.25270828  2106.21147428  2106.21599243   355.69439757] with length 5
last10PointsDistances = [ 4639.59372277  4092.39566969  3553.64112029  2192.66703381  2127.25270828
  2106.21147428  2106.21599243   355.69439757     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 5
last5MinsDistances.max() = 2192.66703381, last10PointsDistance.max() = 4639.59372277
------------------------------2015-08-23 12:01:41------------------------------
last5MinsDistances = [ 2318.37975824  2297.18672062  2297.28940998   549.48536659   194.32387674] with length 5
last10PointsDistances = [ 4284.47364558  3745.43997189  2383.90574735  2318.37975824  2297.18672062
  2297.28940998   549.48536659   194.32387674     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 5
last5MinsDistances.max() = 2318.37975824, last10PointsDistance.max() = 4284.47364558
------------------------------2015-08-23 12:02:11------------------------------
last5MinsDistances = [ 2693.15010629  2692.47925891   932.91623778   644.08359248   507.56042246] with length 5
last10PointsDistances = [ 4127.18771248  2777.15089548  2712.99065175  2693.15010629  2692.47925891
   932.91623778   644.08359248   507.56042246     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 5
last5MinsDistances.max() = 2693.15010629, last10PointsDistance.max() = 4127.18771248
------------------------------2015-08-23 12:02:41------------------------------
last5MinsDistances = [ 3093.13861885  1369.82251587  1115.52900983   988.14864368   480.61954364] with length 5
last10PointsDistances = [ 3175.56350898  3113.0263701   3094.35876916  3093.13861885  1369.82251587
  1115.52900983   988.14864368   480.61954364     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 5
last5MinsDistances.max() = 3093.13861885, last10PointsDistance.max() = 3175.56350898
------------------------------2015-08-23 12:03:11------------------------------
last5MinsDistances = [ 1708.93926614  1465.38289595  1338.75431161   831.20568872   350.93029474] with length 5
last10PointsDistances = [ 3427.3981968   3409.40307158  3407.90146093  1708.93926614  1465.38289595
  1338.75431161   831.20568872   350.93029474     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 5
last5MinsDistances.max() = 1708.93926614, last10PointsDistance.max() = 3427.3981968
------------------------------2015-08-23 12:03:41------------------------------
last5MinsDistances = [ 2193.17446041  1963.10925069  1839.49813001  1331.93820673   851.39534716
   500.8498291 ] with length 6
last10PointsDistances = [ 3857.68287678  3855.82225026  2193.17446041  1963.10925069  1839.49813001
  1331.93820673   851.39534716   500.8498291      0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 6
last5MinsDistances.max() = 2193.17446041, last10PointsDistance.max() = 3857.68287678
------------------------------2015-08-23 12:04:11------------------------------
last5MinsDistances = [ 2632.97915153  2410.157077    2287.80497324  1780.24589225  1299.68478281
   949.13904254   448.31011331] with length 7
last10PointsDistances = [ 4268.98070218  2632.97915153  2410.157077    2287.80497324  1780.24589225
  1299.68478281   949.13904254   448.31011331     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 7
last5MinsDistances.max() = 2632.97915153, last10PointsDistance.max() = 4268.98070218
------------------------------2015-08-23 12:04:41------------------------------
last5MinsDistances = [ 3078.57157868  2862.19200484  2741.40708769  2233.86309811  1753.25862497
  1402.86167137   902.01197214   453.79159239] with length 8
last10PointsDistances = [ 3078.57157868  2862.19200484  2741.40708769  2233.86309811  1753.25862497
  1402.86167137   902.01197214   453.79159239     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 8
last5MinsDistances.max() = 3078.57157868, last10PointsDistance.max() = 3078.57157868
------------------------------2015-08-23 12:05:11------------------------------
last5MinsDistances = [ 2979.88843939  2860.90172119  2353.44274774  1872.83449531  1522.84242212
  1022.14263475   574.57609643   123.31135436] with length 8
last10PointsDistances = [ 2979.88843939  2860.90172119  2353.44274774  1872.83449531  1522.84242212
  1022.14263475   574.57609643   123.31135436     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 8
last5MinsDistances.max() = 2979.88843939, last10PointsDistance.max() = 2979.88843939
------------------------------2015-08-23 12:05:41------------------------------
last5MinsDistances = [ 3023.79951644  2905.92550536  2398.55873631  1918.00217675  1568.32300956
  1067.85834625   620.97566843   172.04548307    49.29683016] with length 9
last10PointsDistances = [ 2905.92550536  2398.55873631  1918.00217675  1568.32300956  1067.85834625
   620.97566843   172.04548307    49.29683016     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 9
last5MinsDistances.max() = 3023.79951644, last10PointsDistance.max() = 2905.92550536
------------------------------2015-08-23 12:06:11------------------------------
last5MinsDistances = [ 2730.87549539  2228.64315533  1754.41709262  1416.26263558   937.53020655
   547.67459704   338.26399206   340.83614579   345.56198891] with length 9
last10PointsDistances = [ 2228.64315533  1754.41709262  1416.26263558   937.53020655   547.67459704
   338.26399206   340.83614579   345.56198891     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 9
last5MinsDistances.max() = 2730.87549539, last10PointsDistance.max() = 2228.64315533
------------------------------2015-08-23 12:06:41------------------------------
last5MinsDistances = [ 2231.78126825  1757.97286529  1420.43380522   942.97039917   555.7632894
   348.92698382   349.95815577   353.74204882    10.93770468] with length 9
last10PointsDistances = [ 1757.97286529  1420.43380522   942.97039917   555.7632894    348.92698382
   349.95815577   353.74204882    10.93770468     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 9
last5MinsDistances.max() = 2231.78126825, last10PointsDistance.max() = 1757.97286529
------------------------------2015-08-23 12:10:11------------------------------
last5MinsDistances = [ 354.95022543   11.82928662    1.21065394] with length 3
last10PointsDistances = [ 1419.97970845   942.66680776   555.83635634   349.95418602   351.14381499
   354.95022543    11.82928662     1.21065394     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 3
last5MinsDistances.max() = 354.950225433, last10PointsDistance.max() = 1419.97970845
------------------------------2015-08-23 12:10:41------------------------------
last5MinsDistances = [ 358.14756277   12.62873837    7.71743348    7.03758876] with length 4
last10PointsDistances = [ 935.89334844  549.99517259  349.8129831   353.44376363  358.14756277
   12.62873837    7.71743348    7.03758876    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 4
last5MinsDistances.max() = 358.147562765, last10PointsDistance.max() = 935.893348443
------------------------------2015-08-23 12:11:11------------------------------
last5MinsDistances = [ 9.86991194  8.67678868  9.13944263] with length 3
last10PointsDistances = [ 557.99028831  358.04222803  359.81866989  363.56815297   19.81828598
    9.86991194    8.67678868    9.13944263    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 3
last5MinsDistances.max() = 9.86991193678, last10PointsDistance.max() = 557.990288314
------------------------------2015-08-23 12:11:40------------------------------
last5MinsDistances = [ 4.30571126  3.11474263  5.4487979   5.92352648] with length 4
last10PointsDistances = [ 352.19812502  353.99530586  357.94763412   13.93756542    4.30571126
    3.11474263    5.4487979     5.92352648    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 4
last5MinsDistances.max() = 5.92352648049, last10PointsDistance.max() = 357.947634116
------------------------------2015-08-23 12:12:11------------------------------
last5MinsDistances = [ 11.4193873    9.83225933   3.38505469   8.38529375] with length 4
last10PointsDistances = [ 362.29404006  366.33270682   21.7361726    12.62986732   11.4193873
    9.83225933    3.38505469    8.38529375    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 4
last5MinsDistances.max() = 11.4193872977, last10PointsDistance.max() = 366.332706823
------------------------------2015-08-23 12:12:41------------------------------
last5MinsDistances = [ 5.33868509  1.69937143  8.54619558  3.99432956  9.81964776] with length 5
last10PointsDistances = [ 357.33472777   12.03691388    6.03258859    5.33868509    1.69937143
    8.54619558    3.99432956    9.81964776    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 5
last5MinsDistances.max() = 9.81964775918, last10PointsDistance.max() = 357.334727774
------------------------------2015-08-23 12:13:11------------------------------
last5MinsDistances = [ 14.28339992  16.4826566    7.38482927  12.39541141   8.47100782
  15.72455749] with length 6
last10PointsDistances = [ 26.08608318  15.28688648  14.28339992  16.4826566    7.38482927
  12.39541141   8.47100782  15.72455749   0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 6
last5MinsDistances.max() = 16.4826566019, last10PointsDistance.max() = 26.0860831805
Found trip end at 2015-08-23 12:06:11
------------------------------2015-08-23 12:13:41------------------------------
last5MinsDistances = [] with length 0
last10PointsDistances = [ 0.] with length 1, shape (1,)
len(last10PointsDistances) = 1, len(last5MinsDistances) = 0
Too few points to make a decision, continuing
------------------------------2015-08-23 12:14:11------------------------------
last5MinsDistances = [ 10.71873598] with length 1
last10PointsDistances = [ 10.71873598   0.        ] with length 2, shape (2,)
len(last10PointsDistances) = 2, len(last5MinsDistances) = 1
Too few points to make a decision, continuing
------------------------------2015-08-23 12:20:04------------------------------
last5MinsDistances = [] with length 0
last10PointsDistances = [  9.08816033  18.17468969   0.        ] with length 3, shape (3,)
len(last10PointsDistances) = 3, len(last5MinsDistances) = 0
Too few points to make a decision, continuing
------------------------------2015-08-23 12:21:04------------------------------
last5MinsDistances = [ 4.5427479] with length 1
last10PointsDistances = [ 13.4549863   22.69752901   4.5427479    0.        ] with length 4, shape (4,)
len(last10PointsDistances) = 4, len(last5MinsDistances) = 1
Too few points to make a decision, continuing
------------------------------2015-08-23 12:21:34------------------------------
last5MinsDistances = [ 10.10829989  14.1123483 ] with length 2
last10PointsDistances = [  8.66284596  10.36279695  10.10829989  14.1123483    0.        ] with length 5, shape (5,)
len(last10PointsDistances) = 5, len(last5MinsDistances) = 2
Too few points to make a decision, continuing
------------------------------2015-08-23 12:29:43------------------------------
last5MinsDistances = [] with length 0
last10PointsDistances = [ 2293.83911282  2283.17359939  2299.35601207  2303.16832836  2289.2486901
     0.        ] with length 6, shape (6,)
len(last10PointsDistances) = 6, len(last5MinsDistances) = 0
Too few points to make a decision, continuing
------------------------------2015-08-23 12:30:43------------------------------
last5MinsDistances = [ 530.6864466] with length 1
last10PointsDistances = [ 2321.08963786  2310.46279265  2328.10695128  2332.38103522  2318.29791741
   530.6864466      0.        ] with length 7, shape (7,)
len(last10PointsDistances) = 7, len(last5MinsDistances) = 1
Too few points to make a decision, continuing
------------------------------2015-08-23 12:31:43------------------------------
last5MinsDistances = [ 534.64927871    3.97213693] with length 2
last10PointsDistances = [ 2321.47933152  2310.85489218  2328.50645334  2332.78314103  2318.7015862
   534.64927871     3.97213693     0.        ] with length 8, shape (8,)
len(last10PointsDistances) = 8, len(last5MinsDistances) = 2
Too few points to make a decision, continuing
------------------------------2015-08-23 12:32:14------------------------------
last5MinsDistances = [ 269.23330344  261.82897676  265.79928629] with length 3
last10PointsDistances = [ 2302.36512445  2291.6480756   2308.68740681  2312.76152963  2298.66573829
   269.23330344   261.82897676   265.79928629     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 3
last5MinsDistances.max() = 269.233303444, last10PointsDistance.max() = 2312.76152963
------------------------------2015-08-23 12:32:44------------------------------
last5MinsDistances = [ 275.5663617   255.2859773   259.25454215    7.26105021] with length 4
last10PointsDistances = [ 2288.6478822   2305.70534269  2309.78521099  2295.68751368   275.5663617
   255.2859773    259.25454215     7.26105021     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 4
last5MinsDistances.max() = 275.566361698, last10PointsDistance.max() = 2309.78521099
------------------------------2015-08-23 12:33:14------------------------------
last5MinsDistances = [ 288.08276358  242.81992645  246.78929718   19.09228333   12.53092964] with length 5
last10PointsDistances = [ 2307.38932356  2311.47987784  2297.37892021   288.08276358   242.81992645
   246.78929718    19.09228333    12.53092964     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 5
last5MinsDistances.max() = 288.082763581, last10PointsDistance.max() = 2311.47987784
------------------------------2015-08-23 12:33:44------------------------------
last5MinsDistances = [ 288.99920905  241.79949019  245.76745145   20.41377226   13.51434186
    2.32148626] with length 6
last10PointsDistances = [ 2309.43549457  2295.33426791   288.99920905   241.79949019   245.76745145
    20.41377226    13.51434186     2.32148626     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 6
last5MinsDistances.max() = 288.999209048, last10PointsDistance.max() = 2309.43549457
------------------------------2015-08-23 12:34:14------------------------------
last5MinsDistances = [ 278.47018936  252.31258198  256.2800822    10.59689124    3.33603497
    9.88054165   10.53077168] with length 7
last10PointsDistances = [ 2294.28603313   278.47018936   252.31258198   256.2800822     10.59689124
     3.33603497     9.88054165    10.53077168     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 7
last5MinsDistances.max() = 278.470189364, last10PointsDistance.max() = 2294.28603313
------------------------------2015-08-23 12:34:44------------------------------
last5MinsDistances = [ 253.76069009  257.72819885    9.31885611    2.14277809   11.27803001
   11.97624191    1.44815704] with length 7
last10PointsDistances = [ 277.02359866  253.76069009  257.72819885    9.31885611    2.14277809
   11.27803001   11.97624191    1.44815704    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 7
last5MinsDistances.max() = 257.728198852, last10PointsDistance.max() = 277.023598658
------------------------------2015-08-23 12:35:14------------------------------
last5MinsDistances = [ 255.54889466  259.51577534    8.35174455    2.34096356   13.2127913
   13.82011164    3.33352376    1.96452247] with length 8
last10PointsDistances = [ 255.54889466  259.51577534    8.35174455    2.34096356   13.2127913
   13.82011164    3.33352376    1.96452247    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 8
last5MinsDistances.max() = 259.515775338, last10PointsDistance.max() = 259.515775338
------------------------------2015-08-23 12:35:44------------------------------
last5MinsDistances = [ 253.36853591   13.94519831    6.68617783    7.8934629     7.92431091
    3.35162793    4.67059584    6.20899865] with length 8
last10PointsDistances = [ 253.36853591   13.94519831    6.68617783    7.8934629     7.92431091
    3.35162793    4.67059584    6.20899865    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 8
last5MinsDistances.max() = 253.368535909, last10PointsDistance.max() = 253.368535909
------------------------------2015-08-23 12:36:14------------------------------
last5MinsDistances = [ 253.2968264    13.96630912    6.70575828    7.78304173    7.82999334
    3.36977379    4.70535913    6.2676604     0.11698253] with length 9
last10PointsDistances = [ 13.96630912   6.70575828   7.78304173   7.82999334   3.36977379
   4.70535913   6.2676604    0.11698253   0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 9
last5MinsDistances.max() = 253.296826399, last10PointsDistance.max() = 13.9663091195
------------------------------2015-08-23 12:36:44------------------------------
last5MinsDistances = [ 14.14400571   6.88305667   7.64068982   7.65743338   3.54711816
   4.88964927   6.4560087    0.26698334   0.18835354] with length 9
last10PointsDistances = [ 6.88305667  7.64068982  7.65743338  3.54711816  4.88964927  6.4560087
  0.26698334  0.18835354  0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 9
last5MinsDistances.max() = 14.1440057058, last10PointsDistance.max() = 7.65743337726
Found trip end at 2015-08-23 12:32:14
------------------------------2015-08-23 12:37:14------------------------------
last5MinsDistances = [] with length 0
last10PointsDistances = [ 0.] with length 1, shape (1,)
len(last10PointsDistances) = 1, len(last5MinsDistances) = 0
Too few points to make a decision, continuing

In [30]:
ipy.inline_map(lo.get_map(my_points_time_df_aug_23))


Out[30]:

In [31]:
ipy.inline_map(lo.get_map(pd.DataFrame(my_segment_points_aug_23)))


Out[31]:

In [32]:
def make_trip(startDict, endDict):
    start = ad.AttrDict(startDict)
    end = ad.AttrDict(endDict)
    print "-" * 20 + str(start.formatted_time) + " -> " + str(end.formatted_time) + "-" * 20
    trip = ad.AttrDict({'user_id': myUUID, 'loc_filter': 'time',
                           'start_ts': start.mTime, 'end_ts': end.mTime,
                           'start_time': start.formatted_time, 'end_time': end.formatted_time})
    return trip

In [33]:
my_trips_list_aug_23 = [make_trip(s1, s2) for s1, s2 in zip(my_segment_points_aug_23, my_segment_points_aug_23[1:])]


--------------------2015-08-23 09:45:55 -> 2015-08-23 09:57:04--------------------
--------------------2015-08-23 09:57:04 -> 2015-08-23 12:06:11--------------------
--------------------2015-08-23 12:06:11 -> 2015-08-23 12:32:14--------------------

In [34]:
trip_section_map = []
for trip in my_trips_list_aug_23:
    trip_section_map.append((trip, ss.segment_into_sections(trip)))


At 2015-08-23 09:46:30, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 09:47:07, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 09:47:24, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 09:48:07, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 09:48:37, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 09:49:06, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 09:49:37, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 09:50:07, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 09:50:37, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 09:51:06, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 09:51:37, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 09:52:07, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 09:52:37, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 09:53:07, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 09:53:37, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 09:54:21, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 09:54:37, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 09:55:07, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 09:55:37, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 09:56:07, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 09:56:37, retained existing activity Activities.IN_VEHICLE
Detected trip end! Ending section at 2015-08-23 09:57:04
At 2015-08-23 09:57:37, retained existing activity Activities.STILL
At 2015-08-23 09:58:31, retained existing activity Activities.STILL
At 2015-08-23 09:59:07, found new activity Activities.ON_FOOT compared to current Activities.STILL - creating new section with start_time 2015-08-23 09:58:31
At 2015-08-23 09:59:37, retained existing activity Activities.ON_FOOT
At 2015-08-23 10:00:07, retained existing activity Activities.ON_FOOT
At 2015-08-23 10:00:38, retained existing activity Activities.ON_FOOT
At 2015-08-23 10:01:08, retained existing activity Activities.ON_FOOT
At 2015-08-23 10:01:37, retained existing activity Activities.ON_FOOT
At 2015-08-23 11:38:33, retained existing activity Activities.ON_FOOT
At 2015-08-23 11:39:03, retained existing activity Activities.ON_FOOT
At 2015-08-23 11:39:33, retained existing activity Activities.ON_FOOT
At 2015-08-23 11:40:03, retained existing activity Activities.ON_FOOT
At 2015-08-23 11:40:34, retained existing activity Activities.ON_FOOT
At 2015-08-23 11:41:04, retained existing activity Activities.ON_FOOT
At 2015-08-23 11:41:34, retained existing activity Activities.ON_FOOT
At 2015-08-23 11:42:04, retained existing activity Activities.ON_FOOT
At 2015-08-23 11:42:34, retained existing activity Activities.ON_FOOT
At 2015-08-23 11:43:04, retained existing activity Activities.ON_FOOT
At 2015-08-23 11:43:46, retained existing activity Activities.ON_FOOT
At 2015-08-23 11:44:04, retained existing activity Activities.ON_FOOT
At 2015-08-23 11:44:34, retained existing activity Activities.ON_FOOT
At 2015-08-23 11:45:21, retained existing activity Activities.ON_FOOT
At 2015-08-23 11:46:04, retained existing activity Activities.ON_FOOT
At 2015-08-23 11:52:13, found new activity Activities.IN_VEHICLE compared to current Activities.ON_FOOT - creating new section with start_time 2015-08-23 11:46:04
At 2015-08-23 11:52:43, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 11:53:02, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 11:53:43, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 11:54:13, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 11:54:43, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 11:55:13, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 11:55:43, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 11:56:13, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 11:56:43, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 11:57:30, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 11:58:30, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 11:59:13, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 11:59:43, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 12:00:13, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 12:00:43, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 12:01:13, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 12:01:43, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 12:02:14, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 12:02:44, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 12:03:13, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 12:03:43, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 12:04:13, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 12:04:43, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 12:05:30, retained existing activity Activities.IN_VEHICLE
Detected trip end! Ending section at 2015-08-23 12:06:11
At 2015-08-23 12:06:43, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 12:07:14, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 12:07:44, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 12:08:42, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 12:09:10, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 12:09:44, found new activity Activities.ON_FOOT compared to current Activities.IN_VEHICLE - creating new section with start_time 2015-08-23 12:09:10
At 2015-08-23 12:10:30, retained existing activity Activities.ON_FOOT
At 2015-08-23 12:11:15, retained existing activity Activities.ON_FOOT
At 2015-08-23 12:12:02, retained existing activity Activities.ON_FOOT
At 2015-08-23 12:12:53, retained existing activity Activities.ON_FOOT
At 2015-08-23 12:13:39, retained existing activity Activities.ON_FOOT
At 2015-08-23 12:18:06, retained existing activity Activities.ON_FOOT
At 2015-08-23 12:18:53, retained existing activity Activities.ON_FOOT
At 2015-08-23 12:20:02, retained existing activity Activities.ON_FOOT
At 2015-08-23 12:21:06, retained existing activity Activities.ON_FOOT
At 2015-08-23 12:27:43, retained existing activity Activities.ON_FOOT
At 2015-08-23 12:28:16, retained existing activity Activities.ON_FOOT
At 2015-08-23 12:29:11, found new activity Activities.IN_VEHICLE compared to current Activities.ON_FOOT - creating new section with start_time 2015-08-23 12:28:16
At 2015-08-23 12:30:03, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 12:31:03, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 12:32:03, retained existing activity Activities.IN_VEHICLE
Detected trip end! Ending section at 2015-08-23 12:32:14

In [35]:
section_map_list_22 = lo.get_map_list_after_segmentation(trip_section_map,
                                                         cso.BoxplotOutlier(ignore_zeros=True),
                                                         cjs.SmoothZigzag())


DEBUG:root:==================== 2015-08-23 09:45:55 -> 2015-08-23 09:57:04 ====================
DEBUG:root:-------------------- 0: 2015-08-23 09:45:55 -> 2015-08-23 09:57:04 --------------------
DEBUG:root:filtering points Int64Index([57, 58, 59, 60, 62, 64, 66], dtype='int64')
DEBUG:root:after accuracy filtering, filtered list size went from (67, 28) to (60, 28)
DEBUG:root:quartile values are 0.25     9.325013
0.75    20.094420
Name: speed, dtype: float64
DEBUG:root:iqr 10.7694070675
DEBUG:root:For cluster 0 - 59, distance = 8203.78294898, is_cluster = False
DEBUG:root:After splitting, segment list is [Segment(0, 59, 8203.78294898)] with size 1
INFO:root:No jumps, nothing to filter
DEBUG:root:for section AttrDict({'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'start_time': Timestamp('2015-08-23 09:45:55'), 'end_ts': 1440349024991, 'start_ts': 1440348355307, 'end_time': Timestamp('2015-08-23 09:57:04'), 'activity': <Activities.IN_VEHICLE: 0>, 'loc_filter': 'time'}), section_df.shape = (60, 28), formatted_time.head() = 0   2015-08-23 09:46:00
1   2015-08-23 09:46:05
2   2015-08-23 09:46:11
3   2015-08-23 09:46:16
4   2015-08-23 09:46:22
Name: formatted_time, dtype: datetime64[ns]
DEBUG:root:==================== 2015-08-23 09:57:04 -> 2015-08-23 12:06:11 ====================
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1440348355307}}, {'data.mTime': {'$lt': 1440349024991}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1440349024991}}, {'data.mTime': {'$lt': 1440356771266}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
DEBUG:root:-------------------- 0: 2015-08-23 09:57:04 -> 2015-08-23 09:58:31 --------------------
DEBUG:root:filtering points Int64Index([], dtype='int64')
DEBUG:root:after accuracy filtering, filtered list size went from (2, 29) to (2, 29)
DEBUG:root:quartile values are 0.25   NaN
0.75   NaN
Name: speed, dtype: float64
DEBUG:root:iqr nan
DEBUG:root:For cluster 0 - 1, distance = 0.0, is_cluster = True
DEBUG:root:After splitting, segment list is [Segment(0, 1, 0.0)] with size 1
INFO:root:No jumps, nothing to filter
DEBUG:root:for section AttrDict({'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'start_time': Timestamp('2015-08-23 09:57:04'), 'end_ts': 1440349111712, 'start_ts': 1440349024991, 'end_time': '2015-08-23 09:58:31', 'activity': <Activities.STILL: 3>, 'loc_filter': 'time'}), section_df.shape = (2, 29), formatted_time.head() = 0   2015-08-23 09:57:35
1   2015-08-23 09:58:04
Name: formatted_time, dtype: datetime64[ns]
DEBUG:root:-------------------- 1: 2015-08-23 09:58:31 -> 2015-08-23 11:46:04 --------------------
DEBUG:root:filtering points Int64Index([21, 22, 23], dtype='int64')
DEBUG:root:after accuracy filtering, filtered list size went from (25, 29) to (22, 29)
DEBUG:root:timeDelta = 0, distanceDelta = %s, returning speed = 0
DEBUG:root:quartile values are 0.25    0.211955
0.75    0.923314
Name: speed, dtype: float64
DEBUG:root:iqr 0.711359265185
DEBUG:root:For cluster 0 - 21, distance = 0.00884278078727, is_cluster = True
DEBUG:root:After splitting, segment list is [Segment(0, 21, 0.00884278078727)] with size 1
INFO:root:No jumps, nothing to filter
DEBUG:root:for section AttrDict({'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'start_time': datetime.datetime(2015, 8, 23, 9, 58, 31), 'end_ts': 1440355564493, 'start_ts': 1440349111712, 'end_time': '2015-08-23 11:46:04', 'activity': <Activities.ON_FOOT: 2>, 'loc_filter': 'time'}), section_df.shape = (22, 29), formatted_time.head() = 0   2015-08-23 09:58:35
1   2015-08-23 09:59:04
2   2015-08-23 09:59:35
3   2015-08-23 10:00:05
4   2015-08-23 10:00:35
Name: formatted_time, dtype: datetime64[ns]
DEBUG:root:-------------------- 2: 2015-08-23 11:46:04 -> 2015-08-23 12:06:11 --------------------
DEBUG:root:filtering points Int64Index([28, 29, 32, 37, 42, 43, 45], dtype='int64')
DEBUG:root:after accuracy filtering, filtered list size went from (29, 29) to (22, 29)
DEBUG:root:quartile values are 0.25     5.920445
0.75    16.691100
Name: speed, dtype: float64
DEBUG:root:iqr 10.770655006
DEBUG:root:For cluster 0 - 21, distance = 10810.2850742, is_cluster = False
DEBUG:root:After splitting, segment list is [Segment(0, 21, 10810.2850742)] with size 1
INFO:root:No jumps, nothing to filter
DEBUG:root:for section AttrDict({'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'start_time': datetime.datetime(2015, 8, 23, 11, 46, 4), 'end_ts': 1440356771266, 'start_ts': 1440355564493, 'end_time': Timestamp('2015-08-23 12:06:11'), 'activity': <Activities.IN_VEHICLE: 0>, 'loc_filter': 'time'}), section_df.shape = (22, 29), formatted_time.head() = 0   2015-08-23 11:46:30
1   2015-08-23 11:52:40
2   2015-08-23 11:53:10
3   2015-08-23 11:54:10
4   2015-08-23 11:54:40
Name: formatted_time, dtype: datetime64[ns]
DEBUG:root:==================== 2015-08-23 12:06:11 -> 2015-08-23 12:32:14 ====================
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1440356771266}}, {'data.mTime': {'$lt': 1440358334036}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
DEBUG:root:-------------------- 0: 2015-08-23 12:06:11 -> 2015-08-23 12:09:10 --------------------
DEBUG:root:filtering points Int64Index([], dtype='int64')
DEBUG:root:after accuracy filtering, filtered list size went from (1, 29) to (1, 29)
DEBUG:root:quartile values are 0.25   NaN
0.75   NaN
Name: speed, dtype: float64
DEBUG:root:iqr nan
Caught error Cannot assign nan to integer series while processing section, skipping...
DEBUG:root:for section AttrDict({'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'start_time': Timestamp('2015-08-23 12:06:11'), 'end_ts': 1440356950423, 'start_ts': 1440356771266, 'end_time': '2015-08-23 12:09:10', 'activity': <Activities.IN_VEHICLE: 0>, 'loc_filter': 'time'}), section_df.shape = (1, 29), formatted_time.head() = 0   2015-08-23 12:06:41
Name: formatted_time, dtype: datetime64[ns]
DEBUG:root:-------------------- 1: 2015-08-23 12:09:10 -> 2015-08-23 12:28:16 --------------------
DEBUG:root:filtering points Int64Index([10, 11, 13, 16, 17, 18, 19], dtype='int64')
DEBUG:root:after accuracy filtering, filtered list size went from (19, 29) to (12, 29)
DEBUG:root:quartile values are 0.25    0.174864
0.75    0.341316
Name: speed, dtype: float64
DEBUG:root:iqr 0.166452122912
DEBUG:root:For cluster 0 - 11, distance = 5.59096114321, is_cluster = True
DEBUG:root:After splitting, segment list is [Segment(0, 11, 5.59096114321)] with size 1
INFO:root:No jumps, nothing to filter
DEBUG:root:for section AttrDict({'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'start_time': datetime.datetime(2015, 8, 23, 12, 9, 10), 'end_ts': 1440358096466, 'start_ts': 1440356950423, 'end_time': '2015-08-23 12:28:16', 'activity': <Activities.ON_FOOT: 2>, 'loc_filter': 'time'}), section_df.shape = (12, 29), formatted_time.head() = 0   2015-08-23 12:10:11
1   2015-08-23 12:10:41
2   2015-08-23 12:11:11
3   2015-08-23 12:11:40
4   2015-08-23 12:12:11
Name: formatted_time, dtype: datetime64[ns]
DEBUG:root:-------------------- 2: 2015-08-23 12:28:16 -> 2015-08-23 12:32:14 --------------------
DEBUG:root:filtering points Int64Index([21], dtype='int64')
DEBUG:root:after accuracy filtering, filtered list size went from (5, 29) to (4, 29)
DEBUG:root:quartile values are 0.25    2.306725
0.75    6.664147
Name: speed, dtype: float64
DEBUG:root:iqr 4.3574222314
DEBUG:root:For cluster 0 - 3, distance = 530.686446595, is_cluster = False
DEBUG:root:After splitting, segment list is [Segment(0, 3, 530.686446595)] with size 1
INFO:root:No jumps, nothing to filter
DEBUG:root:for section AttrDict({'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'start_time': datetime.datetime(2015, 8, 23, 12, 28, 16), 'end_ts': 1440358334036, 'start_ts': 1440358096466, 'end_time': Timestamp('2015-08-23 12:32:14'), 'activity': <Activities.IN_VEHICLE: 0>, 'loc_filter': 'time'}), section_df.shape = (4, 29), formatted_time.head() = 0   2015-08-23 12:29:43
1   2015-08-23 12:30:43
2   2015-08-23 12:31:12
3   2015-08-23 12:31:43
Name: formatted_time, dtype: datetime64[ns]


In [36]:
ipy.inline_maps([[map] for map in section_map_list_22], len(section_map_list_22), 1)


Out[36]:

In [37]:
tom_points_time_df_aug_23 = lq.get_plottable_df(tomUUID, "time", get_aug_dt(23), get_aug_dt(24))


final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1440316800000.0}}, {'data.mTime': {'$lt': 1440403200000.0}}], 'user_id': UUID('b0d937d0-70ef-305e-9563-440369012b39'), 'metadata.filter': 'time'} 

In [38]:
tom_segment_points_aug_23 = ts.segment_into_trips(tom_points_time_df_aug_23)


DEBUG:root:filtering points Int64Index([8, 11, 12, 13, 14, 15, 17, 19, 20, 26, 27, 55, 60, 61, 62, 69, 92, 93, 113, 147], dtype='int64')
DEBUG:root:after accuracy filtering, filtered list size went from (167, 29) to (147, 29)
DEBUG:root:timeDelta = 0, distanceDelta = %s, returning speed = 0
DEBUG:root:timeDelta = 0, distanceDelta = %s, returning speed = 0
DEBUG:root:timeDelta = 0, distanceDelta = %s, returning speed = 0
DEBUG:root:timeDelta = 0, distanceDelta = %s, returning speed = 0
DEBUG:root:timeDelta = 0, distanceDelta = %s, returning speed = 0
DEBUG:root:timeDelta = 0, distanceDelta = %s, returning speed = 0
------------------------------2015-08-23 09:46:40------------------------------
last5MinsDistances = [] with length 0
last10PointsDistances = [ 0.] with length 1, shape (1,)
len(last10PointsDistances) = 1, len(last5MinsDistances) = 0
Too few points to make a decision, continuing
------------------------------2015-08-23 09:47:16------------------------------
last5MinsDistances = [ 45.43268256] with length 1
last10PointsDistances = [ 45.43268256   0.        ] with length 2, shape (2,)
len(last10PointsDistances) = 2, len(last5MinsDistances) = 1
Too few points to make a decision, continuing
------------------------------2015-08-23 09:48:18------------------------------
last5MinsDistances = [ 764.32479334  718.91232409] with length 2
last10PointsDistances = [ 764.32479334  718.91232409    0.        ] with length 3, shape (3,)
len(last10PointsDistances) = 3, len(last5MinsDistances) = 2
Too few points to make a decision, continuing
------------------------------2015-08-23 09:48:47------------------------------
last5MinsDistances = [ 832.33503107  786.96248663   70.06222623] with length 3
last10PointsDistances = [ 832.33503107  786.96248663   70.06222623    0.        ] with length 4, shape (4,)
len(last10PointsDistances) = 4, len(last5MinsDistances) = 3
Too few points to make a decision, continuing
------------------------------2015-08-23 09:49:20------------------------------
last5MinsDistances = [ 1410.24472031  1364.82343558   645.95958598   578.70518213] with length 4
last10PointsDistances = [ 1410.24472031  1364.82343558   645.95958598   578.70518213     0.        ] with length 5, shape (5,)
len(last10PointsDistances) = 5, len(last5MinsDistances) = 4
Too few points to make a decision, continuing
------------------------------2015-08-23 09:50:22------------------------------
last5MinsDistances = [ 2452.43246896  2408.82096624  1722.97358893  1653.35464004  1147.89718829] with length 5
last10PointsDistances = [ 2452.43246896  2408.82096624  1722.97358893  1653.35464004  1147.89718829
     0.        ] with length 6, shape (6,)
len(last10PointsDistances) = 6, len(last5MinsDistances) = 5
Too few points to make a decision, continuing
------------------------------2015-08-23 09:50:53------------------------------
last5MinsDistances = [ 3330.82900889  3290.01894564  2652.52388695  2585.42929719  2131.61231904
  1004.25413885] with length 6
last10PointsDistances = [ 3330.82900889  3290.01894564  2652.52388695  2585.42929719  2131.61231904
  1004.25413885     0.        ] with length 7, shape (7,)
len(last10PointsDistances) = 7, len(last5MinsDistances) = 6
Too few points to make a decision, continuing
------------------------------2015-08-23 09:54:05------------------------------
last5MinsDistances = [ 6488.15664165  5362.79189234  4360.65759322] with length 3
last10PointsDistances = [ 7572.68345256  7536.66629108  6967.07188605  6903.61328676  6488.15664165
  5362.79189234  4360.65759322     0.        ] with length 8, shape (8,)
len(last10PointsDistances) = 8, len(last5MinsDistances) = 3
Too few points to make a decision, continuing
------------------------------2015-08-23 09:55:06------------------------------
last5MinsDistances = [ 5490.28246854  4499.86933268   513.70161328] with length 3
last10PointsDistances = [ 7774.01830855  7736.35959575  7139.37329673  7074.01857203  6630.5507282
  5490.28246854  4499.86933268   513.70161328     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 3
last5MinsDistances.max() = 5490.28246854, last10PointsDistance.max() = 7774.01830855
------------------------------2015-08-23 09:56:41------------------------------
last5MinsDistances = [ 739.21322595  251.87695586] with length 2
last10PointsDistances = [ 7948.28755107  7343.87858945  7278.02129528  6826.47056967  5683.13992428
  4698.40824753   739.21322595   251.87695586     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 2
last5MinsDistances.max() = 739.213225947, last10PointsDistance.max() = 7948.28755107
------------------------------2015-08-23 09:57:12------------------------------
last5MinsDistances = [ 755.25822971  289.21153214   57.35889449] with length 3
last10PointsDistances = [ 7398.12311026  7332.32647681  6881.65015181  5738.57144388  4753.24557121
   755.25822971   289.21153214    57.35889449     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 3
last5MinsDistances.max() = 755.258229714, last10PointsDistance.max() = 7398.12311026
------------------------------2015-08-23 09:57:42------------------------------
last5MinsDistances = [ 760.41049528  290.96563503   53.22722478    8.29871357] with length 4
last10PointsDistances = [ 7330.20880778  6879.12552141  5735.91586924  4750.88512801   760.41049528
   290.96563503    53.22722478     8.29871357     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 4
last5MinsDistances.max() = 760.410495276, last10PointsDistance.max() = 7330.20880778
------------------------------2015-08-23 09:58:14------------------------------
last5MinsDistances = [ 749.5755446   281.96986516   51.16081326    7.4485931    10.95975042] with length 5
last10PointsDistances = [ 6874.48262362  5731.43888898  4746.03821043   749.5755446    281.96986516
    51.16081326     7.4485931     10.95975042     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 5
last5MinsDistances.max() = 749.575544595, last10PointsDistance.max() = 6874.48262362
------------------------------2015-08-23 09:58:44------------------------------
last5MinsDistances = [ 747.84728881  287.34781141   65.41663602   12.5779003    20.87455312
   15.01584756] with length 6
last10PointsDistances = [ 5742.95697292  4757.19285698   747.84728881   287.34781141    65.41663602
    12.5779003     20.87455312    15.01584756     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 6
last5MinsDistances.max() = 747.847288809, last10PointsDistance.max() = 5742.95697292
------------------------------2015-08-23 10:00:16------------------------------
last5MinsDistances = [ 157.02177858  101.35733067  107.93064056  106.39182632   91.68163703] with length 5
last10PointsDistances = [ 4837.21718169   763.59901642   347.99971801   157.02177858   101.35733067
   107.93064056   106.39182632    91.68163703     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 5
last5MinsDistances.max() = 157.021778579, last10PointsDistance.max() = 4837.21718169
------------------------------2015-08-23 10:00:48------------------------------
last5MinsDistances = [ 172.89858643  118.38486469  125.31670453  122.95176502  108.02703918
   19.15121796] with length 6
last10PointsDistances = [ 756.91642436  352.78935478  172.89858643  118.38486469  125.31670453
  122.95176502  108.02703918   19.15121796    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 6
last5MinsDistances.max() = 172.898586433, last10PointsDistance.max() = 756.916424357
------------------------------2015-08-23 10:01:19------------------------------
last5MinsDistances = [ 172.08673111  116.45510433  122.99139374  121.49442312  106.77053679
   15.10510451   10.08994101] with length 7
last10PointsDistances = [ 358.7480474   172.08673111  116.45510433  122.99139374  121.49442312
  106.77053679   15.10510451   10.08994101    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 7
last5MinsDistances.max() = 172.086731114, last10PointsDistance.max() = 358.748047397
------------------------------2015-08-23 10:01:50------------------------------
last5MinsDistances = [ 90.02595339  96.67877388  95.00641896  80.28155815  11.40339065
  29.18130217  26.49139768] with length 7
last10PointsDistances = [ 145.61847703   90.02595339   96.67877388   95.00641896   80.28155815
   11.40339065   29.18130217   26.49139768    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 7
last5MinsDistances.max() = 96.6787738822, last10PointsDistance.max() = 145.618477028
------------------------------2015-08-23 10:02:22------------------------------
last5MinsDistances = [ 72.87930801  67.77374079  52.93788036  47.35874564  59.35284925
  61.08540491  37.23997025] with length 7
last10PointsDistances = [ 64.92321578  72.87930801  67.77374079  52.93788036  47.35874564
  59.35284925  61.08540491  37.23997025   0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 7
last5MinsDistances.max() = 72.8793080071, last10PointsDistance.max() = 72.8793080071
Found trip end at 2015-08-23 09:57:12
------------------------------2015-08-23 10:02:53------------------------------
last5MinsDistances = [] with length 0
last10PointsDistances = [ 0.] with length 1, shape (1,)
len(last10PointsDistances) = 1, len(last5MinsDistances) = 0
Too few points to make a decision, continuing
------------------------------2015-08-23 10:03:27------------------------------
last5MinsDistances = [ 18.63357039] with length 1
last10PointsDistances = [ 18.63357039   0.        ] with length 2, shape (2,)
len(last10PointsDistances) = 2, len(last5MinsDistances) = 1
Too few points to make a decision, continuing
------------------------------2015-08-23 10:05:00------------------------------
last5MinsDistances = [ 137.0752252   118.89399092] with length 2
last10PointsDistances = [ 137.0752252   118.89399092    0.        ] with length 3, shape (3,)
len(last10PointsDistances) = 3, len(last5MinsDistances) = 2
Too few points to make a decision, continuing
------------------------------2015-08-23 10:09:04------------------------------
last5MinsDistances = [ 125.07812556] with length 1
last10PointsDistances = [  12.12055502    8.27929688  125.07812556    0.        ] with length 4, shape (4,)
len(last10PointsDistances) = 4, len(last5MinsDistances) = 1
Too few points to make a decision, continuing
------------------------------2015-08-23 10:09:45------------------------------
last5MinsDistances = [ 127.62104085    2.59875411] with length 2
last10PointsDistances = [   9.73085517   10.63774261  127.62104085    2.59875411    0.        ] with length 5, shape (5,)
len(last10PointsDistances) = 5, len(last5MinsDistances) = 2
Too few points to make a decision, continuing
------------------------------2015-08-23 10:10:16------------------------------
last5MinsDistances = [ 33.34394744  33.67770578] with length 2
last10PointsDistances = [  32.30754854   29.58475068  133.23440953   33.34394744   33.67770578
    0.        ] with length 6, shape (6,)
len(last10PointsDistances) = 6, len(last5MinsDistances) = 2
Too few points to make a decision, continuing
------------------------------2015-08-23 10:10:46------------------------------
last5MinsDistances = [ 30.96159948  31.01771222   4.27637721] with length 3
last10PointsDistances = [  28.76299834   28.15571116  135.53640995   30.96159948   31.01771222
    4.27637721    0.        ] with length 7, shape (7,)
len(last10PointsDistances) = 7, len(last5MinsDistances) = 3
Too few points to make a decision, continuing
------------------------------2015-08-23 10:11:19------------------------------
last5MinsDistances = [ 19.82771385  21.4695055   19.32405289  19.43162571] with length 4
last10PointsDistances = [  25.89185663   12.83944277  118.30522889   19.82771385   21.4695055
   19.32405289   19.43162571    0.        ] with length 8, shape (8,)
len(last10PointsDistances) = 8, len(last5MinsDistances) = 4
Too few points to make a decision, continuing
------------------------------2015-08-23 10:11:50------------------------------
last5MinsDistances = [ 22.76561127  22.95281611  10.77801649   8.25034162  13.26675321] with length 5
last10PointsDistances = [  21.88585473   20.06549301  131.391694     22.76561127   22.95281611
   10.77801649    8.25034162   13.26675321    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 5
last5MinsDistances.max() = 22.9528161111, last10PointsDistance.max() = 131.391693999
------------------------------2015-08-23 10:12:22------------------------------
last5MinsDistances = [ 10.2936243   12.67253419  29.2812698   28.1399622   11.66017697
  20.21749451] with length 6
last10PointsDistances = [   2.03693075  117.19982136   10.2936243    12.67253419   29.2812698
   28.1399622    11.66017697   20.21749451    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 6
last5MinsDistances.max() = 29.2812697962, last10PointsDistance.max() = 117.199821364
------------------------------2015-08-23 10:12:52------------------------------
last5MinsDistances = [  6.29613484   7.76807145  27.51461481  25.47606053  13.70300899
  17.22655126   6.62116984] with length 7
last10PointsDistances = [ 123.79141919    6.29613484    7.76807145   27.51461481   25.47606053
   13.70300899   17.22655126    6.62116984    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 7
last5MinsDistances.max() = 27.5146148057, last10PointsDistance.max() = 123.791419185
------------------------------2015-08-23 10:13:23------------------------------
last5MinsDistances = [ 30.3273224   32.66448653  52.7546381   52.57670851  33.43075811
  45.22914799  25.57633634  31.16203954] with length 8
last10PointsDistances = [ 30.3273224   32.66448653  52.7546381   52.57670851  33.43075811
  45.22914799  25.57633634  31.16203954   0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 8
last5MinsDistances.max() = 52.7546380957, last10PointsDistance.max() = 52.7546380957
Found trip end at 2015-08-23 10:09:04
------------------------------2015-08-23 10:13:55------------------------------
last5MinsDistances = [] with length 0
last10PointsDistances = [ 0.] with length 1, shape (1,)
len(last10PointsDistances) = 1, len(last5MinsDistances) = 0
Too few points to make a decision, continuing
------------------------------2015-08-23 11:45:37------------------------------
last5MinsDistances = [] with length 0
last10PointsDistances = [ 120.24630551    0.        ] with length 2, shape (2,)
len(last10PointsDistances) = 2, len(last5MinsDistances) = 0
Too few points to make a decision, continuing
------------------------------2015-08-23 11:46:40------------------------------
last5MinsDistances = [ 5.93792877] with length 1
last10PointsDistances = [ 114.31429964    5.93792877    0.        ] with length 3, shape (3,)
len(last10PointsDistances) = 3, len(last5MinsDistances) = 1
Too few points to make a decision, continuing
------------------------------2015-08-23 11:47:41------------------------------
last5MinsDistances = [ 228.16725771  234.00561117] with length 2
last10PointsDistances = [ 347.61785112  228.16725771  234.00561117    0.        ] with length 4, shape (4,)
len(last10PointsDistances) = 4, len(last5MinsDistances) = 2
Too few points to make a decision, continuing
------------------------------2015-08-23 11:48:11------------------------------
last5MinsDistances = [ 152.29797636  157.74626673  134.12190919] with length 3
last10PointsDistances = [ 265.46223158  152.29797636  157.74626673  134.12190919    0.        ] with length 5, shape (5,)
len(last10PointsDistances) = 5, len(last5MinsDistances) = 3
Too few points to make a decision, continuing
------------------------------2015-08-23 11:49:12------------------------------
last5MinsDistances = [ 287.83291781  287.70233809  404.13243507  270.5016835 ] with length 4
last10PointsDistances = [ 303.41548914  287.83291781  287.70233809  404.13243507  270.5016835     0.        ] with length 6, shape (6,)
len(last10PointsDistances) = 6, len(last5MinsDistances) = 4
Too few points to make a decision, continuing
------------------------------2015-08-23 11:49:43------------------------------
last5MinsDistances = [ 287.8383988   287.70711285  404.15584789  270.52419845    0.03461637] with length 5
last10PointsDistances = [ 303.40701712  287.8383988   287.70711285  404.15584789  270.52419845
    0.03461637    0.        ] with length 7, shape (7,)
len(last10PointsDistances) = 7, len(last5MinsDistances) = 5
Too few points to make a decision, continuing
------------------------------2015-08-23 11:50:45------------------------------
last5MinsDistances = [ 444.7109169   579.82342568  446.19147488  175.70753057  175.68454269] with length 5
last10PointsDistances = [ 427.65489621  446.11730334  444.7109169   579.82342568  446.19147488
  175.70753057  175.68454269    0.        ] with length 8, shape (8,)
len(last10PointsDistances) = 8, len(last5MinsDistances) = 5
Too few points to make a decision, continuing
------------------------------2015-08-23 11:52:48------------------------------
last5MinsDistances = [ 2593.87187147  2350.81630256  2350.80844227  2197.98655405] with length 4
last10PointsDistances = [ 2624.14082494  2638.0188262   2637.46344015  2710.07577734  2593.87187147
  2350.81630256  2350.80844227  2197.98655405     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 4
last5MinsDistances.max() = 2593.87187147, last10PointsDistance.max() = 2710.07577734
------------------------------2015-08-23 11:53:20------------------------------
last5MinsDistances = [ 2454.65774524  2454.65195156  2307.49479631   179.39606139] with length 4
last10PointsDistances = [ 2742.47970945  2742.24535146  2802.5111941   2690.27755746  2454.65774524
  2454.65195156  2307.49479631   179.39606139     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 4
last5MinsDistances.max() = 2454.65774524, last10PointsDistance.max() = 2802.5111941
------------------------------2015-08-23 11:53:50------------------------------
last5MinsDistances = [ 2554.76759421  2554.76217063  2408.60555229   269.24723306   103.72150066] with length 5
last10PointsDistances = [ 2842.42317777  2900.21063354  2788.86612935  2554.76759421  2554.76217063
  2408.60555229   269.24723306   103.72150066     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 5
last5MinsDistances.max() = 2554.76759421, last10PointsDistance.max() = 2900.21063354
------------------------------2015-08-23 11:54:21------------------------------
last5MinsDistances = [ 3139.60835846  2994.42081734   821.90912539   688.22196415   586.05574574] with length 5
last10PointsDistances = [ 3480.90860511  3371.31803313  3139.61332724  3139.60835846  2994.42081734
   821.90912539   688.22196415   586.05574574     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 5
last5MinsDistances.max() = 3139.60835846, last10PointsDistance.max() = 3480.90860511
------------------------------2015-08-23 11:54:51------------------------------
last5MinsDistances = [ 3384.7879053   1205.82524648  1078.12291565   976.30069776   390.37824611] with length 5
last10PointsDistances = [ 3760.90783664  3529.88960164  3529.88472468  3384.7879053   1205.82524648
  1078.12291565   976.30069776   390.37824611     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 5
last5MinsDistances.max() = 3384.7879053, last10PointsDistance.max() = 3760.90783664
------------------------------2015-08-23 11:55:23------------------------------
last5MinsDistances = [ 4085.58145296  1900.72597137  1778.42748868  1676.98277083  1091.28555487
   700.93552385] with length 6
last10PointsDistances = [ 4230.81256422  4230.80772445  4085.58145296  1900.72597137  1778.42748868
  1676.98277083  1091.28555487   700.93552385     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 6
last5MinsDistances.max() = 4085.58145296, last10PointsDistance.max() = 4230.81256422
------------------------------2015-08-23 11:56:31------------------------------
last5MinsDistances = [ 3260.33763338  3139.77178587  3038.22041955  2452.31454642  2061.95330177
  1361.35436876] with length 6
last10PointsDistances = [ 5591.18303009  5446.73518195  3260.33763338  3139.77178587  3038.22041955
  2452.31454642  2061.95330177  1361.35436876     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 6
last5MinsDistances.max() = 3260.33763338, last10PointsDistance.max() = 5591.18303009
------------------------------2015-08-23 11:57:02------------------------------
last5MinsDistances = [ 3730.01385303  3609.57433903  3507.97647455  2922.02986479  2531.68730249
  1831.17427223   469.83903852] with length 7
last10PointsDistances = [ 5916.43539418  3730.01385303  3609.57433903  3507.97647455  2922.02986479
  2531.68730249  1831.17427223   469.83903852     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 7
last5MinsDistances.max() = 3730.01385303, last10PointsDistance.max() = 5916.43539418
------------------------------2015-08-23 11:57:32------------------------------
last5MinsDistances = [ 3703.78853955  3583.04176726  3481.39762512  2895.42516933  2505.09934994
  1804.68156594   443.46867899    27.70588444] with length 8
last10PointsDistances = [ 3703.78853955  3583.04176726  3481.39762512  2895.42516933  2505.09934994
  1804.68156594   443.46867899    27.70588444     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 8
last5MinsDistances.max() = 3703.78853955, last10PointsDistance.max() = 3703.78853955
------------------------------2015-08-23 11:57:55------------------------------
last5MinsDistances = [ 3580.03376219  3478.40918032  2892.44747801  2502.11399759  1801.65487689
   440.37905532    29.90199074     4.4849976 ] with length 8
last10PointsDistances = [ 3580.03376219  3478.40918032  2892.44747801  2502.11399759  1801.65487689
   440.37905532    29.90199074     4.4849976      0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 8
last5MinsDistances.max() = 3580.03376219, last10PointsDistance.max() = 3580.03376219
------------------------------2015-08-23 11:58:04------------------------------
last5MinsDistances = [ 3584.88936308  3483.25810306  2897.29260491  2506.9617122   1806.51638899
   445.25878136    25.34942826     2.87704916     4.98379674] with length 9
last10PointsDistances = [ 3483.25810306  2897.29260491  2506.9617122   1806.51638899   445.25878136
    25.34942826     2.87704916     4.98379674     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 9
last5MinsDistances.max() = 3584.88936308, last10PointsDistance.max() = 3483.25810306
------------------------------2015-08-23 11:58:34------------------------------
last5MinsDistances = [ 3884.28661452  3298.36459023  2908.01097912  2207.41121249   846.06898874
   376.38784685   403.20062513   406.06407354   401.25687719] with length 9
last10PointsDistances = [ 3298.36459023  2908.01097912  2207.41121249   846.06898874   376.38784685
   403.20062513   406.06407354   401.25687719     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 9
last5MinsDistances.max() = 3884.28661452, last10PointsDistance.max() = 3298.36459023
------------------------------2015-08-23 11:59:14------------------------------
last5MinsDistances = [ 4049.18453026  3658.83444542  2958.23003287  1596.89541597  1127.16182086
  1153.8337464   1156.77307196  1151.93994095   750.82666028] with length 9
last10PointsDistances = [ 3658.83444542  2958.23003287  1596.89541597  1127.16182086  1153.8337464
  1156.77307196  1151.93994095   750.82666028     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 9
last5MinsDistances.max() = 4049.18453026, last10PointsDistance.max() = 3658.83444542
------------------------------2015-08-23 11:59:36------------------------------
last5MinsDistances = [ 4211.16583226  3510.56777423  2149.23260296  1679.48306863  1706.12336695
  1709.07870746  1704.24022906  1303.1636151    552.33810809] with length 9
last10PointsDistances = [ 3510.56777423  2149.23260296  1679.48306863  1706.12336695  1709.07870746
  1704.24022906  1303.1636151    552.33810809     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 9
last5MinsDistances.max() = 4211.16583226, last10PointsDistance.max() = 3510.56777423
------------------------------2015-08-23 11:59:55------------------------------
last5MinsDistances = [ 3584.15911148  2223.32091458  1753.66064453  1779.86181742  1782.98997826
  1778.09551293  1378.44386338   631.47469273   117.55280856] with length 9
last10PointsDistances = [ 2223.32091458  1753.66064453  1779.86181742  1782.98997826  1778.09551293
  1378.44386338   631.47469273   117.55280856     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 9
last5MinsDistances.max() = 3584.15911148, last10PointsDistance.max() = 2223.32091458
------------------------------2015-08-23 12:00:47------------------------------
last5MinsDistances = [ 2423.84685492  1958.20052882  1983.16796283  1986.64874282  1981.67823947
  1589.97617899   870.2424108    416.55850397   299.01699733] with length 9
last10PointsDistances = [ 1958.20052882  1983.16796283  1986.64874282  1981.67823947  1589.97617899
   870.2424108    416.55850397   299.01699733     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 9
last5MinsDistances.max() = 2423.84685492, last10PointsDistance.max() = 1986.64874282
------------------------------2015-08-23 12:00:58------------------------------
last5MinsDistances = [ 2469.49162684  2002.63780091  2027.87851432  2031.29302086  2026.33225927
  1632.47032692   904.15785103   421.13274388   305.21134255    64.3948856 ] with length 10
last10PointsDistances = [ 2027.87851432  2031.29302086  2026.33225927  1632.47032692   904.15785103
   421.13274388   305.21134255    64.3948856      0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 10
last5MinsDistances.max() = 2469.49162684, last10PointsDistance.max() = 2031.29302086
------------------------------2015-08-23 12:01:49------------------------------
last5MinsDistances = [ 2460.82728619  2486.50924569  2489.805296    2484.86760008  2087.79359372
  1346.02805664   810.5991557    715.70318138   522.30800622   467.21741658] with length 10
last10PointsDistances = [ 2489.805296    2484.86760008  2087.79359372  1346.02805664   810.5991557
   715.70318138   522.30800622   467.21741658     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 10
last5MinsDistances.max() = 2489.805296, last10PointsDistance.max() = 2489.805296
------------------------------2015-08-23 12:02:20------------------------------
last5MinsDistances = [ 2770.02161844  2773.58293339  2768.60401022  2379.08078511  1656.58938672
  1147.84362926  1041.78207901   789.82759017   752.43153619   372.39895099] with length 10
last10PointsDistances = [ 2768.60401022  2379.08078511  1656.58938672  1147.84362926  1041.78207901
   789.82759017   752.43153619   372.39895099     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 10
last5MinsDistances.max() = 2773.58293339, last10PointsDistance.max() = 2768.60401022
------------------------------2015-08-23 12:02:51------------------------------
last5MinsDistances = [ 3194.41777883  3189.44048831  2811.35706844  2115.57777627  1634.29670353
  1523.07760422  1247.47804825  1221.91119828   879.73662714   507.37133328] with length 10
last10PointsDistances = [ 2811.35706844  2115.57777627  1634.29670353  1523.07760422  1247.47804825
  1221.91119828   879.73662714   507.37133328     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 10
last5MinsDistances.max() = 3194.41777883, last10PointsDistance.max() = 2811.35706844
------------------------------2015-08-23 12:03:22------------------------------
last5MinsDistances = [ 3141.45639679  2459.60494334  1989.10041872  1876.69220673  1595.88918247
  1573.67304427  1237.71093626   865.61927211   358.83194953] with length 9
last10PointsDistances = [ 2459.60494334  1989.10041872  1876.69220673  1595.88918247  1573.67304427
  1237.71093626   865.61927211   358.83194953     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 9
last5MinsDistances.max() = 3141.45639679, last10PointsDistance.max() = 2459.60494334
------------------------------2015-08-23 12:03:53------------------------------
last5MinsDistances = [ 2999.57403504  2545.0448051   2431.16883249  2144.74747029  2126.59589715
  1802.08506011  1429.94769594   922.80999012   564.37479721] with length 9
last10PointsDistances = [ 2545.0448051   2431.16883249  2144.74747029  2126.59589715  1802.08506011
  1429.94769594   922.80999012   564.37479721     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 9
last5MinsDistances.max() = 2999.57403504, last10PointsDistance.max() = 2545.0448051
------------------------------2015-08-23 12:04:27------------------------------
last5MinsDistances = [ 3052.65179176  2938.18342154  2649.53286922  2633.21651563  2312.47328081
  1940.44056444  1433.39328447  1074.82131311   510.60208646] with length 9
last10PointsDistances = [ 2938.18342154  2649.53286922  2633.21651563  2312.47328081  1940.44056444
  1433.39328447  1074.82131311   510.60208646     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 9
last5MinsDistances.max() = 3052.65179176, last10PointsDistance.max() = 2938.18342154
------------------------------2015-08-23 12:04:58------------------------------
last5MinsDistances = [ 3021.44880196  3007.08518154  2694.05893848  2321.81322543  1814.49844797
  1456.40966869   892.09807546   383.18099719] with length 8
last10PointsDistances = [ 3021.44880196  3007.08518154  2694.05893848  2321.81322543  1814.49844797
  1456.40966869   892.09807546   383.18099719     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 8
last5MinsDistances.max() = 3021.44880196, last10PointsDistance.max() = 3021.44880196
------------------------------2015-08-23 12:05:17------------------------------
last5MinsDistances = [ 3030.77997074  3016.46215777  2703.62222345  2331.37239836  1824.05396771
  1465.9788134    901.6736767    392.79042511     9.61044519] with length 9
last10PointsDistances = [ 3016.46215777  2703.62222345  2331.37239836  1824.05396771  1465.9788134
   901.6736767    392.79042511     9.61044519     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 9
last5MinsDistances.max() = 3030.77997074, last10PointsDistance.max() = 3016.46215777
------------------------------2015-08-23 12:05:54------------------------------
last5MinsDistances = [ 2991.966054    2688.62615532  2316.22874702  1808.99801369  1452.45405323
   890.08683399   391.33766655    79.0511357     79.48172459] with length 9
last10PointsDistances = [ 2688.62615532  2316.22874702  1808.99801369  1452.45405323   890.08683399
   391.33766655    79.0511357     79.48172459     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 9
last5MinsDistances.max() = 2991.966054, last10PointsDistance.max() = 2688.62615532
------------------------------2015-08-23 12:06:33------------------------------
last5MinsDistances = [ 2552.04336738  2181.84809886  1680.52152941  1335.88612485   803.04869757
   418.22893824   362.3932174    365.94402096   290.53873528] with length 9
last10PointsDistances = [ 2181.84809886  1680.52152941  1335.88612485   803.04869757   418.22893824
   362.3932174    365.94402096   290.53873528     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 9
last5MinsDistances.max() = 2552.04336738, last10PointsDistance.max() = 2181.84809886
------------------------------2015-08-23 12:07:04------------------------------
last5MinsDistances = [ 2127.4614865   1627.83675414  1286.16423428   762.75779481   416.71786339
   416.66656573   421.04594071   348.41219504    66.01598571] with length 9
last10PointsDistances = [ 1627.83675414  1286.16423428   762.75779481   416.71786339   416.66656573
   421.04594071   348.41219504    66.01598571     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 9
last5MinsDistances.max() = 2127.4614865, last10PointsDistance.max() = 1627.83675414
------------------------------2015-08-23 12:08:51------------------------------
last5MinsDistances = [ 744.80681016  373.92196441  373.3135464   378.20005989  308.11410454
   58.42197015   49.28348608] with length 7
last10PointsDistances = [ 1277.7955497    744.80681016   373.92196441   373.3135464    378.20005989
   308.11410454    58.42197015    49.28348608     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 7
last5MinsDistances.max() = 744.806810161, last10PointsDistance.max() = 1277.7955497
------------------------------2015-08-23 12:09:26------------------------------
last5MinsDistances = [ 407.77627321  383.83932723  387.98718738  314.57922596   33.45278027
   34.67216744   34.68810824] with length 7
last10PointsDistances = [ 776.21262869  407.77627321  383.83932723  387.98718738  314.57922596
   33.45278027   34.67216744   34.68810824    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 7
last5MinsDistances.max() = 407.776273207, last10PointsDistance.max() = 776.212628687
------------------------------2015-08-23 12:09:38------------------------------
last5MinsDistances = [ 392.28715648  396.50496531  323.33058345   41.72479339   25.6268009
   35.67762031    9.05062729] with length 7
last10PointsDistances = [ 409.58785294  392.28715648  396.50496531  323.33058345   41.72479339
   25.6268009    35.67762031    9.05062729    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 7
last5MinsDistances.max() = 396.504965306, last10PointsDistance.max() = 409.587852937
------------------------------2015-08-23 12:09:45------------------------------
last5MinsDistances = [ 395.95921302  400.18198282  327.01009313   44.68804298   22.07835887
   37.66288923   12.62285449    3.68180034] with length 8
last10PointsDistances = [ 395.95921302  400.18198282  327.01009313   44.68804298   22.07835887
   37.66288923   12.62285449    3.68180034    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 8
last5MinsDistances.max() = 400.181982819, last10PointsDistance.max() = 400.181982819
------------------------------2015-08-23 12:10:01------------------------------
last5MinsDistances = [ 370.65539735  295.32836441    4.86181822   61.52771957   56.77550404
   29.67661142   37.62651159   40.45116945] with length 8
last10PointsDistances = [ 370.65539735  295.32836441    4.86181822   61.52771957   56.77550404
   29.67661142   37.62651159   40.45116945    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 8
last5MinsDistances.max() = 370.655397348, last10PointsDistance.max() = 370.655397348
------------------------------2015-08-23 12:10:46------------------------------
last5MinsDistances = [ 296.87478346    6.99191417   62.48952974   60.40547008   31.94376941
   39.39938994   41.98757556    4.12539792] with length 8
last10PointsDistances = [ 296.87478346    6.99191417   62.48952974   60.40547008   31.94376941
   39.39938994   41.98757556    4.12539792    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 8
last5MinsDistances.max() = 296.874783456, last10PointsDistance.max() = 296.874783456
------------------------------2015-08-23 12:11:18------------------------------
last5MinsDistances = [  5.72699788  66.76093484  62.98639474  35.78063842  43.46126222
  46.128419     6.35395772   4.30633653] with length 8
last10PointsDistances = [  5.72699788  66.76093484  62.98639474  35.78063842  43.46126222
  46.128419     6.35395772   4.30633653   0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 8
last5MinsDistances.max() = 66.7609348357, last10PointsDistance.max() = 66.7609348357
Found trip end at 2015-08-23 12:06:33
------------------------------2015-08-23 12:11:29------------------------------
last5MinsDistances = [] with length 0
last10PointsDistances = [ 0.] with length 1, shape (1,)
len(last10PointsDistances) = 1, len(last5MinsDistances) = 0
Too few points to make a decision, continuing
------------------------------2015-08-23 12:12:05------------------------------
last5MinsDistances = [ 1.79026011] with length 1
last10PointsDistances = [ 1.79026011  0.        ] with length 2, shape (2,)
len(last10PointsDistances) = 2, len(last5MinsDistances) = 1
Too few points to make a decision, continuing
------------------------------2015-08-23 12:25:53------------------------------
last5MinsDistances = [] with length 0
last10PointsDistances = [ 283.39637256  284.31972585    0.        ] with length 3, shape (3,)
len(last10PointsDistances) = 3, len(last5MinsDistances) = 0
Too few points to make a decision, continuing
------------------------------2015-08-23 12:26:27------------------------------
last5MinsDistances = [ 557.05095103] with length 1
last10PointsDistances = [ 839.71016124  840.53909701  557.05095103    0.        ] with length 4, shape (4,)
len(last10PointsDistances) = 4, len(last5MinsDistances) = 1
Too few points to make a decision, continuing
------------------------------2015-08-23 12:27:01------------------------------
last5MinsDistances = [ 890.36567429  336.14628781] with length 2
last10PointsDistances = [ 1173.68500854  1174.57385362   890.36567429   336.14628781     0.        ] with length 5, shape (5,)
len(last10PointsDistances) = 5, len(last5MinsDistances) = 2
Too few points to make a decision, continuing
------------------------------2015-08-23 12:27:32------------------------------
last5MinsDistances = [ 931.04820808  377.24167772   41.14195065] with length 3
last10PointsDistances = [ 1214.40096275  1215.29744634   931.04820808   377.24167772    41.14195065
     0.        ] with length 6, shape (6,)
len(last10PointsDistances) = 6, len(last5MinsDistances) = 3
Too few points to make a decision, continuing
------------------------------2015-08-23 12:28:04------------------------------
last5MinsDistances = [ 1117.34661956   562.28105723   226.989566     186.51046612] with length 4
last10PointsDistances = [ 1400.64953321  1401.53412317  1117.34661956   562.28105723   226.989566
   186.51046612     0.        ] with length 7, shape (7,)
len(last10PointsDistances) = 7, len(last5MinsDistances) = 4
Too few points to make a decision, continuing
------------------------------2015-08-23 12:28:21------------------------------
last5MinsDistances = [ 1292.61552138   746.73458616   413.65598858   372.90855778   207.16736046] with length 5
last10PointsDistances = [ 1575.54805363  1576.54630274  1292.61552138   746.73458616   413.65598858
   372.90855778   207.16736046     0.        ] with length 8, shape (8,)
len(last10PointsDistances) = 8, len(last5MinsDistances) = 5
Too few points to make a decision, continuing
------------------------------2015-08-23 12:28:52------------------------------
last5MinsDistances = [ 1300.91216042   756.76067555   424.89843509   384.36253423   222.11444829
    17.44499146] with length 6
last10PointsDistances = [ 1583.65396171  1584.66668796  1300.91216042   756.76067555   424.89843509
   384.36253423   222.11444829    17.44499146     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 6
last5MinsDistances.max() = 1300.91216042, last10PointsDistance.max() = 1584.66668796
------------------------------2015-08-23 12:29:23------------------------------
last5MinsDistances = [ 1759.41179175  1210.42132333   874.67147965   833.5305093    652.05954434
   467.08041451   459.77671298] with length 7
last10PointsDistances = [ 2043.46148186  1759.41179175  1210.42132333   874.67147965   833.5305093
   652.05954434   467.08041451   459.77671298     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 7
last5MinsDistances.max() = 1759.41179175, last10PointsDistance.max() = 2043.46148186
------------------------------2015-08-23 12:29:53------------------------------
last5MinsDistances = [ 2019.22816742  1465.61620929  1129.71958803  1088.76736573   903.39479166
   732.45130954   726.95887536   274.10015812] with length 8
last10PointsDistances = [ 2019.22816742  1465.61620929  1129.71958803  1088.76736573   903.39479166
   732.45130954   726.95887536   274.10015812     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 8
last5MinsDistances.max() = 2019.22816742, last10PointsDistance.max() = 2019.22816742
------------------------------2015-08-23 12:30:59------------------------------
last5MinsDistances = [ 1507.32382709  1204.46540146  1169.73058767   998.63737568   923.04558023
   928.22058963   658.8624072    539.42122658] with length 8
last10PointsDistances = [ 1507.32382709  1204.46540146  1169.73058767   998.63737568   923.04558023
   928.22058963   658.8624072    539.42122658     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 8
last5MinsDistances.max() = 1507.32382709, last10PointsDistance.max() = 1507.32382709
------------------------------2015-08-23 12:31:19------------------------------
last5MinsDistances = [ 1507.56503418  1204.70246996  1169.96666543   998.86908404   923.25830164
   928.4311805    658.99344971   539.45844144     0.24252232] with length 9
last10PointsDistances = [ 1204.70246996  1169.96666543   998.86908404   923.25830164   928.4311805
   658.99344971   539.45844144     0.24252232     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 9
last5MinsDistances.max() = 1507.56503418, last10PointsDistance.max() = 1204.70246996
------------------------------2015-08-23 12:31:50------------------------------
last5MinsDistances = [ 1209.23951593  1174.56070786  1003.66016457   928.49226317   933.69468568
   664.4015902    544.00242294     5.6703574      5.50123956] with length 9
last10PointsDistances = [ 1174.56070786  1003.66016457   928.49226317   933.69468568   664.4015902
   544.00242294     5.6703574      5.50123956     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 9
last5MinsDistances.max() = 1209.23951593, last10PointsDistance.max() = 1174.56070786
------------------------------2015-08-23 12:32:26------------------------------
last5MinsDistances = [ 1106.11812617   922.70152752   801.84342508   802.75799677   447.67801029
   292.69840906   246.82014091   246.85245468   251.34427552] with length 9
last10PointsDistances = [ 922.70152752  801.84342508  802.75799677  447.67801029  292.69840906
  246.82014091  246.85245468  251.34427552    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 9
last5MinsDistances.max() = 1106.11812617, last10PointsDistance.max() = 922.701527516
------------------------------2015-08-23 12:33:02------------------------------
last5MinsDistances = [ 924.33651084  804.4992351   805.521062    452.43852162  298.3285165
  241.20908666  241.24082272  245.72557287    5.64190168] with length 9
last10PointsDistances = [ 804.4992351   805.521062    452.43852162  298.3285165   241.20908666
  241.24082272  245.72557287    5.64190168    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 9
last5MinsDistances.max() = 924.336510836, last10PointsDistance.max() = 805.521061999
------------------------------2015-08-23 12:33:33------------------------------
last5MinsDistances = [ 807.88307606  455.85632916  301.90456958  237.67682248  237.70751115
  242.17880724    9.28949641    3.6834772 ] with length 8
last10PointsDistances = [ 807.88307606  455.85632916  301.90456958  237.67682248  237.70751115
  242.17880724    9.28949641    3.6834772     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 8
last5MinsDistances.max() = 807.883076061, last10PointsDistance.max() = 807.883076061
------------------------------2015-08-23 12:34:05------------------------------
last5MinsDistances = [ 445.69745302  292.50438166  246.93236124  246.9676598   251.49824394
    3.07064736    6.77352327   10.35932898] with length 8
last10PointsDistances = [ 445.69745302  292.50438166  246.93236124  246.9676598   251.49824394
    3.07064736    6.77352327   10.35932898    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 8
last5MinsDistances.max() = 445.697453025, last10PointsDistance.max() = 445.697453025
------------------------------2015-08-23 12:34:37------------------------------
last5MinsDistances = [ 292.60162903  246.83650121  246.87171243  251.40117882    2.97814074
    6.64466003   10.23371673    0.13143804] with length 8
last10PointsDistances = [ 292.60162903  246.83650121  246.87171243  251.40117882    2.97814074
    6.64466003   10.23371673    0.13143804    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 8
last5MinsDistances.max() = 292.601629033, last10PointsDistance.max() = 292.601629033
------------------------------2015-08-23 12:35:08------------------------------
last5MinsDistances = [ 250.54937811  250.58299322  255.09147796    3.96564654    9.53698829
   13.21239496    4.01492424    4.06369812] with length 8
last10PointsDistances = [ 250.54937811  250.58299322  255.09147796    3.96564654    9.53698829
   13.21239496    4.01492424    4.06369812    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 8
last5MinsDistances.max() = 255.091477959, last10PointsDistance.max() = 255.091477959
------------------------------2015-08-23 12:35:38------------------------------
last5MinsDistances = [ 250.89972618  250.93296469  255.43651665    4.19094524    9.81267242
   13.47546685    4.50485878    4.54788108    0.52644942] with length 9
last10PointsDistances = [ 250.93296469  255.43651665    4.19094524    9.81267242   13.47546685
    4.50485878    4.54788108    0.52644942    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 9
last5MinsDistances.max() = 255.436516652, last10PointsDistance.max() = 255.436516652
------------------------------2015-08-23 12:36:11------------------------------
last5MinsDistances = [ 247.65431298  252.17933291    2.75212273    7.16178197   10.80438283
    0.81560785    0.85733965    3.20635973    3.6918407 ] with length 9
last10PointsDistances = [ 252.17933291    2.75212273    7.16178197   10.80438283    0.81560785
    0.85733965    3.20635973    3.6918407     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 9
last5MinsDistances.max() = 252.179332908, last10PointsDistance.max() = 252.179332908
------------------------------2015-08-23 12:36:41------------------------------
last5MinsDistances = [ 251.75209517    2.86383483    6.87775917   10.49326401    0.34508512
    0.37971072    3.68437775    4.16989398    0.4782198 ] with length 9
last10PointsDistances = [  2.86383483   6.87775917  10.49326401   0.34508512   0.37971072
   3.68437775   4.16989398   0.4782198    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 9
last5MinsDistances.max() = 251.752095167, last10PointsDistance.max() = 10.4932640073
------------------------------2015-08-23 12:37:13------------------------------
last5MinsDistances = [  2.89523062   7.05081916  10.67355016   0.51149666   0.56956603
   3.50354253   3.99354966   0.31057661   0.1986393 ] with length 9
last10PointsDistances = [  7.05081916  10.67355016   0.51149666   0.56956603   3.50354253
   3.99354966   0.31057661   0.1986393    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 9
last5MinsDistances.max() = 10.6735501577, last10PointsDistance.max() = 10.6735501577
Found trip end at 2015-08-23 12:32:26
------------------------------2015-08-23 12:37:44------------------------------
last5MinsDistances = [] with length 0
last10PointsDistances = [ 0.] with length 1, shape (1,)
len(last10PointsDistances) = 1, len(last5MinsDistances) = 0
Too few points to make a decision, continuing
------------------------------2015-08-23 16:20:41------------------------------
last5MinsDistances = [] with length 0
last10PointsDistances = [ 135.8417028    0.       ] with length 2, shape (2,)
len(last10PointsDistances) = 2, len(last5MinsDistances) = 0
Too few points to make a decision, continuing
------------------------------2015-08-23 16:21:11------------------------------
last5MinsDistances = [ 169.53393836] with length 1
last10PointsDistances = [ 297.61256212  169.53393836    0.        ] with length 3, shape (3,)
len(last10PointsDistances) = 3, len(last5MinsDistances) = 1
Too few points to make a decision, continuing
------------------------------2015-08-23 16:21:46------------------------------
last5MinsDistances = [ 187.56833365   35.40658966] with length 2
last10PointsDistances = [ 308.11718157  187.56833365   35.40658966    0.        ] with length 4, shape (4,)
len(last10PointsDistances) = 4, len(last5MinsDistances) = 2
Too few points to make a decision, continuing
------------------------------2015-08-23 16:22:18------------------------------
last5MinsDistances = [ 187.24684786   21.18514615   19.82771071] with length 3
last10PointsDistances = [ 312.50940742  187.24684786   21.18514615   19.82771071    0.        ] with length 5, shape (5,)
len(last10PointsDistances) = 5, len(last5MinsDistances) = 3
Too few points to make a decision, continuing
------------------------------2015-08-23 16:22:48------------------------------
last5MinsDistances = [ 265.28501323   95.75145625   86.68496397   79.43321107] with length 4
last10PointsDistances = [ 391.9414239   265.28501323   95.75145625   86.68496397   79.43321107
    0.        ] with length 6, shape (6,)
len(last10PointsDistances) = 6, len(last5MinsDistances) = 4
Too few points to make a decision, continuing
------------------------------2015-08-23 16:23:03------------------------------
last5MinsDistances = [ 253.81560399   84.40578803   78.47924749   69.23415138   12.67417739] with length 5
last10PointsDistances = [ 381.41534924  253.81560399   84.40578803   78.47924749   69.23415138
   12.67417739    0.        ] with length 7, shape (7,)
len(last10PointsDistances) = 7, len(last5MinsDistances) = 5
Too few points to make a decision, continuing
------------------------------2015-08-23 16:23:49------------------------------
last5MinsDistances = [ 391.38286527  223.14070128  215.94965389  208.57916428  129.52109805
  139.37727873] with length 6
last10PointsDistances = [ 520.66097067  391.38286527  223.14070128  215.94965389  208.57916428
  129.52109805  139.37727873    0.        ] with length 8, shape (8,)
len(last10PointsDistances) = 8, len(last5MinsDistances) = 6
Too few points to make a decision, continuing
------------------------------2015-08-23 16:24:19------------------------------
last5MinsDistances = [ 429.84860954  260.56291188  249.70121015  244.50466992  165.14071194
  176.1577446    43.7815352 ] with length 7
last10PointsDistances = [ 556.95963494  429.84860954  260.56291188  249.70121015  244.50466992
  165.14071194  176.1577446    43.7815352     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 7
last5MinsDistances.max() = 429.848609541, last10PointsDistance.max() = 556.95963494
------------------------------2015-08-23 16:24:37------------------------------
last5MinsDistances = [ 433.55060142  264.28471693  253.47759061  248.25695005  168.88524499
  179.88092544   46.78663271    3.78014476] with length 8
last10PointsDistances = [ 433.55060142  264.28471693  253.47759061  248.25695005  168.88524499
  179.88092544   46.78663271    3.78014476    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 8
last5MinsDistances.max() = 433.550601422, last10PointsDistance.max() = 433.550601422
------------------------------2015-08-23 16:25:10------------------------------
last5MinsDistances = [ 432.7973999   263.36669883  251.63253349  246.95625949  167.74294498
  178.98997446   49.50012976    7.07256157    7.26258174] with length 9
last10PointsDistances = [ 263.36669883  251.63253349  246.95625949  167.74294498  178.98997446
   49.50012976    7.07256157    7.26258174    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 9
last5MinsDistances.max() = 432.797399902, last10PointsDistance.max() = 263.366698827
------------------------------2015-08-23 16:25:18------------------------------
last5MinsDistances = [ 428.29270102  259.19785851  249.14207274  243.47475901  164.04686621
  174.83501078   39.91844391    6.1419429     7.39766778   13.17267571] with length 10
last10PointsDistances = [ 249.14207274  243.47475901  164.04686621  174.83501078   39.91844391
    6.1419429     7.39766778   13.17267571    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 10
last5MinsDistances.max() = 428.292701023, last10PointsDistance.max() = 249.142072737
------------------------------2015-08-23 16:25:58------------------------------
last5MinsDistances = [ 263.96616847  253.44462459  248.05696028  168.65640996  179.57236577
   45.57925026    4.41865186    2.19564147    9.38751597    5.75180112] with length 10
last10PointsDistances = [ 248.05696028  168.65640996  179.57236577   45.57925026    4.41865186
    2.19564147    9.38751597    5.75180112    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 10
last5MinsDistances.max() = 263.966168471, last10PointsDistance.max() = 248.056960283
------------------------------2015-08-23 16:26:09------------------------------
last5MinsDistances = [ 260.67589139  250.26462123  244.80599128  165.39721152  176.28663087
   42.32966731    3.42124263    4.55667104   10.28984852    2.97278628
    3.34870561] with length 11
last10PointsDistances = [ 165.39721152  176.28663087   42.32966731    3.42124263    4.55667104
   10.28984852    2.97278628    3.34870561    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 11
last5MinsDistances.max() = 260.675891395, last10PointsDistance.max() = 176.286630872
------------------------------2015-08-23 16:26:28------------------------------
last5MinsDistances = [ 245.68462375  240.17457639  160.76144986  171.63741302   38.07276531
    5.79904067    8.78116204   12.45863436    3.93984102    7.98576368
    4.65643956] with length 11
last10PointsDistances = [ 171.63741302   38.07276531    5.79904067    8.78116204   12.45863436
    3.93984102    7.98576368    4.65643956    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 11
last5MinsDistances.max() = 245.684623747, last10PointsDistance.max() = 171.637413024
------------------------------2015-08-23 16:27:14------------------------------
last5MinsDistances = [ 242.84095428  163.42539036  174.28803201   40.244092      4.46935264
    6.57236479   11.5385616     1.99821617    5.44409018    2.1048715
    2.67971864] with length 11
last10PointsDistances = [ 40.244092     4.46935264   6.57236479  11.5385616    1.99821617
   5.44409018   2.1048715    2.67971864   0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 11
last5MinsDistances.max() = 242.84095428, last10PointsDistance.max() = 40.2440920005
------------------------------2015-08-23 16:27:44------------------------------
last5MinsDistances = [ 160.08155022  170.8509327    36.14728375    8.25421394   10.7025397
   15.12889135    4.0032833     9.44346014    6.18833547    2.77705026
    4.13060945] with length 11
last10PointsDistances = [  8.25421394  10.7025397   15.12889135   4.0032833    9.44346014
   6.18833547   2.77705026   4.13060945   0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 11
last5MinsDistances.max() = 170.850932704, last10PointsDistance.max() = 15.1288913542
------------------------------2015-08-23 16:28:15------------------------------
last5MinsDistances = [ 39.97050434   4.21626583   6.82395677  11.20360431   2.84242566
   5.96055852   2.64096202   2.02555531   0.92261299   4.05809723] with length 10
last10PointsDistances = [  6.82395677  11.20360431   2.84242566   5.96055852   2.64096202
   2.02555531   0.92261299   4.05809723   0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 10
last5MinsDistances.max() = 39.9705043361, last10PointsDistance.max() = 11.2036043146
Found trip end at 2015-08-23 16:23:49
------------------------------2015-08-23 16:28:35------------------------------
last5MinsDistances = [] with length 0
last10PointsDistances = [ 0.] with length 1, shape (1,)
len(last10PointsDistances) = 1, len(last5MinsDistances) = 0
Too few points to make a decision, continuing
------------------------------2015-08-23 16:47:23------------------------------
last5MinsDistances = [] with length 0
last10PointsDistances = [ 195.24458411    0.        ] with length 2, shape (2,)
len(last10PointsDistances) = 2, len(last5MinsDistances) = 0
Too few points to make a decision, continuing
------------------------------2015-08-23 16:47:54------------------------------
last5MinsDistances = [ 94.89344644] with length 1
last10PointsDistances = [ 287.13683841   94.89344644    0.        ] with length 3, shape (3,)
len(last10PointsDistances) = 3, len(last5MinsDistances) = 1
Too few points to make a decision, continuing
------------------------------2015-08-23 16:48:28------------------------------
last5MinsDistances = [ 166.13387383   74.13739275] with length 2
last10PointsDistances = [ 351.48484906  166.13387383   74.13739275    0.        ] with length 4, shape (4,)
len(last10PointsDistances) = 4, len(last5MinsDistances) = 2
Too few points to make a decision, continuing
------------------------------2015-08-23 16:48:59------------------------------
last5MinsDistances = [ 256.52887791  162.44066302   91.24068726] with length 3
last10PointsDistances = [ 442.46334191  256.52887791  162.44066302   91.24068726    0.        ] with length 5, shape (5,)
len(last10PointsDistances) = 5, len(last5MinsDistances) = 3
Too few points to make a decision, continuing
------------------------------2015-08-23 16:49:29------------------------------
last5MinsDistances = [ 258.1527869   163.59083412   94.18926197    9.67534558] with length 4
last10PointsDistances = [ 445.66646434  258.1527869   163.59083412   94.18926197    9.67534558
    0.        ] with length 6, shape (6,)
len(last10PointsDistances) = 6, len(last5MinsDistances) = 4
Too few points to make a decision, continuing
------------------------------2015-08-23 16:50:00------------------------------
last5MinsDistances = [ 257.85855045  163.98437916   92.23593809    3.64225052   12.96690793] with length 5
last10PointsDistances = [ 443.1658378   257.85855045  163.98437916   92.23593809    3.64225052
   12.96690793    0.        ] with length 7, shape (7,)
len(last10PointsDistances) = 7, len(last5MinsDistances) = 5
Too few points to make a decision, continuing
------------------------------2015-08-23 16:50:31------------------------------
last5MinsDistances = [ 262.08877081  167.32094234  105.00527775   37.89498524   28.25668656
   41.21720425] with length 6
last10PointsDistances = [ 453.38430174  262.08877081  167.32094234  105.00527775   37.89498524
   28.25668656   41.21720425    0.        ] with length 8, shape (8,)
len(last10PointsDistances) = 8, len(last5MinsDistances) = 6
Too few points to make a decision, continuing
------------------------------2015-08-23 16:51:02------------------------------
last5MinsDistances = [ 280.46450169  195.58722365  162.9611229   130.93014968  121.49282519
  134.41065337   93.54382614] with length 7
last10PointsDistances = [ 475.39355773  280.46450169  195.58722365  162.9611229   130.93014968
  121.49282519  134.41065337   93.54382614    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 7
last5MinsDistances.max() = 280.464501691, last10PointsDistance.max() = 475.393557732
------------------------------2015-08-23 16:51:34------------------------------
last5MinsDistances = [ 348.31637821  276.10703785  257.53047582  228.69671669  219.09727741
  232.06340989  190.85212307   99.03403212] with length 8
last10PointsDistances = [ 348.31637821  276.10703785  257.53047582  228.69671669  219.09727741
  232.06340989  190.85212307   99.03403212    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 8
last5MinsDistances.max() = 348.316378214, last10PointsDistance.max() = 348.316378214
------------------------------2015-08-23 16:52:05------------------------------
last5MinsDistances = [ 373.51844305  304.00732884  287.35053087  258.05268073  248.42389428
  261.38128744  220.16723795  128.94782881   30.04745176] with length 9
last10PointsDistances = [ 304.00732884  287.35053087  258.05268073  248.42389428  261.38128744
  220.16723795  128.94782881   30.04745176    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 9
last5MinsDistances.max() = 373.518443051, last10PointsDistance.max() = 304.007328837
------------------------------2015-08-23 16:52:36------------------------------
last5MinsDistances = [ 300.25387516  283.09899441  253.54051367  243.9114012   256.86864932
  215.65476048  124.48064698   25.66546968    4.51316597] with length 9
last10PointsDistances = [ 283.09899441  253.54051367  243.9114012   256.86864932  215.65476048
  124.48064698   25.66546968    4.51316597    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 9
last5MinsDistances.max() = 300.253875162, last10PointsDistance.max() = 283.098994406
------------------------------2015-08-23 16:53:06------------------------------
last5MinsDistances = [ 286.34797208  256.65732479  247.0247697   259.98006321  218.76856637
  127.68803616   28.91277294    1.73279099    3.2508003 ] with length 9
last10PointsDistances = [ 256.65732479  247.0247697   259.98006321  218.76856637  127.68803616
   28.91277294    1.73279099    3.2508003     0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 9
last5MinsDistances.max() = 286.347972078, last10PointsDistance.max() = 259.980063211
------------------------------2015-08-23 16:53:37------------------------------
last5MinsDistances = [ 254.83821144  245.20317669  258.15692403  216.94759359  125.97200641
   27.33569593    3.64736479    2.07100224    1.94837891] with length 9
last10PointsDistances = [ 245.20317669  258.15692403  216.94759359  125.97200641   27.33569593
    3.64736479    2.07100224    1.94837891    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 9
last5MinsDistances.max() = 258.156924035, last10PointsDistance.max() = 258.156924035
------------------------------2015-08-23 16:54:09------------------------------
last5MinsDistances = [ 234.39078557  247.35116048  206.13455196  114.82341007   16.0409175
   14.12557254    9.66676151   12.89914441   11.29483834] with length 9
last10PointsDistances = [ 247.35116048  206.13455196  114.82341007   16.0409175    14.12557254
    9.66676151   12.89914441   11.29483834    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 9
last5MinsDistances.max() = 247.351160481, last10PointsDistance.max() = 247.351160481
------------------------------2015-08-23 16:54:40------------------------------
last5MinsDistances = [ 259.86155184  218.65023326  127.57852977   28.81309732    1.86476652
    3.1563184     0.13343391    1.81594364   12.79543548] with length 9
last10PointsDistances = [ 218.65023326  127.57852977   28.81309732    1.86476652    3.1563184
    0.13343391    1.81594364   12.79543548    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 9
last5MinsDistances.max() = 259.86155184, last10PointsDistance.max() = 218.650233256
------------------------------2015-08-23 16:55:12------------------------------
last5MinsDistances = [ 202.94997113  111.46142647   12.54738605   17.51659427   13.1180846
   16.3656926    14.81277232    3.5493401    16.26648151] with length 9
last10PointsDistances = [ 111.46142647   12.54738605   17.51659427   13.1180846    16.3656926
   14.81277232    3.5493401    16.26648151    0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 9
last5MinsDistances.max() = 202.949971125, last10PointsDistance.max() = 111.461426468
------------------------------2015-08-23 16:55:46------------------------------
last5MinsDistances = [ 122.2721242    23.41825165    6.67768686    2.25713143    5.50684951
    4.15596079    7.44874745    5.41337175   10.87193638] with length 9
last10PointsDistances = [ 23.41825165   6.67768686   2.25713143   5.50684951   4.15596079
   7.44874745   5.41337175  10.87193638   0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 9
last5MinsDistances.max() = 122.272124204, last10PointsDistance.max() = 23.4182516487
------------------------------2015-08-23 16:56:17------------------------------
last5MinsDistances = [ 19.60403379  10.44598801   6.15806606   9.39701741   8.03611053
   3.92546497   9.30833708   7.09790626   3.90850834] with length 9
last10PointsDistances = [ 10.44598801   6.15806606   9.39701741   8.03611053   3.92546497
   9.30833708   7.09790626   3.90850834   0.        ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 9
last5MinsDistances.max() = 19.6040337923, last10PointsDistance.max() = 10.4459880126
Found trip end at 2015-08-23 16:51:34
------------------------------2015-08-23 16:56:48------------------------------
last5MinsDistances = [] with length 0
last10PointsDistances = [ 0.] with length 1, shape (1,)
len(last10PointsDistances) = 1, len(last5MinsDistances) = 0
Too few points to make a decision, continuing

In [39]:
ipy.inline_map(lo.get_map(tom_points_time_df_aug_23))


Out[39]:

In [40]:
ipy.inline_map(lo.get_map(pd.DataFrame(tom_segment_points_aug_23)))


Out[40]:

In [41]:
def make_trip(startDict, endDict):
    start = ad.AttrDict(startDict)
    end = ad.AttrDict(endDict)
    print "-" * 20 + str(start.formatted_time) + " -> " + str(end.formatted_time) + "-" * 20
    trip = ad.AttrDict({'user_id': tomUUID, 'loc_filter': 'time',
                           'start_ts': start.mTime, 'end_ts': end.mTime,
                           'start_time': start.formatted_time, 'end_time': end.formatted_time})
    return trip

In [42]:
tom_trips_list_aug_23 = [make_trip(s1, s2) for s1, s2 in zip(tom_segment_points_aug_23, tom_segment_points_aug_23[1:])]


--------------------2015-08-23 09:46:40 -> 2015-08-23 09:57:12--------------------
--------------------2015-08-23 09:57:12 -> 2015-08-23 10:09:04--------------------
--------------------2015-08-23 10:09:04 -> 2015-08-23 12:06:33--------------------
--------------------2015-08-23 12:06:33 -> 2015-08-23 12:32:26--------------------
--------------------2015-08-23 12:32:26 -> 2015-08-23 16:23:49--------------------
--------------------2015-08-23 16:23:49 -> 2015-08-23 16:51:34--------------------

In [43]:
trip_section_map = []
for trip in tom_trips_list_aug_23:
    trip_section_map.append((trip, ss.segment_into_sections(trip)))


At 2015-08-23 09:47:34, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 09:48:18, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 09:48:49, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 09:49:21, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 09:49:52, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 09:50:23, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 09:50:54, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 09:51:28, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 09:51:59, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 09:52:30, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 09:53:02, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 09:53:33, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 09:54:31, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 09:55:07, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 09:56:05, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 09:56:38, retained existing activity Activities.IN_VEHICLE
Detected trip end! Ending section at 2015-08-23 09:57:12
At 2015-08-23 09:57:39, retained existing activity Activities.STILL
At 2015-08-23 09:58:38, found new activity Activities.ON_FOOT compared to current Activities.STILL - creating new section with start_time 2015-08-23 09:57:39
At 2015-08-23 09:59:27, retained existing activity Activities.ON_FOOT
At 2015-08-23 10:00:05, retained existing activity Activities.ON_FOOT
At 2015-08-23 10:00:49, retained existing activity Activities.ON_FOOT
At 2015-08-23 10:01:39, retained existing activity Activities.ON_FOOT
At 2015-08-23 10:02:22, retained existing activity Activities.ON_FOOT
At 2015-08-23 10:02:54, retained existing activity Activities.ON_FOOT
At 2015-08-23 10:03:28, retained existing activity Activities.ON_FOOT
Detected trip end! Ending section at 2015-08-23 10:09:04
At 2015-08-23 10:09:29, retained existing activity Activities.ON_FOOT
At 2015-08-23 10:10:12, retained existing activity Activities.ON_FOOT
At 2015-08-23 10:10:46, retained existing activity Activities.ON_FOOT
At 2015-08-23 10:11:19, retained existing activity Activities.ON_FOOT
At 2015-08-23 10:11:51, retained existing activity Activities.ON_FOOT
At 2015-08-23 10:12:49, retained existing activity Activities.ON_FOOT
At 2015-08-23 10:13:24, retained existing activity Activities.ON_FOOT
At 2015-08-23 11:45:42, retained existing activity Activities.ON_FOOT
At 2015-08-23 11:46:10, retained existing activity Activities.ON_FOOT
At 2015-08-23 11:46:41, retained existing activity Activities.ON_FOOT
At 2015-08-23 11:47:12, retained existing activity Activities.ON_FOOT
At 2015-08-23 11:48:08, found new activity Activities.IN_VEHICLE compared to current Activities.ON_FOOT - creating new section with start_time 2015-08-23 11:47:12
At 2015-08-23 11:49:08, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 11:50:10, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 11:50:41, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 11:51:11, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 11:51:46, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 11:52:18, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 11:52:49, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 11:53:47, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 11:54:48, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 11:55:24, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 11:55:58, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 11:56:31, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 11:57:27, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 11:58:32, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 11:59:14, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 11:59:53, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 12:00:16, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 12:00:47, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 12:01:18, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 12:01:50, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 12:02:19, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 12:02:48, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 12:03:23, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 12:03:54, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 12:04:27, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 12:05:17, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 12:06:30, retained existing activity Activities.IN_VEHICLE
Detected trip end! Ending section at 2015-08-23 12:06:33
At 2015-08-23 12:06:34, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 12:07:05, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 12:07:37, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 12:08:44, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 12:09:06, found new activity Activities.ON_FOOT compared to current Activities.IN_VEHICLE - creating new section with start_time 2015-08-23 12:08:44
At 2015-08-23 12:09:27, retained existing activity Activities.ON_FOOT
At 2015-08-23 12:10:07, retained existing activity Activities.ON_FOOT
At 2015-08-23 12:11:13, retained existing activity Activities.ON_FOOT
At 2015-08-23 12:11:50, retained existing activity Activities.ON_FOOT
At 2015-08-23 12:26:11, found new activity Activities.IN_VEHICLE compared to current Activities.ON_FOOT - creating new section with start_time 2015-08-23 12:11:50
At 2015-08-23 12:26:58, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 12:27:29, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 12:28:48, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 12:29:50, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 12:30:29, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 12:31:20, retained existing activity Activities.IN_VEHICLE
Detected trip end! Ending section at 2015-08-23 12:32:26
At 2015-08-23 12:32:26, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 12:33:29, retained existing activity Activities.IN_VEHICLE
At 2015-08-23 12:34:12, found new activity Activities.ON_FOOT compared to current Activities.IN_VEHICLE - creating new section with start_time 2015-08-23 12:33:29
At 2015-08-23 12:34:46, retained existing activity Activities.ON_FOOT
At 2015-08-23 12:35:26, retained existing activity Activities.ON_FOOT
At 2015-08-23 12:36:45, retained existing activity Activities.ON_FOOT
At 2015-08-23 12:37:13, retained existing activity Activities.ON_FOOT
At 2015-08-23 12:37:48, retained existing activity Activities.ON_FOOT
At 2015-08-23 16:20:47, found new activity Activities.ON_BICYCLE compared to current Activities.ON_FOOT - creating new section with start_time 2015-08-23 12:37:48
At 2015-08-23 16:21:16, retained existing activity Activities.ON_BICYCLE
At 2015-08-23 16:21:46, retained existing activity Activities.ON_BICYCLE
At 2015-08-23 16:22:18, retained existing activity Activities.ON_BICYCLE
At 2015-08-23 16:23:43, retained existing activity Activities.ON_BICYCLE
Detected trip end! Ending section at 2015-08-23 16:23:49
At 2015-08-23 16:23:49, retained existing activity Activities.ON_BICYCLE
At 2015-08-23 16:24:47, retained existing activity Activities.ON_BICYCLE
At 2015-08-23 16:25:36, found new activity Activities.ON_FOOT compared to current Activities.ON_BICYCLE - creating new section with start_time 2015-08-23 16:24:47
At 2015-08-23 16:26:05, retained existing activity Activities.ON_FOOT
At 2015-08-23 16:26:42, retained existing activity Activities.ON_FOOT
At 2015-08-23 16:27:40, retained existing activity Activities.ON_FOOT
At 2015-08-23 16:28:40, retained existing activity Activities.ON_FOOT
At 2015-08-23 16:47:23, found new activity Activities.ON_BICYCLE compared to current Activities.ON_FOOT - creating new section with start_time 2015-08-23 16:28:40
At 2015-08-23 16:47:55, retained existing activity Activities.ON_BICYCLE
At 2015-08-23 16:48:37, retained existing activity Activities.ON_BICYCLE
At 2015-08-23 16:49:57, retained existing activity Activities.ON_BICYCLE
At 2015-08-23 16:50:01, retained existing activity Activities.ON_BICYCLE
At 2015-08-23 16:50:32, retained existing activity Activities.ON_BICYCLE
At 2015-08-23 16:51:03, retained existing activity Activities.ON_BICYCLE
Detected trip end! Ending section at 2015-08-23 16:51:34

In [44]:
section_map_list_22 = lo.get_map_list_after_segmentation(trip_section_map,
                                                         cso.BoxplotOutlier(ignore_zeros=True),
                                                         cjs.SmoothZigzag())


DEBUG:root:==================== 2015-08-23 09:46:40 -> 2015-08-23 09:57:12 ====================
DEBUG:root:-------------------- 0: 2015-08-23 09:46:40 -> 2015-08-23 09:57:12 --------------------
DEBUG:root:filtering points Int64Index([5, 8, 9, 10, 11, 12, 14, 16, 17], dtype='int64')
DEBUG:root:after accuracy filtering, filtered list size went from (19, 28) to (10, 28)
DEBUG:root:quartile values are 0.25     6.965820
0.75    19.542169
Name: speed, dtype: float64
DEBUG:root:iqr 12.5763496313
DEBUG:root:For cluster 0 - 9, distance = 7736.35959575, is_cluster = False
DEBUG:root:After splitting, segment list is [Segment(0, 9, 7736.35959575)] with size 1
INFO:root:No jumps, nothing to filter
DEBUG:root:for section AttrDict({'user_id': UUID('b0d937d0-70ef-305e-9563-440369012b39'), 'start_time': Timestamp('2015-08-23 09:46:40'), 'end_ts': 1440349032804, 'start_ts': 1440348400381, 'end_time': Timestamp('2015-08-23 09:57:12'), 'activity': <Activities.IN_VEHICLE: 0>, 'loc_filter': 'time'}), section_df.shape = (10, 28), formatted_time.head() = 0   2015-08-23 09:47:16
1   2015-08-23 09:47:27
2   2015-08-23 09:48:18
3   2015-08-23 09:48:47
4   2015-08-23 09:49:20
Name: formatted_time, dtype: datetime64[ns]
DEBUG:root:==================== 2015-08-23 09:57:12 -> 2015-08-23 10:09:04 ====================
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1440348400381}}, {'data.mTime': {'$lt': 1440349032804}}], 'user_id': UUID('b0d937d0-70ef-305e-9563-440369012b39'), 'metadata.filter': 'time'} 
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1440349032804}}, {'data.mTime': {'$lt': 1440349744858}}], 'user_id': UUID('b0d937d0-70ef-305e-9563-440369012b39'), 'metadata.filter': 'time'} 
DEBUG:root:-------------------- 0: 2015-08-23 09:57:12 -> 2015-08-23 09:57:39 --------------------
DEBUG:root:filtering points Int64Index([], dtype='int64')
DEBUG:root:after accuracy filtering, filtered list size went from (0, 29) to (0, 0)
DEBUG:root:quartile values are 0.25   NaN
0.75   NaN
Name: speed, dtype: float64
DEBUG:root:iqr nan
Caught error Cannot assign nan to integer series while processing section, skipping...
INFO:root:Found empty df! skipping...
DEBUG:root:-------------------- 1: 2015-08-23 09:57:39 -> 2015-08-23 10:09:04 --------------------
DEBUG:root:filtering points Int64Index([3, 4], dtype='int64')
DEBUG:root:after accuracy filtering, filtered list size went from (14, 29) to (12, 29)
DEBUG:root:timeDelta = 0, distanceDelta = %s, returning speed = 0
DEBUG:root:quartile values are 0.25    0.447107
0.75    0.958565
Name: speed, dtype: float64
DEBUG:root:iqr 0.511457884039
DEBUG:root:For cluster 0 - 11, distance = 192.242494156, is_cluster = False
DEBUG:root:After splitting, segment list is [Segment(0, 11, 192.242494156)] with size 1
INFO:root:No jumps, nothing to filter
DEBUG:root:for section AttrDict({'user_id': UUID('b0d937d0-70ef-305e-9563-440369012b39'), 'start_time': datetime.datetime(2015, 8, 23, 9, 57, 39), 'end_ts': 1440349744858, 'start_ts': 1440349059033, 'end_time': Timestamp('2015-08-23 10:09:04'), 'activity': <Activities.ON_FOOT: 2>, 'loc_filter': 'time'}), section_df.shape = (12, 29), formatted_time.head() = 0   2015-08-23 09:57:42
1   2015-08-23 09:58:14
2   2015-08-23 09:58:44
3   2015-08-23 10:00:16
4   2015-08-23 10:00:48
Name: formatted_time, dtype: datetime64[ns]
DEBUG:root:==================== 2015-08-23 10:09:04 -> 2015-08-23 12:06:33 ====================
DEBUG:root:-------------------- 0: 2015-08-23 10:09:04 -> 2015-08-23 11:47:12 --------------------
DEBUG:root:filtering points Int64Index([], dtype='int64')
DEBUG:root:after accuracy filtering, filtered list size went from (14, 29) to (14, 29)
DEBUG:root:timeDelta = 0, distanceDelta = %s, returning speed = 0
DEBUG:root:quartile values are 0.25    0.185070
0.75    0.913009
Name: speed, dtype: float64
DEBUG:root:iqr 0.727939515929
DEBUG:root:For cluster 0 - 13, distance = 57.7983824601, is_cluster = True
DEBUG:root:After splitting, segment list is [Segment(0, 13, 57.7983824601)] with size 1
INFO:root:No jumps, nothing to filter
DEBUG:root:for section AttrDict({'user_id': UUID('b0d937d0-70ef-305e-9563-440369012b39'), 'start_time': Timestamp('2015-08-23 10:09:04'), 'end_ts': 1440355632167, 'start_ts': 1440349744858, 'end_time': '2015-08-23 11:47:12', 'activity': <Activities.ON_FOOT: 2>, 'loc_filter': 'time'}), section_df.shape = (14, 29), formatted_time.head() = 0   2015-08-23 10:09:45
1   2015-08-23 10:10:16
2   2015-08-23 10:10:46
3   2015-08-23 10:11:19
4   2015-08-23 10:11:50
Name: formatted_time, dtype: datetime64[ns]
DEBUG:root:-------------------- 1: 2015-08-23 11:47:12 -> 2015-08-23 12:06:33 --------------------
DEBUG:root:filtering points Int64Index([16, 21, 22, 23, 30], dtype='int64')
DEBUG:root:after accuracy filtering, filtered list size went from (37, 29) to (32, 29)
DEBUG:root:quartile values are 0.25     4.435915
0.75    16.177832
Name: speed, dtype: float64
DEBUG:root:iqr 11.7419168644
DEBUG:root:For cluster 0 - 31, distance = 10828.5631893, is_cluster = False
DEBUG:root:After splitting, segment list is [Segment(0, 31, 10828.5631893)] with size 1
INFO:root:No jumps, nothing to filter
DEBUG:root:for section AttrDict({'user_id': UUID('b0d937d0-70ef-305e-9563-440369012b39'), 'start_time': datetime.datetime(2015, 8, 23, 11, 47, 12), 'end_ts': 1440356793875, 'start_ts': 1440355632167, 'end_time': Timestamp('2015-08-23 12:06:33'), 'activity': <Activities.IN_VEHICLE: 0>, 'loc_filter': 'time'}), section_df.shape = (32, 29), formatted_time.head() = 0   2015-08-23 11:47:41
1   2015-08-23 11:48:11
2   2015-08-23 11:49:12
3   2015-08-23 11:49:43
4   2015-08-23 11:50:10
Name: formatted_time, dtype: datetime64[ns]
DEBUG:root:==================== 2015-08-23 12:06:33 -> 2015-08-23 12:32:26 ====================
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1440349744858}}, {'data.mTime': {'$lt': 1440356793875}}], 'user_id': UUID('b0d937d0-70ef-305e-9563-440369012b39'), 'metadata.filter': 'time'} 
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1440356793875}}, {'data.mTime': {'$lt': 1440358346064}}], 'user_id': UUID('b0d937d0-70ef-305e-9563-440369012b39'), 'metadata.filter': 'time'} 
DEBUG:root:-------------------- 0: 2015-08-23 12:06:33 -> 2015-08-23 12:08:44 --------------------
DEBUG:root:filtering points Int64Index([1, 2], dtype='int64')
DEBUG:root:after accuracy filtering, filtered list size went from (3, 29) to (1, 29)
DEBUG:root:quartile values are 0.25   NaN
0.75   NaN
Name: speed, dtype: float64
DEBUG:root:iqr nan
Caught error Cannot assign nan to integer series while processing section, skipping...
DEBUG:root:for section AttrDict({'user_id': UUID('b0d937d0-70ef-305e-9563-440369012b39'), 'start_time': Timestamp('2015-08-23 12:06:33'), 'end_ts': 1440356924463, 'start_ts': 1440356793875, 'end_time': '2015-08-23 12:08:44', 'activity': <Activities.IN_VEHICLE: 0>, 'loc_filter': 'time'}), section_df.shape = (1, 29), formatted_time.head() = 0   2015-08-23 12:07:04
Name: formatted_time, dtype: datetime64[ns]
DEBUG:root:-------------------- 1: 2015-08-23 12:08:44 -> 2015-08-23 12:11:50 --------------------
DEBUG:root:filtering points Int64Index([], dtype='int64')
DEBUG:root:after accuracy filtering, filtered list size went from (8, 29) to (8, 29)
DEBUG:root:quartile values are 0.25    0.197304
0.75    0.881895
Name: speed, dtype: float64
DEBUG:root:iqr 0.684591013865
DEBUG:root:For cluster 0 - 7, distance = 62.986394736, is_cluster = True
DEBUG:root:After splitting, segment list is [Segment(0, 7, 62.986394736)] with size 1
INFO:root:No jumps, nothing to filter
DEBUG:root:for section AttrDict({'user_id': UUID('b0d937d0-70ef-305e-9563-440369012b39'), 'start_time': datetime.datetime(2015, 8, 23, 12, 8, 44), 'end_ts': 1440357110981, 'start_ts': 1440356924463, 'end_time': '2015-08-23 12:11:50', 'activity': <Activities.ON_FOOT: 2>, 'loc_filter': 'time'}), section_df.shape = (8, 29), formatted_time.head() = 0   2015-08-23 12:08:51
1   2015-08-23 12:09:26
2   2015-08-23 12:09:38
3   2015-08-23 12:09:45
4   2015-08-23 12:10:01
Name: formatted_time, dtype: datetime64[ns]
DEBUG:root:-------------------- 2: 2015-08-23 12:11:50 -> 2015-08-23 12:32:26 --------------------
DEBUG:root:filtering points Int64Index([22], dtype='int64')
DEBUG:root:after accuracy filtering, filtered list size went from (15, 29) to (14, 29)
DEBUG:root:timeDelta = 0, distanceDelta = %s, returning speed = 0
DEBUG:root:quartile values are 0.25     0.512578
0.75    10.325114
Name: speed, dtype: float64
DEBUG:root:iqr 9.81253671473
DEBUG:root:For cluster 0 - 13, distance = 2329.18905624, is_cluster = False
DEBUG:root:After splitting, segment list is [Segment(0, 13, 2329.18905624)] with size 1
INFO:root:No jumps, nothing to filter
DEBUG:root:for section AttrDict({'user_id': UUID('b0d937d0-70ef-305e-9563-440369012b39'), 'start_time': datetime.datetime(2015, 8, 23, 12, 11, 50), 'end_ts': 1440358346064, 'start_ts': 1440357110981, 'end_time': Timestamp('2015-08-23 12:32:26'), 'activity': <Activities.IN_VEHICLE: 0>, 'loc_filter': 'time'}), section_df.shape = (14, 29), formatted_time.head() = 0   2015-08-23 12:12:05
1   2015-08-23 12:25:53
2   2015-08-23 12:25:53
3   2015-08-23 12:26:27
4   2015-08-23 12:27:01
Name: formatted_time, dtype: datetime64[ns]
DEBUG:root:==================== 2015-08-23 12:32:26 -> 2015-08-23 16:23:49 ====================
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1440358346064}}, {'data.mTime': {'$lt': 1440372229200}}], 'user_id': UUID('b0d937d0-70ef-305e-9563-440369012b39'), 'metadata.filter': 'time'} 
DEBUG:root:-------------------- 0: 2015-08-23 12:32:26 -> 2015-08-23 12:33:29 --------------------
DEBUG:root:filtering points Int64Index([], dtype='int64')
DEBUG:root:after accuracy filtering, filtered list size went from (1, 29) to (1, 29)
DEBUG:root:quartile values are 0.25   NaN
0.75   NaN
Name: speed, dtype: float64
DEBUG:root:iqr nan
Caught error Cannot assign nan to integer series while processing section, skipping...
DEBUG:root:for section AttrDict({'user_id': UUID('b0d937d0-70ef-305e-9563-440369012b39'), 'start_time': Timestamp('2015-08-23 12:32:26'), 'end_ts': 1440358409448, 'start_ts': 1440358346064, 'end_time': '2015-08-23 12:33:29', 'activity': <Activities.IN_VEHICLE: 0>, 'loc_filter': 'time'}), section_df.shape = (1, 29), formatted_time.head() = 0   2015-08-23 12:33:02
Name: formatted_time, dtype: datetime64[ns]
DEBUG:root:-------------------- 1: 2015-08-23 12:33:29 -> 2015-08-23 12:37:48 --------------------
DEBUG:root:filtering points Int64Index([], dtype='int64')
DEBUG:root:after accuracy filtering, filtered list size went from (9, 29) to (9, 29)
DEBUG:root:quartile values are 0.25    0.013466
0.75    0.118941
Name: speed, dtype: float64
DEBUG:root:iqr 0.105474469333
DEBUG:root:For cluster 0 - 8, distance = 10.6735501577, is_cluster = True
DEBUG:root:After splitting, segment list is [Segment(0, 8, 10.6735501577)] with size 1
INFO:root:No jumps, nothing to filter
DEBUG:root:for section AttrDict({'user_id': UUID('b0d937d0-70ef-305e-9563-440369012b39'), 'start_time': datetime.datetime(2015, 8, 23, 12, 33, 29), 'end_ts': 1440358668375, 'start_ts': 1440358409448, 'end_time': '2015-08-23 12:37:48', 'activity': <Activities.ON_FOOT: 2>, 'loc_filter': 'time'}), section_df.shape = (9, 29), formatted_time.head() = 0   2015-08-23 12:33:33
1   2015-08-23 12:34:05
2   2015-08-23 12:34:37
3   2015-08-23 12:35:08
4   2015-08-23 12:35:38
Name: formatted_time, dtype: datetime64[ns]
DEBUG:root:-------------------- 2: 2015-08-23 12:37:48 -> 2015-08-23 16:23:49 --------------------
DEBUG:root:filtering points Int64Index([], dtype='int64')
DEBUG:root:after accuracy filtering, filtered list size went from (7, 29) to (7, 29)
DEBUG:root:timeDelta = 0, distanceDelta = %s, returning speed = 0
DEBUG:root:quartile values are 0.25    0.863481
0.75    2.593314
Name: speed, dtype: float64
DEBUG:root:iqr 1.72983288324
DEBUG:root:For cluster 0 - 6, distance = 265.285013226, is_cluster = False
DEBUG:root:After splitting, segment list is [Segment(0, 6, 265.285013226)] with size 1
INFO:root:No jumps, nothing to filter
DEBUG:root:for section AttrDict({'user_id': UUID('b0d937d0-70ef-305e-9563-440369012b39'), 'start_time': datetime.datetime(2015, 8, 23, 12, 37, 48), 'end_ts': 1440372229200, 'start_ts': 1440358668375, 'end_time': Timestamp('2015-08-23 16:23:49'), 'activity': <Activities.ON_BICYCLE: 1>, 'loc_filter': 'time'}), section_df.shape = (7, 29), formatted_time.head() = 0   2015-08-23 16:20:41
1   2015-08-23 16:20:41
2   2015-08-23 16:21:11
3   2015-08-23 16:21:46
4   2015-08-23 16:22:18
Name: formatted_time, dtype: datetime64[ns]
DEBUG:root:==================== 2015-08-23 16:23:49 -> 2015-08-23 16:51:34 ====================
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1440372229200}}, {'data.mTime': {'$lt': 1440373894634}}], 'user_id': UUID('b0d937d0-70ef-305e-9563-440369012b39'), 'metadata.filter': 'time'} 
DEBUG:root:-------------------- 0: 2015-08-23 16:23:49 -> 2015-08-23 16:24:47 --------------------
DEBUG:root:filtering points Int64Index([], dtype='int64')
DEBUG:root:after accuracy filtering, filtered list size went from (2, 28) to (2, 28)
DEBUG:root:quartile values are 0.25    0.211335
0.75    0.211335
Name: speed, dtype: float64
DEBUG:root:iqr 0.0
DEBUG:root:For cluster 0 - 1, distance = 0.0, is_cluster = True
DEBUG:root:After splitting, segment list is [Segment(0, 1, 0.0)] with size 1
INFO:root:No jumps, nothing to filter
DEBUG:root:for section AttrDict({'user_id': UUID('b0d937d0-70ef-305e-9563-440369012b39'), 'start_time': Timestamp('2015-08-23 16:23:49'), 'end_ts': 1440372287914, 'start_ts': 1440372229200, 'end_time': '2015-08-23 16:24:47', 'activity': <Activities.ON_BICYCLE: 1>, 'loc_filter': 'time'}), section_df.shape = (2, 28), formatted_time.head() = 0   2015-08-23 16:24:19
1   2015-08-23 16:24:37
Name: formatted_time, dtype: datetime64[ns]
DEBUG:root:-------------------- 1: 2015-08-23 16:24:47 -> 2015-08-23 16:28:40 --------------------
DEBUG:root:filtering points Int64Index([], dtype='int64')
DEBUG:root:after accuracy filtering, filtered list size went from (9, 28) to (9, 28)
DEBUG:root:quartile values are 0.25    0.135746
0.75    0.391758
Name: speed, dtype: float64
DEBUG:root:iqr 0.25601153047
DEBUG:root:For cluster 0 - 1, distance = 0.0, is_cluster = True
DEBUG:root:For cluster 1 - 8, distance = 2.84242566355, is_cluster = True
DEBUG:root:After splitting, segment list is [Segment(0, 1, 0.0), Segment(1, 8, 2.84242566355)] with size 2
DEBUG:root:Finished marking segment states for direction IterationDirection.RIGHT 
DEBUG:root:Processing segment 0: Segment(0, 1, 0.0), expecting state Segment_State.BAD
DEBUG:root:At the end of the loop for direction IterationDirection.LEFT, i = -1
DEBUG:root:Finished marking segment states for direction IterationDirection.LEFT 
DEBUG:root:unknown_segments = []
DEBUG:root:bad_segments = [Segment(0, 1, 0.0)]
DEBUG:root:after setting values, outlier_mask = [0]
DEBUG:root:point details are    mLatitude  mLongitude  mAccuracy      formatted_time
0   37.39203 -122.080093    114.422 2015-08-23 16:25:10
DEBUG:root:quartile values are 0.25    0.134067
0.75    0.270597
Name: speed, dtype: float64
DEBUG:root:iqr 0.136530242257
WARNING:root:After first round, still have outliers   filter      formatted_time                  key  mAccuracy  mAltitude  \
8   time 2015-08-23 16:28:35  background/location       34.5          0   

   mBearing  mDistance  mElapsedRealtimeNanos mHasAccuracy mHasAltitude  \
8         0          0        152694661000000         True        False   

     ...    mProvider mResults  mSpeed          mTime  platform  read_ts  \
8    ...        fused   [0, 0]       0  1440372515798   android        0   

      type       write_ts   distance     speed  
8  message  1440372522013  13.820342  0.683702  

[1 rows x 30 columns]
DEBUG:root:for section AttrDict({'user_id': UUID('b0d937d0-70ef-305e-9563-440369012b39'), 'start_time': datetime.datetime(2015, 8, 23, 16, 24, 47), 'end_ts': 1440372520828, 'start_ts': 1440372287914, 'end_time': '2015-08-23 16:28:40', 'activity': <Activities.ON_FOOT: 2>, 'loc_filter': 'time'}), section_df.shape = (8, 28), formatted_time.head() = 1   2015-08-23 16:25:18
2   2015-08-23 16:25:58
3   2015-08-23 16:26:09
4   2015-08-23 16:26:28
5   2015-08-23 16:27:14
Name: formatted_time, dtype: datetime64[ns]
DEBUG:root:-------------------- 2: 2015-08-23 16:28:40 -> 2015-08-23 16:51:34 --------------------
DEBUG:root:filtering points Int64Index([11], dtype='int64')
DEBUG:root:after accuracy filtering, filtered list size went from (9, 28) to (8, 28)
DEBUG:root:quartile values are 0.25    0.871913
0.75    2.944549
Name: speed, dtype: float64
DEBUG:root:iqr 2.07263579593
DEBUG:root:For cluster 0 - 7, distance = 262.088770814, is_cluster = False
DEBUG:root:After splitting, segment list is [Segment(0, 7, 262.088770814)] with size 1
INFO:root:No jumps, nothing to filter
DEBUG:root:for section AttrDict({'user_id': UUID('b0d937d0-70ef-305e-9563-440369012b39'), 'start_time': datetime.datetime(2015, 8, 23, 16, 28, 40), 'end_ts': 1440373894634, 'start_ts': 1440372520828, 'end_time': Timestamp('2015-08-23 16:51:34'), 'activity': <Activities.ON_BICYCLE: 1>, 'loc_filter': 'time'}), section_df.shape = (8, 28), formatted_time.head() = 0   2015-08-23 16:47:23
1   2015-08-23 16:47:54
2   2015-08-23 16:48:28
3   2015-08-23 16:48:59
4   2015-08-23 16:49:29
Name: formatted_time, dtype: datetime64[ns]


In [45]:
ipy.inline_maps([[map] for map in section_map_list_22], len(section_map_list_22), 1)


Out[45]:

In [45]: