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 in the Contiguous United States, 2010–2023

basemap © Mapbox © OpenStreetMap (Improve this map)

Map of North America showing driving tracks.

My Driving in Alaska, Hawaii, and Puerto Rico, 2010–2023

basemap © Mapbox © OpenStreetMap (Improve this map)

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.

Tags: