Refine climate metrics and data pipeline

This commit is contained in:
2026-07-24 22:55:14 -04:00
parent 016f7386d8
commit 4e2d878e5b
32 changed files with 3557 additions and 3347 deletions
@@ -29,7 +29,6 @@ import geopandas as gpd
from shapely.geometry import box
from shapely.wkt import dumps as dump_wkt
DEFAULT_COUNTIES_GEOJSON = Path("data/geojson-counties-fips.json")
DEFAULT_ENDPOINT = "https://developer.nlr.gov/api/nsrdb/v2/solar/nsrdb-GOES-tmy-v4-0-0-download.json"
DEFAULT_POLAR_ENDPOINT = "https://developer.nlr.gov/api/nsrdb/v2/solar/nsrdb-polar-tmy-v4-0-0-download.json"
@@ -550,7 +549,7 @@ class ArchiveQueueMonitor:
)
)
now = time.monotonic()
for url, status in zip(unresolved_urls, statuses):
for url, status in zip(unresolved_urls, statuses, strict=True):
if status == "pending":
if url not in self.pending_urls:
ambiguous_403 += 1
@@ -584,7 +583,7 @@ class ArchiveQueueMonitor:
return {
"pending": sum(
status == "pending" and url in self.pending_urls
for url, status in zip(unresolved_urls, statuses)
for url, status in zip(unresolved_urls, statuses, strict=True)
),
"ambiguous_403": ambiguous_403,
"recently_downloaded": recently_downloaded,
@@ -1402,8 +1401,6 @@ def submit_county_request(
return [], build_error_row(county, profile, None, None, wkt, error)
for profile in request_profiles(args, county):
site_count: int | None = None
weight: int | None = None
final_profile = profile
try:
return [