Integration: Google Maps Timeline / Location History (meta: what about backfill-only integrations?) #350
Description
- App: "Google Maps"
- Website: https://www.google.com/maps/timeline
Google Maps allows to store one's location history. Personally, I have been recording my position since 2009. The data is entirely private to the individual.
API
As far as I know, there is no public API to consume the data. However, users can download their entire location history via Google Takeout.
When doing so, one currently gets two feeds:
- a JSON with all the recorded raw positions
- a folder with many JSON files containing a semantic analysis of the above positions
This second one is the most interesting, as it includes items like this:
}, {
"activitySegment" : {
"startLocation" : {
"latitudeE7" : 376170755,
"longitudeE7" : -1223805551
},
"endLocation" : {
"latitudeE7" : 474489486,
"longitudeE7" : -1223033108
},
"duration" : {
"startTimestampMs" : "1579623399874",
"endTimestampMs" : "1579632555789"
},
"distance" : 1093383,
"activityType" : "FLYING",
"confidence" : "HIGH",
[...]
}
}
}, {
This means that by parsing these JSON files, North app would be able to get all my past flights, as well as all my past car, cycling, subway train trips... But not the future ones.
Parsing these JSON doesn't seem hard. For a better user experience, there is probably also the need for unzipping what users download from takeout, which can be done with jszip. I might be able to give a hand.
This leads to a meta question: Should the North app support such "backfill" only integrations? or is the idea to only build integrations that constantly fetch data.
My opinion is that such backfills are valuable:
- to be able to compare my past impact with my current impact
- to have an estimate of how much CO2 I previously released per year / past months
- users can do periodic import of the data to keep things roughly up to date.