This directory contains scripts for managing compressed data files in the repository.
To keep the repository size manageable, large data files are stored compressed:
- GeoJSON files:
oh/*.geojson.gz(~43MB compressed vs ~418MB uncompressed) - CSV files:
georef-united-states-of-america-zc-point.csv.gz(~1.6MB vs ~5MB)
Compresses all GeoJSON and CSV files for repository storage.
Usage:
./scripts/compress_data.shWhen to use:
- Before committing new or updated data files
- After downloading fresh county data
- When adding new GeoJSON files to the
oh/directory
What it does:
- Compresses all
.geojsonfiles inoh/directory using gzip -9 (maximum compression) - Compresses the ZIP code CSV file
- Keeps original files intact (uses
-kflag) - Shows compression statistics
Decompresses all .gz files for runtime use.
Usage:
./scripts/decompress_data.shWhen to use:
- After cloning the repository
- When switching branches that have different data
- When
.gzfiles are newer than decompressed versions - Automatically runs during Docker build
What it does:
- Decompresses all
oh/*.geojson.gzfiles - Decompresses the ZIP code CSV file
- Only decompresses if target file is missing or older than
.gzversion - Safe to run multiple times (skips already-decompressed files)
The .gitignore is configured to:
- ✅ Include compressed files (
.gz) - ❌ Exclude uncompressed files (
.geojson,.csv) - ❌ Exclude metadata files (
.geojson.meta)
The Dockerfile automatically:
- Copies compressed files from the builder stage
- Runs
decompress_data.shduring image build - Ensures all data is ready before the application starts
After adding/updating data:
# 1. Compress the files
./scripts/compress_data.sh
# 2. Stage only the .gz files
git add oh/*.geojson.gz
git add georef-united-states-of-america-zc-point.csv.gz
# 3. Commit
git commit -m "Update Ohio county data"After cloning/pulling:
# Decompress for local development
./scripts/decompress_data.sh
# Or just run the app (Docker handles it automatically)
docker compose up- Compressed files use maximum compression (
gzip -9) - Original files are preserved during compression (
-kflag) - Decompression is idempotent (safe to run multiple times)
- The app expects decompressed files at runtime
