Transform Garmin golf shot data into ShotPattern app format with an easy-to-use command-line interface. Tired of manual CSV edits? This tool automates the process! Just hit some shots with your Garmin Launch Monitor on the driving range, export the data, and let Garmin2ShotPattern handle the rest.
- 🪄 Setup Wizard - Interactive configuration for your specific clubs and data format
- 📁 Easy file selection - Browse and select Garmin CSV files with cursor navigation
- ⛳ Club mapping - Map your Garmin club names to ShotPattern identifiers
- 📏 Unit support - Configure meters/yards for distance and meters/feet/yards for deviation
- 🎯 Shot type configuration - Define whether shots are tee shots or approach shots
- 🎨 Beautiful interface - Clean, colorful terminal UI with interactive prompts
- 📊 Data validation - Shows club statistics and mapping status before transformation
- ✂️ Shot review - Review and optionally remove specific shots before export
- Python 3.11 or higher
- pip (Python package installer)
- make (optional, if you are familiar with python virtual environments)
- Python 3.11 or higher
- pip (Python package installer)
- make (optional, if you are familiar with python virtual environments)
(skip if you prefer manual setup)
make setupThis will:
- Create a virtual environment
- Install all required dependencies
- Prepare the application for use
Before transforming data, run the setup wizard to configure your club mappings:
make configure
# or
python setup_wizard.pyThis interactive wizard will:
- Ask for your preferred units (meters/yards, meters/feet/yards)
- Map columns in your Garmin CSV files
- Map your specific Garmin clubs to ShotPattern club identifiers
- Set default total distances for each club. This will be used as the target to calculate shot deviation.
- Save configuration to
config.json
You can re-run the wizard anytime to update your configuration.
make runOr manually:
# Activate virtual environment
source venv/bin/activate
# Run the application
python transform.pymake help # Show all available commands
make setup # Create virtual environment and install dependencies
make configure # Run setup wizard to configure club mappings
make run # Run the application
make clean # Remove cache files
make install # Install/update dependencies onlygarmin2shotpattern/
├── transform.py # Main CLI application
├── setup_wizard.py # Configuration wizard
├── enums.py # ShotPattern club identifiers
├── config.json # User configuration (generated by setup)
├── requirements.txt # Python dependencies
├── Makefile # Build automation
├── data/
│ ├── garmin/ # Place Garmin CSV files here
│ ├── output/ # Transformed CSV files
│ └── template/ # Template file
└── README.md # This file
The config.json file is generated by running make configure and stores your personal setup:
It will handle the column mapping as the Garmin Application has localized column headers.
{
"units": {
"distance": "meters",
"deviation": "meters"
},
"column_mapping": {
"Club": "Schlägername",
"Total": "Gesamtstrecke",
"Side": "Gesamtabweichungsdistanz"
},
"club_mappings": {
"Stealth I7": "7i",
"Stealth I8": "8i",
"Stealth AW 49°": "GW"
},
"target_distances": {
"7i": "150",
"8i": "140",
"GW": "110"
}
}Configuration Options:
units.distance: Display unit for distances ("meters" or "yards")units.deviation: Display unit for deviations ("meters", "feet", or "yards")column_mapping: Maps ShotPattern columns to your Garmin CSV column namesclub_mappings: Maps your specific Garmin club names to ShotPattern identifierstarget_distances: Default target distance for each club
The shotpattern_enums.py file contains all valid ShotPattern club identifiers:
Drivers & Woods:
Dr(Driver)2W,3W,4W,5W,7W,9W,11W,13W,15W
Hybrids:
1Hy,2Hy,3Hy,4Hy,5Hy,6Hy,7Hy,8Hy,9Hy,10Hy,11Hy,12Hy,13Hy,14Hy,15Hy
Irons:
1i,2i,3i,4i,5i,6i,7i,8i,9i,10i,11i
Wedges:
PW(Pitching Wedge)GW(Gap Wedge)SW(Sand Wedge)LW(Lob Wedge)48°,49°,50°,51°,52°,53°,54°,55°,56°,57°,58°,59°,60°,61°,62°,63°,64°
Putter:
Putter
-
Create some data!
- Run a Driving Range session in the Garmin Golf app
- Hit shots with your clubs to your default target distances of that club.
- Export the session data as a CSV file and place it in the
data/garmin/folder.
-
Run setup wizard (first time):
make configure- Select your preferred units
- Choose a sample Garmin CSV file
- Map your clubs to ShotPattern identifiers
- Set target distances for each club
-
Transform data:
make run- Select a Garmin CSV file to transform
- Review detected clubs and their mapping status
- Configure shot types (Tee/Approach) for each club
- Review and optionally remove specific shots
- Export to ShotPattern format
-
Import to ShotPattern app
- Find the transformed CSV in
data/output/ - Import into the ShotPattern mobile app
- Find the transformed CSV in
- pandas: Data manipulation and CSV processing
- click: Command-line interface framework
- rich: Beautiful terminal formatting
- InquirerPy: Interactive prompts with cursor navigation
Input (Garmin CSV):
- Must contain club name column (configurable)
- Should have distance and deviation columns (configurable)
- First row after headers contains units (automatically skipped)
Output (ShotPattern format):
- Club: Mapped club identifier (7i, 8i, GW, etc.)
- Type: "Tee" or "Approach"
- Target: Target distance in meters
- Total: Total distance measurement
- Side: Side deviation measurement
Contributions are welcome! Please open issues or pull requests for bug fixes, enhancements, or new features.
MIT License - see the LICENSE file for details.
Copyright (c) 2025 Bastian Winkler
"Python 3 is not installed"
- Install Python 3.11+ from python.org
"Virtual environment not found"
- Run
make setupfirst to create the environment
"config.json not found"
- Run
make configureto generate your configuration file
"No Garmin CSV files found"
- Ensure CSV files are in the
data/garmin/folder - Check that files have
.csvextension
"make: command not found"
- macOS: Install Xcode Command Line Tools with
xcode-select --install - Linux: Install build-essential with
sudo apt-get install build-essential
- Run
make configurefirst to set up your club mappings and units - Keep all your Garmin CSV files in
data/garmin/for easy access - Re-run
make configureanytime to update your configuration - The setup wizard remembers your previous settings as defaults
- Shot type configuration (Tee/Approach) is done per transformation
- Review the statistics table to catch any data issues
- Use the shot review feature to remove outliers before export
config.jsonstores your personal settings - don't commit it to version control- Use
make helpto see all available commands
Made with ⛳ for better golf shot analysis
