Working-Hours
A python script that parses a Google Maps takeout to log the amount of hours you spend near a specific GPS coordinate. A great way to passively log working hours using Google's data.
Usage
This file is a standalone script so to use it you must edit the source code WorkingHours.py
The key parameters are
location_history_file
The path to theLocation History.json
file provided from Google Takoutwork_lat
The latitude of your work in degreeswork_lon
The longitude of your work in degreeswork_range
The range in meters around the coordinate defined bywork_lat
andwork_lon
to be considered "at work" (this compensates for GPS noise)start_date
The date to start counting fromstop_date
The date to stop counting from (None to go to the end of the dataset)dur_thresh
The duration threshold to be considered "at work" (this compensates for drive-by conditions)
Run this script using Python 3 with all the parameters defined above.
This has been tested on a takeout of approx. 780,000 waypoints and computation time on a fully loaded MacBook Pro (mid 2014) is about 1 minute for 9 months worth of waypoints.