cbeley / GoogleTakeoutLocationHistoryParser

Extract date ranges from your location history into GeoJSON and KML.
MIT License
13 stars 2 forks source link

Extract Driving Mileage data #3

Closed tauren closed 1 year ago

tauren commented 1 year ago

I've been looking for a script that will parse Takeout location data to create a Mileage Log for tax purposes.

Good news is that I tested your script on the current Takeout file format, and it processes them without failing. I've found that most of the other scripts that process Takeout files throw exceptions because they are expecting some older JSON structure. Bad news is that your script doesn't really do what I need. But it might be a good starting place...

Ideally, I'd like to export a CSV file with the following data on each row:

The hacker in me wants to whip this out, but realistically it isn't something I have time to do. So I'm just throwing this out as a potential use-case that your script could be adapted for if it interested you.

If you aren't interested, feel free to close this ticket. But it would be a useful tool for a lot of people. I believe Quickbooks Self Employed edition has a feature to import mileage data from Takeout. And another service called MileageWise also imports data from Takeout. So it seems like there is commercial demand for it.

tauren commented 1 year ago

I hacked something together for my personal needs. I was able to reuse a lot of your date interval and takeout data loading logic. Thanks for sharing your code! When I have some time, I'll clean up my hacked code and open source it as well.