Fix path references in scripts after reorganization

Update 8 scripts to use Path(__file__).parent.parent as PROJECT_ROOT
so they resolve data/, output/, and internet_cables/ relative to the
project root rather than the caller's working directory.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-27 21:57:42 -07:00
parent ee5856661a
commit 6db5e0fff8
8 changed files with 22 additions and 11 deletions

View File

@@ -5,6 +5,7 @@ and city-level network-dominance points from PostGIS.
import argparse
import json
import os
from pathlib import Path
import psycopg2
@@ -307,7 +308,7 @@ def parse_args():
p = argparse.ArgumentParser(
description="Render a Leaflet map combining data centers, submarine cables, and city dominance."
)
p.add_argument("--output", default="data_centers_cables_map.html")
p.add_argument("--output", default=str(Path(__file__).parent.parent / "output" / "data_centers_cables_map.html"))
p.add_argument(
"--us-cities-only",
action="store_true",