Based on Google Location History, get the days you were in the office similar to GitHub contributions heatmap.
Color scale:
Default radius: 150 meters.
- Download your Google Location History (Timeline) from Google Takeout.
git clone https://github.com/Maxim-Mazurok/google-location-history-office-days
- Unzip, find
Records.json
and copy it todata
folder inside of thegoogle-location-history-office-days
folder. - Install dependencies:
pip install -r requirements.txt
(not all of them are necessary, you can skip this step and install only the ones you need later if you get an error) - Find your office location (latitude and longitude) and update
parse.py
, seetarget_latitude
andtarget_longitude
variables. You can right-click on Google Maps, click on coordinates to copy (include all the digits when pasting). - Parse data:
python parse.py
(it may take a while) - Generate heatmap:
python chart.py
Also you can use office-days.py
to get the number of days/hours you were in the office in the last financial year to help with your tax return.
Note: it shows data in Sydney timezone, you may need to adjust it in parse.py
if you are in a different timezone.
This project is for educational purposes only. I do not take any responsibility for the accuracy or any other issues caused by the use of this project.
Most of the code was written with ChatGPT 4o and ChatGPT 4o with canvas (beta).
It might be missing something, maybe using Semantic Location History
and look for "semanticType": "TYPE_WORK"
would work better, this project relies on the "raw" data.