This project processes location data extracted via Google Takeout. It reads location records from a JSON file, calculates daily statistics based on movement data (walking, cycling, vehicle travel, etc.), and generates yearly summaries in Excel format.
Google Takeout provides a JSON file containing detailed location and activity records. This project reads and parses the JSON data, calculates various daily metrics (such as distance traveled by foot or vehicle), and organizes these metrics into an Excel report per year.
- JSON Parsing: Reads Google Takeout JSON location data with nested activity details.
- Daily Metrics Calculation: Calculates daily travel distances, active time, and average speed for different activities (e.g., on foot, by bicycle, in a vehicle).
- Excel Output: Generates yearly Excel sheets summarizing calculated metrics for each day, with support for custom output directories.
- CLI Support: Easily specify input files and output directories via command-line arguments.
Ensure you have Dart SDK installed on your system.
-
Clone this repository:
git clone https://github.com/artemkulyk/takeout_cli cd google-takeout-processor
-
Install dependencies:
dart pub get
Run the program by specifying the input file and optional output directory:
dart run bin/takeout_cli.dart -i path/to/Records.json -o path/to/output/folder
-i
: Specifies the path to the Google Takeout JSON file. If not provided, defaults toRecords.json
in the current directory.-o
: Specifies the output directory where Excel files will be saved. If not provided, defaults to the current directory. The directory will be created if it does not exist.
dart run bin/takeout_cli.dart -i ./data/Records.json -o ./out
The program outputs yearly Excel files in the specified directory, named Statistics_<year>.xlsx
, containing columns for:
- Date
- Point Count
- Total Distance (m)
- Active Time (min)
- Foot Distance (m)
- Bicycle Distance (m)
- Vehicle Distance (m)
- Vehicle Max Speed (m/s)
- Vehicle Avg Speed (m/s)
- Vehicle Time (min)
Each row represents daily statistics for that date.
This project works entirely offline and does not share or upload any data. The processed data remains on your local machine. Ensure that you manage your data responsibly as Google Takeout location files contain sensitive location and activity information.