In [1]:
import os
data_path = os.environ["YAHOO_DATA"]
print data_path
rawEventsRdd = sc.textFile(data_path + "events.txt")
/home/mertergun/yahoo_data/
In [3]:
sc.parallelize(rawEventsRdd.take(1000)).cache().saveAsTextFile(data_path + "filteredEvents.txt")
In [2]:
rawEventsRdd = sc.textFile(data_path + "filteredEvents.txt")
execfile("../script/context.py")
context
Out[2]:
[<function __main__.context_timestamp>,
<function __main__.context_latitude>,
<function __main__.context_longitude>,
<function __main__.context_city>,
<function __main__.context_dayOfWeek>,
<function __main__.context_time_of_day>,
<function __main__.context_event_type>]
In [3]:
userIdConversionDictionary = rawEventsRdd.map(get_user_id).distinct().zipWithIndex().collectAsMap()
userIdConversionDictionaryBroadcast = sc.broadcast(userIdConversionDictionary)
itemIdConversionDictionary = rawEventsRdd.map(get_item_id).distinct().zipWithIndex().collectAsMap()
itemIdConversionDictionaryBroadcast = sc.broadcast(itemIdConversionDictionary)
cityConversionDictionary = rawEventsRdd.map(context_city).distinct().zipWithIndex().collectAsMap()
cityConversionDictionaryBroadcast = sc.broadcast(cityConversionDictionary)
In [9]:
userIdConversionDictionary
Out[9]:
{u'001e6d8e-cbe7-4374-8c38-f37962a457e9': 1,
u'005ca0a2-6e94-4709-adc6-f35cdd50bf8f': 0}
In [5]:
def set_context(line):
key1 = (userIdConversionDictionary[get_user_id(line)],
itemIdConversionDictionary[get_item_id(line)])
list = []
for f in context:
list = list + [(context.index(f), f(line))]
#convert city to id
list[3] = list[3][0], cityConversionDictionary[list[3][1]]
return [key1,list]
eventRDDConverted = rawEventsRdd.map(set_context).cache()
eventRDDConverted.take(3)
Out[5]:
[[(1, 41),
[(0, u'1421521691'),
(1, u'47.235050'),
(2, u'-122.534698'),
(3, 9),
(4, u'5'),
(5, u'11'),
(6, u'App_Opened')]],
[(1, 46),
[(0, u'1421558502'),
(1, u'47.235050'),
(2, u'-122.534698'),
(3, 9),
(4, u'5'),
(5, u'21'),
(6, u'App_Opened')]],
[(1, 44),
[(0, u'1421017853'),
(1, u'47.237461'),
(2, u'-122.530899'),
(3, 9),
(4, u'6'),
(5, u'15'),
(6, u'App_Opened')]]]
In [6]:
def flat_context(lst):
l = []
for x in lst[1]:
l = l + [[(lst[0][0], lst[0][1], x[0]), x[1]]]
return l
eventRDD = eventRDDConverted.flatMap(flat_context).cache()
eventRDD.take(3)
Out[6]:
[[(1, 41, 0), u'1421521691'],
[(1, 41, 1), u'47.235050'],
[(1, 41, 2), u'-122.534698']]
In [4]:
import os
execfile("../script/utils.py")
eventsPath = os.environ["YAHOO_DATA"]
splitedRdd = sc.textFile(eventsPath + "/splitedData")
splitedRdd = splitedRdd.map(parseContextData2)
a = splitedRdd.take(1)
len(a[0][1][0]) + len(a[0][1][1]) #80% training and #20%test data already separated
a
Out[4]:
[(61952,
[[train(itemId=60075, context=context(ts=1421371713, city=12940, lat=43.503536, lon=-88.558907, moving=1, location=3, time_of_day=4)),
train(itemId=91914, context=context(ts=1421371762, city=12940, lat=43.503551, lon=-88.558922, moving=2, location=3, time_of_day=4)),
train(itemId=91512, context=context(ts=1421371807, city=12940, lat=43.503551, lon=-88.558922, moving=2, location=3, time_of_day=4)),
train(itemId=91914, context=context(ts=1421371816, city=12940, lat=43.503551, lon=-88.558922, moving=2, location=3, time_of_day=4)),
train(itemId=43924, context=context(ts=1421371837, city=12940, lat=43.50354, lon=-88.55899, moving=2, location=3, time_of_day=4)),
train(itemId=91914, context=context(ts=1421371838, city=12940, lat=43.50354, lon=-88.55899, moving=2, location=3, time_of_day=4)),
train(itemId=44053, context=context(ts=1421371861, city=12940, lat=43.50354, lon=-88.55899, moving=2, location=3, time_of_day=4)),
train(itemId=91914, context=context(ts=1421371862, city=12940, lat=43.50354, lon=-88.55899, moving=2, location=3, time_of_day=4)),
train(itemId=91914, context=context(ts=1421372271, city=12940, lat=43.503555, lon=-88.558891, moving=1, location=3, time_of_day=4)),
train(itemId=54178, context=context(ts=1421372314, city=12940, lat=43.503513, lon=-88.558914, moving=2, location=3, time_of_day=4)),
train(itemId=91914, context=context(ts=1421372318, city=12940, lat=43.503513, lon=-88.558914, moving=2, location=3, time_of_day=4)),
train(itemId=18722, context=context(ts=1421372369, city=12940, lat=43.503513, lon=-88.558914, moving=2, location=3, time_of_day=4)),
train(itemId=96547, context=context(ts=1421372382, city=12940, lat=43.503536, lon=-88.558922, moving=2, location=3, time_of_day=4)),
train(itemId=91914, context=context(ts=1421372388, city=12940, lat=43.503536, lon=-88.558922, moving=2, location=3, time_of_day=4)),
train(itemId=55396, context=context(ts=1421372406, city=12940, lat=43.503536, lon=-88.558922, moving=2, location=3, time_of_day=4)),
train(itemId=91914, context=context(ts=1421372424, city=12940, lat=43.503536, lon=-88.558922, moving=2, location=3, time_of_day=4)),
train(itemId=44053, context=context(ts=1421372442, city=12940, lat=43.503536, lon=-88.558922, moving=2, location=3, time_of_day=4)),
train(itemId=91914, context=context(ts=1421372486, city=12940, lat=43.503536, lon=-88.558929, moving=2, location=3, time_of_day=4)),
train(itemId=79614, context=context(ts=1421372538, city=12940, lat=43.50354, lon=-88.558922, moving=2, location=3, time_of_day=4)),
train(itemId=91914, context=context(ts=1421372543, city=12940, lat=43.50354, lon=-88.558922, moving=2, location=3, time_of_day=4)),
train(itemId=55396, context=context(ts=1421372548, city=12940, lat=43.50354, lon=-88.558922, moving=2, location=3, time_of_day=4)),
train(itemId=91914, context=context(ts=1421372549, city=12940, lat=43.50354, lon=-88.558922, moving=2, location=3, time_of_day=4)),
train(itemId=68089, context=context(ts=1421372632, city=12940, lat=43.503551, lon=-88.558929, moving=2, location=3, time_of_day=4)),
train(itemId=30179, context=context(ts=1421372707, city=12940, lat=43.503555, lon=-88.558952, moving=2, location=3, time_of_day=4)),
train(itemId=51319, context=context(ts=1421372783, city=12940, lat=43.503559, lon=-88.558937, moving=2, location=3, time_of_day=4)),
train(itemId=68089, context=context(ts=1421372889, city=12940, lat=43.503536, lon=-88.558922, moving=2, location=3, time_of_day=4)),
train(itemId=51319, context=context(ts=1421372920, city=12940, lat=43.503532, lon=-88.558914, moving=2, location=3, time_of_day=4)),
train(itemId=44053, context=context(ts=1421372951, city=12940, lat=43.503532, lon=-88.558914, moving=2, location=3, time_of_day=4)),
train(itemId=91914, context=context(ts=1421372983, city=12940, lat=43.50354, lon=-88.558907, moving=2, location=3, time_of_day=4)),
train(itemId=55396, context=context(ts=1421373023, city=12940, lat=43.50354, lon=-88.558907, moving=2, location=3, time_of_day=4)),
train(itemId=91914, context=context(ts=1421373024, city=12940, lat=43.50354, lon=-88.558907, moving=2, location=3, time_of_day=4)),
train(itemId=6588, context=context(ts=1421373043, city=12940, lat=43.50354, lon=-88.558907, moving=2, location=3, time_of_day=4)),
train(itemId=91914, context=context(ts=1421373050, city=12940, lat=43.50354, lon=-88.558907, moving=2, location=3, time_of_day=4)),
train(itemId=51319, context=context(ts=1421373091, city=12940, lat=43.50354, lon=-88.558929, moving=2, location=3, time_of_day=4)),
train(itemId=1137, context=context(ts=1421373152, city=12940, lat=43.503559, lon=-88.558899, moving=2, location=3, time_of_day=4)),
train(itemId=47270, context=context(ts=1421373212, city=12940, lat=43.503544, lon=-88.558899, moving=2, location=3, time_of_day=4)),
train(itemId=88178, context=context(ts=1421373272, city=12940, lat=43.503544, lon=-88.558899, moving=2, location=3, time_of_day=4)),
train(itemId=55396, context=context(ts=1421373332, city=12940, lat=43.503521, lon=-88.558914, moving=2, location=3, time_of_day=4)),
train(itemId=9603, context=context(ts=1421373467, city=12940, lat=43.503555, lon=-88.558952, moving=2, location=3, time_of_day=4)),
train(itemId=80657, context=context(ts=1421373542, city=12940, lat=43.503525, lon=-88.558929, moving=2, location=3, time_of_day=4)),
train(itemId=51319, context=context(ts=1421373617, city=12940, lat=43.503525, lon=-88.558929, moving=2, location=3, time_of_day=4)),
train(itemId=13399, context=context(ts=1421373735, city=12940, lat=43.503563, lon=-88.558922, moving=2, location=3, time_of_day=4)),
train(itemId=96547, context=context(ts=1421373778, city=12940, lat=43.503532, lon=-88.558952, moving=2, location=3, time_of_day=4)),
train(itemId=58777, context=context(ts=1421373821, city=12940, lat=43.503529, lon=-88.558922, moving=2, location=3, time_of_day=4)),
train(itemId=88178, context=context(ts=1421373864, city=12940, lat=43.503529, lon=-88.558922, moving=2, location=3, time_of_day=4)),
train(itemId=55396, context=context(ts=1421373907, city=12940, lat=43.503529, lon=-88.558929, moving=2, location=3, time_of_day=4)),
train(itemId=51319, context=context(ts=1421373949, city=12940, lat=43.503529, lon=-88.558929, moving=2, location=3, time_of_day=4)),
train(itemId=88178, context=context(ts=1421374057, city=12940, lat=43.503582, lon=-88.558922, moving=2, location=3, time_of_day=4)),
train(itemId=51319, context=context(ts=1421374122, city=12940, lat=43.503536, lon=-88.558922, moving=2, location=3, time_of_day=4)),
train(itemId=1351, context=context(ts=1421374186, city=12940, lat=43.503548, lon=-88.558952, moving=2, location=3, time_of_day=4)),
train(itemId=36703, context=context(ts=1421374285, city=12940, lat=43.50354, lon=-88.558922, moving=2, location=3, time_of_day=4)),
train(itemId=79614, context=context(ts=1421374296, city=12940, lat=43.50354, lon=-88.558922, moving=2, location=3, time_of_day=4)),
train(itemId=55396, context=context(ts=1421374305, city=12940, lat=43.503555, lon=-88.558945, moving=2, location=3, time_of_day=4)),
train(itemId=88178, context=context(ts=1421374329, city=12940, lat=43.503555, lon=-88.558945, moving=2, location=3, time_of_day=4)),
train(itemId=43924, context=context(ts=1421374405, city=12940, lat=43.503548, lon=-88.558907, moving=2, location=3, time_of_day=4)),
train(itemId=47270, context=context(ts=1421374408, city=12940, lat=43.503548, lon=-88.558907, moving=2, location=3, time_of_day=4)),
train(itemId=55396, context=context(ts=1421374425, city=12940, lat=43.503548, lon=-88.558907, moving=2, location=3, time_of_day=4)),
train(itemId=91914, context=context(ts=1421374437, city=12940, lat=43.503548, lon=-88.558907, moving=2, location=3, time_of_day=4)),
train(itemId=55396, context=context(ts=1421374455, city=12940, lat=43.503532, lon=-88.558922, moving=2, location=3, time_of_day=4)),
train(itemId=88178, context=context(ts=1421374505, city=12940, lat=43.503532, lon=-88.558922, moving=2, location=3, time_of_day=4)),
train(itemId=91914, context=context(ts=1421374514, city=12940, lat=43.503559, lon=-88.558899, moving=2, location=3, time_of_day=4)),
train(itemId=55396, context=context(ts=1421374577, city=12940, lat=43.503529, lon=-88.558922, moving=2, location=3, time_of_day=4)),
train(itemId=30179, context=context(ts=1421374628, city=12940, lat=43.503529, lon=-88.558922, moving=2, location=3, time_of_day=4)),
train(itemId=68089, context=context(ts=1421374678, city=12940, lat=43.503551, lon=-88.558945, moving=2, location=3, time_of_day=4)),
train(itemId=57917, context=context(ts=1421374729, city=12940, lat=43.503529, lon=-88.558929, moving=2, location=3, time_of_day=4)),
train(itemId=51319, context=context(ts=1421374779, city=12940, lat=43.503529, lon=-88.558929, moving=2, location=3, time_of_day=4)),
train(itemId=6575, context=context(ts=1421374898, city=12940, lat=43.503529, lon=-88.558937, moving=2, location=3, time_of_day=4)),
train(itemId=88178, context=context(ts=1421374966, city=12940, lat=43.503521, lon=-88.558922, moving=2, location=3, time_of_day=4)),
train(itemId=51319, context=context(ts=1421375035, city=12940, lat=43.503532, lon=-88.558929, moving=2, location=3, time_of_day=4)),
train(itemId=60075, context=context(ts=1421375158, city=12940, lat=43.503563, lon=-88.558922, moving=2, location=3, time_of_day=4)),
train(itemId=43924, context=context(ts=1421375167, city=12940, lat=43.503563, lon=-88.558922, moving=2, location=3, time_of_day=4)),
train(itemId=83804, context=context(ts=1421375173, city=12940, lat=43.503563, lon=-88.558922, moving=2, location=3, time_of_day=4)),
train(itemId=44053, context=context(ts=1421375189, city=12940, lat=43.503563, lon=-88.558922, moving=2, location=3, time_of_day=4)),
train(itemId=4690, context=context(ts=1421375227, city=12940, lat=43.50354, lon=-88.558922, moving=2, location=3, time_of_day=4)),
train(itemId=51319, context=context(ts=1421375262, city=12940, lat=43.50354, lon=-88.558922, moving=2, location=3, time_of_day=4)),
train(itemId=43924, context=context(ts=1421375358, city=12940, lat=43.503536, lon=-88.558929, moving=2, location=3, time_of_day=4)),
train(itemId=93731, context=context(ts=1421375509, city=12940, lat=43.503551, lon=-88.558922, moving=2, location=3, time_of_day=4)),
train(itemId=88178, context=context(ts=1421375624, city=12940, lat=43.503544, lon=-88.558907, moving=2, location=3, time_of_day=4)),
train(itemId=43924, context=context(ts=1421375637, city=12940, lat=43.503544, lon=-88.558907, moving=2, location=3, time_of_day=4)),
train(itemId=58158, context=context(ts=1421375897, city=12940, lat=43.503544, lon=-88.558983, moving=2, location=3, time_of_day=4)),
train(itemId=42, context=context(ts=1421375921, city=12940, lat=43.503544, lon=-88.558983, moving=2, location=3, time_of_day=4)),
train(itemId=5959, context=context(ts=1421375934, city=12940, lat=43.503544, lon=-88.558983, moving=2, location=3, time_of_day=4)),
train(itemId=58158, context=context(ts=1421375949, city=12940, lat=43.503544, lon=-88.558983, moving=2, location=3, time_of_day=4)),
train(itemId=88178, context=context(ts=1421376003, city=12940, lat=43.503536, lon=-88.558983, moving=2, location=3, time_of_day=4)),
train(itemId=6575, context=context(ts=1421376056, city=12940, lat=43.503525, lon=-88.558952, moving=2, location=3, time_of_day=4)),
train(itemId=88178, context=context(ts=1421376089, city=12940, lat=43.503525, lon=-88.558952, moving=2, location=3, time_of_day=4)),
train(itemId=43924, context=context(ts=1421376090, city=12940, lat=43.503525, lon=-88.558952, moving=2, location=3, time_of_day=4)),
train(itemId=88178, context=context(ts=1421376106, city=12940, lat=43.503525, lon=-88.558952, moving=2, location=3, time_of_day=4)),
train(itemId=44053, context=context(ts=1421376985, city=12940, lat=43.503551, lon=-88.558983, moving=1, location=3, time_of_day=4)),
train(itemId=88178, context=context(ts=1421380203, city=12940, lat=43.503601, lon=-88.558945, moving=1, location=3, time_of_day=4)),
train(itemId=88178, context=context(ts=1421380276, city=12940, lat=43.503544, lon=-88.558937, moving=2, location=3, time_of_day=4)),
train(itemId=43924, context=context(ts=1421380317, city=12940, lat=43.503525, lon=-88.558907, moving=2, location=3, time_of_day=4)),
train(itemId=13399, context=context(ts=1421410505, city=12940, lat=43.503567, lon=-88.558929, moving=1, location=1, time_of_day=2)),
train(itemId=47270, context=context(ts=1421413608, city=12940, lat=43.503544, lon=-88.558998, moving=1, location=2, time_of_day=2)),
train(itemId=88178, context=context(ts=1421413721, city=12940, lat=43.503544, lon=-88.558907, moving=2, location=2, time_of_day=2)),
train(itemId=43924, context=context(ts=1421413735, city=12940, lat=43.503544, lon=-88.558907, moving=2, location=2, time_of_day=2)),
train(itemId=88178, context=context(ts=1421413750, city=12940, lat=43.503544, lon=-88.558907, moving=2, location=2, time_of_day=2)),
train(itemId=20306, context=context(ts=1421413754, city=12940, lat=43.503567, lon=-88.558868, moving=3, location=2, time_of_day=2)),
train(itemId=44053, context=context(ts=1421413758, city=12940, lat=43.503567, lon=-88.558868, moving=2, location=2, time_of_day=2)),
train(itemId=13399, context=context(ts=1421413782, city=12940, lat=43.503567, lon=-88.558868, moving=2, location=2, time_of_day=2)),
train(itemId=88178, context=context(ts=1421414647, city=12940, lat=43.503582, lon=-88.558907, moving=1, location=2, time_of_day=2)),
train(itemId=47270, context=context(ts=1421415305, city=12940, lat=43.503563, lon=-88.558983, moving=1, location=2, time_of_day=2)),
train(itemId=88178, context=context(ts=1421415313, city=12940, lat=43.503563, lon=-88.558983, moving=2, location=2, time_of_day=2)),
train(itemId=88178, context=context(ts=1421415322, city=12940, lat=43.503563, lon=-88.558983, moving=2, location=2, time_of_day=2)),
train(itemId=47270, context=context(ts=1421416936, city=12940, lat=43.503551, lon=-88.558929, moving=1, location=2, time_of_day=2)),
train(itemId=88178, context=context(ts=1421416950, city=12940, lat=43.503551, lon=-88.558929, moving=2, location=2, time_of_day=2)),
train(itemId=20306, context=context(ts=1421417204, city=12940, lat=43.503502, lon=-88.559021, moving=2, location=2, time_of_day=2)),
train(itemId=81109, context=context(ts=1421417304, city=12940, lat=43.503532, lon=-88.558983, moving=2, location=2, time_of_day=2)),
train(itemId=88178, context=context(ts=1421417364, city=12940, lat=43.503567, lon=-88.559006, moving=2, location=2, time_of_day=2)),
train(itemId=20306, context=context(ts=1421417423, city=12940, lat=43.50346, lon=-88.559052, moving=2, location=2, time_of_day=2)),
train(itemId=79614, context=context(ts=1421417486, city=12940, lat=43.50346, lon=-88.559052, moving=2, location=2, time_of_day=2)),
train(itemId=37219, context=context(ts=1421417495, city=12940, lat=43.50346, lon=-88.559052, moving=2, location=2, time_of_day=2)),
train(itemId=43924, context=context(ts=1421417572, city=12940, lat=43.503551, lon=-88.558929, moving=2, location=2, time_of_day=2)),
train(itemId=88178, context=context(ts=1421417602, city=12940, lat=43.503551, lon=-88.558929, moving=2, location=2, time_of_day=2)),
train(itemId=20306, context=context(ts=1421417834, city=12940, lat=43.503502, lon=-88.558662, moving=2, location=2, time_of_day=2)),
train(itemId=88178, context=context(ts=1421417912, city=12940, lat=43.50354, lon=-88.55883, moving=2, location=2, time_of_day=2)),
train(itemId=47315, context=context(ts=1421417971, city=12940, lat=43.503487, lon=-88.558632, moving=2, location=2, time_of_day=2)),
train(itemId=37219, context=context(ts=1421418207, city=12940, lat=43.506699, lon=-88.557823, moving=3, location=2, time_of_day=2)),
train(itemId=47315, context=context(ts=1421418438, city=12940, lat=43.51276, lon=-88.528702, moving=4, location=2, time_of_day=2)),
train(itemId=88178, context=context(ts=1421418713, city=2879, lat=43.575829, lon=-88.547241, moving=4, location=2, time_of_day=2)),
train(itemId=6575, context=context(ts=1421418752, city=3644, lat=43.643303, lon=-88.448349, moving=4, location=2, time_of_day=2)),
train(itemId=88178, context=context(ts=1421419144, city=2879, lat=43.618103, lon=-88.449081, moving=1, location=2, time_of_day=2)),
train(itemId=6575, context=context(ts=1421419273, city=2879, lat=43.626957, lon=-88.441238, moving=4, location=2, time_of_day=2)),
train(itemId=88178, context=context(ts=1421419610, city=6251, lat=43.732327, lon=-88.444077, moving=1, location=2, time_of_day=2)),
train(itemId=6575, context=context(ts=1421420015, city=6251, lat=43.777691, lon=-88.480515, moving=1, location=2, time_of_day=2)),
train(itemId=88178, context=context(ts=1421420023, city=6251, lat=43.777691, lon=-88.480515, moving=2, location=2, time_of_day=2)),
train(itemId=37219, context=context(ts=1421423049, city=6251, lat=43.77663, lon=-88.481262, moving=1, location=2, time_of_day=2)),
train(itemId=96547, context=context(ts=1421423403, city=6251, lat=43.777172, lon=-88.481804, moving=1, location=2, time_of_day=2)),
train(itemId=88178, context=context(ts=1421423494, city=6251, lat=43.777172, lon=-88.481804, moving=2, location=2, time_of_day=2)),
train(itemId=47315, context=context(ts=1421423643, city=6251, lat=43.777172, lon=-88.481804, moving=2, location=2, time_of_day=2)),
train(itemId=6575, context=context(ts=1421424169, city=6251, lat=43.730328, lon=-88.511986, moving=1, location=2, time_of_day=3)),
train(itemId=37219, context=context(ts=1421424356, city=1847, lat=43.699924, lon=-88.522354, moving=4, location=2, time_of_day=3)),
train(itemId=6575, context=context(ts=1421424366, city=1847, lat=43.699924, lon=-88.522354, moving=2, location=2, time_of_day=3)),
train(itemId=88178, context=context(ts=1421425416, city=12940, lat=43.518524, lon=-88.56205, moving=1, location=2, time_of_day=3)),
train(itemId=6575, context=context(ts=1421425636, city=12940, lat=43.547474, lon=-88.536797, moving=4, location=2, time_of_day=3)),
train(itemId=88178, context=context(ts=1421425967, city=12940, lat=43.497551, lon=-88.54689, moving=1, location=2, time_of_day=3)),
train(itemId=47270, context=context(ts=1421426431, city=12940, lat=43.50359, lon=-88.558876, moving=1, location=2, time_of_day=3)),
train(itemId=88178, context=context(ts=1421426480, city=12940, lat=43.503548, lon=-88.558929, moving=2, location=2, time_of_day=3)),
train(itemId=43924, context=context(ts=1421426529, city=12940, lat=43.503555, lon=-88.558929, moving=2, location=2, time_of_day=3)),
train(itemId=6575, context=context(ts=1421426578, city=12940, lat=43.503555, lon=-88.558929, moving=2, location=2, time_of_day=3)),
train(itemId=88178, context=context(ts=1421428658, city=12940, lat=43.503525, lon=-88.558968, moving=1, location=2, time_of_day=3)),
train(itemId=37219, context=context(ts=1421429156, city=12940, lat=43.50354, lon=-88.558853, moving=1, location=2, time_of_day=3)),
train(itemId=88178, context=context(ts=1421429166, city=12940, lat=43.50354, lon=-88.558853, moving=2, location=2, time_of_day=3)),
train(itemId=6575, context=context(ts=1421430116, city=12940, lat=43.503525, lon=-88.55896, moving=1, location=2, time_of_day=3)),
train(itemId=43924, context=context(ts=1421430166, city=12940, lat=43.503525, lon=-88.55896, moving=2, location=2, time_of_day=3)),
train(itemId=88178, context=context(ts=1421430179, city=12940, lat=43.503525, lon=-88.55896, moving=2, location=2, time_of_day=3)),
train(itemId=37219, context=context(ts=1421431610, city=12940, lat=43.503544, lon=-88.55896, moving=1, location=3, time_of_day=3)),
train(itemId=88178, context=context(ts=1421432055, city=12940, lat=43.503555, lon=-88.558975, moving=1, location=3, time_of_day=3)),
train(itemId=20306, context=context(ts=1421432082, city=12940, lat=43.503544, lon=-88.558891, moving=2, location=3, time_of_day=3)),
train(itemId=47270, context=context(ts=1421432179, city=12940, lat=43.503532, lon=-88.558891, moving=2, location=3, time_of_day=3)),
train(itemId=88178, context=context(ts=1421432456, city=12940, lat=43.503574, lon=-88.558922, moving=2, location=3, time_of_day=3)),
train(itemId=37219, context=context(ts=1421433207, city=12940, lat=43.503567, lon=-88.558907, moving=1, location=3, time_of_day=3)),
train(itemId=88178, context=context(ts=1421433217, city=12940, lat=43.503567, lon=-88.558907, moving=2, location=3, time_of_day=3)),
train(itemId=47270, context=context(ts=1421433883, city=12940, lat=43.503536, lon=-88.558907, moving=1, location=3, time_of_day=3)),
train(itemId=88178, context=context(ts=1421434048, city=12940, lat=43.503536, lon=-88.558907, moving=2, location=3, time_of_day=3)),
train(itemId=6575, context=context(ts=1421434087, city=12940, lat=43.503536, lon=-88.558907, moving=2, location=3, time_of_day=3)),
train(itemId=88178, context=context(ts=1421435995, city=9969, lat=43.464798, lon=-88.812912, moving=1, location=3, time_of_day=3)),
train(itemId=6575, context=context(ts=1421436034, city=9969, lat=43.457848, lon=-88.818192, moving=4, location=3, time_of_day=3)),
train(itemId=88178, context=context(ts=1421436239, city=9969, lat=43.456329, lon=-88.829292, moving=4, location=3, time_of_day=3)),
train(itemId=47315, context=context(ts=1421436252, city=9969, lat=43.456329, lon=-88.829292, moving=2, location=3, time_of_day=3)),
train(itemId=43924, context=context(ts=1421436264, city=9969, lat=43.456699, lon=-88.836624, moving=4, location=3, time_of_day=3)),
train(itemId=20306, context=context(ts=1421436276, city=9969, lat=43.456699, lon=-88.836624, moving=2, location=3, time_of_day=3)),
train(itemId=37219, context=context(ts=1421436288, city=9969, lat=43.456699, lon=-88.836624, moving=2, location=3, time_of_day=3)),
train(itemId=47270, context=context(ts=1421436300, city=9969, lat=43.456699, lon=-88.836624, moving=2, location=3, time_of_day=3)),
train(itemId=6575, context=context(ts=1421436312, city=9969, lat=43.456699, lon=-88.836624, moving=2, location=3, time_of_day=3)),
train(itemId=98655, context=context(ts=1421438757, city=12504, lat=43.181931, lon=-89.233154, moving=1, location=3, time_of_day=4)),
train(itemId=43924, context=context(ts=1421438881, city=12504, lat=43.182732, lon=-89.229607, moving=4, location=3, time_of_day=4)),
train(itemId=88178, context=context(ts=1421439231, city=12504, lat=43.179344, lon=-89.239464, moving=1, location=3, time_of_day=4)),
train(itemId=47270, context=context(ts=1421439893, city=12504, lat=43.17746, lon=-89.243706, moving=1, location=3, time_of_day=4)),
train(itemId=88178, context=context(ts=1421443704, city=4524, lat=43.125031, lon=-89.303963, moving=1, location=3, time_of_day=4)),
train(itemId=44053, context=context(ts=1421443740, city=4524, lat=43.125031, lon=-89.303963, moving=2, location=3, time_of_day=4)),
train(itemId=20306, context=context(ts=1421443776, city=4524, lat=43.125031, lon=-89.303963, moving=2, location=3, time_of_day=4)),
train(itemId=88178, context=context(ts=1421443812, city=4524, lat=43.125031, lon=-89.303963, moving=2, location=3, time_of_day=4)),
train(itemId=79614, context=context(ts=1421443851, city=4524, lat=43.125031, lon=-89.303963, moving=2, location=3, time_of_day=4)),
train(itemId=88178, context=context(ts=1421443909, city=4524, lat=43.125031, lon=-89.303963, moving=2, location=3, time_of_day=4)),
train(itemId=37219, context=context(ts=1421443923, city=4524, lat=43.125031, lon=-89.303963, moving=2, location=3, time_of_day=4)),
train(itemId=6575, context=context(ts=1421443927, city=4524, lat=43.125031, lon=-89.303963, moving=2, location=3, time_of_day=4)),
train(itemId=98655, context=context(ts=1421443930, city=4524, lat=43.125031, lon=-89.303963, moving=2, location=3, time_of_day=4)),
train(itemId=43924, context=context(ts=1421443934, city=4524, lat=43.125031, lon=-89.303963, moving=2, location=3, time_of_day=4)),
train(itemId=47270, context=context(ts=1421443937, city=4524, lat=43.125031, lon=-89.303963, moving=2, location=3, time_of_day=4)),
train(itemId=44053, context=context(ts=1421443941, city=4524, lat=43.125031, lon=-89.303963, moving=2, location=3, time_of_day=4)),
train(itemId=20306, context=context(ts=1421443945, city=4524, lat=43.125031, lon=-89.303963, moving=2, location=3, time_of_day=4)),
train(itemId=79614, context=context(ts=1421443948, city=4524, lat=43.125031, lon=-89.303963, moving=2, location=3, time_of_day=4)),
train(itemId=88178, context=context(ts=1421443952, city=4524, lat=43.125031, lon=-89.303963, moving=2, location=3, time_of_day=4)),
train(itemId=37219, context=context(ts=1421445125, city=4524, lat=43.13026, lon=-89.308403, moving=1, location=3, time_of_day=4)),
train(itemId=98655, context=context(ts=1421447345, city=4524, lat=43.128197, lon=-89.306664, moving=1, location=3, time_of_day=4)),
train(itemId=44053, context=context(ts=1421447345, city=4524, lat=43.128197, lon=-89.306664, moving=1, location=3, time_of_day=4)),
train(itemId=43924, context=context(ts=1421447345, city=4524, lat=43.128197, lon=-89.306664, moving=1, location=3, time_of_day=4)),
train(itemId=47270, context=context(ts=1421447345, city=4524, lat=43.128197, lon=-89.306664, moving=1, location=3, time_of_day=4)),
train(itemId=6575, context=context(ts=1421447345, city=4524, lat=43.128197, lon=-89.306664, moving=1, location=3, time_of_day=4)),
train(itemId=37219, context=context(ts=1421447346, city=4524, lat=43.128193, lon=-89.306664, moving=2, location=3, time_of_day=4)),
train(itemId=79614, context=context(ts=1421447346, city=4524, lat=43.128193, lon=-89.306664, moving=1, location=3, time_of_day=4)),
train(itemId=88178, context=context(ts=1421447346, city=4524, lat=43.128193, lon=-89.306664, moving=1, location=3, time_of_day=4)),
train(itemId=20306, context=context(ts=1421447346, city=4524, lat=43.128193, lon=-89.306664, moving=1, location=3, time_of_day=4)),
train(itemId=43924, context=context(ts=1421447868, city=4524, lat=43.128193, lon=-89.306656, moving=1, location=3, time_of_day=4)),
train(itemId=88178, context=context(ts=1421447874, city=4524, lat=43.128193, lon=-89.306656, moving=2, location=3, time_of_day=4)),
train(itemId=60075, context=context(ts=1421449474, city=12504, lat=43.181931, lon=-89.233154, moving=1, location=3, time_of_day=4)),
train(itemId=37219, context=context(ts=1421449501, city=12504, lat=43.181931, lon=-89.233154, moving=2, location=3, time_of_day=4)),
train(itemId=60075, context=context(ts=1421449533, city=12504, lat=43.180996, lon=-89.242714, moving=4, location=3, time_of_day=4)),
train(itemId=37219, context=context(ts=1421449654, city=12504, lat=43.201775, lon=-89.211151, moving=4, location=3, time_of_day=4)),
train(itemId=60075, context=context(ts=1421449766, city=12504, lat=43.186935, lon=-89.160118, moving=4, location=3, time_of_day=4)),
train(itemId=88178, context=context(ts=1421449892, city=12504, lat=43.211506, lon=-89.191826, moving=4, location=3, time_of_day=4)),
train(itemId=60075, context=context(ts=1421449904, city=12504, lat=43.211506, lon=-89.191826, moving=2, location=3, time_of_day=4)),
train(itemId=43924, context=context(ts=1421453467, city=9969, lat=43.463055, lon=-88.835358, moving=1, location=3, time_of_day=4)),
train(itemId=47270, context=context(ts=1421453528, city=9969, lat=43.463055, lon=-88.835358, moving=2, location=3, time_of_day=4)),
train(itemId=73047, context=context(ts=1421453643, city=9969, lat=43.463055, lon=-88.835358, moving=2, location=3, time_of_day=4)),
train(itemId=47270, context=context(ts=1421453670, city=9969, lat=43.463055, lon=-88.835358, moving=2, location=3, time_of_day=4)),
train(itemId=93731, context=context(ts=1421458388, city=9969, lat=43.463055, lon=-88.835365, moving=1, location=3, time_of_day=4)),
train(itemId=55396, context=context(ts=1421458436, city=9969, lat=43.463055, lon=-88.835365, moving=2, location=3, time_of_day=4)),
train(itemId=47270, context=context(ts=1421458466, city=9969, lat=43.463055, lon=-88.835365, moving=2, location=3, time_of_day=4)),
train(itemId=60075, context=context(ts=1421458569, city=9969, lat=43.463127, lon=-88.835342, moving=2, location=3, time_of_day=4)),
train(itemId=43924, context=context(ts=1421458727, city=9969, lat=43.463112, lon=-88.835442, moving=2, location=3, time_of_day=4)),
train(itemId=47270, context=context(ts=1421462244, city=9969, lat=43.463108, lon=-88.835434, moving=1, location=3, time_of_day=4)),
train(itemId=60075, context=context(ts=1421462327, city=9969, lat=43.463051, lon=-88.835403, moving=2, location=3, time_of_day=4)),
train(itemId=88178, context=context(ts=1421467305, city=9969, lat=43.463085, lon=-88.835365, moving=1, location=3, time_of_day=1)),
train(itemId=91914, context=context(ts=1421481952, city=9969, lat=43.463066, lon=-88.835381, moving=1, location=1, time_of_day=1)),
train(itemId=88178, context=context(ts=1421509794, city=9969, lat=43.463112, lon=-88.835434, moving=1, location=2, time_of_day=2)),
train(itemId=91914, context=context(ts=1421512945, city=9969, lat=43.463066, lon=-88.835342, moving=1, location=2, time_of_day=3)),
train(itemId=29345, context=context(ts=1421512985, city=9969, lat=43.463066, lon=-88.835342, moving=2, location=2, time_of_day=3)),
train(itemId=91914, context=context(ts=1421512992, city=9969, lat=43.463066, lon=-88.835342, moving=2, location=2, time_of_day=3)),
train(itemId=88178, context=context(ts=1421513018, city=9969, lat=43.46312, lon=-88.835335, moving=2, location=2, time_of_day=3)),
train(itemId=91914, context=context(ts=1421513028, city=9969, lat=43.46312, lon=-88.835335, moving=2, location=2, time_of_day=3)),
train(itemId=88178, context=context(ts=1421513387, city=9969, lat=43.463089, lon=-88.835335, moving=1, location=2, time_of_day=3)),
train(itemId=55396, context=context(ts=1421513396, city=9969, lat=43.463089, lon=-88.835335, moving=2, location=2, time_of_day=3)),
train(itemId=91914, context=context(ts=1421513403, city=9969, lat=43.463089, lon=-88.835335, moving=2, location=2, time_of_day=3)),
train(itemId=47270, context=context(ts=1421514100, city=9969, lat=43.46312, lon=-88.835457, moving=1, location=2, time_of_day=3)),
train(itemId=91914, context=context(ts=1421514142, city=9969, lat=43.46312, lon=-88.835457, moving=2, location=2, time_of_day=3)),
train(itemId=79614, context=context(ts=1421514249, city=9969, lat=43.463112, lon=-88.835464, moving=2, location=2, time_of_day=3)),
train(itemId=91914, context=context(ts=1421514336, city=9969, lat=43.4631, lon=-88.83535, moving=2, location=2, time_of_day=3)),
train(itemId=60075, context=context(ts=1421514391, city=9969, lat=43.463074, lon=-88.83548, moving=2, location=2, time_of_day=3)),
train(itemId=91914, context=context(ts=1421515037, city=9969, lat=43.463116, lon=-88.835396, moving=1, location=2, time_of_day=3)),
train(itemId=88178, context=context(ts=1421515310, city=9969, lat=43.463055, lon=-88.835335, moving=2, location=2, time_of_day=3)),
train(itemId=91914, context=context(ts=1421515312, city=9969, lat=43.463055, lon=-88.835335, moving=2, location=2, time_of_day=3)),
train(itemId=60075, context=context(ts=1421515315, city=9969, lat=43.463055, lon=-88.835335, moving=2, location=2, time_of_day=3)),
train(itemId=88178, context=context(ts=1421515666, city=9969, lat=43.463123, lon=-88.835365, moving=1, location=2, time_of_day=3)),
train(itemId=60075, context=context(ts=1421516174, city=9969, lat=43.46312, lon=-88.835419, moving=1, location=2, time_of_day=3)),
train(itemId=88178, context=context(ts=1421516244, city=9969, lat=43.463116, lon=-88.835457, moving=2, location=2, time_of_day=3)),
train(itemId=60075, context=context(ts=1421516893, city=9969, lat=43.463116, lon=-88.835373, moving=1, location=2, time_of_day=3)),
train(itemId=91914, context=context(ts=1421516924, city=9969, lat=43.463116, lon=-88.835373, moving=2, location=2, time_of_day=3)),
train(itemId=88178, context=context(ts=1421516932, city=9969, lat=43.463116, lon=-88.835373, moving=2, location=2, time_of_day=3)),
train(itemId=91914, context=context(ts=1421516944, city=9969, lat=43.463116, lon=-88.835373, moving=2, location=2, time_of_day=3)),
train(itemId=88178, context=context(ts=1421517017, city=9969, lat=43.46307, lon=-88.835396, moving=2, location=2, time_of_day=3)),
train(itemId=91914, context=context(ts=1421517033, city=9969, lat=43.463127, lon=-88.835442, moving=2, location=2, time_of_day=3)),
train(itemId=88178, context=context(ts=1421517259, city=9969, lat=43.46291, lon=-88.83522, moving=2, location=2, time_of_day=3)),
train(itemId=91914, context=context(ts=1421517375, city=9969, lat=43.46312, lon=-88.835464, moving=2, location=2, time_of_day=3)),
train(itemId=88178, context=context(ts=1421517416, city=9969, lat=43.463123, lon=-88.835449, moving=2, location=2, time_of_day=3)),
train(itemId=91914, context=context(ts=1421518465, city=9969, lat=43.463043, lon=-88.835365, moving=1, location=3, time_of_day=3)),
train(itemId=88178, context=context(ts=1421518722, city=9969, lat=43.46312, lon=-88.835472, moving=2, location=3, time_of_day=3)),
train(itemId=37219, context=context(ts=1421519025, city=9969, lat=43.4631, lon=-88.835449, moving=1, location=3, time_of_day=3)),
train(itemId=88178, context=context(ts=1421519030, city=9969, lat=43.4631, lon=-88.835449, moving=2, location=3, time_of_day=3)),
train(itemId=91914, context=context(ts=1421520034, city=9969, lat=43.483074, lon=-88.818748, moving=1, location=3, time_of_day=3)),
train(itemId=60075, context=context(ts=1421520072, city=9969, lat=43.485336, lon=-88.805756, moving=4, location=3, time_of_day=3)),
train(itemId=22560, context=context(ts=1421520104, city=9969, lat=43.485336, lon=-88.805756, moving=2, location=3, time_of_day=3)),
train(itemId=88178, context=context(ts=1421520131, city=9969, lat=43.487347, lon=-88.810539, moving=4, location=3, time_of_day=3)),
train(itemId=91914, context=context(ts=1421520158, city=9969, lat=43.487347, lon=-88.810539, moving=2, location=3, time_of_day=3)),
train(itemId=88178, context=context(ts=1421520277, city=9969, lat=43.487324, lon=-88.810616, moving=2, location=3, time_of_day=3)),
train(itemId=91914, context=context(ts=1421520606, city=9969, lat=43.488373, lon=-88.811615, moving=1, location=3, time_of_day=3)),
train(itemId=88178, context=context(ts=1421520662, city=9969, lat=43.488373, lon=-88.811615, moving=2, location=3, time_of_day=3)),
train(itemId=91914, context=context(ts=1421520724, city=9969, lat=43.488373, lon=-88.811615, moving=2, location=3, time_of_day=3)),
train(itemId=88178, context=context(ts=1421520763, city=9969, lat=43.488373, lon=-88.811615, moving=2, location=3, time_of_day=3)),
train(itemId=91914, context=context(ts=1421520774, city=9969, lat=43.488373, lon=-88.811615, moving=2, location=3, time_of_day=3)),
train(itemId=88178, context=context(ts=1421520878, city=9969, lat=43.488373, lon=-88.811615, moving=2, location=3, time_of_day=3)),
train(itemId=91914, context=context(ts=1421520887, city=9969, lat=43.488373, lon=-88.811615, moving=2, location=3, time_of_day=3)),
train(itemId=88178, context=context(ts=1421520934, city=9969, lat=43.488373, lon=-88.811615, moving=2, location=3, time_of_day=3)),
train(itemId=91914, context=context(ts=1421520947, city=9969, lat=43.488373, lon=-88.811615, moving=2, location=3, time_of_day=3)),
train(itemId=43924, context=context(ts=1421520990, city=9969, lat=43.488373, lon=-88.811615, moving=2, location=3, time_of_day=3)),
train(itemId=91914, context=context(ts=1421520991, city=9969, lat=43.488373, lon=-88.811615, moving=2, location=3, time_of_day=3)),
train(itemId=88178, context=context(ts=1421521002, city=9969, lat=43.488373, lon=-88.811615, moving=2, location=3, time_of_day=3)),
train(itemId=91914, context=context(ts=1421521007, city=9969, lat=43.488373, lon=-88.811615, moving=2, location=3, time_of_day=3)),
train(itemId=88178, context=context(ts=1421521047, city=9969, lat=43.488373, lon=-88.811615, moving=2, location=3, time_of_day=3)),
train(itemId=91914, context=context(ts=1421521127, city=9969, lat=43.488373, lon=-88.811615, moving=2, location=3, time_of_day=3)),
train(itemId=88178, context=context(ts=1421521204, city=9969, lat=43.488373, lon=-88.811615, moving=2, location=3, time_of_day=3)),
train(itemId=91914, context=context(ts=1421521231, city=9969, lat=43.488373, lon=-88.811615, moving=2, location=3, time_of_day=3)),
train(itemId=88178, context=context(ts=1421521406, city=9969, lat=43.488373, lon=-88.811615, moving=2, location=3, time_of_day=3)),
train(itemId=91914, context=context(ts=1421521414, city=9969, lat=43.488373, lon=-88.811615, moving=2, location=3, time_of_day=3)),
train(itemId=47270, context=context(ts=1421521449, city=9969, lat=43.488266, lon=-88.812042, moving=3, location=3, time_of_day=3)),
train(itemId=91914, context=context(ts=1421521458, city=9969, lat=43.488266, lon=-88.812042, moving=2, location=3, time_of_day=3)),
train(itemId=88178, context=context(ts=1421521742, city=9969, lat=43.488266, lon=-88.812042, moving=2, location=3, time_of_day=3)),
train(itemId=91914, context=context(ts=1421521753, city=9969, lat=43.488266, lon=-88.812042, moving=2, location=3, time_of_day=3)),
train(itemId=88178, context=context(ts=1421521829, city=9969, lat=43.488266, lon=-88.812042, moving=2, location=3, time_of_day=3)),
train(itemId=55396, context=context(ts=1421522850, city=9969, lat=43.457397, lon=-88.832664, moving=1, location=3, time_of_day=3)),
train(itemId=91914, context=context(ts=1421522852, city=9969, lat=43.457397, lon=-88.832664, moving=2, location=3, time_of_day=3)),
train(itemId=79463, context=context(ts=1421522917, city=9969, lat=43.457397, lon=-88.832664, moving=2, location=3, time_of_day=3)),
train(itemId=91914, context=context(ts=1421522923, city=9969, lat=43.457397, lon=-88.832664, moving=2, location=3, time_of_day=3)),
train(itemId=57917, context=context(ts=1421524657, city=9969, lat=43.457401, lon=-88.832642, moving=1, location=3, time_of_day=3)),
train(itemId=47270, context=context(ts=1421526632, city=9969, lat=43.457382, lon=-88.832588, moving=1, location=3, time_of_day=4)),
train(itemId=57917, context=context(ts=1421526639, city=9969, lat=43.457382, lon=-88.832588, moving=2, location=3, time_of_day=4)),
train(itemId=91914, context=context(ts=1421526646, city=9969, lat=43.457382, lon=-88.832588, moving=2, location=3, time_of_day=4)),
train(itemId=22560, context=context(ts=1421526658, city=9969, lat=43.457382, lon=-88.832588, moving=2, location=3, time_of_day=4)),
train(itemId=91914, context=context(ts=1421526666, city=9969, lat=43.457382, lon=-88.832588, moving=2, location=3, time_of_day=4)),
train(itemId=79614, context=context(ts=1421531136, city=9969, lat=43.463085, lon=-88.835358, moving=1, location=3, time_of_day=4)),
train(itemId=43924, context=context(ts=1421531139, city=9969, lat=43.463085, lon=-88.835358, moving=2, location=3, time_of_day=4))],
[train(itemId=91914, context=context(ts=1421531140, city=9969, lat=43.463085, lon=-88.835358, moving=2, location=3, time_of_day=4)),
train(itemId=22560, context=context(ts=1421531199, city=9969, lat=43.46307, lon=-88.835381, moving=2, location=3, time_of_day=4)),
train(itemId=47270, context=context(ts=1421531240, city=9969, lat=43.46307, lon=-88.835381, moving=2, location=3, time_of_day=4)),
train(itemId=91914, context=context(ts=1421531281, city=9969, lat=43.463116, lon=-88.835464, moving=2, location=3, time_of_day=4)),
train(itemId=88178, context=context(ts=1421531334, city=9969, lat=43.463058, lon=-88.835373, moving=2, location=3, time_of_day=4)),
train(itemId=43924, context=context(ts=1421531357, city=9969, lat=43.463058, lon=-88.835373, moving=2, location=3, time_of_day=4)),
train(itemId=44053, context=context(ts=1421531378, city=9969, lat=43.463066, lon=-88.835442, moving=2, location=3, time_of_day=4)),
train(itemId=20306, context=context(ts=1421531399, city=9969, lat=43.463066, lon=-88.835442, moving=2, location=3, time_of_day=4)),
train(itemId=91914, context=context(ts=1421531420, city=9969, lat=43.463066, lon=-88.835442, moving=2, location=3, time_of_day=4)),
train(itemId=43924, context=context(ts=1421531456, city=9969, lat=43.463104, lon=-88.835396, moving=2, location=3, time_of_day=4)),
train(itemId=91914, context=context(ts=1421531462, city=9969, lat=43.463104, lon=-88.835396, moving=2, location=3, time_of_day=4)),
train(itemId=37219, context=context(ts=1421537968, city=9969, lat=43.463078, lon=-88.835335, moving=1, location=3, time_of_day=4)),
train(itemId=91914, context=context(ts=1421537974, city=9969, lat=43.463078, lon=-88.835335, moving=2, location=3, time_of_day=4)),
train(itemId=88178, context=context(ts=1421541660, city=9969, lat=43.463062, lon=-88.835388, moving=1, location=3, time_of_day=4)),
train(itemId=20306, context=context(ts=1421541940, city=9969, lat=43.46307, lon=-88.835373, moving=2, location=3, time_of_day=4)),
train(itemId=44053, context=context(ts=1421541948, city=9969, lat=43.46307, lon=-88.835373, moving=2, location=3, time_of_day=4)),
train(itemId=88178, context=context(ts=1421541956, city=9969, lat=43.46307, lon=-88.835373, moving=2, location=3, time_of_day=4)),
train(itemId=91914, context=context(ts=1421541963, city=9969, lat=43.46307, lon=-88.835373, moving=2, location=3, time_of_day=4)),
train(itemId=37219, context=context(ts=1421541994, city=9969, lat=43.46307, lon=-88.835373, moving=2, location=3, time_of_day=4)),
train(itemId=91914, context=context(ts=1421542036, city=9969, lat=43.46312, lon=-88.835396, moving=2, location=3, time_of_day=4)),
train(itemId=79614, context=context(ts=1421542196, city=9969, lat=43.463043, lon=-88.835442, moving=2, location=3, time_of_day=4)),
train(itemId=37219, context=context(ts=1421542200, city=9969, lat=43.463047, lon=-88.835365, moving=3, location=3, time_of_day=4)),
train(itemId=79614, context=context(ts=1421542529, city=9969, lat=43.463066, lon=-88.835342, moving=1, location=3, time_of_day=4)),
train(itemId=91914, context=context(ts=1421542530, city=9969, lat=43.463066, lon=-88.835342, moving=2, location=3, time_of_day=4)),
train(itemId=88178, context=context(ts=1421542558, city=9969, lat=43.463036, lon=-88.835197, moving=2, location=3, time_of_day=4)),
train(itemId=91914, context=context(ts=1421542575, city=9969, lat=43.463036, lon=-88.835197, moving=2, location=3, time_of_day=4)),
train(itemId=88178, context=context(ts=1421542765, city=9969, lat=43.463047, lon=-88.83548, moving=2, location=3, time_of_day=4)),
train(itemId=93731, context=context(ts=1421542803, city=9969, lat=43.463081, lon=-88.835419, moving=2, location=3, time_of_day=4)),
train(itemId=88178, context=context(ts=1421542824, city=9969, lat=43.463081, lon=-88.835419, moving=2, location=3, time_of_day=4)),
train(itemId=91914, context=context(ts=1421542845, city=9969, lat=43.46307, lon=-88.835403, moving=2, location=3, time_of_day=4)),
train(itemId=88178, context=context(ts=1421542932, city=9969, lat=43.46307, lon=-88.835403, moving=2, location=3, time_of_day=4)),
train(itemId=91914, context=context(ts=1421542977, city=9969, lat=43.463009, lon=-88.835358, moving=2, location=3, time_of_day=4)),
train(itemId=47270, context=context(ts=1421543037, city=9969, lat=43.463066, lon=-88.835365, moving=2, location=3, time_of_day=4)),
train(itemId=91914, context=context(ts=1421543047, city=9969, lat=43.463066, lon=-88.835365, moving=2, location=3, time_of_day=4)),
train(itemId=88178, context=context(ts=1421543069, city=9969, lat=43.463108, lon=-88.835411, moving=2, location=3, time_of_day=4)),
train(itemId=43924, context=context(ts=1421543087, city=9969, lat=43.463108, lon=-88.835411, moving=2, location=3, time_of_day=4)),
train(itemId=91914, context=context(ts=1421543105, city=9969, lat=43.463108, lon=-88.835411, moving=2, location=3, time_of_day=4)),
train(itemId=88178, context=context(ts=1421544856, city=9969, lat=43.463093, lon=-88.835419, moving=1, location=3, time_of_day=4)),
train(itemId=91914, context=context(ts=1421544878, city=9969, lat=43.463093, lon=-88.835419, moving=2, location=3, time_of_day=4)),
train(itemId=43924, context=context(ts=1421545229, city=9969, lat=43.463058, lon=-88.835472, moving=1, location=3, time_of_day=4)),
train(itemId=91914, context=context(ts=1421545229, city=9969, lat=43.463058, lon=-88.835472, moving=1, location=3, time_of_day=4)),
train(itemId=1137, context=context(ts=1421545636, city=9969, lat=43.463112, lon=-88.835434, moving=1, location=3, time_of_day=4)),
train(itemId=91914, context=context(ts=1421545637, city=9969, lat=43.463112, lon=-88.835434, moving=2, location=3, time_of_day=4)),
train(itemId=55396, context=context(ts=1421545649, city=9969, lat=43.463112, lon=-88.835419, moving=2, location=3, time_of_day=4)),
train(itemId=91914, context=context(ts=1421545649, city=9969, lat=43.463112, lon=-88.835419, moving=1, location=3, time_of_day=4)),
train(itemId=44053, context=context(ts=1421545671, city=9969, lat=43.463116, lon=-88.835426, moving=2, location=3, time_of_day=4)),
train(itemId=91914, context=context(ts=1421545672, city=9969, lat=43.463116, lon=-88.835426, moving=2, location=3, time_of_day=4)),
train(itemId=88178, context=context(ts=1421547101, city=9969, lat=43.463017, lon=-88.835426, moving=1, location=3, time_of_day=4)),
train(itemId=55396, context=context(ts=1421547109, city=9969, lat=43.463017, lon=-88.835426, moving=2, location=3, time_of_day=4)),
train(itemId=91914, context=context(ts=1421547115, city=9969, lat=43.463017, lon=-88.835426, moving=2, location=3, time_of_day=4)),
train(itemId=60075, context=context(ts=1421547124, city=9969, lat=43.463017, lon=-88.835426, moving=2, location=3, time_of_day=4)),
train(itemId=22560, context=context(ts=1421547930, city=9969, lat=43.463081, lon=-88.835396, moving=1, location=3, time_of_day=4)),
train(itemId=60075, context=context(ts=1421548030, city=9969, lat=43.463154, lon=-88.835197, moving=2, location=3, time_of_day=4)),
train(itemId=91914, context=context(ts=1421549476, city=9969, lat=43.463158, lon=-88.835197, moving=1, location=3, time_of_day=4)),
train(itemId=20306, context=context(ts=1421551509, city=9969, lat=43.463116, lon=-88.835457, moving=1, location=3, time_of_day=4)),
train(itemId=47270, context=context(ts=1421551550, city=9969, lat=43.46307, lon=-88.835464, moving=2, location=3, time_of_day=4)),
train(itemId=91914, context=context(ts=1421551591, city=9969, lat=43.46307, lon=-88.835289, moving=2, location=3, time_of_day=4)),
train(itemId=6676, context=context(ts=1421551653, city=9969, lat=43.463131, lon=-88.835472, moving=2, location=3, time_of_day=4)),
train(itemId=91914, context=context(ts=1421551742, city=9969, lat=43.463047, lon=-88.835426, moving=2, location=3, time_of_day=4)),
train(itemId=36703, context=context(ts=1421551814, city=9969, lat=43.463108, lon=-88.835381, moving=2, location=3, time_of_day=4)),
train(itemId=91914, context=context(ts=1421551867, city=9969, lat=43.463135, lon=-88.835358, moving=2, location=3, time_of_day=4)),
train(itemId=55396, context=context(ts=1421551949, city=9969, lat=43.463116, lon=-88.835419, moving=2, location=3, time_of_day=4)),
train(itemId=91914, context=context(ts=1421551951, city=9969, lat=43.463116, lon=-88.835419, moving=2, location=3, time_of_day=4)),
train(itemId=1351, context=context(ts=1421551982, city=9969, lat=43.463104, lon=-88.835403, moving=2, location=3, time_of_day=4)),
train(itemId=43924, context=context(ts=1421551988, city=9969, lat=43.463104, lon=-88.835403, moving=2, location=3, time_of_day=4)),
train(itemId=22560, context=context(ts=1421552283, city=9969, lat=43.463078, lon=-88.83535, moving=2, location=3, time_of_day=4)),
train(itemId=67448, context=context(ts=1421552331, city=9969, lat=43.463078, lon=-88.83535, moving=2, location=3, time_of_day=4)),
train(itemId=60075, context=context(ts=1421559065, city=9969, lat=43.463131, lon=-88.835442, moving=1, location=1, time_of_day=1)),
train(itemId=47270, context=context(ts=1421559142, city=9969, lat=43.46312, lon=-88.835487, moving=2, location=1, time_of_day=1)),
train(itemId=6676, context=context(ts=1421559180, city=9969, lat=43.46312, lon=-88.835487, moving=2, location=1, time_of_day=1)),
train(itemId=12358, context=context(ts=1421560215, city=9969, lat=43.463116, lon=-88.835442, moving=1, location=1, time_of_day=1)),
train(itemId=60075, context=context(ts=1421561964, city=9969, lat=43.463127, lon=-88.835503, moving=1, location=1, time_of_day=1)),
train(itemId=88178, context=context(ts=1421562008, city=9969, lat=43.463127, lon=-88.835503, moving=2, location=1, time_of_day=1))]])]
In [6]:
number = 5
splitedRdd.filter(lambda row: len(row[1][1]) >= number).count()
Out[6]:
591
In [ ]:
Content source: rubattino/apprecsys
Similar notebooks: