google-data-analyses
google-data-analyses copied to clipboard
Script not compatible with locally stored timeline
As of a recent change performed by Google (a couple of months ago), the timeline is no longer stored centrally within Google Maps, but locally on a device (if enabled).
See this post for more details.
The locally-stored timeline can also be exported as a JSON file, but the structure is quite different from the one that this script can parse so far. Please find below a short sample extract:
{
"semanticSegments": [
{
"startTime": "2011-06-16T20:00:00.000+02:00",
"endTime": "2011-06-16T22:00:00.000+02:00",
"timelinePath": [
{
"point": "43.775309°, 9.071146°",
"time": "2011-06-16T20:41:00.000+02:00"
}
]
},
{
"startTime": "2011-06-16T20:41:27.000+02:00",
"endTime": "2011-06-17T09:02:33.000+02:00",
"startTimeTimezoneUtcOffsetMinutes": 120,
"endTimeTimezoneUtcOffsetMinutes": 120,
"visit": {
"hierarchyLevel": 0,
"probability": 0.7799999713897705,
"topCandidate": {
"placeId": "adjh234ghjadgjdd",
"semanticType": "INFERRED_HOME",
"probability": 0.9975311160087585,
"placeLocation": {
"latLng": "56.7754018°, 1.0711443°"
}
}
}
},
{
"startTime": "2011-06-17T08:00:00.000+02:00",
"endTime": "2011-06-17T10:00:00.000+02:00",
"timelinePath": [
{
"point": "56.775309°, 23.071146°",
"time": "2011-06-17T09:03:00.000+02:00"
},
{
"point": "40.778527°, 2.058678°",
"time": "2011-06-17T09:05:00.000+02:00"
},
{
"point": "40.778527°, 2.058678°",
"time": "2011-06-17T09:08:00.000+02:00"
},
{
"point": "40.778527°, 2.058678°",
"time": "2011-06-17T09:42:00.000+02:00"
},
{
"point": "40.778527°, 2.058678°",
"time": "2011-06-17T09:42:00.000+02:00"
}
]
},
{
"startTime": "2011-06-17T10:00:00.000+02:00",
"endTime": "2011-06-17T12:00:00.000+02:00",
"timelinePath": [
{
"point": "40.778527°, 2.058678°",
"time": "2011-06-17T10:20:00.000+02:00"
},
{
"point": "40.778527°, 2.058678°",
"time": "2011-06-17T10:24:00.000+02:00"
},
{
"point": "40.778527°, 2.058678°",
"time": "2011-06-17T10:29:00.000+02:00"
},
It would be great if the script could be adapted to the new format.