/
data.py
51 lines (49 loc) · 2.08 KB
/
data.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# This is formatted to reveal the structure of the JSON data files.
tiny_data = \
{"events": [
{"type": "sms",
"src_number": "422-4785",
"dst_number": "731-0105",
"time": "2018-01-01 14:29:05",
"src_loc": [-79.42848154284123, 43.641401675960374],
"dst_loc": [-79.52745693913239, 43.750338501653374]},
{"type": "sms",
"src_number": "934-0592",
"dst_number": "136-5226",
"time": "2018-01-02 03:17:57",
"src_loc": [-79.45188229255568, 43.62186408875219],
"dst_loc": [-79.36866519485261, 43.680793196449336]},
{"type": "call",
"src_number": "422-4785",
"dst_number": "136-5226",
"time": "2018-01-03 02:14:31",
"duration": 117,
"src_loc": [-79.68079993411648, 43.64986163420895],
"dst_loc": [-79.46762523704258, 43.59568659654661]},
{"type": "call",
"src_number": "136-5226",
"dst_number": "861-1710",
"time": "2018-03-05 01:24:33",
"duration": 148,
"src_loc": [-79.32179993411648, 43.76386163420895],
"dst_loc": [-79.21362523704258, 43.67768659654661]}
],
"customers": [
{"lines": [{"number": "861-1710", "contract": "mtm"}], "id": 2247},
{"lines": [{"number": "426-4804", "contract": "term"},
{"number": "934-0592", "contract": "term"},
{"number": "131-3768", "contract": "prepaid"},
{"number": "386-6346", "contract": "term"}], "id": 3895},
{"lines": [{"number": "931-8588", "contract": "term"},
{"number": "981-7145", "contract": "mtm"},
{"number": "817-5571", "contract": "mtm"},
{"number": "581-0057", "contract": "mtm"},
{"number": "452-7360", "contract": "prepaid"}], "id": 8548},
{"lines": [{"number": "895-2223", "contract": "prepaid"},
{"number": "425-5910", "contract": "mtm"},
{"number": "731-0105", "contract": "term"},
{"number": "136-5226", "contract": "mtm"},
{"number": "422-4785", "contract": "prepaid"}], "id": 5716},
{"lines": [{"number": "829-6467", "contract": "term"}], "id": 9701}
]
}