Driving Log

Since 2010, I’ve logged nearly all of my driving (both personal and rental cars) by downloading location data from GPS devices.

Map of North America showing driving tracks.

My driving, North America, 2010–2022. (As of 2022, I’ve also driven in Hawaii, Puerto Rico, Germany, Iceland, Australia, and New Zealand.)

I’ve started adding annual driving maps to my recent Year in Travel posts.

Technical Details

I am currently on version 3.0 of my driving log.

Data Collection

My primary device for logging my driving is a Bad Elf GPS Pro+ GPS data logger. I’ve also historically used a number of Garmin automotive GPS devices from the DriveSmart and nüvi series. All of these data loggers can export data as GPX files.

Data Storage

My driving log is stored in a GeoPackage database file. All driving tracks are stored in a driving_tracks LineString layer, with the following attributes:

Name Type Value
fid Integer64 Feature ID
utc_start DateTime UTC timestamp for the beginning of the track
utc_stop DateTime UTC timestamp for the end of the track
creator String Device or software used to create the track (e.g. Bad Elf GPS Pro+ or myTracks)
role String driver or passenger
vehicle_owner String personal (the log owner’s own vehicle), private (a privately owned vehicle, such as a friend’s car), or rental (a rental vehicle)
comments String Optional comments
source_track_timestamp DateTime UTC timestamp for the first point of the source GPX track before any processing. Used to identify a track to determine if it has already been imported.

(I also created an empty GeoPackage file template with this structure, if needed.)

For archival purposes, I also keep folder of all of the original source GPX files that have been imported into my driving log.

Data Processing

I maintain a number of GPS data processing scripts in a GitHub repository at bogardpd/gps-log-tools. These scripts are primarily written in Python, and interaction with the GeoPackage driving log database file is done through the GeoPandas library.

Diagram showing input files (GPX) flowing into an import_gpx.py container with an Import GPX step, flowing into a driving log (GeoPackage), flowing into an export_kmz.py container with an Export KMZ step, flowing into an output file (KMZ).

Process flow for GeoPackage driving log with KMZ output

My two primary scripts are import_gpx.py (which imports one or more GPX files from a GPS data logger into my GeoPackage database file) and export_kmz.py (which exports the current driving log from the GeoPackage database into a KMZ file that I can open with Google Earth).

I also wrote a number of utility scripts for processing the idiosyncrasies of various GPS loggers; these are described in the README.

Resources

See my Mapping Resources page.

Relevant Posts

2022 Year in Travel

31 Dec 2022 · This year I spent 97 nights traveling, visited my 100th airport, flew 74 times (including my 1000th flight), and had some issues with rental cars.

Automating myTracks Driving Log Filtering with iOS Shortcuts

18 Dec 2022 · How I use iOS automation to record when I start and stop driving.

2021 Year in Travel

31 Dec 2021 · My travel statistics for 2021.

2020 Year in Travel

31 Dec 2020 · My travel statistics for 2020. For obvious reasons, travel has been substantially lower than in recent years.

2019 Year in Travel

31 Dec 2019 · My travel statistics for 2019.

Tags: