turambar928 commited on
Commit
5c294d2
·
verified ·
1 Parent(s): c686278

Upload folder using huggingface_hub (part 149)

Browse files
Files changed (50) hide show
  1. 20260906-200431-transport-safety-4a6be9/tests/reference/ground_truth/code_block_inventory.csv +88 -0
  2. 20260906-200431-transport-safety-4a6be9/tests/reference/ground_truth/keyword_inventory.csv +10 -0
  3. 20260906-200431-transport-safety-4a6be9/tests/reference/ground_truth/section_outline.csv +50 -0
  4. 20260906-200431-transport-safety-4a6be9/tests/reference/ground_truth/summary.json +11 -0
  5. 20260906-200431-transport-safety-4a6be9/tests/reference/internal/workflow_adapters_runtime.py +679 -0
  6. 20260906-200431-transport-safety-4a6be9/tests/reference/internal/workflow_runtime.py +5 -0
  7. 20260906-200431-transport-safety-4a6be9/tests/reference/reference_manifest.json +34 -0
  8. 20260906-200431-transport-safety-4a6be9/tests/reference/reference_solution.py +20 -0
  9. 20260906-200431-transport-safety-4a6be9/tests/test.sh +29 -0
  10. 20260906-200501-transport-safety-79813e/.DS_Store +3 -0
  11. 20260906-200501-transport-safety-79813e/environment/Dockerfile +12 -0
  12. 20260906-200501-transport-safety-79813e/environment/public_data/README.md +11 -0
  13. 20260906-200501-transport-safety-79813e/environment/public_data/input/README.md +6 -0
  14. 20260906-200501-transport-safety-79813e/environment/public_data/input/analysis_spec.json +95 -0
  15. 20260906-200501-transport-safety-79813e/environment/public_data/input/source_context_windows.jsonl +0 -0
  16. 20260906-200501-transport-safety-79813e/environment/public_data/input/tutorial_metadata.json +31 -0
  17. 20260906-200501-transport-safety-79813e/environment/public_data/input/tutorial_source.html +0 -0
  18. 20260906-200501-transport-safety-79813e/environment/public_data/input/tutorial_text_windows.csv +0 -0
  19. 20260906-200501-transport-safety-79813e/environment/public_data/main.py +180 -0
  20. 20260906-200501-transport-safety-79813e/environment/public_data/software/command_examples.csv +10 -0
  21. 20260906-200501-transport-safety-79813e/environment/public_data/software/software_manifest.json +19 -0
  22. 20260906-200501-transport-safety-79813e/environment/public_data/software/validate_outputs.py +41 -0
  23. 20260906-200501-transport-safety-79813e/environment/public_data/task_card.json +114 -0
  24. 20260906-200501-transport-safety-79813e/instruction.md +33 -0
  25. 20260906-200501-transport-safety-79813e/solution/internal/workflow_adapters_runtime.py +679 -0
  26. 20260906-200501-transport-safety-79813e/solution/internal/workflow_runtime.py +5 -0
  27. 20260906-200501-transport-safety-79813e/solution/reference_solution.py +20 -0
  28. 20260906-200501-transport-safety-79813e/solution/solve.sh +7 -0
  29. 20260906-200501-transport-safety-79813e/task.toml +45 -0
  30. 20260906-200501-transport-safety-79813e/tests/Dockerfile +6 -0
  31. 20260906-200501-transport-safety-79813e/tests/evaluator_runner.py +92 -0
  32. 20260906-200501-transport-safety-79813e/tests/reference/__pycache__/evaluator.cpython-312.pyc +0 -0
  33. 20260906-200501-transport-safety-79813e/tests/reference/evaluator.py +114 -0
  34. 20260906-200501-transport-safety-79813e/tests/reference/ground_truth/code_block_inventory.csv +88 -0
  35. 20260906-200501-transport-safety-79813e/tests/reference/ground_truth/keyword_inventory.csv +12 -0
  36. 20260906-200501-transport-safety-79813e/tests/reference/ground_truth/section_outline.csv +50 -0
  37. 20260906-200501-transport-safety-79813e/tests/reference/ground_truth/summary.json +11 -0
  38. 20260906-200501-transport-safety-79813e/tests/reference/internal/workflow_adapters_runtime.py +679 -0
  39. 20260906-200501-transport-safety-79813e/tests/reference/internal/workflow_runtime.py +5 -0
  40. 20260906-200501-transport-safety-79813e/tests/reference/reference_manifest.json +34 -0
  41. 20260906-200501-transport-safety-79813e/tests/reference/reference_solution.py +20 -0
  42. 20260906-200501-transport-safety-79813e/tests/test.sh +29 -0
  43. 20260906-225059-science-environment-679c04/.DS_Store +3 -0
  44. 20260906-225059-science-environment-679c04/environment/Dockerfile +12 -0
  45. 20260906-225059-science-environment-679c04/environment/public_data/README.md +11 -0
  46. 20260906-225059-science-environment-679c04/environment/public_data/input/README.md +6 -0
  47. 20260906-225059-science-environment-679c04/environment/public_data/input/analysis_spec.json +76 -0
  48. 20260906-225059-science-environment-679c04/environment/public_data/input/source_context_windows.jsonl +0 -0
  49. 20260906-225059-science-environment-679c04/environment/public_data/input/usgs_fdsn_andes_1988_1989_m4p5.csv +574 -0
  50. 20260906-225059-science-environment-679c04/environment/public_data/main.py +180 -0
20260906-200431-transport-safety-4a6be9/tests/reference/ground_truth/code_block_inventory.csv ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ block_index,line_count,char_count,contains_code_term,first_line
2
+ 1,2,103,true,netconvert --node-files=MyNodes.nod.xml --edge-files=MyEdges.edg.xml \
3
+ 2,3,219,true,netconvert -- node - files = MyNodes . nod . xml -- edge - files = MyEdges . edg . xml \
4
+ 3,1,68,false,"<node id= ""<STRING>"" x= ""<FLOAT>"" y= ""<FLOAT>"" [ type= ""<TYPE>"" ] />"
5
+ 4,11,815,false,<nodes> <!-- The opening tag -->
6
+ 5,4,86,false,<nodes>
7
+ 6,14,993,false,<edges>
8
+ 7,5,180,false,... previous definitions ...
9
+ 8,5,194,false,... previous definitions ...
10
+ 9,7,261,false,"<edge id= ""<ID>"" > "
11
+ 10,5,192,false,... previous definitions ...
12
+ 11,6,215,false,... previous definitions ...
13
+ 12,3,62,false,"<edge id= ""123"" > "
14
+ 13,3,64,false,"<edge id= ""-123"" > "
15
+ 14,4,106,false,<edges>
16
+ 15,8,165,false,<edges>
17
+ 16,4,142,false,<edges>
18
+ 17,14,597,false,<edges>
19
+ 18,5,203,false,<types>
20
+ 19,3,115,false,"<type id= ""a"" priority= ""3"" numLanes= ""3"" speed= ""38.89"" > "
21
+ 20,1,53,false,"<connection from=""<FROM_EDGE_ID>"" to=""<T0_EDGE_ID>""/>"
22
+ 21,1,89,false,"<connection from=""<FROM_EDGE_ID>"" to=""<T0_EDGE_ID>"" fromLane=""<INT_1>"" toLane=""<INT_2>""/>"
23
+ 22,1,49,false,"<delete from=""<FROM_EDGE_ID>"" to=""<T0_EDGE_ID>""/>"
24
+ 23,1,48,false,"<connection from=""<FROM_EDGE_ID>"" reset=""true""/>"
25
+ 24,6,177,false,<connections>
26
+ 25,6,281,false,<connections>
27
+ 26,21,1224,false,<connections>
28
+ 27,4,166,false,<connections>
29
+ 28,1,60,false,"<crossing node= ""C"" edges= ""edge1 edge2"" priority= ""true"" />"
30
+ 29,1,163,false,"<walkingArea node= ""C"" edges= ""SC"" shape= ""115.88,88.57 120.38,88.57 120.38,86.87 120.37,83.87 119.86,80.83 118.46,78.53 115.46,78.50 113.74,78.55 113.73,83.05"" />"
31
+ 30,1,6,false,static
32
+ 31,1,8,false,actuated
33
+ 32,1,9,false,opposites
34
+ 33,1,8,false,incoming
35
+ 34,1,15,false,alternateOneWay
36
+ 35,1,8,false,priority
37
+ 36,1,13,false,traffic_light
38
+ 37,1,17,false,right_before_left
39
+ 38,1,17,false,left_before_right
40
+ 39,1,11,false,unregulated
41
+ 40,1,25,false,traffic_light_unregulated
42
+ 41,1,13,false,priority_stop
43
+ 42,1,11,false,allway_stop
44
+ 43,1,11,false,rail_signal
45
+ 44,1,6,false,zipper
46
+ 45,1,13,false,rail_crossing
47
+ 46,1,26,false,traffic_light_right_on_red
48
+ 47,1,8,false,dead_end
49
+ 48,1,4,false,type
50
+ 49,1,10,false,importance
51
+ 50,1,11,false,"pass=""true"""
52
+ 51,1,6,false,<node>
53
+ 52,1,6,false,<join>
54
+ 53,1,13,false,<joinExclude>
55
+ 54,1,5,false,nodes
56
+ 55,1,2,false,id
57
+ 56,1,12,false,"reset=""true"""
58
+ 57,1,303,false,"<edge id=""<STRING>"" from=""<NODE_ID>"" to=""<NODE_ID>"" [type=""<STRING>""] [numLanes=""<INT>""] [speed=""<FLOAT>""] [priority=""<UINT>""] [length=""<FLOAT>""] [shape=""<2D-POSITION>[ <2D-POSITION>]*""] [spreadType="""
59
+ 58,1,31,false,"from=""<NODE_ID>"" to=""<NODE_ID>"""
60
+ 59,1,4,false,from
61
+ 60,1,2,false,to
62
+ 61,1,8,false,numLanes
63
+ 62,1,5,false,speed
64
+ 63,1,5,false,allow
65
+ 64,1,8,false,disallow
66
+ 65,1,5,false,shape
67
+ 66,1,19,false,"spreadType=""center"""
68
+ 67,1,19,false,"allow=""bus bicycle"""
69
+ 68,1,14,false,"disallow=""all"""
70
+ 69,1,10,false,changeLeft
71
+ 70,1,11,false,changeRight
72
+ 71,1,10,false,stopOffset
73
+ 72,1,8,false,vClasses
74
+ 73,1,10,false,exceptions
75
+ 74,1,5,false,value
76
+ 75,1,8,false,"pos=""30"""
77
+ 76,1,5,false,lanes
78
+ 77,1,7,false,<neigh>
79
+ 78,1,6,false,<type>
80
+ 79,1,8,false,maxSpeed
81
+ 80,1,8,false,speedDev
82
+ 81,1,11,false,speedFactor
83
+ 82,1,12,false,FROM_EDGE_ID
84
+ 83,1,144,false,"<prohibition prohibitor=""<PROHIBITING_FROM_EDGE_ID>-><PROHIBITING_TO_EDGE_ID>"" prohibited=""<PROHIBITED_FROM_EDGE_ID>-><PROHIBITED_TO_EDGE_ID>""/>"
85
+ 84,1,13,false,<tlLogic ...>
86
+ 85,1,17,false,<connection .../>
87
+ 86,1,7,false,<phase>
88
+ 87,1,11,false,walkingArea
20260906-200431-transport-safety-4a6be9/tests/reference/ground_truth/keyword_inventory.csv ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ term,category,count,first_window,appears_in_code
2
+ .net.xml,code,9,12,true
3
+ .rou.xml,code,0,,false
4
+ netedit,code,3,119,false
5
+ sumo,code,33,1,true
6
+ edge,required,321,4,true
7
+ network,required,40,4,true
8
+ node,required,145,3,true
9
+ simulation,required,9,13,false
10
+ vehicle,required,77,8,true
20260906-200431-transport-safety-4a6be9/tests/reference/ground_truth/section_outline.csv ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ rank,heading_level,heading_text,slug
2
+ 1,h1,PlainXML,plainxml
3
+ 2,h1,Node Descriptions #,node_descriptions
4
+ 3,h2,Traffic lights #,traffic_lights
5
+ 4,h3,tlType #,tltype
6
+ 5,h3,tlLayout #,tllayout
7
+ 6,h2,Node types #,node_types
8
+ 7,h2,Right-of-way #,right_of_way
9
+ 8,h3,"rightOfWay=""default"" #",rightofway_default
10
+ 9,h3,"rightOfWay=""mixedPriority"" #",rightofway_mixedpriority
11
+ 10,h3,"rightOfWay=""edgePriority"" #",rightofway_edgepriority
12
+ 11,h3,"rightOfWay=""allwayStop"" #",rightofway_allwaystop
13
+ 12,h3,Special Cases #,special_cases
14
+ 13,h3,Understanding right-of-way rules in a Network #,understanding_right_of_way_rules_in_a_network
15
+ 14,h3,Modifying Right-of-Way #,modifying_right_of_way
16
+ 15,h2,Fringe #,fringe
17
+ 16,h2,Joining Nodes #,joining_nodes
18
+ 17,h3,Reasons for joining node clusters #,reasons_for_joining_node_clusters
19
+ 18,h3,Algorithm for joining node clusters #,algorithm_for_joining_node_clusters
20
+ 19,h3,Specifying and excluding explicit joins #,specifying_and_excluding_explicit_joins
21
+ 20,h3,Connections after joining nodes #,connections_after_joining_nodes
22
+ 21,h1,Edge Descriptions #,edge_descriptions
23
+ 22,h2,SpreadType #,spreadtype
24
+ 23,h2,"Road access permissions (allow, disallow) #",road_access_permissions_allow_disallow
25
+ 24,h2,Lane-specific Definitions #,lane_specific_definitions
26
+ 25,h3,lane change restrictions #,lane_change_restrictions
27
+ 26,h2,Stop Offsets #,stop_offsets
28
+ 27,h2,Road Segment Refining #,road_segment_refining
29
+ 28,h2,Roundabouts #,roundabouts
30
+ 29,h2,Neighboring opposite-direction Lanes #,neighboring_opposite_direction_lanes
31
+ 30,h2,Deleting edges or lanes #,deleting_edges_or_lanes
32
+ 31,h1,Type Descriptions #,type_descriptions
33
+ 32,h2,vehicle-class specific speed limits #,vehicle_class_specific_speed_limits
34
+ 33,h2,speed on junction #,speed_on_junction
35
+ 34,h1,Connection Descriptions #,connection_descriptions
36
+ 35,h2,Explicitly setting which Edge / Lane is connected to which #,explicitly_setting_which_edge_lane_is_connected_to_which
37
+ 36,h3,Edge-to-Edge connectivity #,edge_to_edge_connectivity
38
+ 37,h3,Lane-to-Lane connectivity #,lane_to_lane_connectivity
39
+ 38,h3,Deleting connections #,deleting_connections
40
+ 39,h3,Patching connections and guessing again #,patching_connections_and_guessing_again
41
+ 40,h3,Examples #,examples
42
+ 41,h2,Setting Connection Priorities #,setting_connection_priorities
43
+ 42,h2,Multiple connections from the same edge to the same target lane #,multiple_connections_from_the_same_edge_to_the_same_target_lane
44
+ 43,h1,Traffic Light Program Definition #,traffic_light_program_definition
45
+ 44,h2,traffic light definitions #,traffic_light_definitions
46
+ 45,h2,controlled connections #,controlled_connections
47
+ 46,h1,Pedestrian Crossings #,pedestrian_crossings
48
+ 47,h1,Walking Areas #,walking_areas
49
+ 48,h4,Search,search
50
+ 49,h4,Keyboard Shortcuts,keyboard_shortcuts
20260906-200431-transport-safety-4a6be9/tests/reference/ground_truth/summary.json ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "software_name": "SUMO",
3
+ "source_file": "tutorial_source.html",
4
+ "window_count": 475,
5
+ "heading_count": 49,
6
+ "code_block_count": 87,
7
+ "keyword_total": 637,
8
+ "unique_required_terms_found": 5,
9
+ "top_keyword": "edge",
10
+ "source_character_count": 60096
11
+ }
20260906-200431-transport-safety-4a6be9/tests/reference/internal/workflow_adapters_runtime.py ADDED
@@ -0,0 +1,679 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import annotations
2
+
3
+ import csv
4
+ import datetime as dt
5
+ import html
6
+ import json
7
+ import math
8
+ import re
9
+ import shutil
10
+ import statistics
11
+ from pathlib import Path
12
+ from typing import Any
13
+
14
+
15
+ def _read_json(path: Path) -> Any:
16
+ with path.open("r", encoding="utf-8") as handle:
17
+ return json.load(handle)
18
+
19
+
20
+ def _write_json(path: Path, payload: Any) -> None:
21
+ path.parent.mkdir(parents=True, exist_ok=True)
22
+ with path.open("w", encoding="utf-8") as handle:
23
+ json.dump(payload, handle, ensure_ascii=False, indent=2)
24
+ handle.write("\n")
25
+
26
+ def _stable_region(place: str) -> str:
27
+ if not place:
28
+ return "unknown"
29
+ if "," in place:
30
+ return place.split(",")[-1].strip() or place.strip()
31
+ parts = place.split()
32
+ return " ".join(parts[-2:]) if len(parts) >= 2 else place.strip()
33
+
34
+
35
+ def _mag_bin(value: float | None) -> str:
36
+ if value is None or math.isnan(value):
37
+ return "unknown"
38
+ lower = math.floor(value)
39
+ upper = lower + 1
40
+ return f"{lower:.0f}-{upper:.0f}"
41
+
42
+
43
+ def _depth_bin(value: float | None) -> str:
44
+ if value is None or math.isnan(value):
45
+ return "unknown"
46
+ if value < 0:
47
+ return "<0"
48
+ if value < 10:
49
+ return "0-10"
50
+ if value < 30:
51
+ return "10-30"
52
+ if value < 70:
53
+ return "30-70"
54
+ if value < 300:
55
+ return "70-300"
56
+ return "300+"
57
+
58
+
59
+ def _clean_markup_text(raw: str) -> str:
60
+ text = re.sub(r"(?is)<(script|style|noscript)[^>]*>.*?</\1>", " ", raw)
61
+ text = re.sub(r"(?is)<br\s*/?>", "\n", text)
62
+ text = re.sub(r"(?is)</(p|div|li|tr|h[1-6]|pre)>", "\n", text)
63
+ text = re.sub(r"(?is)<[^>]+>", " ", text)
64
+ text = html.unescape(text)
65
+ text = re.sub(r"[ \t]+", " ", text)
66
+ text = re.sub(r"\n\s+", "\n", text)
67
+ return text.strip()
68
+
69
+
70
+ def _heading_slug(value: str) -> str:
71
+ slug = re.sub(r"[^a-z0-9]+", "_", value.lower()).strip("_")
72
+ return slug[:80] or "section"
73
+
74
+
75
+ def _extract_headings(raw: str) -> list[dict[str, str]]:
76
+ headings: list[dict[str, str]] = []
77
+ for match in re.finditer(r"(?is)<h([1-6])[^>]*>(.*?)</h\1>", raw):
78
+ text = _clean_markup_text(match.group(2))
79
+ if text:
80
+ headings.append({"level": f"h{match.group(1)}", "text": text})
81
+ if headings:
82
+ return headings
83
+ for line in raw.splitlines():
84
+ match = re.match(r"^(#{1,6})\s+(.+?)\s*$", line)
85
+ if match:
86
+ headings.append({"level": f"h{len(match.group(1))}", "text": match.group(2).strip()})
87
+ return headings
88
+
89
+
90
+ def _extract_code_blocks(raw: str) -> list[str]:
91
+ blocks: list[str] = []
92
+ for match in re.finditer(r"(?is)<pre[^>]*>(.*?)</pre>", raw):
93
+ text = _clean_markup_text(match.group(1))
94
+ if text:
95
+ blocks.append(text)
96
+ for match in re.finditer(r"(?is)<code[^>]*>(.*?)</code>", raw):
97
+ text = _clean_markup_text(match.group(1))
98
+ if text and text not in blocks:
99
+ blocks.append(text)
100
+ for match in re.finditer(r"(?s)```(?:[A-Za-z0-9_-]+)?\n(.*?)```", raw):
101
+ text = html.unescape(match.group(1).strip())
102
+ if text and text not in blocks:
103
+ blocks.append(text)
104
+ return blocks
105
+
106
+
107
+ def _window_rows(clean_text: str, *, width: int = 40, stride: int = 20) -> list[dict[str, Any]]:
108
+ words = re.findall(r"\S+", clean_text)
109
+ rows: list[dict[str, Any]] = []
110
+ if not words:
111
+ return rows
112
+ start = 0
113
+ while start < len(words):
114
+ end = min(start + width, len(words))
115
+ rows.append({
116
+ "window_id": len(rows) + 1,
117
+ "start_word": start,
118
+ "end_word": end,
119
+ "text": " ".join(words[start:end]),
120
+ })
121
+ if end == len(words):
122
+ break
123
+ start += stride
124
+ return rows
125
+
126
+
127
+ def _term_count(text: str, term: str) -> int:
128
+ term = term.strip()
129
+ if not term:
130
+ return 0
131
+ return len(re.findall(re.escape(term), text, flags=re.IGNORECASE))
132
+
133
+
134
+ def _first_window(windows: list[dict[str, Any]], term: str) -> str:
135
+ term_lower = term.lower()
136
+ for row in windows:
137
+ if term_lower in str(row.get("text") or "").lower():
138
+ return str(row.get("window_id") or "")
139
+ return ""
140
+
141
+
142
+ def _write_tutorial_public_inputs(input_dir: Path, source_path: Path, spec_payload: dict[str, Any]) -> None:
143
+ raw = source_path.read_text(encoding="utf-8", errors="replace")
144
+ # Tutorial examples may contain a maintainer's local Windows path. Keep
145
+ # the command semantics while preventing host-specific paths from entering
146
+ # the public task artifact.
147
+ sanitized_raw = re.sub(r"(?i)\b[A-Z]:\\(?:[^\\\r\n<>\"']+\\?)*[^\\\r\n<>\"']*", "./local.db", raw)
148
+ clean_text = _clean_markup_text(sanitized_raw)
149
+ windows = _window_rows(clean_text)
150
+ if len(windows) < 100:
151
+ raise ValueError(f"official tutorial source produced only {len(windows)} text windows; need at least 100")
152
+ required_terms = [str(item) for item in spec_payload.get("required_terms") or []]
153
+ code_terms = [str(item) for item in spec_payload.get("code_terms") or []]
154
+ input_dir.mkdir(parents=True, exist_ok=True)
155
+ destination = input_dir / str(spec_payload["source_file"])
156
+ # Always materialize the sanitized copy, including when the downloader
157
+ # already placed the source at the destination path.
158
+ destination.write_text(sanitized_raw, encoding="utf-8")
159
+ with (input_dir / str(spec_payload["input_file"])).open("w", encoding="utf-8", newline="") as handle:
160
+ fieldnames = ["window_id", "start_word", "end_word", "text", "contains_code_term", "matched_required_terms"]
161
+ writer = csv.DictWriter(handle, fieldnames=fieldnames)
162
+ writer.writeheader()
163
+ for row in windows:
164
+ text = str(row["text"])
165
+ matched = [term for term in required_terms if term.lower() in text.lower()]
166
+ contains_code = any(term.lower() in text.lower() for term in code_terms)
167
+ writer.writerow({
168
+ "window_id": row["window_id"],
169
+ "start_word": row["start_word"],
170
+ "end_word": row["end_word"],
171
+ "text": text,
172
+ "contains_code_term": "true" if contains_code else "false",
173
+ "matched_required_terms": "|".join(matched),
174
+ })
175
+ metadata = {
176
+ "software_name": spec_payload.get("software_name"),
177
+ "tutorial_url": spec_payload.get("tutorial_url"),
178
+ "source_urls": spec_payload.get("source_urls"),
179
+ "source_file": spec_payload.get("source_file"),
180
+ "window_file": spec_payload.get("input_file"),
181
+ "window_rule": spec_payload.get("window_rule"),
182
+ "required_terms": spec_payload.get("required_terms"),
183
+ "code_terms": spec_payload.get("code_terms"),
184
+ "note": "Provenance and public extraction rules only; scored aggregate values are intentionally not stored here.",
185
+ }
186
+ _write_json(input_dir / "tutorial_metadata.json", metadata)
187
+
188
+
189
+ def _source_context_text(path: Path) -> str:
190
+ try:
191
+ raw = path.read_text(encoding="utf-8", errors="replace")
192
+ except Exception:
193
+ return f"{path.name}\nsha256={_sha256_file(path)}\nsize_bytes={path.stat().st_size}\n"
194
+ if path.suffix.lower() in {".html", ".htm", ".md", ".txt"}:
195
+ return _clean_markup_text(raw)
196
+ return re.sub(r"\s+", " ", raw).strip()
197
+
198
+
199
+ def _ensure_public_input_footprint(input_dir: Path, source_paths: list[Path]) -> str:
200
+ current = _tree_file_bytes(input_dir)
201
+ if current >= MIN_PUBLIC_TASK_DATA_BYTES:
202
+ return f"public input footprint is {current} bytes; no context expansion needed"
203
+ context_path = input_dir / "source_context_windows.jsonl"
204
+ base = current - (context_path.stat().st_size if context_path.is_file() else 0)
205
+ context_path.unlink(missing_ok=True)
206
+ rows: list[dict[str, Any]] = []
207
+ for source in source_paths:
208
+ if not source.is_file() or source.resolve() == context_path.resolve():
209
+ continue
210
+ text = _source_context_text(source)
211
+ if not text:
212
+ continue
213
+ start = 0
214
+ width = 1800
215
+ stride = 900
216
+ while start < len(text):
217
+ end = min(len(text), start + width)
218
+ rows.append({
219
+ "source_file": source.relative_to(input_dir).as_posix() if source.is_relative_to(input_dir) else source.name,
220
+ "source_sha256": _sha256_file(source),
221
+ "start_char": start,
222
+ "end_char": end,
223
+ "text": text[start:end],
224
+ })
225
+ if end == len(text):
226
+ break
227
+ start += stride
228
+ if not rows:
229
+ raise ValueError("public input footprint expansion has no public source text")
230
+ input_dir.mkdir(parents=True, exist_ok=True)
231
+ rows_written = 0
232
+ target_extra = MIN_PUBLIC_TASK_DATA_BYTES - max(0, base)
233
+ with context_path.open("w", encoding="utf-8") as handle:
234
+ cycle = 0
235
+ while handle.tell() < target_extra or rows_written < 100:
236
+ row = dict(rows[rows_written % len(rows)])
237
+ row["window_id"] = rows_written + 1
238
+ row["cycle"] = cycle
239
+ handle.write(json.dumps(row, ensure_ascii=False) + "\n")
240
+ rows_written += 1
241
+ if rows_written % len(rows) == 0:
242
+ cycle += 1
243
+ handle.flush()
244
+ return f"wrote input/source_context_windows.jsonl with {rows_written} public-source windows and {context_path.stat().st_size} bytes"
245
+
246
+
247
+ def _write_software_manifest(software_dir: Path, spec_payload: dict[str, Any]) -> None:
248
+ if str(spec_payload.get("workflow_kind") or "") != "software_tutorial_doc_audit":
249
+ return
250
+ software_dir.mkdir(parents=True, exist_ok=True)
251
+ software_name = str(spec_payload.get("software_name") or "").strip()
252
+ executables = [str(item).strip() for item in spec_payload.get("executables") or [] if str(item).strip()]
253
+ system_packages = [str(item).strip() for item in spec_payload.get("required_system_packages") or [] if str(item).strip()]
254
+ source_urls = [str(item).strip() for item in spec_payload.get("source_urls") or [] if str(item).strip()]
255
+ _write_json(software_dir / "software_manifest.json", {
256
+ "software_name": software_name,
257
+ "executables": executables,
258
+ "required_system_packages": system_packages,
259
+ "official_sources": source_urls,
260
+ "solve_time_network": "disabled",
261
+ "python_wrapper_only": False,
262
+ "note": "This task audits real official software documentation/source staged offline; Python helpers only validate outputs.",
263
+ })
264
+ with (software_dir / "command_examples.csv").open("w", encoding="utf-8", newline="") as handle:
265
+ writer = csv.DictWriter(handle, fieldnames=["term", "kind", "software_name"])
266
+ writer.writeheader()
267
+ for term in spec_payload.get("code_terms") or []:
268
+ writer.writerow({"term": str(term), "kind": "code_term", "software_name": software_name})
269
+ for exe in executables:
270
+ writer.writerow({"term": exe, "kind": "executable", "software_name": software_name})
271
+
272
+
273
+ def software_tutorial_outputs(input_dir: Path, output_dir: Path) -> None:
274
+ spec = _read_json(input_dir / "analysis_spec.json")
275
+ source_file = str(spec["source_file"])
276
+ source_text = (input_dir / source_file).read_text(encoding="utf-8", errors="replace")
277
+ clean_text = _clean_markup_text(source_text)
278
+ headings = _extract_headings(source_text)
279
+ code_blocks = _extract_code_blocks(source_text)
280
+ window_rows: list[dict[str, str]] = []
281
+ with (input_dir / str(spec["input_file"])).open("r", encoding="utf-8", newline="") as handle:
282
+ window_rows = list(csv.DictReader(handle))
283
+ output_dir.mkdir(parents=True, exist_ok=True)
284
+
285
+ with (output_dir / "section_outline.csv").open("w", encoding="utf-8", newline="") as handle:
286
+ fieldnames = ["rank", "heading_level", "heading_text", "slug"]
287
+ writer = csv.DictWriter(handle, fieldnames=fieldnames)
288
+ writer.writeheader()
289
+ for rank, heading in enumerate(headings, start=1):
290
+ writer.writerow({
291
+ "rank": rank,
292
+ "heading_level": heading["level"],
293
+ "heading_text": heading["text"],
294
+ "slug": _heading_slug(heading["text"]),
295
+ })
296
+
297
+ all_terms: list[tuple[str, str]] = []
298
+ for term in spec.get("required_terms") or []:
299
+ all_terms.append((str(term), "required"))
300
+ for term in spec.get("code_terms") or []:
301
+ if str(term) not in {item[0] for item in all_terms}:
302
+ all_terms.append((str(term), "code"))
303
+ code_text = "\n".join(code_blocks)
304
+ term_rows: list[dict[str, Any]] = []
305
+ for term, category in all_terms:
306
+ term_rows.append({
307
+ "term": term,
308
+ "category": category,
309
+ "count": _term_count(clean_text, term),
310
+ "first_window": _first_window(window_rows, term),
311
+ "appears_in_code": "true" if term.lower() in code_text.lower() else "false",
312
+ })
313
+ term_rows.sort(key=lambda row: (str(row["category"]), str(row["term"]).lower()))
314
+ with (output_dir / "keyword_inventory.csv").open("w", encoding="utf-8", newline="") as handle:
315
+ fieldnames = ["term", "category", "count", "first_window", "appears_in_code"]
316
+ writer = csv.DictWriter(handle, fieldnames=fieldnames)
317
+ writer.writeheader()
318
+ for row in term_rows:
319
+ writer.writerow(row)
320
+
321
+ code_terms = [str(item).lower() for item in spec.get("code_terms") or []]
322
+ with (output_dir / "code_block_inventory.csv").open("w", encoding="utf-8", newline="") as handle:
323
+ fieldnames = ["block_index", "line_count", "char_count", "contains_code_term", "first_line"]
324
+ writer = csv.DictWriter(handle, fieldnames=fieldnames)
325
+ writer.writeheader()
326
+ for index, block in enumerate(code_blocks, start=1):
327
+ lines = [line for line in block.splitlines() if line.strip()]
328
+ contains = any(term and term in block.lower() for term in code_terms)
329
+ writer.writerow({
330
+ "block_index": index,
331
+ "line_count": len(lines),
332
+ "char_count": len(block),
333
+ "contains_code_term": "true" if contains else "false",
334
+ "first_line": lines[0][:200] if lines else "",
335
+ })
336
+
337
+ keyword_total = sum(int(row["count"]) for row in term_rows)
338
+ required_found = sum(1 for row in term_rows if row["category"] == "required" and int(row["count"]) > 0)
339
+ top_keyword = None
340
+ if term_rows:
341
+ top = max(term_rows, key=lambda row: (int(row["count"]), str(row["term"]).lower()))
342
+ top_keyword = str(top["term"]) if int(top["count"]) > 0 else None
343
+ summary = {
344
+ "software_name": str(spec.get("software_name") or ""),
345
+ "source_file": source_file,
346
+ "window_count": len(window_rows),
347
+ "heading_count": len(headings),
348
+ "code_block_count": len(code_blocks),
349
+ "keyword_total": keyword_total,
350
+ "unique_required_terms_found": required_found,
351
+ "top_keyword": top_keyword,
352
+ "source_character_count": len(clean_text),
353
+ }
354
+ _write_json(output_dir / "summary.json", summary)
355
+
356
+
357
+ def geojson_outputs(input_dir: Path, output_dir: Path) -> None:
358
+ payload = _read_json(input_dir / "events.geojson")
359
+ features = payload.get("features") if isinstance(payload, dict) else []
360
+ rows: list[dict[str, Any]] = []
361
+ for feature in features:
362
+ if not isinstance(feature, dict):
363
+ continue
364
+ props = feature.get("properties") if isinstance(feature.get("properties"), dict) else {}
365
+ geom = feature.get("geometry") if isinstance(feature.get("geometry"), dict) else {}
366
+ coords = geom.get("coordinates") if isinstance(geom.get("coordinates"), list) else []
367
+ mag = props.get("mag")
368
+ try:
369
+ mag = float(mag) if mag is not None else None
370
+ except (TypeError, ValueError):
371
+ mag = None
372
+ depth = None
373
+ if len(coords) >= 3:
374
+ try:
375
+ depth = float(coords[2])
376
+ except (TypeError, ValueError):
377
+ depth = None
378
+ time_ms = props.get("time")
379
+ date_utc = "unknown"
380
+ if isinstance(time_ms, (int, float)):
381
+ date_utc = dt.datetime.utcfromtimestamp(time_ms / 1000).date().isoformat()
382
+ rows.append({
383
+ "id": feature.get("id") or props.get("code") or "",
384
+ "mag": mag,
385
+ "depth": depth,
386
+ "place": str(props.get("place") or ""),
387
+ "region": _stable_region(str(props.get("place") or "")),
388
+ "date_utc": date_utc,
389
+ "feature": feature,
390
+ })
391
+ output_dir.mkdir(parents=True, exist_ok=True)
392
+ mags = [row["mag"] for row in rows if row["mag"] is not None]
393
+ depths = [row["depth"] for row in rows if row["depth"] is not None]
394
+ summary = {
395
+ "event_count": len(rows),
396
+ "magnitude": {
397
+ "count": len(mags),
398
+ "min": round(min(mags), 6) if mags else None,
399
+ "max": round(max(mags), 6) if mags else None,
400
+ "mean": round(statistics.fmean(mags), 6) if mags else None,
401
+ "median": round(statistics.median(mags), 6) if mags else None,
402
+ },
403
+ "depth_km": {
404
+ "count": len(depths),
405
+ "min": round(min(depths), 6) if depths else None,
406
+ "max": round(max(depths), 6) if depths else None,
407
+ "mean": round(statistics.fmean(depths), 6) if depths else None,
408
+ },
409
+ "time_range_utc": {
410
+ "start_date": min((row["date_utc"] for row in rows if row["date_utc"] != "unknown"), default=None),
411
+ "end_date": max((row["date_utc"] for row in rows if row["date_utc"] != "unknown"), default=None),
412
+ },
413
+ "quality_flags": {
414
+ "missing_magnitude": sum(1 for row in rows if row["mag"] is None),
415
+ "missing_depth": sum(1 for row in rows if row["depth"] is None),
416
+ "unique_regions": len({row["region"] for row in rows}),
417
+ },
418
+ }
419
+ _write_json(output_dir / "summary.json", summary)
420
+
421
+ grouped: dict[tuple[str, str], list[dict[str, Any]]] = {}
422
+ for row in rows:
423
+ grouped.setdefault((_mag_bin(row["mag"]), _depth_bin(row["depth"])), []).append(row)
424
+ with (output_dir / "magnitude_depth_bins.csv").open("w", encoding="utf-8", newline="") as handle:
425
+ fieldnames = ["mag_bin", "depth_bin", "event_count", "mean_magnitude", "max_magnitude"]
426
+ writer = csv.DictWriter(handle, fieldnames=fieldnames)
427
+ writer.writeheader()
428
+ for (mag_bin, depth_bin), group in sorted(grouped.items()):
429
+ group_mags = [row["mag"] for row in group if row["mag"] is not None]
430
+ writer.writerow({
431
+ "mag_bin": mag_bin,
432
+ "depth_bin": depth_bin,
433
+ "event_count": len(group),
434
+ "mean_magnitude": f"{statistics.fmean(group_mags):.6f}" if group_mags else "",
435
+ "max_magnitude": f"{max(group_mags):.6f}" if group_mags else "",
436
+ })
437
+
438
+ daily: dict[tuple[str, str], list[dict[str, Any]]] = {}
439
+ for row in rows:
440
+ daily.setdefault((row["region"], row["date_utc"]), []).append(row)
441
+ with (output_dir / "region_daily_counts.csv").open("w", encoding="utf-8", newline="") as handle:
442
+ fieldnames = ["region", "date_utc", "event_count", "max_magnitude"]
443
+ writer = csv.DictWriter(handle, fieldnames=fieldnames)
444
+ writer.writeheader()
445
+ for (region, date_utc), group in sorted(daily.items()):
446
+ group_mags = [row["mag"] for row in group if row["mag"] is not None]
447
+ writer.writerow({
448
+ "region": region,
449
+ "date_utc": date_utc,
450
+ "event_count": len(group),
451
+ "max_magnitude": f"{max(group_mags):.6f}" if group_mags else "",
452
+ })
453
+
454
+ filtered = [row["feature"] for row in rows if row["mag"] is not None and row["mag"] >= 4.5]
455
+ _write_json(output_dir / "filtered_events.geojson", {"type": "FeatureCollection", "features": filtered})
456
+
457
+
458
+ def csv_time_series_outputs(input_dir: Path, output_dir: Path) -> None:
459
+ spec = _read_json(input_dir / "analysis_spec.json")
460
+ csv_name = spec["input_file"]
461
+ date_column = spec["date_column"]
462
+ value_column = spec["value_column"]
463
+ rows: list[dict[str, Any]] = []
464
+ with (input_dir / csv_name).open("r", encoding="utf-8", newline="") as raw_handle:
465
+ lines = [line for line in raw_handle if not line.lstrip().startswith("#")]
466
+ reader = csv.DictReader(lines)
467
+ for item in reader:
468
+ raw_date = item.get(date_column, "")
469
+ try:
470
+ day = dt.date.fromisoformat(raw_date)
471
+ except ValueError:
472
+ if raw_date.isdigit() and len(raw_date) == 4:
473
+ day = dt.date(int(raw_date), 1, 1)
474
+ else:
475
+ continue
476
+ raw_value = item.get(value_column, "")
477
+ try:
478
+ value = float(raw_value)
479
+ except (TypeError, ValueError):
480
+ value = None
481
+ rows.append({"date": day, "value": value, "raw": item})
482
+ rows.sort(key=lambda item: item["date"])
483
+ valid = [row for row in rows if row["value"] is not None]
484
+ output_dir.mkdir(parents=True, exist_ok=True)
485
+ monthly: dict[str, list[float]] = {}
486
+ for row in valid:
487
+ key = row["date"].strftime("%Y-%m")
488
+ monthly.setdefault(key, []).append(row["value"])
489
+ with (output_dir / "monthly_statistics.csv").open("w", encoding="utf-8", newline="") as handle:
490
+ fieldnames = ["month", "count", "mean", "median", "min", "max"]
491
+ writer = csv.DictWriter(handle, fieldnames=fieldnames)
492
+ writer.writeheader()
493
+ for month, values in sorted(monthly.items()):
494
+ writer.writerow({
495
+ "month": month,
496
+ "count": len(values),
497
+ "mean": f"{statistics.fmean(values):.6f}",
498
+ "median": f"{statistics.median(values):.6f}",
499
+ "min": f"{min(values):.6f}",
500
+ "max": f"{max(values):.6f}",
501
+ })
502
+ existing_dates = {row["date"] for row in rows}
503
+ missing_days: list[dt.date] = []
504
+ if rows:
505
+ day = rows[0]["date"]
506
+ while day <= rows[-1]["date"]:
507
+ if day.weekday() < 5 and day not in existing_dates:
508
+ missing_days.append(day)
509
+ day += dt.timedelta(days=1)
510
+ with (output_dir / "missing_business_days.csv").open("w", encoding="utf-8", newline="") as handle:
511
+ writer = csv.DictWriter(handle, fieldnames=["date"])
512
+ writer.writeheader()
513
+ for day in missing_days:
514
+ writer.writerow({"date": day.isoformat()})
515
+ with (output_dir / "clean_series.csv").open("w", encoding="utf-8", newline="") as handle:
516
+ writer = csv.DictWriter(handle, fieldnames=["date", "value"])
517
+ writer.writeheader()
518
+ for row in valid:
519
+ writer.writerow({"date": row["date"].isoformat(), "value": f"{row['value']:.6f}"})
520
+ values = [row["value"] for row in valid]
521
+ summary = {
522
+ "series_name": spec.get("series_name", value_column),
523
+ "row_count": len(rows),
524
+ "valid_value_count": len(valid),
525
+ "missing_value_count": len(rows) - len(valid),
526
+ "missing_business_day_count": len(missing_days),
527
+ "date_range": {
528
+ "start": rows[0]["date"].isoformat() if rows else None,
529
+ "end": rows[-1]["date"].isoformat() if rows else None,
530
+ },
531
+ "value": {
532
+ "min": round(min(values), 6) if values else None,
533
+ "max": round(max(values), 6) if values else None,
534
+ "mean": round(statistics.fmean(values), 6) if values else None,
535
+ "median": round(statistics.median(values), 6) if values else None,
536
+ },
537
+ }
538
+ _write_json(output_dir / "summary.json", summary)
539
+
540
+
541
+ def _aggregate_annual_rows(rows: list[dict[str, Any]], aggregation: str) -> list[dict[str, Any]]:
542
+ if not aggregation:
543
+ return rows
544
+ grouped: dict[int, list[float]] = {}
545
+ for row in rows:
546
+ grouped.setdefault(int(row["year"]), []).append(float(row["value"]))
547
+ aggregated: list[dict[str, Any]] = []
548
+ for year, values in sorted(grouped.items()):
549
+ if aggregation == "mean":
550
+ value = statistics.fmean(values)
551
+ elif aggregation == "median":
552
+ value = statistics.median(values)
553
+ elif aggregation == "max":
554
+ value = max(values)
555
+ elif aggregation == "min":
556
+ value = min(values)
557
+ elif aggregation == "count":
558
+ value = float(len(values))
559
+ else:
560
+ raise ValueError(f"unsupported year_aggregation for csv_annual_series_audit: {aggregation}")
561
+ aggregated.append({"year": year, "value": value})
562
+ return aggregated
563
+
564
+
565
+ def csv_annual_series_outputs(input_dir: Path, output_dir: Path) -> None:
566
+ spec = _read_json(input_dir / "analysis_spec.json")
567
+ csv_name = spec["input_file"]
568
+ year_column = spec["year_column"]
569
+ value_column = spec["value_column"]
570
+ # Optional: derive the year from an ISO-8601 timestamp column (e.g. USGS FDSN
571
+ # `time` = "2022-06-29T19:17:58.929Z") instead of parsing an integer year.
572
+ # When unset, behaviour is unchanged (integer year column).
573
+ year_from_timestamp = bool(spec.get("year_from_timestamp", False))
574
+ year_aggregation = str(spec.get("year_aggregation") or "").strip().lower()
575
+ raw_rows: list[dict[str, Any]] = []
576
+ with (input_dir / csv_name).open("r", encoding="utf-8", newline="") as raw_handle:
577
+ lines = [line for line in raw_handle if not line.lstrip().startswith("#")]
578
+ reader = csv.DictReader(lines)
579
+ for item in reader:
580
+ raw_year = str(item.get(year_column, "")).strip()
581
+ try:
582
+ if year_from_timestamp:
583
+ # Take the leading 4-digit year of an ISO timestamp/date.
584
+ match = re.match(r"\s*(\d{4})", raw_year)
585
+ if not match:
586
+ continue
587
+ year = int(match.group(1))
588
+ else:
589
+ year = int(raw_year)
590
+ value = float(str(item.get(value_column, "")).strip())
591
+ except (TypeError, ValueError):
592
+ continue
593
+ raw_rows.append({"year": year, "value": value})
594
+ rows = _aggregate_annual_rows(raw_rows, year_aggregation)
595
+ rows.sort(key=lambda item: item["year"])
596
+ output_dir.mkdir(parents=True, exist_ok=True)
597
+ decades: dict[str, list[float]] = {}
598
+ for row in rows:
599
+ decade_start = (row["year"] // 10) * 10
600
+ decades.setdefault(f"{decade_start}s", []).append(row["value"])
601
+ with (output_dir / "decadal_statistics.csv").open("w", encoding="utf-8", newline="") as handle:
602
+ fieldnames = [
603
+ "decade_start",
604
+ "start_year",
605
+ "end_year",
606
+ "count",
607
+ "mean_departure",
608
+ "median_departure",
609
+ "min_departure",
610
+ "max_departure",
611
+ "sample_std_departure",
612
+ ]
613
+ writer = csv.DictWriter(handle, fieldnames=fieldnames)
614
+ writer.writeheader()
615
+ for decade, values in sorted(decades.items()):
616
+ decade_start = int(decade.rstrip("s"))
617
+ years = [row["year"] for row in rows if decade_start <= row["year"] <= decade_start + 9]
618
+ writer.writerow({
619
+ "decade_start": decade_start,
620
+ "start_year": min(years),
621
+ "end_year": max(years),
622
+ "count": len(values),
623
+ "mean_departure": f"{statistics.fmean(values):.6f}",
624
+ "median_departure": f"{statistics.median(values):.6f}",
625
+ "min_departure": f"{min(values):.6f}",
626
+ "max_departure": f"{max(values):.6f}",
627
+ "sample_std_departure": f"{statistics.stdev(values):.6f}" if len(values) >= 2 else "",
628
+ })
629
+ threshold = float(spec.get("threshold", 1.0))
630
+ with (output_dir / "threshold_years.csv").open("w", encoding="utf-8", newline="") as handle:
631
+ fieldnames = ["rank", "year", "departure", "threshold"]
632
+ writer = csv.DictWriter(handle, fieldnames=fieldnames)
633
+ writer.writeheader()
634
+ rank = 1
635
+ for row in rows:
636
+ if row["value"] >= threshold:
637
+ writer.writerow({
638
+ "rank": rank,
639
+ "year": row["year"],
640
+ "departure": f"{row['value']:.6f}",
641
+ "threshold": f"{threshold:.6f}",
642
+ })
643
+ rank += 1
644
+ with (output_dir / "clean_series.csv").open("w", encoding="utf-8", newline="") as handle:
645
+ writer = csv.DictWriter(handle, fieldnames=["Year", "Departure from Average"])
646
+ writer.writeheader()
647
+ for row in rows:
648
+ writer.writerow({"Year": row["year"], "Departure from Average": f"{row['value']:.6f}"})
649
+ values = [row["value"] for row in rows]
650
+ threshold_rows = [row for row in rows if row["value"] >= threshold]
651
+ min_row = min(rows, key=lambda row: row["value"]) if rows else None
652
+ max_row = max(rows, key=lambda row: row["value"]) if rows else None
653
+ summary = {
654
+ "series_name": spec.get("series_name", value_column),
655
+ "row_count": len(rows),
656
+ "year_range": {
657
+ "start": rows[0]["year"] if rows else None,
658
+ "end": rows[-1]["year"] if rows else None,
659
+ },
660
+ "value": {
661
+ "min": round(min(values), 6) if values else None,
662
+ "min_year": min_row["year"] if min_row else None,
663
+ "max": round(max(values), 6) if values else None,
664
+ "max_year": max_row["year"] if max_row else None,
665
+ "mean": round(statistics.fmean(values), 6) if values else None,
666
+ "median": round(statistics.median(values), 6) if values else None,
667
+ "sample_std": round(statistics.stdev(values), 6) if len(values) >= 2 else None,
668
+ },
669
+ "threshold": threshold,
670
+ "years_at_or_above_threshold": len(threshold_rows),
671
+ "first_threshold_year": threshold_rows[0]["year"] if threshold_rows else None,
672
+ "last_threshold_year": threshold_rows[-1]["year"] if threshold_rows else None,
673
+ }
674
+ if year_aggregation:
675
+ summary["year_aggregation"] = year_aggregation
676
+ summary["source_row_count"] = len(raw_rows)
677
+ _write_json(output_dir / "summary.json", summary)
678
+
679
+
20260906-200431-transport-safety-4a6be9/tests/reference/internal/workflow_runtime.py ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ from pathlib import Path
2
+ from workflow_adapters_runtime import software_tutorial_outputs
3
+
4
+ def run_reference(input_dir: Path, output_dir: Path) -> None:
5
+ software_tutorial_outputs(input_dir, output_dir)
20260906-200431-transport-safety-4a6be9/tests/reference/reference_manifest.json ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "workflow_kind": "software_tutorial_doc_audit",
3
+ "task_id": "repair_20260906_software_0117",
4
+ "domain": "transport_safety",
5
+ "task": "sumo_plainxml_documentation_audit",
6
+ "variant": "base",
7
+ "created_from": "standard reference workflow",
8
+ "required_outputs": [
9
+ {
10
+ "path": "summary.json",
11
+ "type": "json"
12
+ },
13
+ {
14
+ "path": "section_outline.csv",
15
+ "type": "csv"
16
+ },
17
+ {
18
+ "path": "keyword_inventory.csv",
19
+ "type": "csv"
20
+ },
21
+ {
22
+ "path": "code_block_inventory.csv",
23
+ "type": "csv"
24
+ }
25
+ ],
26
+ "numeric_tolerance": 1e-09,
27
+ "source_prior_sha256": "cbfc9d4ffd92466a4cf7bfad411d08d3b5567d92e0a647a5aa27e7d7c33ea075",
28
+ "gold_output_hashes": {
29
+ "summary.json": "0e4d4f9512713a31a0f0d6ab134f4755f05d135a344151aff7dce1fafb14d817",
30
+ "section_outline.csv": "0c617421af75a24ea546befd2ba6c519207d98b9c49552d62d6dcac260c9e3a1",
31
+ "keyword_inventory.csv": "9255e4efeed11e2582c675c7b36b7f4a2c5948041c749b45e0e16bf289ecb504",
32
+ "code_block_inventory.csv": "a6538cdd2f098eb50feafb9f5f2923e86f3accaa93b0fc151387e05dc0c475a7"
33
+ }
34
+ }
20260906-200431-transport-safety-4a6be9/tests/reference/reference_solution.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import annotations
2
+
3
+ import argparse
4
+ import sys
5
+ from pathlib import Path
6
+
7
+
8
+ def main() -> int:
9
+ parser = argparse.ArgumentParser()
10
+ parser.add_argument("--input", required=True)
11
+ parser.add_argument("--output", required=True)
12
+ args = parser.parse_args()
13
+ sys.path.insert(0, str(Path(__file__).resolve().parent / "internal"))
14
+ from workflow_runtime import run_reference
15
+ run_reference(Path(args.input), Path(args.output))
16
+ return 0
17
+
18
+
19
+ if __name__ == "__main__":
20
+ raise SystemExit(main())
20260906-200431-transport-safety-4a6be9/tests/test.sh ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ set -u
3
+
4
+ TESTS_DIR="${HARBOR_TESTS_DIR:-/tests}"
5
+ WORKSPACE_DIR="${HARBOR_WORKSPACE_DIR:-/workspace}"
6
+ LOGS_DIR="${HARBOR_LOGS_DIR:-/logs/verifier}"
7
+
8
+ mkdir -p "${LOGS_DIR}" "${WORKSPACE_DIR}/output"
9
+
10
+ python "${TESTS_DIR}/evaluator_runner.py" \
11
+ --output-dir "${WORKSPACE_DIR}/output" \
12
+ --reference-dir "${TESTS_DIR}/reference" \
13
+ --reward-json "${LOGS_DIR}/reward.json" \
14
+ --details-json "${LOGS_DIR}/ale_evaluator_details.json"
15
+
16
+ if [ ! -f "${LOGS_DIR}/reward.json" ]; then
17
+ echo '{"score":0.0,"format":0.0,"output_present":0.0,"evaluator_available":0.0,"item_count":0.0}' > "${LOGS_DIR}/reward.json"
18
+ fi
19
+
20
+ python - <<'PY' "${LOGS_DIR}/reward.json" "${LOGS_DIR}/reward.txt"
21
+ import json
22
+ import sys
23
+ from pathlib import Path
24
+ reward = json.loads(Path(sys.argv[1]).read_text(encoding="utf-8"))
25
+ score = float(reward.get("score", 0.0))
26
+ Path(sys.argv[2]).write_text(f"{score}\n", encoding="utf-8")
27
+ PY
28
+
29
+ exit 0
20260906-200501-transport-safety-79813e/.DS_Store ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ddbc57d9e3498007772fefd21a9bf4bfe4808aaf20e7cc4c1c8ca5ec94c07d8a
3
+ size 6148
20260906-200501-transport-safety-79813e/environment/Dockerfile ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.12-slim
2
+
3
+ WORKDIR /workspace
4
+
5
+ COPY public_data/input /workspace/input
6
+ COPY public_data/software /workspace/software
7
+ COPY public_data/task_card.json /workspace/task_card.json
8
+ COPY public_data/main.py /workspace/main.py
9
+ COPY public_data/README.md /workspace/README.md
10
+
11
+ RUN mkdir -p /workspace/output /workspace/report /logs/agent /logs/artifacts \
12
+ && chmod -R 777 /workspace/output /workspace/report /logs
20260906-200501-transport-safety-79813e/environment/public_data/README.md ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Public Task Inputs
2
+
3
+ Files in this directory are copied into the workspace:
4
+
5
+ - `input/` -> `/workspace/input/`
6
+ - `software/` -> `/workspace/software/`
7
+ - `task_card.json` -> `/workspace/task_card.json`
8
+ - `main.py` -> `/workspace/main.py`
9
+
10
+ Hidden reference data and evaluator files are not present in the agent workspace.
11
+ Final deliverables must be written under `/workspace/output/`.
20260906-200501-transport-safety-79813e/environment/public_data/input/README.md ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ This directory contains the public staged input for this task.
2
+ input/analysis_spec.json is the authoritative public contract for input columns, grouping/filtering rules, required output files, and output schemas.
3
+ Primary data file: input/tutorial_text_windows.csv.
4
+ Workflow kind: software_tutorial_doc_audit.
5
+ Required output files: output/summary.json, output/section_outline.csv, output/keyword_inventory.csv, output/code_block_inventory.csv.
6
+ Solve the task from the staged local files only; do not fetch fresh remote data during solve time.
20260906-200501-transport-safety-79813e/environment/public_data/input/analysis_spec.json ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "input_file": "tutorial_text_windows.csv",
3
+ "source_file": "tutorial_source.html",
4
+ "workflow_kind": "software_tutorial_doc_audit",
5
+ "software_name": "SUMO",
6
+ "tutorial_url": "https://sumo.dlr.de/docs/Networks/PlainXML.html",
7
+ "source_urls": [
8
+ "https://sumo.dlr.de/docs/Networks/PlainXML.html"
9
+ ],
10
+ "window_rule": {
11
+ "cleaning": "Strip HTML/script/style tags, decode entities, collapse whitespace, and preserve document text order.",
12
+ "window_size_words": 40,
13
+ "stride_words": 20,
14
+ "minimum_windows": 100
15
+ },
16
+ "heading_rule": "Extract h1-h6 headings from HTML; if no HTML headings are present, use Markdown # headings.",
17
+ "keyword_rule": "Count case-insensitive occurrences of required_terms and code_terms in the cleaned tutorial text.",
18
+ "required_terms": [
19
+ "SUMO",
20
+ "network",
21
+ "route",
22
+ "simulation",
23
+ "edge",
24
+ "node"
25
+ ],
26
+ "code_terms": [
27
+ "netconvert",
28
+ "duarouter",
29
+ "netedit",
30
+ ".net.xml",
31
+ ".rou.xml"
32
+ ],
33
+ "executables": [
34
+ "sumo",
35
+ "netconvert",
36
+ "duarouter",
37
+ "netedit"
38
+ ],
39
+ "required_system_packages": [
40
+ "sumo",
41
+ "sumo-tools"
42
+ ],
43
+ "required_outputs": [
44
+ {
45
+ "path": "summary.json",
46
+ "type": "json"
47
+ },
48
+ {
49
+ "path": "section_outline.csv",
50
+ "type": "csv"
51
+ },
52
+ {
53
+ "path": "keyword_inventory.csv",
54
+ "type": "csv"
55
+ },
56
+ {
57
+ "path": "code_block_inventory.csv",
58
+ "type": "csv"
59
+ }
60
+ ],
61
+ "output_schemas": {
62
+ "summary.json": {
63
+ "software_name": "string",
64
+ "source_file": "string",
65
+ "window_count": "integer",
66
+ "heading_count": "integer",
67
+ "code_block_count": "integer",
68
+ "keyword_total": "integer",
69
+ "unique_required_terms_found": "integer",
70
+ "top_keyword": "string|null",
71
+ "source_character_count": "integer"
72
+ },
73
+ "section_outline.csv": [
74
+ "rank",
75
+ "heading_level",
76
+ "heading_text",
77
+ "slug"
78
+ ],
79
+ "keyword_inventory.csv": [
80
+ "term",
81
+ "category",
82
+ "count",
83
+ "first_window",
84
+ "appears_in_code"
85
+ ],
86
+ "code_block_inventory.csv": [
87
+ "block_index",
88
+ "line_count",
89
+ "char_count",
90
+ "contains_code_term",
91
+ "first_line"
92
+ ]
93
+ },
94
+ "notes": "Audit the staged offline official tutorial corpus. Do not fetch fresh documentation. All counts must be derived from the staged source file and tutorial_text_windows.csv."
95
+ }
20260906-200501-transport-safety-79813e/environment/public_data/input/source_context_windows.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
20260906-200501-transport-safety-79813e/environment/public_data/input/tutorial_metadata.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "software_name": "SUMO",
3
+ "tutorial_url": "https://sumo.dlr.de/docs/Networks/PlainXML.html",
4
+ "source_urls": [
5
+ "https://sumo.dlr.de/docs/Networks/PlainXML.html"
6
+ ],
7
+ "source_file": "tutorial_source.html",
8
+ "window_file": "tutorial_text_windows.csv",
9
+ "window_rule": {
10
+ "cleaning": "Strip HTML/script/style tags, decode entities, collapse whitespace, and preserve document text order.",
11
+ "window_size_words": 40,
12
+ "stride_words": 20,
13
+ "minimum_windows": 100
14
+ },
15
+ "required_terms": [
16
+ "SUMO",
17
+ "network",
18
+ "route",
19
+ "simulation",
20
+ "edge",
21
+ "node"
22
+ ],
23
+ "code_terms": [
24
+ "netconvert",
25
+ "duarouter",
26
+ "netedit",
27
+ ".net.xml",
28
+ ".rou.xml"
29
+ ],
30
+ "note": "Provenance and public extraction rules only; scored aggregate values are intentionally not stored here."
31
+ }
20260906-200501-transport-safety-79813e/environment/public_data/input/tutorial_source.html ADDED
The diff for this file is too large to render. See raw diff
 
20260906-200501-transport-safety-79813e/environment/public_data/input/tutorial_text_windows.csv ADDED
The diff for this file is too large to render. See raw diff
 
20260906-200501-transport-safety-79813e/environment/public_data/main.py ADDED
@@ -0,0 +1,180 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import annotations
2
+
3
+ import importlib.util
4
+ import json
5
+ import os
6
+ import shlex
7
+ import shutil
8
+ from pathlib import Path
9
+ from typing import Any
10
+
11
+
12
+ class Task:
13
+ def __init__(self, task_id: str, description: str, metadata: dict[str, Any]):
14
+ self.task_id = task_id
15
+ self.description = description
16
+ self.prompt = description
17
+ self.metadata = metadata
18
+ self.computer = {"setup_config": {"os_type": "linux"}}
19
+
20
+
21
+ def _task_dir() -> Path:
22
+ return Path(__file__).resolve().parent
23
+
24
+
25
+ def _load_card() -> dict[str, Any]:
26
+ path = _task_dir() / "task_card.json"
27
+ if not path.is_file():
28
+ return {
29
+ "taskId": os.environ.get("ALE_TASK_ID", "transport_safety/sumo_plainxml_document_audit"),
30
+ "taskPrompt": "Task card has not been rendered yet; this fallback exists for stage-03 hook smoke only.",
31
+ "metadata": {
32
+ "domain": "transport_safety",
33
+ "task": "sumo_plainxml_document_audit",
34
+ "variant": "base",
35
+ "domain_name": "transport_safety",
36
+ "task_name": "sumo_plainxml_document_audit",
37
+ "variant_name": "base",
38
+ "requires_task_data": True,
39
+ "task_dir": "/media/user/data/agenthle/transport_safety/sumo_plainxml_document_audit/base",
40
+ "input_dir": "/media/user/data/agenthle/transport_safety/sumo_plainxml_document_audit/base/input",
41
+ "software_dir": "/media/user/data/agenthle/transport_safety/sumo_plainxml_document_audit/base/software",
42
+ "remote_output_dir": "/media/user/data/agenthle/transport_safety/sumo_plainxml_document_audit/base/output",
43
+ "reference_dir": "/media/user/data/agenthle/transport_safety/sumo_plainxml_document_audit/base/reference",
44
+ },
45
+ }
46
+ with path.open("r", encoding="utf-8") as handle:
47
+ return json.load(handle)
48
+
49
+
50
+ def load() -> list[Task]:
51
+ card = _load_card()
52
+ metadata = dict(card.get("metadata") or {})
53
+ if not metadata:
54
+ domain, _, task = str(card["taskId"]).partition("/")
55
+ variant = "base"
56
+ task_dir = f"/media/user/data/agenthle/{domain}/{task}/{variant}"
57
+ metadata.update({
58
+ "domain": domain,
59
+ "task": task,
60
+ "variant": variant,
61
+ "domain_name": domain,
62
+ "task_name": task,
63
+ "variant_name": variant,
64
+ "requires_task_data": True,
65
+ "task_dir": task_dir,
66
+ "input_dir": f"{task_dir}/input",
67
+ "software_dir": f"{task_dir}/software",
68
+ "remote_output_dir": f"{task_dir}/output",
69
+ "reference_dir": f"{task_dir}/reference",
70
+ })
71
+ return [Task(task_id=card["taskId"], description=card["taskPrompt"], metadata=metadata)]
72
+
73
+
74
+ def _metadata(cfg: Any = None) -> dict[str, Any]:
75
+ if cfg is None:
76
+ return {}
77
+ value = getattr(cfg, "metadata", None)
78
+ return value if isinstance(value, dict) else {}
79
+
80
+
81
+ def _remote_path(metadata: dict[str, Any], key: str, fallback: str) -> str:
82
+ value = str(metadata.get(key) or "").strip()
83
+ return value or fallback
84
+
85
+
86
+ async def _remote_run(session: Any, command: str, *, check: bool = False) -> Any:
87
+ try:
88
+ return await session.run_command(command, check=check)
89
+ except TypeError:
90
+ return await session.run_command(command)
91
+
92
+
93
+ async def _remote_start(cfg: Any, session: Any) -> dict[str, Any]:
94
+ metadata = _metadata(cfg)
95
+ output_dir = _remote_path(metadata, "remote_output_dir", "output")
96
+ input_dir = _remote_path(metadata, "input_dir", "input")
97
+ software_dir = _remote_path(metadata, "software_dir", "software")
98
+ command = (
99
+ "set -eu\n"
100
+ f"mkdir -p {shlex.quote(output_dir)}\n"
101
+ f"find {shlex.quote(output_dir)} -mindepth 1 -maxdepth 1 -exec rm -rf -- {{}} +\n"
102
+ )
103
+ await _remote_run(session, command, check=True)
104
+ return {"ok": True, "input_dir": input_dir, "software_dir": software_dir, "output_dir": output_dir}
105
+
106
+
107
+ def start(cfg: Any = None, session: Any = None) -> dict[str, Any]:
108
+ if session is not None:
109
+ return _remote_start(cfg, session)
110
+ del cfg
111
+ output_dir = Path(os.environ.get("ALE_OUTPUT_DIR", "output"))
112
+ output_dir.mkdir(parents=True, exist_ok=True)
113
+ for child in output_dir.iterdir():
114
+ if child.is_dir():
115
+ shutil.rmtree(child)
116
+ else:
117
+ child.unlink()
118
+ input_dir = Path(os.environ.get("ALE_INPUT_DIR", "input"))
119
+ software_dir = Path(os.environ.get("ALE_SOFTWARE_DIR", "software"))
120
+ return {
121
+ "ok": True,
122
+ "input_dir": str(input_dir),
123
+ "software_dir": str(software_dir),
124
+ "output_dir": str(output_dir),
125
+ }
126
+
127
+
128
+ async def _remote_evaluate(cfg: Any, session: Any) -> list[float]:
129
+ metadata = _metadata(cfg)
130
+ output_dir = _remote_path(metadata, "remote_output_dir", "output")
131
+ reference_dir = _remote_path(metadata, "reference_dir", "reference")
132
+ script = f"""
133
+ import importlib.util
134
+ import json
135
+ import pathlib
136
+
137
+ output_dir = pathlib.Path({output_dir!r})
138
+ reference_dir = pathlib.Path({reference_dir!r})
139
+ evaluator_path = reference_dir / "evaluator.py"
140
+ if not evaluator_path.is_file():
141
+ raise FileNotFoundError(f"hidden evaluator is missing: {{evaluator_path}}")
142
+ spec = importlib.util.spec_from_file_location("hidden_ale_evaluator", evaluator_path)
143
+ if spec is None or spec.loader is None:
144
+ raise RuntimeError(f"cannot import hidden evaluator: {{evaluator_path}}")
145
+ module = importlib.util.module_from_spec(spec)
146
+ spec.loader.exec_module(module)
147
+ result = module.evaluate(output_dir, reference_dir)
148
+ print(json.dumps(result))
149
+ """
150
+ command = "python3 - <<'PY'\n" + script + "\nPY"
151
+ result = await _remote_run(session, command, check=True)
152
+ stdout = getattr(result, "stdout", "") or ""
153
+ for line in reversed([item.strip() for item in stdout.splitlines() if item.strip()]):
154
+ try:
155
+ payload = json.loads(line)
156
+ if isinstance(payload, list):
157
+ return [float(max(0.0, min(1.0, value))) for value in payload]
158
+ except Exception:
159
+ continue
160
+ raise RuntimeError("hidden evaluator did not emit a JSON score list")
161
+
162
+
163
+ def evaluate(cfg: Any = None, session: Any = None) -> list[float]:
164
+ if session is not None:
165
+ return _remote_evaluate(cfg, session)
166
+ del cfg
167
+ output_dir = Path(os.environ.get("ALE_OUTPUT_DIR", "output"))
168
+ reference_dir = Path(os.environ.get("ALE_REFERENCE_DIR", "reference"))
169
+ evaluator_path = reference_dir / "evaluator.py"
170
+ if not evaluator_path.is_file():
171
+ raise FileNotFoundError(f"hidden evaluator is missing: {evaluator_path}")
172
+ spec = importlib.util.spec_from_file_location("hidden_ale_evaluator", evaluator_path)
173
+ if spec is None or spec.loader is None:
174
+ raise RuntimeError(f"cannot import hidden evaluator: {evaluator_path}")
175
+ module = importlib.util.module_from_spec(spec)
176
+ spec.loader.exec_module(module)
177
+ result = module.evaluate(output_dir, reference_dir)
178
+ if not isinstance(result, list):
179
+ raise TypeError("hidden evaluator must return list[float]")
180
+ return [float(max(0.0, min(1.0, value))) for value in result]
20260906-200501-transport-safety-79813e/environment/public_data/software/command_examples.csv ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ term,kind,software_name
2
+ netconvert,code_term,SUMO
3
+ duarouter,code_term,SUMO
4
+ netedit,code_term,SUMO
5
+ .net.xml,code_term,SUMO
6
+ .rou.xml,code_term,SUMO
7
+ sumo,executable,SUMO
8
+ netconvert,executable,SUMO
9
+ duarouter,executable,SUMO
10
+ netedit,executable,SUMO
20260906-200501-transport-safety-79813e/environment/public_data/software/software_manifest.json ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "software_name": "SUMO",
3
+ "executables": [
4
+ "sumo",
5
+ "netconvert",
6
+ "duarouter",
7
+ "netedit"
8
+ ],
9
+ "required_system_packages": [
10
+ "sumo",
11
+ "sumo-tools"
12
+ ],
13
+ "official_sources": [
14
+ "https://sumo.dlr.de/docs/Networks/PlainXML.html"
15
+ ],
16
+ "solve_time_network": "disabled",
17
+ "python_wrapper_only": false,
18
+ "note": "This task audits real official software documentation/source staged offline; Python helpers only validate outputs."
19
+ }
20260906-200501-transport-safety-79813e/environment/public_data/software/validate_outputs.py ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ from __future__ import annotations
3
+
4
+ import json
5
+ import os
6
+ import sys
7
+ from pathlib import Path
8
+
9
+
10
+ def required_outputs(input_dir: Path) -> list[str]:
11
+ spec_path = input_dir / "analysis_spec.json"
12
+ if spec_path.is_file():
13
+ payload = json.loads(spec_path.read_text(encoding="utf-8"))
14
+ required = payload.get("required_outputs") if isinstance(payload, dict) else None
15
+ if isinstance(required, list):
16
+ rows = [str(item.get("path") or "") for item in required if isinstance(item, dict)]
17
+ rows = [item for item in rows if item]
18
+ if rows:
19
+ return rows
20
+ return [
21
+ "summary.json",
22
+ "magnitude_depth_bins.csv",
23
+ "region_daily_counts.csv",
24
+ "filtered_events.geojson",
25
+ ]
26
+
27
+
28
+ def main() -> int:
29
+ output_dir = Path(sys.argv[1]) if len(sys.argv) > 1 else Path("output")
30
+ input_dir = Path(sys.argv[2]) if len(sys.argv) > 2 else Path(os.environ.get("ALE_INPUT_DIR", "input"))
31
+ required = required_outputs(input_dir)
32
+ missing = [name for name in required if not (output_dir / name).is_file()]
33
+ if missing:
34
+ print(json.dumps({"ok": False, "missing": missing}, indent=2))
35
+ return 1
36
+ print(json.dumps({"ok": True, "required": required}, indent=2))
37
+ return 0
38
+
39
+
40
+ if __name__ == "__main__":
41
+ raise SystemExit(main())
20260906-200501-transport-safety-79813e/environment/public_data/task_card.json ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "taskId": "transport_safety/sumo_plainxml_document_audit__20260906-200501_transport_safety_79813e",
3
+ "title": "Repair 20260906 Software 0127",
4
+ "summary": "Audit a staged offline SUMO traffic-simulation quick-start tutorial and produce reproducible section, keyword, and command inventories from local files (keyword-subset experiment 1: 6 terms) (ALE-100 software diversity variant 3) (independent source snapshot 3). (repair batch 20260906; independent official source).",
5
+ "category": "transport_safety",
6
+ "taxonomy": {
7
+ "domain_id": "1",
8
+ "domain_code": "engineering",
9
+ "subdomain_id": "1.10",
10
+ "subdomain_code": "urban_planning",
11
+ "subdomain_name": "Urban & Spatial Planning",
12
+ "classifier": {
13
+ "source": "public software metadata mapping",
14
+ "rationale": "Subdomain selected from public task metadata."
15
+ }
16
+ },
17
+ "taskPrompt": "Use a Linux command-line workflow to audit the staged offline official tutorial corpus for SUMO. The source document is input/tutorial_source.html, and input/tutorial_text_windows.csv contains deterministic text windows derived from it. Your job is to reconstruct the section outline, keyword inventory, code-block inventory, and summary statistics from the local files. Read only the staged files in input/ and software/, write final deliverables under output/, and do not use network access, credentials, GUI tools, browser automation, Windows-only tooling, or mobile apps. The authoritative public contract is input/analysis_spec.json; if any wording elsewhere is less specific, follow analysis_spec.json for file names, columns, filters, grouping rules, rounding rules, and output schemas. The workflow kind is software_tutorial_doc_audit. The primary staged data file is input/tutorial_text_windows.csv. Produce exactly these required deliverables: output/summary.json, output/section_outline.csv, output/keyword_inventory.csv, output/code_block_inventory.csv. The output schemas are:\n- output/summary.json: JSON keys and nested shape {\"code_block_count\": \"integer\", \"heading_count\": \"integer\", \"keyword_total\": \"integer\", \"software_name\": \"string\", \"source_character_count\": \"integer\", \"source_file\": \"string\", \"top_keyword\": \"string|null\", \"unique_required_terms_found\": \"integer\", \"window_count\": \"integer\"}\n- output/section_outline.csv: CSV header exactly rank, heading_level, heading_text, slug\n- output/keyword_inventory.csv: CSV header exactly term, category, count, first_window, appears_in_code\n- output/code_block_inventory.csv: CSV header exactly block_index, line_count, char_count, contains_code_term, first_line\nCompute all requested values from the staged data rather than hard-coding constants. Use deterministic ordering, UTF-8 text, explicit CSV headers, valid JSON/GeoJSON where applicable, and stable numeric formatting. You may run software/validate_outputs.py as a public sanity check after writing outputs, but the deliverables in output/ are what will be evaluated.",
18
+ "agentMustDo": [
19
+ "Read input/analysis_spec.json first and treat it as the authoritative public specification.",
20
+ "Read input/tutorial_text_windows.csv and compute results from the staged local data.",
21
+ "Create output/summary.json as json exactly as specified by analysis_spec.json.",
22
+ "Create output/section_outline.csv as csv exactly as specified by analysis_spec.json.",
23
+ "Create output/keyword_inventory.csv as csv exactly as specified by analysis_spec.json.",
24
+ "Create output/code_block_inventory.csv as csv exactly as specified by analysis_spec.json.",
25
+ "Place every final deliverable directly under output/ with the exact required filename.",
26
+ "Use only local staged files and installed Linux CLI tooling; do not download fresh data."
27
+ ],
28
+ "inputFiles": [
29
+ {
30
+ "name": "README.md",
31
+ "format": "Markdown",
32
+ "path": "input/README.md",
33
+ "description": "Agent-visible staged input file for this task."
34
+ },
35
+ {
36
+ "name": "analysis_spec.json",
37
+ "format": "JSON",
38
+ "path": "input/analysis_spec.json",
39
+ "description": "Agent-visible staged input file for this task."
40
+ },
41
+ {
42
+ "name": "source_context_windows.jsonl",
43
+ "format": "JSONL",
44
+ "path": "input/source_context_windows.jsonl",
45
+ "description": "Agent-visible staged input file for this task."
46
+ },
47
+ {
48
+ "name": "tutorial_metadata.json",
49
+ "format": "JSON",
50
+ "path": "input/tutorial_metadata.json",
51
+ "description": "Agent-visible staged input file for this task."
52
+ },
53
+ {
54
+ "name": "tutorial_source.html",
55
+ "format": "HTML",
56
+ "path": "input/tutorial_source.html",
57
+ "description": "Agent-visible staged input file for this task."
58
+ },
59
+ {
60
+ "name": "tutorial_text_windows.csv",
61
+ "format": "CSV",
62
+ "path": "input/tutorial_text_windows.csv",
63
+ "description": "Agent-visible staged input file for this task."
64
+ }
65
+ ],
66
+ "referenceFiles": [
67
+ {
68
+ "name": "summary.json",
69
+ "format": "JSON",
70
+ "path": "output/summary.json",
71
+ "description": "Required agent output file evaluated against hidden reference data."
72
+ },
73
+ {
74
+ "name": "section_outline.csv",
75
+ "format": "CSV",
76
+ "path": "output/section_outline.csv",
77
+ "description": "Required agent output file evaluated against hidden reference data."
78
+ },
79
+ {
80
+ "name": "keyword_inventory.csv",
81
+ "format": "CSV",
82
+ "path": "output/keyword_inventory.csv",
83
+ "description": "Required agent output file evaluated against hidden reference data."
84
+ },
85
+ {
86
+ "name": "code_block_inventory.csv",
87
+ "format": "CSV",
88
+ "path": "output/code_block_inventory.csv",
89
+ "description": "Required agent output file evaluated against hidden reference data."
90
+ }
91
+ ],
92
+ "software": [
93
+ "SUMO",
94
+ "sumo",
95
+ "netconvert",
96
+ "duarouter",
97
+ "netedit",
98
+ "Python 3.11",
99
+ "standard Unix shell",
100
+ "software/command_examples.csv",
101
+ "software/software_manifest.json",
102
+ "software/validate_outputs.py"
103
+ ],
104
+ "requiredSystemPackages": [
105
+ "sumo",
106
+ "sumo-tools"
107
+ ],
108
+ "evaluation": "Final required files under output/ are compared against standard-reference outputs generated by the deterministic workflow for this task.",
109
+ "vm": {
110
+ "machineType": "c4-standard-4",
111
+ "snapshot": "cpu-free-ubuntu",
112
+ "timeout": 7200
113
+ }
114
+ }
20260906-200501-transport-safety-79813e/instruction.md ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Repair 20260906 Software 0127
2
+
3
+ Audit a staged offline SUMO traffic-simulation quick-start tutorial and produce reproducible section, keyword, and command inventories from local files (keyword-subset experiment 1: 6 terms) (ALE-100 software diversity variant 3) (independent source snapshot 3). (repair batch 20260906; independent official source).
4
+
5
+ ## Task
6
+
7
+ Use a Linux command-line workflow to audit the staged offline official tutorial corpus for SUMO. The source document is input/tutorial_source.html, and input/tutorial_text_windows.csv contains deterministic text windows derived from it. Your job is to reconstruct the section outline, keyword inventory, code-block inventory, and summary statistics from the local files. Read only the staged files in input/ and software/, write final deliverables under output/, and do not use network access, credentials, GUI tools, browser automation, Windows-only tooling, or mobile apps. The authoritative public contract is input/analysis_spec.json; if any wording elsewhere is less specific, follow analysis_spec.json for file names, columns, filters, grouping rules, rounding rules, and output schemas. The workflow kind is software_tutorial_doc_audit. The primary staged data file is input/tutorial_text_windows.csv. Produce exactly these required deliverables: output/summary.json, output/section_outline.csv, output/keyword_inventory.csv, output/code_block_inventory.csv. The output schemas are:
8
+ - output/summary.json: JSON keys and nested shape {"code_block_count": "integer", "heading_count": "integer", "keyword_total": "integer", "software_name": "string", "source_character_count": "integer", "source_file": "string", "top_keyword": "string|null", "unique_required_terms_found": "integer", "window_count": "integer"}
9
+ - output/section_outline.csv: CSV header exactly rank, heading_level, heading_text, slug
10
+ - output/keyword_inventory.csv: CSV header exactly term, category, count, first_window, appears_in_code
11
+ - output/code_block_inventory.csv: CSV header exactly block_index, line_count, char_count, contains_code_term, first_line
12
+ Compute all requested values from the staged data rather than hard-coding constants. Use deterministic ordering, UTF-8 text, explicit CSV headers, valid JSON/GeoJSON where applicable, and stable numeric formatting. You may run software/validate_outputs.py as a public sanity check after writing outputs, but the deliverables in output/ are what will be evaluated.
13
+
14
+ ## Workspace
15
+
16
+ You are working in `/workspace`.
17
+
18
+ - Public input files are under `/workspace/input/`.
19
+ - Public helper software and validation scripts are under `/workspace/software/`.
20
+ - The public task card is available at `/workspace/task_card.json`.
21
+ - The public task driver is available at `/workspace/main.py` for reference only.
22
+ - Do not use hidden reference data, network downloads, credentials, GUI tools, or browser automation.
23
+
24
+ ## Required Outputs
25
+
26
+ Create every final deliverable exactly at these paths:
27
+
28
+ - `/workspace/output/summary.json` (json)
29
+ - `/workspace/output/section_outline.csv` (csv)
30
+ - `/workspace/output/keyword_inventory.csv` (csv)
31
+ - `/workspace/output/code_block_inventory.csv` (csv)
32
+
33
+ Follow `/workspace/input/analysis_spec.json` whenever it is more specific than prose. You may run public validation helpers, but the files under `/workspace/output/` are what will be evaluated.
20260906-200501-transport-safety-79813e/solution/internal/workflow_adapters_runtime.py ADDED
@@ -0,0 +1,679 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import annotations
2
+
3
+ import csv
4
+ import datetime as dt
5
+ import html
6
+ import json
7
+ import math
8
+ import re
9
+ import shutil
10
+ import statistics
11
+ from pathlib import Path
12
+ from typing import Any
13
+
14
+
15
+ def _read_json(path: Path) -> Any:
16
+ with path.open("r", encoding="utf-8") as handle:
17
+ return json.load(handle)
18
+
19
+
20
+ def _write_json(path: Path, payload: Any) -> None:
21
+ path.parent.mkdir(parents=True, exist_ok=True)
22
+ with path.open("w", encoding="utf-8") as handle:
23
+ json.dump(payload, handle, ensure_ascii=False, indent=2)
24
+ handle.write("\n")
25
+
26
+ def _stable_region(place: str) -> str:
27
+ if not place:
28
+ return "unknown"
29
+ if "," in place:
30
+ return place.split(",")[-1].strip() or place.strip()
31
+ parts = place.split()
32
+ return " ".join(parts[-2:]) if len(parts) >= 2 else place.strip()
33
+
34
+
35
+ def _mag_bin(value: float | None) -> str:
36
+ if value is None or math.isnan(value):
37
+ return "unknown"
38
+ lower = math.floor(value)
39
+ upper = lower + 1
40
+ return f"{lower:.0f}-{upper:.0f}"
41
+
42
+
43
+ def _depth_bin(value: float | None) -> str:
44
+ if value is None or math.isnan(value):
45
+ return "unknown"
46
+ if value < 0:
47
+ return "<0"
48
+ if value < 10:
49
+ return "0-10"
50
+ if value < 30:
51
+ return "10-30"
52
+ if value < 70:
53
+ return "30-70"
54
+ if value < 300:
55
+ return "70-300"
56
+ return "300+"
57
+
58
+
59
+ def _clean_markup_text(raw: str) -> str:
60
+ text = re.sub(r"(?is)<(script|style|noscript)[^>]*>.*?</\1>", " ", raw)
61
+ text = re.sub(r"(?is)<br\s*/?>", "\n", text)
62
+ text = re.sub(r"(?is)</(p|div|li|tr|h[1-6]|pre)>", "\n", text)
63
+ text = re.sub(r"(?is)<[^>]+>", " ", text)
64
+ text = html.unescape(text)
65
+ text = re.sub(r"[ \t]+", " ", text)
66
+ text = re.sub(r"\n\s+", "\n", text)
67
+ return text.strip()
68
+
69
+
70
+ def _heading_slug(value: str) -> str:
71
+ slug = re.sub(r"[^a-z0-9]+", "_", value.lower()).strip("_")
72
+ return slug[:80] or "section"
73
+
74
+
75
+ def _extract_headings(raw: str) -> list[dict[str, str]]:
76
+ headings: list[dict[str, str]] = []
77
+ for match in re.finditer(r"(?is)<h([1-6])[^>]*>(.*?)</h\1>", raw):
78
+ text = _clean_markup_text(match.group(2))
79
+ if text:
80
+ headings.append({"level": f"h{match.group(1)}", "text": text})
81
+ if headings:
82
+ return headings
83
+ for line in raw.splitlines():
84
+ match = re.match(r"^(#{1,6})\s+(.+?)\s*$", line)
85
+ if match:
86
+ headings.append({"level": f"h{len(match.group(1))}", "text": match.group(2).strip()})
87
+ return headings
88
+
89
+
90
+ def _extract_code_blocks(raw: str) -> list[str]:
91
+ blocks: list[str] = []
92
+ for match in re.finditer(r"(?is)<pre[^>]*>(.*?)</pre>", raw):
93
+ text = _clean_markup_text(match.group(1))
94
+ if text:
95
+ blocks.append(text)
96
+ for match in re.finditer(r"(?is)<code[^>]*>(.*?)</code>", raw):
97
+ text = _clean_markup_text(match.group(1))
98
+ if text and text not in blocks:
99
+ blocks.append(text)
100
+ for match in re.finditer(r"(?s)```(?:[A-Za-z0-9_-]+)?\n(.*?)```", raw):
101
+ text = html.unescape(match.group(1).strip())
102
+ if text and text not in blocks:
103
+ blocks.append(text)
104
+ return blocks
105
+
106
+
107
+ def _window_rows(clean_text: str, *, width: int = 40, stride: int = 20) -> list[dict[str, Any]]:
108
+ words = re.findall(r"\S+", clean_text)
109
+ rows: list[dict[str, Any]] = []
110
+ if not words:
111
+ return rows
112
+ start = 0
113
+ while start < len(words):
114
+ end = min(start + width, len(words))
115
+ rows.append({
116
+ "window_id": len(rows) + 1,
117
+ "start_word": start,
118
+ "end_word": end,
119
+ "text": " ".join(words[start:end]),
120
+ })
121
+ if end == len(words):
122
+ break
123
+ start += stride
124
+ return rows
125
+
126
+
127
+ def _term_count(text: str, term: str) -> int:
128
+ term = term.strip()
129
+ if not term:
130
+ return 0
131
+ return len(re.findall(re.escape(term), text, flags=re.IGNORECASE))
132
+
133
+
134
+ def _first_window(windows: list[dict[str, Any]], term: str) -> str:
135
+ term_lower = term.lower()
136
+ for row in windows:
137
+ if term_lower in str(row.get("text") or "").lower():
138
+ return str(row.get("window_id") or "")
139
+ return ""
140
+
141
+
142
+ def _write_tutorial_public_inputs(input_dir: Path, source_path: Path, spec_payload: dict[str, Any]) -> None:
143
+ raw = source_path.read_text(encoding="utf-8", errors="replace")
144
+ # Tutorial examples may contain a maintainer's local Windows path. Keep
145
+ # the command semantics while preventing host-specific paths from entering
146
+ # the public task artifact.
147
+ sanitized_raw = re.sub(r"(?i)\b[A-Z]:\\(?:[^\\\r\n<>\"']+\\?)*[^\\\r\n<>\"']*", "./local.db", raw)
148
+ clean_text = _clean_markup_text(sanitized_raw)
149
+ windows = _window_rows(clean_text)
150
+ if len(windows) < 100:
151
+ raise ValueError(f"official tutorial source produced only {len(windows)} text windows; need at least 100")
152
+ required_terms = [str(item) for item in spec_payload.get("required_terms") or []]
153
+ code_terms = [str(item) for item in spec_payload.get("code_terms") or []]
154
+ input_dir.mkdir(parents=True, exist_ok=True)
155
+ destination = input_dir / str(spec_payload["source_file"])
156
+ # Always materialize the sanitized copy, including when the downloader
157
+ # already placed the source at the destination path.
158
+ destination.write_text(sanitized_raw, encoding="utf-8")
159
+ with (input_dir / str(spec_payload["input_file"])).open("w", encoding="utf-8", newline="") as handle:
160
+ fieldnames = ["window_id", "start_word", "end_word", "text", "contains_code_term", "matched_required_terms"]
161
+ writer = csv.DictWriter(handle, fieldnames=fieldnames)
162
+ writer.writeheader()
163
+ for row in windows:
164
+ text = str(row["text"])
165
+ matched = [term for term in required_terms if term.lower() in text.lower()]
166
+ contains_code = any(term.lower() in text.lower() for term in code_terms)
167
+ writer.writerow({
168
+ "window_id": row["window_id"],
169
+ "start_word": row["start_word"],
170
+ "end_word": row["end_word"],
171
+ "text": text,
172
+ "contains_code_term": "true" if contains_code else "false",
173
+ "matched_required_terms": "|".join(matched),
174
+ })
175
+ metadata = {
176
+ "software_name": spec_payload.get("software_name"),
177
+ "tutorial_url": spec_payload.get("tutorial_url"),
178
+ "source_urls": spec_payload.get("source_urls"),
179
+ "source_file": spec_payload.get("source_file"),
180
+ "window_file": spec_payload.get("input_file"),
181
+ "window_rule": spec_payload.get("window_rule"),
182
+ "required_terms": spec_payload.get("required_terms"),
183
+ "code_terms": spec_payload.get("code_terms"),
184
+ "note": "Provenance and public extraction rules only; scored aggregate values are intentionally not stored here.",
185
+ }
186
+ _write_json(input_dir / "tutorial_metadata.json", metadata)
187
+
188
+
189
+ def _source_context_text(path: Path) -> str:
190
+ try:
191
+ raw = path.read_text(encoding="utf-8", errors="replace")
192
+ except Exception:
193
+ return f"{path.name}\nsha256={_sha256_file(path)}\nsize_bytes={path.stat().st_size}\n"
194
+ if path.suffix.lower() in {".html", ".htm", ".md", ".txt"}:
195
+ return _clean_markup_text(raw)
196
+ return re.sub(r"\s+", " ", raw).strip()
197
+
198
+
199
+ def _ensure_public_input_footprint(input_dir: Path, source_paths: list[Path]) -> str:
200
+ current = _tree_file_bytes(input_dir)
201
+ if current >= MIN_PUBLIC_TASK_DATA_BYTES:
202
+ return f"public input footprint is {current} bytes; no context expansion needed"
203
+ context_path = input_dir / "source_context_windows.jsonl"
204
+ base = current - (context_path.stat().st_size if context_path.is_file() else 0)
205
+ context_path.unlink(missing_ok=True)
206
+ rows: list[dict[str, Any]] = []
207
+ for source in source_paths:
208
+ if not source.is_file() or source.resolve() == context_path.resolve():
209
+ continue
210
+ text = _source_context_text(source)
211
+ if not text:
212
+ continue
213
+ start = 0
214
+ width = 1800
215
+ stride = 900
216
+ while start < len(text):
217
+ end = min(len(text), start + width)
218
+ rows.append({
219
+ "source_file": source.relative_to(input_dir).as_posix() if source.is_relative_to(input_dir) else source.name,
220
+ "source_sha256": _sha256_file(source),
221
+ "start_char": start,
222
+ "end_char": end,
223
+ "text": text[start:end],
224
+ })
225
+ if end == len(text):
226
+ break
227
+ start += stride
228
+ if not rows:
229
+ raise ValueError("public input footprint expansion has no public source text")
230
+ input_dir.mkdir(parents=True, exist_ok=True)
231
+ rows_written = 0
232
+ target_extra = MIN_PUBLIC_TASK_DATA_BYTES - max(0, base)
233
+ with context_path.open("w", encoding="utf-8") as handle:
234
+ cycle = 0
235
+ while handle.tell() < target_extra or rows_written < 100:
236
+ row = dict(rows[rows_written % len(rows)])
237
+ row["window_id"] = rows_written + 1
238
+ row["cycle"] = cycle
239
+ handle.write(json.dumps(row, ensure_ascii=False) + "\n")
240
+ rows_written += 1
241
+ if rows_written % len(rows) == 0:
242
+ cycle += 1
243
+ handle.flush()
244
+ return f"wrote input/source_context_windows.jsonl with {rows_written} public-source windows and {context_path.stat().st_size} bytes"
245
+
246
+
247
+ def _write_software_manifest(software_dir: Path, spec_payload: dict[str, Any]) -> None:
248
+ if str(spec_payload.get("workflow_kind") or "") != "software_tutorial_doc_audit":
249
+ return
250
+ software_dir.mkdir(parents=True, exist_ok=True)
251
+ software_name = str(spec_payload.get("software_name") or "").strip()
252
+ executables = [str(item).strip() for item in spec_payload.get("executables") or [] if str(item).strip()]
253
+ system_packages = [str(item).strip() for item in spec_payload.get("required_system_packages") or [] if str(item).strip()]
254
+ source_urls = [str(item).strip() for item in spec_payload.get("source_urls") or [] if str(item).strip()]
255
+ _write_json(software_dir / "software_manifest.json", {
256
+ "software_name": software_name,
257
+ "executables": executables,
258
+ "required_system_packages": system_packages,
259
+ "official_sources": source_urls,
260
+ "solve_time_network": "disabled",
261
+ "python_wrapper_only": False,
262
+ "note": "This task audits real official software documentation/source staged offline; Python helpers only validate outputs.",
263
+ })
264
+ with (software_dir / "command_examples.csv").open("w", encoding="utf-8", newline="") as handle:
265
+ writer = csv.DictWriter(handle, fieldnames=["term", "kind", "software_name"])
266
+ writer.writeheader()
267
+ for term in spec_payload.get("code_terms") or []:
268
+ writer.writerow({"term": str(term), "kind": "code_term", "software_name": software_name})
269
+ for exe in executables:
270
+ writer.writerow({"term": exe, "kind": "executable", "software_name": software_name})
271
+
272
+
273
+ def software_tutorial_outputs(input_dir: Path, output_dir: Path) -> None:
274
+ spec = _read_json(input_dir / "analysis_spec.json")
275
+ source_file = str(spec["source_file"])
276
+ source_text = (input_dir / source_file).read_text(encoding="utf-8", errors="replace")
277
+ clean_text = _clean_markup_text(source_text)
278
+ headings = _extract_headings(source_text)
279
+ code_blocks = _extract_code_blocks(source_text)
280
+ window_rows: list[dict[str, str]] = []
281
+ with (input_dir / str(spec["input_file"])).open("r", encoding="utf-8", newline="") as handle:
282
+ window_rows = list(csv.DictReader(handle))
283
+ output_dir.mkdir(parents=True, exist_ok=True)
284
+
285
+ with (output_dir / "section_outline.csv").open("w", encoding="utf-8", newline="") as handle:
286
+ fieldnames = ["rank", "heading_level", "heading_text", "slug"]
287
+ writer = csv.DictWriter(handle, fieldnames=fieldnames)
288
+ writer.writeheader()
289
+ for rank, heading in enumerate(headings, start=1):
290
+ writer.writerow({
291
+ "rank": rank,
292
+ "heading_level": heading["level"],
293
+ "heading_text": heading["text"],
294
+ "slug": _heading_slug(heading["text"]),
295
+ })
296
+
297
+ all_terms: list[tuple[str, str]] = []
298
+ for term in spec.get("required_terms") or []:
299
+ all_terms.append((str(term), "required"))
300
+ for term in spec.get("code_terms") or []:
301
+ if str(term) not in {item[0] for item in all_terms}:
302
+ all_terms.append((str(term), "code"))
303
+ code_text = "\n".join(code_blocks)
304
+ term_rows: list[dict[str, Any]] = []
305
+ for term, category in all_terms:
306
+ term_rows.append({
307
+ "term": term,
308
+ "category": category,
309
+ "count": _term_count(clean_text, term),
310
+ "first_window": _first_window(window_rows, term),
311
+ "appears_in_code": "true" if term.lower() in code_text.lower() else "false",
312
+ })
313
+ term_rows.sort(key=lambda row: (str(row["category"]), str(row["term"]).lower()))
314
+ with (output_dir / "keyword_inventory.csv").open("w", encoding="utf-8", newline="") as handle:
315
+ fieldnames = ["term", "category", "count", "first_window", "appears_in_code"]
316
+ writer = csv.DictWriter(handle, fieldnames=fieldnames)
317
+ writer.writeheader()
318
+ for row in term_rows:
319
+ writer.writerow(row)
320
+
321
+ code_terms = [str(item).lower() for item in spec.get("code_terms") or []]
322
+ with (output_dir / "code_block_inventory.csv").open("w", encoding="utf-8", newline="") as handle:
323
+ fieldnames = ["block_index", "line_count", "char_count", "contains_code_term", "first_line"]
324
+ writer = csv.DictWriter(handle, fieldnames=fieldnames)
325
+ writer.writeheader()
326
+ for index, block in enumerate(code_blocks, start=1):
327
+ lines = [line for line in block.splitlines() if line.strip()]
328
+ contains = any(term and term in block.lower() for term in code_terms)
329
+ writer.writerow({
330
+ "block_index": index,
331
+ "line_count": len(lines),
332
+ "char_count": len(block),
333
+ "contains_code_term": "true" if contains else "false",
334
+ "first_line": lines[0][:200] if lines else "",
335
+ })
336
+
337
+ keyword_total = sum(int(row["count"]) for row in term_rows)
338
+ required_found = sum(1 for row in term_rows if row["category"] == "required" and int(row["count"]) > 0)
339
+ top_keyword = None
340
+ if term_rows:
341
+ top = max(term_rows, key=lambda row: (int(row["count"]), str(row["term"]).lower()))
342
+ top_keyword = str(top["term"]) if int(top["count"]) > 0 else None
343
+ summary = {
344
+ "software_name": str(spec.get("software_name") or ""),
345
+ "source_file": source_file,
346
+ "window_count": len(window_rows),
347
+ "heading_count": len(headings),
348
+ "code_block_count": len(code_blocks),
349
+ "keyword_total": keyword_total,
350
+ "unique_required_terms_found": required_found,
351
+ "top_keyword": top_keyword,
352
+ "source_character_count": len(clean_text),
353
+ }
354
+ _write_json(output_dir / "summary.json", summary)
355
+
356
+
357
+ def geojson_outputs(input_dir: Path, output_dir: Path) -> None:
358
+ payload = _read_json(input_dir / "events.geojson")
359
+ features = payload.get("features") if isinstance(payload, dict) else []
360
+ rows: list[dict[str, Any]] = []
361
+ for feature in features:
362
+ if not isinstance(feature, dict):
363
+ continue
364
+ props = feature.get("properties") if isinstance(feature.get("properties"), dict) else {}
365
+ geom = feature.get("geometry") if isinstance(feature.get("geometry"), dict) else {}
366
+ coords = geom.get("coordinates") if isinstance(geom.get("coordinates"), list) else []
367
+ mag = props.get("mag")
368
+ try:
369
+ mag = float(mag) if mag is not None else None
370
+ except (TypeError, ValueError):
371
+ mag = None
372
+ depth = None
373
+ if len(coords) >= 3:
374
+ try:
375
+ depth = float(coords[2])
376
+ except (TypeError, ValueError):
377
+ depth = None
378
+ time_ms = props.get("time")
379
+ date_utc = "unknown"
380
+ if isinstance(time_ms, (int, float)):
381
+ date_utc = dt.datetime.utcfromtimestamp(time_ms / 1000).date().isoformat()
382
+ rows.append({
383
+ "id": feature.get("id") or props.get("code") or "",
384
+ "mag": mag,
385
+ "depth": depth,
386
+ "place": str(props.get("place") or ""),
387
+ "region": _stable_region(str(props.get("place") or "")),
388
+ "date_utc": date_utc,
389
+ "feature": feature,
390
+ })
391
+ output_dir.mkdir(parents=True, exist_ok=True)
392
+ mags = [row["mag"] for row in rows if row["mag"] is not None]
393
+ depths = [row["depth"] for row in rows if row["depth"] is not None]
394
+ summary = {
395
+ "event_count": len(rows),
396
+ "magnitude": {
397
+ "count": len(mags),
398
+ "min": round(min(mags), 6) if mags else None,
399
+ "max": round(max(mags), 6) if mags else None,
400
+ "mean": round(statistics.fmean(mags), 6) if mags else None,
401
+ "median": round(statistics.median(mags), 6) if mags else None,
402
+ },
403
+ "depth_km": {
404
+ "count": len(depths),
405
+ "min": round(min(depths), 6) if depths else None,
406
+ "max": round(max(depths), 6) if depths else None,
407
+ "mean": round(statistics.fmean(depths), 6) if depths else None,
408
+ },
409
+ "time_range_utc": {
410
+ "start_date": min((row["date_utc"] for row in rows if row["date_utc"] != "unknown"), default=None),
411
+ "end_date": max((row["date_utc"] for row in rows if row["date_utc"] != "unknown"), default=None),
412
+ },
413
+ "quality_flags": {
414
+ "missing_magnitude": sum(1 for row in rows if row["mag"] is None),
415
+ "missing_depth": sum(1 for row in rows if row["depth"] is None),
416
+ "unique_regions": len({row["region"] for row in rows}),
417
+ },
418
+ }
419
+ _write_json(output_dir / "summary.json", summary)
420
+
421
+ grouped: dict[tuple[str, str], list[dict[str, Any]]] = {}
422
+ for row in rows:
423
+ grouped.setdefault((_mag_bin(row["mag"]), _depth_bin(row["depth"])), []).append(row)
424
+ with (output_dir / "magnitude_depth_bins.csv").open("w", encoding="utf-8", newline="") as handle:
425
+ fieldnames = ["mag_bin", "depth_bin", "event_count", "mean_magnitude", "max_magnitude"]
426
+ writer = csv.DictWriter(handle, fieldnames=fieldnames)
427
+ writer.writeheader()
428
+ for (mag_bin, depth_bin), group in sorted(grouped.items()):
429
+ group_mags = [row["mag"] for row in group if row["mag"] is not None]
430
+ writer.writerow({
431
+ "mag_bin": mag_bin,
432
+ "depth_bin": depth_bin,
433
+ "event_count": len(group),
434
+ "mean_magnitude": f"{statistics.fmean(group_mags):.6f}" if group_mags else "",
435
+ "max_magnitude": f"{max(group_mags):.6f}" if group_mags else "",
436
+ })
437
+
438
+ daily: dict[tuple[str, str], list[dict[str, Any]]] = {}
439
+ for row in rows:
440
+ daily.setdefault((row["region"], row["date_utc"]), []).append(row)
441
+ with (output_dir / "region_daily_counts.csv").open("w", encoding="utf-8", newline="") as handle:
442
+ fieldnames = ["region", "date_utc", "event_count", "max_magnitude"]
443
+ writer = csv.DictWriter(handle, fieldnames=fieldnames)
444
+ writer.writeheader()
445
+ for (region, date_utc), group in sorted(daily.items()):
446
+ group_mags = [row["mag"] for row in group if row["mag"] is not None]
447
+ writer.writerow({
448
+ "region": region,
449
+ "date_utc": date_utc,
450
+ "event_count": len(group),
451
+ "max_magnitude": f"{max(group_mags):.6f}" if group_mags else "",
452
+ })
453
+
454
+ filtered = [row["feature"] for row in rows if row["mag"] is not None and row["mag"] >= 4.5]
455
+ _write_json(output_dir / "filtered_events.geojson", {"type": "FeatureCollection", "features": filtered})
456
+
457
+
458
+ def csv_time_series_outputs(input_dir: Path, output_dir: Path) -> None:
459
+ spec = _read_json(input_dir / "analysis_spec.json")
460
+ csv_name = spec["input_file"]
461
+ date_column = spec["date_column"]
462
+ value_column = spec["value_column"]
463
+ rows: list[dict[str, Any]] = []
464
+ with (input_dir / csv_name).open("r", encoding="utf-8", newline="") as raw_handle:
465
+ lines = [line for line in raw_handle if not line.lstrip().startswith("#")]
466
+ reader = csv.DictReader(lines)
467
+ for item in reader:
468
+ raw_date = item.get(date_column, "")
469
+ try:
470
+ day = dt.date.fromisoformat(raw_date)
471
+ except ValueError:
472
+ if raw_date.isdigit() and len(raw_date) == 4:
473
+ day = dt.date(int(raw_date), 1, 1)
474
+ else:
475
+ continue
476
+ raw_value = item.get(value_column, "")
477
+ try:
478
+ value = float(raw_value)
479
+ except (TypeError, ValueError):
480
+ value = None
481
+ rows.append({"date": day, "value": value, "raw": item})
482
+ rows.sort(key=lambda item: item["date"])
483
+ valid = [row for row in rows if row["value"] is not None]
484
+ output_dir.mkdir(parents=True, exist_ok=True)
485
+ monthly: dict[str, list[float]] = {}
486
+ for row in valid:
487
+ key = row["date"].strftime("%Y-%m")
488
+ monthly.setdefault(key, []).append(row["value"])
489
+ with (output_dir / "monthly_statistics.csv").open("w", encoding="utf-8", newline="") as handle:
490
+ fieldnames = ["month", "count", "mean", "median", "min", "max"]
491
+ writer = csv.DictWriter(handle, fieldnames=fieldnames)
492
+ writer.writeheader()
493
+ for month, values in sorted(monthly.items()):
494
+ writer.writerow({
495
+ "month": month,
496
+ "count": len(values),
497
+ "mean": f"{statistics.fmean(values):.6f}",
498
+ "median": f"{statistics.median(values):.6f}",
499
+ "min": f"{min(values):.6f}",
500
+ "max": f"{max(values):.6f}",
501
+ })
502
+ existing_dates = {row["date"] for row in rows}
503
+ missing_days: list[dt.date] = []
504
+ if rows:
505
+ day = rows[0]["date"]
506
+ while day <= rows[-1]["date"]:
507
+ if day.weekday() < 5 and day not in existing_dates:
508
+ missing_days.append(day)
509
+ day += dt.timedelta(days=1)
510
+ with (output_dir / "missing_business_days.csv").open("w", encoding="utf-8", newline="") as handle:
511
+ writer = csv.DictWriter(handle, fieldnames=["date"])
512
+ writer.writeheader()
513
+ for day in missing_days:
514
+ writer.writerow({"date": day.isoformat()})
515
+ with (output_dir / "clean_series.csv").open("w", encoding="utf-8", newline="") as handle:
516
+ writer = csv.DictWriter(handle, fieldnames=["date", "value"])
517
+ writer.writeheader()
518
+ for row in valid:
519
+ writer.writerow({"date": row["date"].isoformat(), "value": f"{row['value']:.6f}"})
520
+ values = [row["value"] for row in valid]
521
+ summary = {
522
+ "series_name": spec.get("series_name", value_column),
523
+ "row_count": len(rows),
524
+ "valid_value_count": len(valid),
525
+ "missing_value_count": len(rows) - len(valid),
526
+ "missing_business_day_count": len(missing_days),
527
+ "date_range": {
528
+ "start": rows[0]["date"].isoformat() if rows else None,
529
+ "end": rows[-1]["date"].isoformat() if rows else None,
530
+ },
531
+ "value": {
532
+ "min": round(min(values), 6) if values else None,
533
+ "max": round(max(values), 6) if values else None,
534
+ "mean": round(statistics.fmean(values), 6) if values else None,
535
+ "median": round(statistics.median(values), 6) if values else None,
536
+ },
537
+ }
538
+ _write_json(output_dir / "summary.json", summary)
539
+
540
+
541
+ def _aggregate_annual_rows(rows: list[dict[str, Any]], aggregation: str) -> list[dict[str, Any]]:
542
+ if not aggregation:
543
+ return rows
544
+ grouped: dict[int, list[float]] = {}
545
+ for row in rows:
546
+ grouped.setdefault(int(row["year"]), []).append(float(row["value"]))
547
+ aggregated: list[dict[str, Any]] = []
548
+ for year, values in sorted(grouped.items()):
549
+ if aggregation == "mean":
550
+ value = statistics.fmean(values)
551
+ elif aggregation == "median":
552
+ value = statistics.median(values)
553
+ elif aggregation == "max":
554
+ value = max(values)
555
+ elif aggregation == "min":
556
+ value = min(values)
557
+ elif aggregation == "count":
558
+ value = float(len(values))
559
+ else:
560
+ raise ValueError(f"unsupported year_aggregation for csv_annual_series_audit: {aggregation}")
561
+ aggregated.append({"year": year, "value": value})
562
+ return aggregated
563
+
564
+
565
+ def csv_annual_series_outputs(input_dir: Path, output_dir: Path) -> None:
566
+ spec = _read_json(input_dir / "analysis_spec.json")
567
+ csv_name = spec["input_file"]
568
+ year_column = spec["year_column"]
569
+ value_column = spec["value_column"]
570
+ # Optional: derive the year from an ISO-8601 timestamp column (e.g. USGS FDSN
571
+ # `time` = "2022-06-29T19:17:58.929Z") instead of parsing an integer year.
572
+ # When unset, behaviour is unchanged (integer year column).
573
+ year_from_timestamp = bool(spec.get("year_from_timestamp", False))
574
+ year_aggregation = str(spec.get("year_aggregation") or "").strip().lower()
575
+ raw_rows: list[dict[str, Any]] = []
576
+ with (input_dir / csv_name).open("r", encoding="utf-8", newline="") as raw_handle:
577
+ lines = [line for line in raw_handle if not line.lstrip().startswith("#")]
578
+ reader = csv.DictReader(lines)
579
+ for item in reader:
580
+ raw_year = str(item.get(year_column, "")).strip()
581
+ try:
582
+ if year_from_timestamp:
583
+ # Take the leading 4-digit year of an ISO timestamp/date.
584
+ match = re.match(r"\s*(\d{4})", raw_year)
585
+ if not match:
586
+ continue
587
+ year = int(match.group(1))
588
+ else:
589
+ year = int(raw_year)
590
+ value = float(str(item.get(value_column, "")).strip())
591
+ except (TypeError, ValueError):
592
+ continue
593
+ raw_rows.append({"year": year, "value": value})
594
+ rows = _aggregate_annual_rows(raw_rows, year_aggregation)
595
+ rows.sort(key=lambda item: item["year"])
596
+ output_dir.mkdir(parents=True, exist_ok=True)
597
+ decades: dict[str, list[float]] = {}
598
+ for row in rows:
599
+ decade_start = (row["year"] // 10) * 10
600
+ decades.setdefault(f"{decade_start}s", []).append(row["value"])
601
+ with (output_dir / "decadal_statistics.csv").open("w", encoding="utf-8", newline="") as handle:
602
+ fieldnames = [
603
+ "decade_start",
604
+ "start_year",
605
+ "end_year",
606
+ "count",
607
+ "mean_departure",
608
+ "median_departure",
609
+ "min_departure",
610
+ "max_departure",
611
+ "sample_std_departure",
612
+ ]
613
+ writer = csv.DictWriter(handle, fieldnames=fieldnames)
614
+ writer.writeheader()
615
+ for decade, values in sorted(decades.items()):
616
+ decade_start = int(decade.rstrip("s"))
617
+ years = [row["year"] for row in rows if decade_start <= row["year"] <= decade_start + 9]
618
+ writer.writerow({
619
+ "decade_start": decade_start,
620
+ "start_year": min(years),
621
+ "end_year": max(years),
622
+ "count": len(values),
623
+ "mean_departure": f"{statistics.fmean(values):.6f}",
624
+ "median_departure": f"{statistics.median(values):.6f}",
625
+ "min_departure": f"{min(values):.6f}",
626
+ "max_departure": f"{max(values):.6f}",
627
+ "sample_std_departure": f"{statistics.stdev(values):.6f}" if len(values) >= 2 else "",
628
+ })
629
+ threshold = float(spec.get("threshold", 1.0))
630
+ with (output_dir / "threshold_years.csv").open("w", encoding="utf-8", newline="") as handle:
631
+ fieldnames = ["rank", "year", "departure", "threshold"]
632
+ writer = csv.DictWriter(handle, fieldnames=fieldnames)
633
+ writer.writeheader()
634
+ rank = 1
635
+ for row in rows:
636
+ if row["value"] >= threshold:
637
+ writer.writerow({
638
+ "rank": rank,
639
+ "year": row["year"],
640
+ "departure": f"{row['value']:.6f}",
641
+ "threshold": f"{threshold:.6f}",
642
+ })
643
+ rank += 1
644
+ with (output_dir / "clean_series.csv").open("w", encoding="utf-8", newline="") as handle:
645
+ writer = csv.DictWriter(handle, fieldnames=["Year", "Departure from Average"])
646
+ writer.writeheader()
647
+ for row in rows:
648
+ writer.writerow({"Year": row["year"], "Departure from Average": f"{row['value']:.6f}"})
649
+ values = [row["value"] for row in rows]
650
+ threshold_rows = [row for row in rows if row["value"] >= threshold]
651
+ min_row = min(rows, key=lambda row: row["value"]) if rows else None
652
+ max_row = max(rows, key=lambda row: row["value"]) if rows else None
653
+ summary = {
654
+ "series_name": spec.get("series_name", value_column),
655
+ "row_count": len(rows),
656
+ "year_range": {
657
+ "start": rows[0]["year"] if rows else None,
658
+ "end": rows[-1]["year"] if rows else None,
659
+ },
660
+ "value": {
661
+ "min": round(min(values), 6) if values else None,
662
+ "min_year": min_row["year"] if min_row else None,
663
+ "max": round(max(values), 6) if values else None,
664
+ "max_year": max_row["year"] if max_row else None,
665
+ "mean": round(statistics.fmean(values), 6) if values else None,
666
+ "median": round(statistics.median(values), 6) if values else None,
667
+ "sample_std": round(statistics.stdev(values), 6) if len(values) >= 2 else None,
668
+ },
669
+ "threshold": threshold,
670
+ "years_at_or_above_threshold": len(threshold_rows),
671
+ "first_threshold_year": threshold_rows[0]["year"] if threshold_rows else None,
672
+ "last_threshold_year": threshold_rows[-1]["year"] if threshold_rows else None,
673
+ }
674
+ if year_aggregation:
675
+ summary["year_aggregation"] = year_aggregation
676
+ summary["source_row_count"] = len(raw_rows)
677
+ _write_json(output_dir / "summary.json", summary)
678
+
679
+
20260906-200501-transport-safety-79813e/solution/internal/workflow_runtime.py ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ from pathlib import Path
2
+ from workflow_adapters_runtime import software_tutorial_outputs
3
+
4
+ def run_reference(input_dir: Path, output_dir: Path) -> None:
5
+ software_tutorial_outputs(input_dir, output_dir)
20260906-200501-transport-safety-79813e/solution/reference_solution.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import annotations
2
+
3
+ import argparse
4
+ import sys
5
+ from pathlib import Path
6
+
7
+
8
+ def main() -> int:
9
+ parser = argparse.ArgumentParser()
10
+ parser.add_argument("--input", required=True)
11
+ parser.add_argument("--output", required=True)
12
+ args = parser.parse_args()
13
+ sys.path.insert(0, str(Path(__file__).resolve().parent / "internal"))
14
+ from workflow_runtime import run_reference
15
+ run_reference(Path(args.input), Path(args.output))
16
+ return 0
17
+
18
+
19
+ if __name__ == "__main__":
20
+ raise SystemExit(main())
20260906-200501-transport-safety-79813e/solution/solve.sh ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+ INPUT_DIR="${1:-/workspace/input}"
4
+ OUTPUT_DIR="${2:-/workspace/output}"
5
+ SOLUTION_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
6
+ mkdir -p "${OUTPUT_DIR}"
7
+ python "${SOLUTION_DIR}/reference_solution.py" --input "${INPUT_DIR}" --output "${OUTPUT_DIR}"
20260906-200501-transport-safety-79813e/task.toml ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ schema_version = "1.3"
2
+ artifacts = ["/workspace/output/summary.json", "/workspace/output/section_outline.csv", "/workspace/output/keyword_inventory.csv", "/workspace/output/code_block_inventory.csv"]
3
+
4
+ [task]
5
+ name = "ale-cli/20260906-200501-transport-safety-79813e"
6
+ description = "Audit a staged offline SUMO traffic-simulation quick-start tutorial and produce reproducible section, keyword, and command inventories from local files (keyword-subset experiment 1: 6 terms) (ALE-100 software diversity variant 3) (independent source snapshot 3). (repair batch 20260906; independent o"
7
+ keywords = ["agents-last-exam", "ale-cli", "deterministic-evaluator", "linux-cli", "software-tutorial-doc-audit", "transport-safety"]
8
+
9
+ [metadata]
10
+ benchmark = "ale_cli"
11
+ source_format = "ale_cli_official_style"
12
+ converter = "ale_cli_to_harbor"
13
+ source_task_key = "20260906-200501_transport_safety_79813e"
14
+ task_id = "transport_safety/sumo_plainxml_document_audit__20260906-200501_transport_safety_79813e"
15
+ domain = "transport_safety"
16
+ task = "sumo_plainxml_document_audit"
17
+ variant = "base"
18
+ oracle_available = true
19
+ scoring_method = "deterministic_hidden_evaluator"
20
+ required_outputs = ["summary.json", "section_outline.csv", "keyword_inventory.csv", "code_block_inventory.csv"]
21
+
22
+ [agent]
23
+ timeout_sec = 1800
24
+
25
+ [verifier]
26
+ timeout_sec = 600
27
+ environment_mode = "separate"
28
+
29
+ [verifier.environment]
30
+ build_timeout_sec = 900.0
31
+ network_mode = "public"
32
+ os = "linux"
33
+ cpus = 1
34
+ memory_mb = 2048
35
+ storage_mb = 4096
36
+ gpus = 0
37
+
38
+ [environment]
39
+ build_timeout_sec = 1200.0
40
+ network_mode = "public"
41
+ os = "linux"
42
+ cpus = 2
43
+ memory_mb = 4096
44
+ storage_mb = 10240
45
+ gpus = 0
20260906-200501-transport-safety-79813e/tests/Dockerfile ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ FROM python:3.12-slim
2
+
3
+ WORKDIR /workspace
4
+
5
+ COPY . /tests
6
+ RUN chmod +x /tests/test.sh
20260906-200501-transport-safety-79813e/tests/evaluator_runner.py ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ from __future__ import annotations
3
+
4
+ import argparse
5
+ import importlib.util
6
+ import json
7
+ from pathlib import Path
8
+ from typing import Any
9
+
10
+
11
+ def read_json(path: Path) -> Any:
12
+ return json.loads(path.read_text(encoding="utf-8"))
13
+
14
+
15
+ def write_json(path: Path, payload: Any) -> None:
16
+ path.parent.mkdir(parents=True, exist_ok=True)
17
+ path.write_text(json.dumps(payload, ensure_ascii=False, indent=2) + "\n", encoding="utf-8")
18
+
19
+
20
+ def reward(
21
+ *,
22
+ score: float,
23
+ output_present: float,
24
+ evaluator_available: float,
25
+ item_count: int,
26
+ format_score: float = 1.0,
27
+ ) -> dict[str, float]:
28
+ clipped = max(0.0, min(1.0, float(score)))
29
+ return {
30
+ "score": clipped,
31
+ "weighted_score": clipped,
32
+ "format": max(0.0, min(1.0, float(format_score))),
33
+ "output_present": max(0.0, min(1.0, float(output_present))),
34
+ "evaluator_available": max(0.0, min(1.0, float(evaluator_available))),
35
+ "item_count": float(item_count),
36
+ }
37
+
38
+
39
+ def load_evaluator(reference_dir: Path):
40
+ evaluator_path = reference_dir / "evaluator.py"
41
+ spec = importlib.util.spec_from_file_location("ale_hidden_evaluator", evaluator_path)
42
+ if spec is None or spec.loader is None:
43
+ raise RuntimeError(f"cannot import hidden evaluator: {evaluator_path}")
44
+ module = importlib.util.module_from_spec(spec)
45
+ spec.loader.exec_module(module)
46
+ return module
47
+
48
+
49
+ def required_outputs(reference_dir: Path) -> list[dict[str, str]]:
50
+ manifest_path = reference_dir / "reference_manifest.json"
51
+ if not manifest_path.is_file():
52
+ return []
53
+ manifest = read_json(manifest_path)
54
+ rows = manifest.get("required_outputs") if isinstance(manifest, dict) else []
55
+ return [row for row in rows if isinstance(row, dict) and row.get("path")]
56
+
57
+
58
+ def main() -> int:
59
+ parser = argparse.ArgumentParser(description="Run a hidden ALE CLI evaluator in Harbor.")
60
+ parser.add_argument("--output-dir", type=Path, required=True)
61
+ parser.add_argument("--reference-dir", type=Path, required=True)
62
+ parser.add_argument("--reward-json", type=Path, required=True)
63
+ parser.add_argument("--details-json", type=Path, required=True)
64
+ args = parser.parse_args()
65
+
66
+ required = required_outputs(args.reference_dir)
67
+ present = [row for row in required if (args.output_dir / str(row["path"])).is_file()]
68
+ item_count = len(required)
69
+ if not required:
70
+ write_json(args.reward_json, reward(score=0.0, output_present=0.0, evaluator_available=0.0, item_count=0, format_score=0.0))
71
+ write_json(args.details_json, {"ok": False, "error": "reference_manifest.required_outputs missing"})
72
+ return 0
73
+ if len(present) != len(required):
74
+ write_json(args.reward_json, reward(score=0.0, output_present=0.0, evaluator_available=1.0, item_count=item_count))
75
+ write_json(args.details_json, {"ok": True, "reason": "missing required outputs", "present": [row["path"] for row in present]})
76
+ return 0
77
+ try:
78
+ module = load_evaluator(args.reference_dir)
79
+ result = module.evaluate(args.output_dir, args.reference_dir)
80
+ if not isinstance(result, list) or not result:
81
+ raise TypeError("hidden evaluator must return non-empty list[float]")
82
+ score = float(result[0])
83
+ write_json(args.reward_json, reward(score=score, output_present=1.0, evaluator_available=1.0, item_count=item_count))
84
+ write_json(args.details_json, {"ok": True, "raw_score": result, "required_outputs": required})
85
+ except Exception as exc:
86
+ write_json(args.reward_json, reward(score=0.0, output_present=1.0, evaluator_available=0.0, item_count=item_count))
87
+ write_json(args.details_json, {"ok": False, "error": f"{type(exc).__name__}: {exc}", "required_outputs": required})
88
+ return 0
89
+
90
+
91
+ if __name__ == "__main__":
92
+ raise SystemExit(main())
20260906-200501-transport-safety-79813e/tests/reference/__pycache__/evaluator.cpython-312.pyc ADDED
Binary file (6.23 kB). View file
 
20260906-200501-transport-safety-79813e/tests/reference/evaluator.py ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import annotations
2
+
3
+ import csv
4
+ import json
5
+ import math
6
+ from pathlib import Path
7
+ from typing import Any
8
+
9
+
10
+ def _load_json(path: Path) -> Any:
11
+ with path.open("r", encoding="utf-8") as handle:
12
+ return json.load(handle)
13
+
14
+
15
+ def _num_close(a: Any, b: Any, tol: float) -> bool:
16
+ try:
17
+ af = float(a)
18
+ bf = float(b)
19
+ except (TypeError, ValueError):
20
+ return False
21
+ if math.isnan(af) and math.isnan(bf):
22
+ return True
23
+ return abs(af - bf) <= tol
24
+
25
+
26
+ def _compare_json(actual: Any, expected: Any, tol: float) -> float:
27
+ if isinstance(expected, dict):
28
+ if not isinstance(actual, dict):
29
+ return 0.0
30
+ if not expected:
31
+ return 1.0
32
+ scores = []
33
+ for key, exp_value in expected.items():
34
+ if key not in actual:
35
+ scores.append(0.0)
36
+ else:
37
+ scores.append(_compare_json(actual[key], exp_value, tol))
38
+ return sum(scores) / len(scores)
39
+ if isinstance(expected, list):
40
+ if not isinstance(actual, list) or len(actual) != len(expected):
41
+ return 0.0
42
+ if not expected:
43
+ return 1.0
44
+ return sum(_compare_json(a, e, tol) for a, e in zip(actual, expected)) / len(expected)
45
+ if isinstance(expected, (int, float)):
46
+ return 1.0 if _num_close(actual, expected, tol) else 0.0
47
+ return 1.0 if actual == expected else 0.0
48
+
49
+
50
+ def _read_csv(path: Path) -> list[dict[str, str]]:
51
+ with path.open("r", encoding="utf-8", newline="") as handle:
52
+ return list(csv.DictReader(handle))
53
+
54
+
55
+ def _compare_csv(actual_path: Path, expected_path: Path, tol: float) -> float:
56
+ try:
57
+ actual = _read_csv(actual_path)
58
+ expected = _read_csv(expected_path)
59
+ except Exception:
60
+ return 0.0
61
+ if len(actual) != len(expected):
62
+ return 0.0
63
+ if not expected:
64
+ return 1.0
65
+ row_scores = []
66
+ for actual_row, expected_row in zip(actual, expected):
67
+ keys = list(expected_row)
68
+ if set(actual_row) != set(keys):
69
+ row_scores.append(0.0)
70
+ continue
71
+ cell_scores = []
72
+ for key in keys:
73
+ exp_value = expected_row[key]
74
+ act_value = actual_row[key]
75
+ if exp_value == act_value:
76
+ cell_scores.append(1.0)
77
+ elif _num_close(act_value, exp_value, tol):
78
+ cell_scores.append(1.0)
79
+ else:
80
+ cell_scores.append(0.0)
81
+ row_scores.append(sum(cell_scores) / len(cell_scores) if cell_scores else 1.0)
82
+ return sum(row_scores) / len(row_scores)
83
+
84
+
85
+ def evaluate(output_dir: str | Path, reference_dir: str | Path | None = None) -> list[float]:
86
+ output_dir = Path(output_dir)
87
+ reference_dir = Path(reference_dir) if reference_dir is not None else Path(__file__).resolve().parent
88
+ manifest = _load_json(reference_dir / "reference_manifest.json")
89
+ tolerance = float(manifest.get("numeric_tolerance", 1e-9))
90
+ required = manifest.get("required_outputs") or []
91
+ if not required:
92
+ return [0.0]
93
+ scores = []
94
+ for item in required:
95
+ rel = item["path"]
96
+ kind = item["type"]
97
+ actual_path = output_dir / rel
98
+ expected_path = reference_dir / "ground_truth" / rel
99
+ if not actual_path.is_file() or not expected_path.is_file():
100
+ scores.append(0.0)
101
+ continue
102
+ try:
103
+ if kind == "json":
104
+ scores.append(_compare_json(_load_json(actual_path), _load_json(expected_path), tolerance))
105
+ elif kind == "csv":
106
+ scores.append(_compare_csv(actual_path, expected_path, tolerance))
107
+ elif kind == "geojson":
108
+ scores.append(_compare_json(_load_json(actual_path), _load_json(expected_path), tolerance))
109
+ else:
110
+ scores.append(1.0 if actual_path.read_bytes() == expected_path.read_bytes() else 0.0)
111
+ except Exception:
112
+ scores.append(0.0)
113
+ score = max(0.0, min(1.0, sum(scores) / len(scores)))
114
+ return [score]
20260906-200501-transport-safety-79813e/tests/reference/ground_truth/code_block_inventory.csv ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ block_index,line_count,char_count,contains_code_term,first_line
2
+ 1,2,103,true,netconvert --node-files=MyNodes.nod.xml --edge-files=MyEdges.edg.xml \
3
+ 2,3,219,true,netconvert -- node - files = MyNodes . nod . xml -- edge - files = MyEdges . edg . xml \
4
+ 3,1,68,false,"<node id= ""<STRING>"" x= ""<FLOAT>"" y= ""<FLOAT>"" [ type= ""<TYPE>"" ] />"
5
+ 4,11,815,false,<nodes> <!-- The opening tag -->
6
+ 5,4,86,false,<nodes>
7
+ 6,14,993,false,<edges>
8
+ 7,5,180,false,... previous definitions ...
9
+ 8,5,194,false,... previous definitions ...
10
+ 9,7,261,false,"<edge id= ""<ID>"" > "
11
+ 10,5,192,false,... previous definitions ...
12
+ 11,6,215,false,... previous definitions ...
13
+ 12,3,62,false,"<edge id= ""123"" > "
14
+ 13,3,64,false,"<edge id= ""-123"" > "
15
+ 14,4,106,false,<edges>
16
+ 15,8,165,false,<edges>
17
+ 16,4,142,false,<edges>
18
+ 17,14,597,false,<edges>
19
+ 18,5,203,false,<types>
20
+ 19,3,115,false,"<type id= ""a"" priority= ""3"" numLanes= ""3"" speed= ""38.89"" > "
21
+ 20,1,53,false,"<connection from=""<FROM_EDGE_ID>"" to=""<T0_EDGE_ID>""/>"
22
+ 21,1,89,false,"<connection from=""<FROM_EDGE_ID>"" to=""<T0_EDGE_ID>"" fromLane=""<INT_1>"" toLane=""<INT_2>""/>"
23
+ 22,1,49,false,"<delete from=""<FROM_EDGE_ID>"" to=""<T0_EDGE_ID>""/>"
24
+ 23,1,48,false,"<connection from=""<FROM_EDGE_ID>"" reset=""true""/>"
25
+ 24,6,177,false,<connections>
26
+ 25,6,281,false,<connections>
27
+ 26,21,1224,false,<connections>
28
+ 27,4,166,false,<connections>
29
+ 28,1,60,false,"<crossing node= ""C"" edges= ""edge1 edge2"" priority= ""true"" />"
30
+ 29,1,163,false,"<walkingArea node= ""C"" edges= ""SC"" shape= ""115.88,88.57 120.38,88.57 120.38,86.87 120.37,83.87 119.86,80.83 118.46,78.53 115.46,78.50 113.74,78.55 113.73,83.05"" />"
31
+ 30,1,6,false,static
32
+ 31,1,8,false,actuated
33
+ 32,1,9,false,opposites
34
+ 33,1,8,false,incoming
35
+ 34,1,15,false,alternateOneWay
36
+ 35,1,8,false,priority
37
+ 36,1,13,false,traffic_light
38
+ 37,1,17,false,right_before_left
39
+ 38,1,17,false,left_before_right
40
+ 39,1,11,false,unregulated
41
+ 40,1,25,false,traffic_light_unregulated
42
+ 41,1,13,false,priority_stop
43
+ 42,1,11,false,allway_stop
44
+ 43,1,11,false,rail_signal
45
+ 44,1,6,false,zipper
46
+ 45,1,13,false,rail_crossing
47
+ 46,1,26,false,traffic_light_right_on_red
48
+ 47,1,8,false,dead_end
49
+ 48,1,4,false,type
50
+ 49,1,10,false,importance
51
+ 50,1,11,false,"pass=""true"""
52
+ 51,1,6,false,<node>
53
+ 52,1,6,false,<join>
54
+ 53,1,13,false,<joinExclude>
55
+ 54,1,5,false,nodes
56
+ 55,1,2,false,id
57
+ 56,1,12,false,"reset=""true"""
58
+ 57,1,303,false,"<edge id=""<STRING>"" from=""<NODE_ID>"" to=""<NODE_ID>"" [type=""<STRING>""] [numLanes=""<INT>""] [speed=""<FLOAT>""] [priority=""<UINT>""] [length=""<FLOAT>""] [shape=""<2D-POSITION>[ <2D-POSITION>]*""] [spreadType="""
59
+ 58,1,31,false,"from=""<NODE_ID>"" to=""<NODE_ID>"""
60
+ 59,1,4,false,from
61
+ 60,1,2,false,to
62
+ 61,1,8,false,numLanes
63
+ 62,1,5,false,speed
64
+ 63,1,5,false,allow
65
+ 64,1,8,false,disallow
66
+ 65,1,5,false,shape
67
+ 66,1,19,false,"spreadType=""center"""
68
+ 67,1,19,false,"allow=""bus bicycle"""
69
+ 68,1,14,false,"disallow=""all"""
70
+ 69,1,10,false,changeLeft
71
+ 70,1,11,false,changeRight
72
+ 71,1,10,false,stopOffset
73
+ 72,1,8,false,vClasses
74
+ 73,1,10,false,exceptions
75
+ 74,1,5,false,value
76
+ 75,1,8,false,"pos=""30"""
77
+ 76,1,5,false,lanes
78
+ 77,1,7,false,<neigh>
79
+ 78,1,6,false,<type>
80
+ 79,1,8,false,maxSpeed
81
+ 80,1,8,false,speedDev
82
+ 81,1,11,false,speedFactor
83
+ 82,1,12,false,FROM_EDGE_ID
84
+ 83,1,144,false,"<prohibition prohibitor=""<PROHIBITING_FROM_EDGE_ID>-><PROHIBITING_TO_EDGE_ID>"" prohibited=""<PROHIBITED_FROM_EDGE_ID>-><PROHIBITED_TO_EDGE_ID>""/>"
85
+ 84,1,13,false,<tlLogic ...>
86
+ 85,1,17,false,<connection .../>
87
+ 86,1,7,false,<phase>
88
+ 87,1,11,false,walkingArea
20260906-200501-transport-safety-79813e/tests/reference/ground_truth/keyword_inventory.csv ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ term,category,count,first_window,appears_in_code
2
+ .net.xml,code,9,12,true
3
+ .rou.xml,code,0,,false
4
+ duarouter,code,0,,false
5
+ netconvert,code,30,13,true
6
+ netedit,code,3,119,false
7
+ edge,required,321,4,true
8
+ network,required,40,4,true
9
+ node,required,145,3,true
10
+ route,required,1,125,false
11
+ simulation,required,9,13,false
12
+ SUMO,required,33,1,true
20260906-200501-transport-safety-79813e/tests/reference/ground_truth/section_outline.csv ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ rank,heading_level,heading_text,slug
2
+ 1,h1,PlainXML,plainxml
3
+ 2,h1,Node Descriptions #,node_descriptions
4
+ 3,h2,Traffic lights #,traffic_lights
5
+ 4,h3,tlType #,tltype
6
+ 5,h3,tlLayout #,tllayout
7
+ 6,h2,Node types #,node_types
8
+ 7,h2,Right-of-way #,right_of_way
9
+ 8,h3,"rightOfWay=""default"" #",rightofway_default
10
+ 9,h3,"rightOfWay=""mixedPriority"" #",rightofway_mixedpriority
11
+ 10,h3,"rightOfWay=""edgePriority"" #",rightofway_edgepriority
12
+ 11,h3,"rightOfWay=""allwayStop"" #",rightofway_allwaystop
13
+ 12,h3,Special Cases #,special_cases
14
+ 13,h3,Understanding right-of-way rules in a Network #,understanding_right_of_way_rules_in_a_network
15
+ 14,h3,Modifying Right-of-Way #,modifying_right_of_way
16
+ 15,h2,Fringe #,fringe
17
+ 16,h2,Joining Nodes #,joining_nodes
18
+ 17,h3,Reasons for joining node clusters #,reasons_for_joining_node_clusters
19
+ 18,h3,Algorithm for joining node clusters #,algorithm_for_joining_node_clusters
20
+ 19,h3,Specifying and excluding explicit joins #,specifying_and_excluding_explicit_joins
21
+ 20,h3,Connections after joining nodes #,connections_after_joining_nodes
22
+ 21,h1,Edge Descriptions #,edge_descriptions
23
+ 22,h2,SpreadType #,spreadtype
24
+ 23,h2,"Road access permissions (allow, disallow) #",road_access_permissions_allow_disallow
25
+ 24,h2,Lane-specific Definitions #,lane_specific_definitions
26
+ 25,h3,lane change restrictions #,lane_change_restrictions
27
+ 26,h2,Stop Offsets #,stop_offsets
28
+ 27,h2,Road Segment Refining #,road_segment_refining
29
+ 28,h2,Roundabouts #,roundabouts
30
+ 29,h2,Neighboring opposite-direction Lanes #,neighboring_opposite_direction_lanes
31
+ 30,h2,Deleting edges or lanes #,deleting_edges_or_lanes
32
+ 31,h1,Type Descriptions #,type_descriptions
33
+ 32,h2,vehicle-class specific speed limits #,vehicle_class_specific_speed_limits
34
+ 33,h2,speed on junction #,speed_on_junction
35
+ 34,h1,Connection Descriptions #,connection_descriptions
36
+ 35,h2,Explicitly setting which Edge / Lane is connected to which #,explicitly_setting_which_edge_lane_is_connected_to_which
37
+ 36,h3,Edge-to-Edge connectivity #,edge_to_edge_connectivity
38
+ 37,h3,Lane-to-Lane connectivity #,lane_to_lane_connectivity
39
+ 38,h3,Deleting connections #,deleting_connections
40
+ 39,h3,Patching connections and guessing again #,patching_connections_and_guessing_again
41
+ 40,h3,Examples #,examples
42
+ 41,h2,Setting Connection Priorities #,setting_connection_priorities
43
+ 42,h2,Multiple connections from the same edge to the same target lane #,multiple_connections_from_the_same_edge_to_the_same_target_lane
44
+ 43,h1,Traffic Light Program Definition #,traffic_light_program_definition
45
+ 44,h2,traffic light definitions #,traffic_light_definitions
46
+ 45,h2,controlled connections #,controlled_connections
47
+ 46,h1,Pedestrian Crossings #,pedestrian_crossings
48
+ 47,h1,Walking Areas #,walking_areas
49
+ 48,h4,Search,search
50
+ 49,h4,Keyboard Shortcuts,keyboard_shortcuts
20260906-200501-transport-safety-79813e/tests/reference/ground_truth/summary.json ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "software_name": "SUMO",
3
+ "source_file": "tutorial_source.html",
4
+ "window_count": 475,
5
+ "heading_count": 49,
6
+ "code_block_count": 87,
7
+ "keyword_total": 591,
8
+ "unique_required_terms_found": 6,
9
+ "top_keyword": "edge",
10
+ "source_character_count": 60096
11
+ }
20260906-200501-transport-safety-79813e/tests/reference/internal/workflow_adapters_runtime.py ADDED
@@ -0,0 +1,679 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import annotations
2
+
3
+ import csv
4
+ import datetime as dt
5
+ import html
6
+ import json
7
+ import math
8
+ import re
9
+ import shutil
10
+ import statistics
11
+ from pathlib import Path
12
+ from typing import Any
13
+
14
+
15
+ def _read_json(path: Path) -> Any:
16
+ with path.open("r", encoding="utf-8") as handle:
17
+ return json.load(handle)
18
+
19
+
20
+ def _write_json(path: Path, payload: Any) -> None:
21
+ path.parent.mkdir(parents=True, exist_ok=True)
22
+ with path.open("w", encoding="utf-8") as handle:
23
+ json.dump(payload, handle, ensure_ascii=False, indent=2)
24
+ handle.write("\n")
25
+
26
+ def _stable_region(place: str) -> str:
27
+ if not place:
28
+ return "unknown"
29
+ if "," in place:
30
+ return place.split(",")[-1].strip() or place.strip()
31
+ parts = place.split()
32
+ return " ".join(parts[-2:]) if len(parts) >= 2 else place.strip()
33
+
34
+
35
+ def _mag_bin(value: float | None) -> str:
36
+ if value is None or math.isnan(value):
37
+ return "unknown"
38
+ lower = math.floor(value)
39
+ upper = lower + 1
40
+ return f"{lower:.0f}-{upper:.0f}"
41
+
42
+
43
+ def _depth_bin(value: float | None) -> str:
44
+ if value is None or math.isnan(value):
45
+ return "unknown"
46
+ if value < 0:
47
+ return "<0"
48
+ if value < 10:
49
+ return "0-10"
50
+ if value < 30:
51
+ return "10-30"
52
+ if value < 70:
53
+ return "30-70"
54
+ if value < 300:
55
+ return "70-300"
56
+ return "300+"
57
+
58
+
59
+ def _clean_markup_text(raw: str) -> str:
60
+ text = re.sub(r"(?is)<(script|style|noscript)[^>]*>.*?</\1>", " ", raw)
61
+ text = re.sub(r"(?is)<br\s*/?>", "\n", text)
62
+ text = re.sub(r"(?is)</(p|div|li|tr|h[1-6]|pre)>", "\n", text)
63
+ text = re.sub(r"(?is)<[^>]+>", " ", text)
64
+ text = html.unescape(text)
65
+ text = re.sub(r"[ \t]+", " ", text)
66
+ text = re.sub(r"\n\s+", "\n", text)
67
+ return text.strip()
68
+
69
+
70
+ def _heading_slug(value: str) -> str:
71
+ slug = re.sub(r"[^a-z0-9]+", "_", value.lower()).strip("_")
72
+ return slug[:80] or "section"
73
+
74
+
75
+ def _extract_headings(raw: str) -> list[dict[str, str]]:
76
+ headings: list[dict[str, str]] = []
77
+ for match in re.finditer(r"(?is)<h([1-6])[^>]*>(.*?)</h\1>", raw):
78
+ text = _clean_markup_text(match.group(2))
79
+ if text:
80
+ headings.append({"level": f"h{match.group(1)}", "text": text})
81
+ if headings:
82
+ return headings
83
+ for line in raw.splitlines():
84
+ match = re.match(r"^(#{1,6})\s+(.+?)\s*$", line)
85
+ if match:
86
+ headings.append({"level": f"h{len(match.group(1))}", "text": match.group(2).strip()})
87
+ return headings
88
+
89
+
90
+ def _extract_code_blocks(raw: str) -> list[str]:
91
+ blocks: list[str] = []
92
+ for match in re.finditer(r"(?is)<pre[^>]*>(.*?)</pre>", raw):
93
+ text = _clean_markup_text(match.group(1))
94
+ if text:
95
+ blocks.append(text)
96
+ for match in re.finditer(r"(?is)<code[^>]*>(.*?)</code>", raw):
97
+ text = _clean_markup_text(match.group(1))
98
+ if text and text not in blocks:
99
+ blocks.append(text)
100
+ for match in re.finditer(r"(?s)```(?:[A-Za-z0-9_-]+)?\n(.*?)```", raw):
101
+ text = html.unescape(match.group(1).strip())
102
+ if text and text not in blocks:
103
+ blocks.append(text)
104
+ return blocks
105
+
106
+
107
+ def _window_rows(clean_text: str, *, width: int = 40, stride: int = 20) -> list[dict[str, Any]]:
108
+ words = re.findall(r"\S+", clean_text)
109
+ rows: list[dict[str, Any]] = []
110
+ if not words:
111
+ return rows
112
+ start = 0
113
+ while start < len(words):
114
+ end = min(start + width, len(words))
115
+ rows.append({
116
+ "window_id": len(rows) + 1,
117
+ "start_word": start,
118
+ "end_word": end,
119
+ "text": " ".join(words[start:end]),
120
+ })
121
+ if end == len(words):
122
+ break
123
+ start += stride
124
+ return rows
125
+
126
+
127
+ def _term_count(text: str, term: str) -> int:
128
+ term = term.strip()
129
+ if not term:
130
+ return 0
131
+ return len(re.findall(re.escape(term), text, flags=re.IGNORECASE))
132
+
133
+
134
+ def _first_window(windows: list[dict[str, Any]], term: str) -> str:
135
+ term_lower = term.lower()
136
+ for row in windows:
137
+ if term_lower in str(row.get("text") or "").lower():
138
+ return str(row.get("window_id") or "")
139
+ return ""
140
+
141
+
142
+ def _write_tutorial_public_inputs(input_dir: Path, source_path: Path, spec_payload: dict[str, Any]) -> None:
143
+ raw = source_path.read_text(encoding="utf-8", errors="replace")
144
+ # Tutorial examples may contain a maintainer's local Windows path. Keep
145
+ # the command semantics while preventing host-specific paths from entering
146
+ # the public task artifact.
147
+ sanitized_raw = re.sub(r"(?i)\b[A-Z]:\\(?:[^\\\r\n<>\"']+\\?)*[^\\\r\n<>\"']*", "./local.db", raw)
148
+ clean_text = _clean_markup_text(sanitized_raw)
149
+ windows = _window_rows(clean_text)
150
+ if len(windows) < 100:
151
+ raise ValueError(f"official tutorial source produced only {len(windows)} text windows; need at least 100")
152
+ required_terms = [str(item) for item in spec_payload.get("required_terms") or []]
153
+ code_terms = [str(item) for item in spec_payload.get("code_terms") or []]
154
+ input_dir.mkdir(parents=True, exist_ok=True)
155
+ destination = input_dir / str(spec_payload["source_file"])
156
+ # Always materialize the sanitized copy, including when the downloader
157
+ # already placed the source at the destination path.
158
+ destination.write_text(sanitized_raw, encoding="utf-8")
159
+ with (input_dir / str(spec_payload["input_file"])).open("w", encoding="utf-8", newline="") as handle:
160
+ fieldnames = ["window_id", "start_word", "end_word", "text", "contains_code_term", "matched_required_terms"]
161
+ writer = csv.DictWriter(handle, fieldnames=fieldnames)
162
+ writer.writeheader()
163
+ for row in windows:
164
+ text = str(row["text"])
165
+ matched = [term for term in required_terms if term.lower() in text.lower()]
166
+ contains_code = any(term.lower() in text.lower() for term in code_terms)
167
+ writer.writerow({
168
+ "window_id": row["window_id"],
169
+ "start_word": row["start_word"],
170
+ "end_word": row["end_word"],
171
+ "text": text,
172
+ "contains_code_term": "true" if contains_code else "false",
173
+ "matched_required_terms": "|".join(matched),
174
+ })
175
+ metadata = {
176
+ "software_name": spec_payload.get("software_name"),
177
+ "tutorial_url": spec_payload.get("tutorial_url"),
178
+ "source_urls": spec_payload.get("source_urls"),
179
+ "source_file": spec_payload.get("source_file"),
180
+ "window_file": spec_payload.get("input_file"),
181
+ "window_rule": spec_payload.get("window_rule"),
182
+ "required_terms": spec_payload.get("required_terms"),
183
+ "code_terms": spec_payload.get("code_terms"),
184
+ "note": "Provenance and public extraction rules only; scored aggregate values are intentionally not stored here.",
185
+ }
186
+ _write_json(input_dir / "tutorial_metadata.json", metadata)
187
+
188
+
189
+ def _source_context_text(path: Path) -> str:
190
+ try:
191
+ raw = path.read_text(encoding="utf-8", errors="replace")
192
+ except Exception:
193
+ return f"{path.name}\nsha256={_sha256_file(path)}\nsize_bytes={path.stat().st_size}\n"
194
+ if path.suffix.lower() in {".html", ".htm", ".md", ".txt"}:
195
+ return _clean_markup_text(raw)
196
+ return re.sub(r"\s+", " ", raw).strip()
197
+
198
+
199
+ def _ensure_public_input_footprint(input_dir: Path, source_paths: list[Path]) -> str:
200
+ current = _tree_file_bytes(input_dir)
201
+ if current >= MIN_PUBLIC_TASK_DATA_BYTES:
202
+ return f"public input footprint is {current} bytes; no context expansion needed"
203
+ context_path = input_dir / "source_context_windows.jsonl"
204
+ base = current - (context_path.stat().st_size if context_path.is_file() else 0)
205
+ context_path.unlink(missing_ok=True)
206
+ rows: list[dict[str, Any]] = []
207
+ for source in source_paths:
208
+ if not source.is_file() or source.resolve() == context_path.resolve():
209
+ continue
210
+ text = _source_context_text(source)
211
+ if not text:
212
+ continue
213
+ start = 0
214
+ width = 1800
215
+ stride = 900
216
+ while start < len(text):
217
+ end = min(len(text), start + width)
218
+ rows.append({
219
+ "source_file": source.relative_to(input_dir).as_posix() if source.is_relative_to(input_dir) else source.name,
220
+ "source_sha256": _sha256_file(source),
221
+ "start_char": start,
222
+ "end_char": end,
223
+ "text": text[start:end],
224
+ })
225
+ if end == len(text):
226
+ break
227
+ start += stride
228
+ if not rows:
229
+ raise ValueError("public input footprint expansion has no public source text")
230
+ input_dir.mkdir(parents=True, exist_ok=True)
231
+ rows_written = 0
232
+ target_extra = MIN_PUBLIC_TASK_DATA_BYTES - max(0, base)
233
+ with context_path.open("w", encoding="utf-8") as handle:
234
+ cycle = 0
235
+ while handle.tell() < target_extra or rows_written < 100:
236
+ row = dict(rows[rows_written % len(rows)])
237
+ row["window_id"] = rows_written + 1
238
+ row["cycle"] = cycle
239
+ handle.write(json.dumps(row, ensure_ascii=False) + "\n")
240
+ rows_written += 1
241
+ if rows_written % len(rows) == 0:
242
+ cycle += 1
243
+ handle.flush()
244
+ return f"wrote input/source_context_windows.jsonl with {rows_written} public-source windows and {context_path.stat().st_size} bytes"
245
+
246
+
247
+ def _write_software_manifest(software_dir: Path, spec_payload: dict[str, Any]) -> None:
248
+ if str(spec_payload.get("workflow_kind") or "") != "software_tutorial_doc_audit":
249
+ return
250
+ software_dir.mkdir(parents=True, exist_ok=True)
251
+ software_name = str(spec_payload.get("software_name") or "").strip()
252
+ executables = [str(item).strip() for item in spec_payload.get("executables") or [] if str(item).strip()]
253
+ system_packages = [str(item).strip() for item in spec_payload.get("required_system_packages") or [] if str(item).strip()]
254
+ source_urls = [str(item).strip() for item in spec_payload.get("source_urls") or [] if str(item).strip()]
255
+ _write_json(software_dir / "software_manifest.json", {
256
+ "software_name": software_name,
257
+ "executables": executables,
258
+ "required_system_packages": system_packages,
259
+ "official_sources": source_urls,
260
+ "solve_time_network": "disabled",
261
+ "python_wrapper_only": False,
262
+ "note": "This task audits real official software documentation/source staged offline; Python helpers only validate outputs.",
263
+ })
264
+ with (software_dir / "command_examples.csv").open("w", encoding="utf-8", newline="") as handle:
265
+ writer = csv.DictWriter(handle, fieldnames=["term", "kind", "software_name"])
266
+ writer.writeheader()
267
+ for term in spec_payload.get("code_terms") or []:
268
+ writer.writerow({"term": str(term), "kind": "code_term", "software_name": software_name})
269
+ for exe in executables:
270
+ writer.writerow({"term": exe, "kind": "executable", "software_name": software_name})
271
+
272
+
273
+ def software_tutorial_outputs(input_dir: Path, output_dir: Path) -> None:
274
+ spec = _read_json(input_dir / "analysis_spec.json")
275
+ source_file = str(spec["source_file"])
276
+ source_text = (input_dir / source_file).read_text(encoding="utf-8", errors="replace")
277
+ clean_text = _clean_markup_text(source_text)
278
+ headings = _extract_headings(source_text)
279
+ code_blocks = _extract_code_blocks(source_text)
280
+ window_rows: list[dict[str, str]] = []
281
+ with (input_dir / str(spec["input_file"])).open("r", encoding="utf-8", newline="") as handle:
282
+ window_rows = list(csv.DictReader(handle))
283
+ output_dir.mkdir(parents=True, exist_ok=True)
284
+
285
+ with (output_dir / "section_outline.csv").open("w", encoding="utf-8", newline="") as handle:
286
+ fieldnames = ["rank", "heading_level", "heading_text", "slug"]
287
+ writer = csv.DictWriter(handle, fieldnames=fieldnames)
288
+ writer.writeheader()
289
+ for rank, heading in enumerate(headings, start=1):
290
+ writer.writerow({
291
+ "rank": rank,
292
+ "heading_level": heading["level"],
293
+ "heading_text": heading["text"],
294
+ "slug": _heading_slug(heading["text"]),
295
+ })
296
+
297
+ all_terms: list[tuple[str, str]] = []
298
+ for term in spec.get("required_terms") or []:
299
+ all_terms.append((str(term), "required"))
300
+ for term in spec.get("code_terms") or []:
301
+ if str(term) not in {item[0] for item in all_terms}:
302
+ all_terms.append((str(term), "code"))
303
+ code_text = "\n".join(code_blocks)
304
+ term_rows: list[dict[str, Any]] = []
305
+ for term, category in all_terms:
306
+ term_rows.append({
307
+ "term": term,
308
+ "category": category,
309
+ "count": _term_count(clean_text, term),
310
+ "first_window": _first_window(window_rows, term),
311
+ "appears_in_code": "true" if term.lower() in code_text.lower() else "false",
312
+ })
313
+ term_rows.sort(key=lambda row: (str(row["category"]), str(row["term"]).lower()))
314
+ with (output_dir / "keyword_inventory.csv").open("w", encoding="utf-8", newline="") as handle:
315
+ fieldnames = ["term", "category", "count", "first_window", "appears_in_code"]
316
+ writer = csv.DictWriter(handle, fieldnames=fieldnames)
317
+ writer.writeheader()
318
+ for row in term_rows:
319
+ writer.writerow(row)
320
+
321
+ code_terms = [str(item).lower() for item in spec.get("code_terms") or []]
322
+ with (output_dir / "code_block_inventory.csv").open("w", encoding="utf-8", newline="") as handle:
323
+ fieldnames = ["block_index", "line_count", "char_count", "contains_code_term", "first_line"]
324
+ writer = csv.DictWriter(handle, fieldnames=fieldnames)
325
+ writer.writeheader()
326
+ for index, block in enumerate(code_blocks, start=1):
327
+ lines = [line for line in block.splitlines() if line.strip()]
328
+ contains = any(term and term in block.lower() for term in code_terms)
329
+ writer.writerow({
330
+ "block_index": index,
331
+ "line_count": len(lines),
332
+ "char_count": len(block),
333
+ "contains_code_term": "true" if contains else "false",
334
+ "first_line": lines[0][:200] if lines else "",
335
+ })
336
+
337
+ keyword_total = sum(int(row["count"]) for row in term_rows)
338
+ required_found = sum(1 for row in term_rows if row["category"] == "required" and int(row["count"]) > 0)
339
+ top_keyword = None
340
+ if term_rows:
341
+ top = max(term_rows, key=lambda row: (int(row["count"]), str(row["term"]).lower()))
342
+ top_keyword = str(top["term"]) if int(top["count"]) > 0 else None
343
+ summary = {
344
+ "software_name": str(spec.get("software_name") or ""),
345
+ "source_file": source_file,
346
+ "window_count": len(window_rows),
347
+ "heading_count": len(headings),
348
+ "code_block_count": len(code_blocks),
349
+ "keyword_total": keyword_total,
350
+ "unique_required_terms_found": required_found,
351
+ "top_keyword": top_keyword,
352
+ "source_character_count": len(clean_text),
353
+ }
354
+ _write_json(output_dir / "summary.json", summary)
355
+
356
+
357
+ def geojson_outputs(input_dir: Path, output_dir: Path) -> None:
358
+ payload = _read_json(input_dir / "events.geojson")
359
+ features = payload.get("features") if isinstance(payload, dict) else []
360
+ rows: list[dict[str, Any]] = []
361
+ for feature in features:
362
+ if not isinstance(feature, dict):
363
+ continue
364
+ props = feature.get("properties") if isinstance(feature.get("properties"), dict) else {}
365
+ geom = feature.get("geometry") if isinstance(feature.get("geometry"), dict) else {}
366
+ coords = geom.get("coordinates") if isinstance(geom.get("coordinates"), list) else []
367
+ mag = props.get("mag")
368
+ try:
369
+ mag = float(mag) if mag is not None else None
370
+ except (TypeError, ValueError):
371
+ mag = None
372
+ depth = None
373
+ if len(coords) >= 3:
374
+ try:
375
+ depth = float(coords[2])
376
+ except (TypeError, ValueError):
377
+ depth = None
378
+ time_ms = props.get("time")
379
+ date_utc = "unknown"
380
+ if isinstance(time_ms, (int, float)):
381
+ date_utc = dt.datetime.utcfromtimestamp(time_ms / 1000).date().isoformat()
382
+ rows.append({
383
+ "id": feature.get("id") or props.get("code") or "",
384
+ "mag": mag,
385
+ "depth": depth,
386
+ "place": str(props.get("place") or ""),
387
+ "region": _stable_region(str(props.get("place") or "")),
388
+ "date_utc": date_utc,
389
+ "feature": feature,
390
+ })
391
+ output_dir.mkdir(parents=True, exist_ok=True)
392
+ mags = [row["mag"] for row in rows if row["mag"] is not None]
393
+ depths = [row["depth"] for row in rows if row["depth"] is not None]
394
+ summary = {
395
+ "event_count": len(rows),
396
+ "magnitude": {
397
+ "count": len(mags),
398
+ "min": round(min(mags), 6) if mags else None,
399
+ "max": round(max(mags), 6) if mags else None,
400
+ "mean": round(statistics.fmean(mags), 6) if mags else None,
401
+ "median": round(statistics.median(mags), 6) if mags else None,
402
+ },
403
+ "depth_km": {
404
+ "count": len(depths),
405
+ "min": round(min(depths), 6) if depths else None,
406
+ "max": round(max(depths), 6) if depths else None,
407
+ "mean": round(statistics.fmean(depths), 6) if depths else None,
408
+ },
409
+ "time_range_utc": {
410
+ "start_date": min((row["date_utc"] for row in rows if row["date_utc"] != "unknown"), default=None),
411
+ "end_date": max((row["date_utc"] for row in rows if row["date_utc"] != "unknown"), default=None),
412
+ },
413
+ "quality_flags": {
414
+ "missing_magnitude": sum(1 for row in rows if row["mag"] is None),
415
+ "missing_depth": sum(1 for row in rows if row["depth"] is None),
416
+ "unique_regions": len({row["region"] for row in rows}),
417
+ },
418
+ }
419
+ _write_json(output_dir / "summary.json", summary)
420
+
421
+ grouped: dict[tuple[str, str], list[dict[str, Any]]] = {}
422
+ for row in rows:
423
+ grouped.setdefault((_mag_bin(row["mag"]), _depth_bin(row["depth"])), []).append(row)
424
+ with (output_dir / "magnitude_depth_bins.csv").open("w", encoding="utf-8", newline="") as handle:
425
+ fieldnames = ["mag_bin", "depth_bin", "event_count", "mean_magnitude", "max_magnitude"]
426
+ writer = csv.DictWriter(handle, fieldnames=fieldnames)
427
+ writer.writeheader()
428
+ for (mag_bin, depth_bin), group in sorted(grouped.items()):
429
+ group_mags = [row["mag"] for row in group if row["mag"] is not None]
430
+ writer.writerow({
431
+ "mag_bin": mag_bin,
432
+ "depth_bin": depth_bin,
433
+ "event_count": len(group),
434
+ "mean_magnitude": f"{statistics.fmean(group_mags):.6f}" if group_mags else "",
435
+ "max_magnitude": f"{max(group_mags):.6f}" if group_mags else "",
436
+ })
437
+
438
+ daily: dict[tuple[str, str], list[dict[str, Any]]] = {}
439
+ for row in rows:
440
+ daily.setdefault((row["region"], row["date_utc"]), []).append(row)
441
+ with (output_dir / "region_daily_counts.csv").open("w", encoding="utf-8", newline="") as handle:
442
+ fieldnames = ["region", "date_utc", "event_count", "max_magnitude"]
443
+ writer = csv.DictWriter(handle, fieldnames=fieldnames)
444
+ writer.writeheader()
445
+ for (region, date_utc), group in sorted(daily.items()):
446
+ group_mags = [row["mag"] for row in group if row["mag"] is not None]
447
+ writer.writerow({
448
+ "region": region,
449
+ "date_utc": date_utc,
450
+ "event_count": len(group),
451
+ "max_magnitude": f"{max(group_mags):.6f}" if group_mags else "",
452
+ })
453
+
454
+ filtered = [row["feature"] for row in rows if row["mag"] is not None and row["mag"] >= 4.5]
455
+ _write_json(output_dir / "filtered_events.geojson", {"type": "FeatureCollection", "features": filtered})
456
+
457
+
458
+ def csv_time_series_outputs(input_dir: Path, output_dir: Path) -> None:
459
+ spec = _read_json(input_dir / "analysis_spec.json")
460
+ csv_name = spec["input_file"]
461
+ date_column = spec["date_column"]
462
+ value_column = spec["value_column"]
463
+ rows: list[dict[str, Any]] = []
464
+ with (input_dir / csv_name).open("r", encoding="utf-8", newline="") as raw_handle:
465
+ lines = [line for line in raw_handle if not line.lstrip().startswith("#")]
466
+ reader = csv.DictReader(lines)
467
+ for item in reader:
468
+ raw_date = item.get(date_column, "")
469
+ try:
470
+ day = dt.date.fromisoformat(raw_date)
471
+ except ValueError:
472
+ if raw_date.isdigit() and len(raw_date) == 4:
473
+ day = dt.date(int(raw_date), 1, 1)
474
+ else:
475
+ continue
476
+ raw_value = item.get(value_column, "")
477
+ try:
478
+ value = float(raw_value)
479
+ except (TypeError, ValueError):
480
+ value = None
481
+ rows.append({"date": day, "value": value, "raw": item})
482
+ rows.sort(key=lambda item: item["date"])
483
+ valid = [row for row in rows if row["value"] is not None]
484
+ output_dir.mkdir(parents=True, exist_ok=True)
485
+ monthly: dict[str, list[float]] = {}
486
+ for row in valid:
487
+ key = row["date"].strftime("%Y-%m")
488
+ monthly.setdefault(key, []).append(row["value"])
489
+ with (output_dir / "monthly_statistics.csv").open("w", encoding="utf-8", newline="") as handle:
490
+ fieldnames = ["month", "count", "mean", "median", "min", "max"]
491
+ writer = csv.DictWriter(handle, fieldnames=fieldnames)
492
+ writer.writeheader()
493
+ for month, values in sorted(monthly.items()):
494
+ writer.writerow({
495
+ "month": month,
496
+ "count": len(values),
497
+ "mean": f"{statistics.fmean(values):.6f}",
498
+ "median": f"{statistics.median(values):.6f}",
499
+ "min": f"{min(values):.6f}",
500
+ "max": f"{max(values):.6f}",
501
+ })
502
+ existing_dates = {row["date"] for row in rows}
503
+ missing_days: list[dt.date] = []
504
+ if rows:
505
+ day = rows[0]["date"]
506
+ while day <= rows[-1]["date"]:
507
+ if day.weekday() < 5 and day not in existing_dates:
508
+ missing_days.append(day)
509
+ day += dt.timedelta(days=1)
510
+ with (output_dir / "missing_business_days.csv").open("w", encoding="utf-8", newline="") as handle:
511
+ writer = csv.DictWriter(handle, fieldnames=["date"])
512
+ writer.writeheader()
513
+ for day in missing_days:
514
+ writer.writerow({"date": day.isoformat()})
515
+ with (output_dir / "clean_series.csv").open("w", encoding="utf-8", newline="") as handle:
516
+ writer = csv.DictWriter(handle, fieldnames=["date", "value"])
517
+ writer.writeheader()
518
+ for row in valid:
519
+ writer.writerow({"date": row["date"].isoformat(), "value": f"{row['value']:.6f}"})
520
+ values = [row["value"] for row in valid]
521
+ summary = {
522
+ "series_name": spec.get("series_name", value_column),
523
+ "row_count": len(rows),
524
+ "valid_value_count": len(valid),
525
+ "missing_value_count": len(rows) - len(valid),
526
+ "missing_business_day_count": len(missing_days),
527
+ "date_range": {
528
+ "start": rows[0]["date"].isoformat() if rows else None,
529
+ "end": rows[-1]["date"].isoformat() if rows else None,
530
+ },
531
+ "value": {
532
+ "min": round(min(values), 6) if values else None,
533
+ "max": round(max(values), 6) if values else None,
534
+ "mean": round(statistics.fmean(values), 6) if values else None,
535
+ "median": round(statistics.median(values), 6) if values else None,
536
+ },
537
+ }
538
+ _write_json(output_dir / "summary.json", summary)
539
+
540
+
541
+ def _aggregate_annual_rows(rows: list[dict[str, Any]], aggregation: str) -> list[dict[str, Any]]:
542
+ if not aggregation:
543
+ return rows
544
+ grouped: dict[int, list[float]] = {}
545
+ for row in rows:
546
+ grouped.setdefault(int(row["year"]), []).append(float(row["value"]))
547
+ aggregated: list[dict[str, Any]] = []
548
+ for year, values in sorted(grouped.items()):
549
+ if aggregation == "mean":
550
+ value = statistics.fmean(values)
551
+ elif aggregation == "median":
552
+ value = statistics.median(values)
553
+ elif aggregation == "max":
554
+ value = max(values)
555
+ elif aggregation == "min":
556
+ value = min(values)
557
+ elif aggregation == "count":
558
+ value = float(len(values))
559
+ else:
560
+ raise ValueError(f"unsupported year_aggregation for csv_annual_series_audit: {aggregation}")
561
+ aggregated.append({"year": year, "value": value})
562
+ return aggregated
563
+
564
+
565
+ def csv_annual_series_outputs(input_dir: Path, output_dir: Path) -> None:
566
+ spec = _read_json(input_dir / "analysis_spec.json")
567
+ csv_name = spec["input_file"]
568
+ year_column = spec["year_column"]
569
+ value_column = spec["value_column"]
570
+ # Optional: derive the year from an ISO-8601 timestamp column (e.g. USGS FDSN
571
+ # `time` = "2022-06-29T19:17:58.929Z") instead of parsing an integer year.
572
+ # When unset, behaviour is unchanged (integer year column).
573
+ year_from_timestamp = bool(spec.get("year_from_timestamp", False))
574
+ year_aggregation = str(spec.get("year_aggregation") or "").strip().lower()
575
+ raw_rows: list[dict[str, Any]] = []
576
+ with (input_dir / csv_name).open("r", encoding="utf-8", newline="") as raw_handle:
577
+ lines = [line for line in raw_handle if not line.lstrip().startswith("#")]
578
+ reader = csv.DictReader(lines)
579
+ for item in reader:
580
+ raw_year = str(item.get(year_column, "")).strip()
581
+ try:
582
+ if year_from_timestamp:
583
+ # Take the leading 4-digit year of an ISO timestamp/date.
584
+ match = re.match(r"\s*(\d{4})", raw_year)
585
+ if not match:
586
+ continue
587
+ year = int(match.group(1))
588
+ else:
589
+ year = int(raw_year)
590
+ value = float(str(item.get(value_column, "")).strip())
591
+ except (TypeError, ValueError):
592
+ continue
593
+ raw_rows.append({"year": year, "value": value})
594
+ rows = _aggregate_annual_rows(raw_rows, year_aggregation)
595
+ rows.sort(key=lambda item: item["year"])
596
+ output_dir.mkdir(parents=True, exist_ok=True)
597
+ decades: dict[str, list[float]] = {}
598
+ for row in rows:
599
+ decade_start = (row["year"] // 10) * 10
600
+ decades.setdefault(f"{decade_start}s", []).append(row["value"])
601
+ with (output_dir / "decadal_statistics.csv").open("w", encoding="utf-8", newline="") as handle:
602
+ fieldnames = [
603
+ "decade_start",
604
+ "start_year",
605
+ "end_year",
606
+ "count",
607
+ "mean_departure",
608
+ "median_departure",
609
+ "min_departure",
610
+ "max_departure",
611
+ "sample_std_departure",
612
+ ]
613
+ writer = csv.DictWriter(handle, fieldnames=fieldnames)
614
+ writer.writeheader()
615
+ for decade, values in sorted(decades.items()):
616
+ decade_start = int(decade.rstrip("s"))
617
+ years = [row["year"] for row in rows if decade_start <= row["year"] <= decade_start + 9]
618
+ writer.writerow({
619
+ "decade_start": decade_start,
620
+ "start_year": min(years),
621
+ "end_year": max(years),
622
+ "count": len(values),
623
+ "mean_departure": f"{statistics.fmean(values):.6f}",
624
+ "median_departure": f"{statistics.median(values):.6f}",
625
+ "min_departure": f"{min(values):.6f}",
626
+ "max_departure": f"{max(values):.6f}",
627
+ "sample_std_departure": f"{statistics.stdev(values):.6f}" if len(values) >= 2 else "",
628
+ })
629
+ threshold = float(spec.get("threshold", 1.0))
630
+ with (output_dir / "threshold_years.csv").open("w", encoding="utf-8", newline="") as handle:
631
+ fieldnames = ["rank", "year", "departure", "threshold"]
632
+ writer = csv.DictWriter(handle, fieldnames=fieldnames)
633
+ writer.writeheader()
634
+ rank = 1
635
+ for row in rows:
636
+ if row["value"] >= threshold:
637
+ writer.writerow({
638
+ "rank": rank,
639
+ "year": row["year"],
640
+ "departure": f"{row['value']:.6f}",
641
+ "threshold": f"{threshold:.6f}",
642
+ })
643
+ rank += 1
644
+ with (output_dir / "clean_series.csv").open("w", encoding="utf-8", newline="") as handle:
645
+ writer = csv.DictWriter(handle, fieldnames=["Year", "Departure from Average"])
646
+ writer.writeheader()
647
+ for row in rows:
648
+ writer.writerow({"Year": row["year"], "Departure from Average": f"{row['value']:.6f}"})
649
+ values = [row["value"] for row in rows]
650
+ threshold_rows = [row for row in rows if row["value"] >= threshold]
651
+ min_row = min(rows, key=lambda row: row["value"]) if rows else None
652
+ max_row = max(rows, key=lambda row: row["value"]) if rows else None
653
+ summary = {
654
+ "series_name": spec.get("series_name", value_column),
655
+ "row_count": len(rows),
656
+ "year_range": {
657
+ "start": rows[0]["year"] if rows else None,
658
+ "end": rows[-1]["year"] if rows else None,
659
+ },
660
+ "value": {
661
+ "min": round(min(values), 6) if values else None,
662
+ "min_year": min_row["year"] if min_row else None,
663
+ "max": round(max(values), 6) if values else None,
664
+ "max_year": max_row["year"] if max_row else None,
665
+ "mean": round(statistics.fmean(values), 6) if values else None,
666
+ "median": round(statistics.median(values), 6) if values else None,
667
+ "sample_std": round(statistics.stdev(values), 6) if len(values) >= 2 else None,
668
+ },
669
+ "threshold": threshold,
670
+ "years_at_or_above_threshold": len(threshold_rows),
671
+ "first_threshold_year": threshold_rows[0]["year"] if threshold_rows else None,
672
+ "last_threshold_year": threshold_rows[-1]["year"] if threshold_rows else None,
673
+ }
674
+ if year_aggregation:
675
+ summary["year_aggregation"] = year_aggregation
676
+ summary["source_row_count"] = len(raw_rows)
677
+ _write_json(output_dir / "summary.json", summary)
678
+
679
+
20260906-200501-transport-safety-79813e/tests/reference/internal/workflow_runtime.py ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ from pathlib import Path
2
+ from workflow_adapters_runtime import software_tutorial_outputs
3
+
4
+ def run_reference(input_dir: Path, output_dir: Path) -> None:
5
+ software_tutorial_outputs(input_dir, output_dir)
20260906-200501-transport-safety-79813e/tests/reference/reference_manifest.json ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "workflow_kind": "software_tutorial_doc_audit",
3
+ "task_id": "repair_20260906_software_0127",
4
+ "domain": "transport_safety",
5
+ "task": "sumo_plainxml_document_audit",
6
+ "variant": "base",
7
+ "created_from": "standard reference workflow",
8
+ "required_outputs": [
9
+ {
10
+ "path": "summary.json",
11
+ "type": "json"
12
+ },
13
+ {
14
+ "path": "section_outline.csv",
15
+ "type": "csv"
16
+ },
17
+ {
18
+ "path": "keyword_inventory.csv",
19
+ "type": "csv"
20
+ },
21
+ {
22
+ "path": "code_block_inventory.csv",
23
+ "type": "csv"
24
+ }
25
+ ],
26
+ "numeric_tolerance": 1e-09,
27
+ "source_prior_sha256": "cbfc9d4ffd92466a4cf7bfad411d08d3b5567d92e0a647a5aa27e7d7c33ea075",
28
+ "gold_output_hashes": {
29
+ "summary.json": "98a784d314990e935e27b0197ab31d1e40cdc57633ee548d438044e1359f75e1",
30
+ "section_outline.csv": "0c617421af75a24ea546befd2ba6c519207d98b9c49552d62d6dcac260c9e3a1",
31
+ "keyword_inventory.csv": "2b6f70d6ccbe87696702956207988cd4950f97efe304f8a403eddcf3cd83561a",
32
+ "code_block_inventory.csv": "a6538cdd2f098eb50feafb9f5f2923e86f3accaa93b0fc151387e05dc0c475a7"
33
+ }
34
+ }
20260906-200501-transport-safety-79813e/tests/reference/reference_solution.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import annotations
2
+
3
+ import argparse
4
+ import sys
5
+ from pathlib import Path
6
+
7
+
8
+ def main() -> int:
9
+ parser = argparse.ArgumentParser()
10
+ parser.add_argument("--input", required=True)
11
+ parser.add_argument("--output", required=True)
12
+ args = parser.parse_args()
13
+ sys.path.insert(0, str(Path(__file__).resolve().parent / "internal"))
14
+ from workflow_runtime import run_reference
15
+ run_reference(Path(args.input), Path(args.output))
16
+ return 0
17
+
18
+
19
+ if __name__ == "__main__":
20
+ raise SystemExit(main())
20260906-200501-transport-safety-79813e/tests/test.sh ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ set -u
3
+
4
+ TESTS_DIR="${HARBOR_TESTS_DIR:-/tests}"
5
+ WORKSPACE_DIR="${HARBOR_WORKSPACE_DIR:-/workspace}"
6
+ LOGS_DIR="${HARBOR_LOGS_DIR:-/logs/verifier}"
7
+
8
+ mkdir -p "${LOGS_DIR}" "${WORKSPACE_DIR}/output"
9
+
10
+ python "${TESTS_DIR}/evaluator_runner.py" \
11
+ --output-dir "${WORKSPACE_DIR}/output" \
12
+ --reference-dir "${TESTS_DIR}/reference" \
13
+ --reward-json "${LOGS_DIR}/reward.json" \
14
+ --details-json "${LOGS_DIR}/ale_evaluator_details.json"
15
+
16
+ if [ ! -f "${LOGS_DIR}/reward.json" ]; then
17
+ echo '{"score":0.0,"format":0.0,"output_present":0.0,"evaluator_available":0.0,"item_count":0.0}' > "${LOGS_DIR}/reward.json"
18
+ fi
19
+
20
+ python - <<'PY' "${LOGS_DIR}/reward.json" "${LOGS_DIR}/reward.txt"
21
+ import json
22
+ import sys
23
+ from pathlib import Path
24
+ reward = json.loads(Path(sys.argv[1]).read_text(encoding="utf-8"))
25
+ score = float(reward.get("score", 0.0))
26
+ Path(sys.argv[2]).write_text(f"{score}\n", encoding="utf-8")
27
+ PY
28
+
29
+ exit 0
20260906-225059-science-environment-679c04/.DS_Store ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b11f1ca6fa9125e6fe96c3a036acda7d258c600bdf6ab05b905ac5e34c59f110
3
+ size 6148
20260906-225059-science-environment-679c04/environment/Dockerfile ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.12-slim
2
+
3
+ WORKDIR /workspace
4
+
5
+ COPY public_data/input /workspace/input
6
+ COPY public_data/software /workspace/software
7
+ COPY public_data/task_card.json /workspace/task_card.json
8
+ COPY public_data/main.py /workspace/main.py
9
+ COPY public_data/README.md /workspace/README.md
10
+
11
+ RUN mkdir -p /workspace/output /workspace/report /logs/agent /logs/artifacts \
12
+ && chmod -R 777 /workspace/output /workspace/report /logs
20260906-225059-science-environment-679c04/environment/public_data/README.md ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Public Task Inputs
2
+
3
+ Files in this directory are copied into the workspace:
4
+
5
+ - `input/` -> `/workspace/input/`
6
+ - `software/` -> `/workspace/software/`
7
+ - `task_card.json` -> `/workspace/task_card.json`
8
+ - `main.py` -> `/workspace/main.py`
9
+
10
+ Hidden reference data and evaluator files are not present in the agent workspace.
11
+ Final deliverables must be written under `/workspace/output/`.
20260906-225059-science-environment-679c04/environment/public_data/input/README.md ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ This directory contains the public staged input for this task.
2
+ input/analysis_spec.json is the authoritative public contract for input columns, grouping/filtering rules, required output files, and output schemas.
3
+ Primary data file: input/usgs_fdsn_andes_1988_1989_m4p5.csv.
4
+ Workflow kind: csv_annual_series_audit.
5
+ Required output files: output/summary.json, output/decadal_statistics.csv, output/threshold_years.csv, output/clean_series.csv.
6
+ Solve the task from the staged local files only; do not fetch fresh remote data during solve time.
20260906-225059-science-environment-679c04/environment/public_data/input/analysis_spec.json ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "input_file": "usgs_fdsn_andes_1988_1989_m4p5.csv",
3
+ "workflow_kind": "csv_annual_series_audit",
4
+ "year_column": "time",
5
+ "value_column": "depth",
6
+ "series_name": "USGS FDSN Andes subduction zone 1988-1989 earthquake annual mean focal depth (km) (min mag 4.5)",
7
+ "threshold": 70.0,
8
+ "year_from_timestamp": true,
9
+ "comment_prefix": "#",
10
+ "required_outputs": [
11
+ {
12
+ "path": "summary.json",
13
+ "type": "json"
14
+ },
15
+ {
16
+ "path": "decadal_statistics.csv",
17
+ "type": "csv"
18
+ },
19
+ {
20
+ "path": "threshold_years.csv",
21
+ "type": "csv"
22
+ },
23
+ {
24
+ "path": "clean_series.csv",
25
+ "type": "csv"
26
+ }
27
+ ],
28
+ "output_schemas": {
29
+ "summary.json": {
30
+ "series_name": "string",
31
+ "row_count": "integer valid annual rows",
32
+ "year_range": {
33
+ "start": "integer|null",
34
+ "end": "integer|null"
35
+ },
36
+ "value": {
37
+ "min": "number|null",
38
+ "min_year": "integer|null",
39
+ "max": "number|null",
40
+ "max_year": "integer|null",
41
+ "mean": "number|null",
42
+ "median": "number|null",
43
+ "sample_std": "number|null"
44
+ },
45
+ "threshold": "number",
46
+ "years_at_or_above_threshold": "integer",
47
+ "first_threshold_year": "integer|null",
48
+ "last_threshold_year": "integer|null",
49
+ "year_aggregation": "string annual aggregation applied to raw rows",
50
+ "source_row_count": "integer raw rows before annual aggregation"
51
+ },
52
+ "decadal_statistics.csv": [
53
+ "decade_start",
54
+ "start_year",
55
+ "end_year",
56
+ "count",
57
+ "mean_departure",
58
+ "median_departure",
59
+ "min_departure",
60
+ "max_departure",
61
+ "sample_std_departure"
62
+ ],
63
+ "threshold_years.csv": [
64
+ "rank",
65
+ "year",
66
+ "departure",
67
+ "threshold"
68
+ ],
69
+ "clean_series.csv": [
70
+ "Year",
71
+ "Departure from Average"
72
+ ]
73
+ },
74
+ "notes": "First group raw CSV rows by year and aggregate the value column with mean; then compute reproducible annual-series audit outputs. Do not fetch new data.",
75
+ "year_aggregation": "mean"
76
+ }
20260906-225059-science-environment-679c04/environment/public_data/input/source_context_windows.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
20260906-225059-science-environment-679c04/environment/public_data/input/usgs_fdsn_andes_1988_1989_m4p5.csv ADDED
@@ -0,0 +1,574 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ time,latitude,longitude,depth,mag,magType,nst,gap,dmin,rms,net,id,updated,place,type,horizontalError,depthError,magError,magNst,status,locationSource,magSource
2
+ 1988-01-03T10:28:34.740Z,-24.794,-70.087,54.9,4.9,mb,,,,1.1,us,usp0003bs4,2014-11-07T00:41:28.603Z,"78 km NNE of Taltal, Chile",earthquake,,,,13,reviewed,us,us
3
+ 1988-01-05T08:54:10.220Z,-16.05,-73.541,91.8,5,mb,,,,0.7,us,usp0003bu4,2014-11-07T00:41:29.129Z,"19 km NNE of Atico, Peru",earthquake,,9.4,,3,reviewed,us,us
4
+ 1988-01-15T09:17:27.750Z,-23.162,-68.973,129.9,4.9,mb,,,,1.2,us,usp0003c30,2014-11-07T00:41:31.087Z,"78 km S of Calama, Chile",earthquake,,,,6,reviewed,us,us
5
+ 1988-01-16T05:16:12.050Z,-25.088,-68.616,91.8,4.7,mb,,,,1.2,us,usp0003c3j,2014-11-07T00:41:31.154Z,"Chile-Argentina border region",earthquake,,11.2,,4,reviewed,us,us
6
+ 1988-01-17T15:11:49.000Z,-27.1,-71.271,33,4.7,mb,,,,0.7,us,usp0003c4n,2014-11-07T00:41:31.289Z,"97 km WNW of Copiapó, Chile",earthquake,,,,2,reviewed,us,us
7
+ 1988-01-17T16:48:05.620Z,-27.043,-71.047,33,4.9,mb,,,,1,us,usp0003c4u,2014-11-07T00:41:31.307Z,"79 km WNW of Copiapó, Chile",earthquake,,,,5,reviewed,us,us
8
+ 1988-01-18T07:35:17.080Z,6.86,-73.014,156.6,4.8,mb,,,,1.1,us,usp0003c5b,2014-11-07T00:41:31.364Z,"12 km NNW of Cepitá, Colombia",earthquake,,7.3,,10,reviewed,us,us
9
+ 1988-01-18T13:48:12.540Z,-2.446,-76.641,148.7,4.9,mb,,,,1.1,us,usp0003c5j,2014-11-07T00:41:31.410Z,"116 km NNW of Alianza Cristiana, Peru",earthquake,,6.9,,37,reviewed,us,us
10
+ 1988-01-19T07:30:31.860Z,-24.71,-70.568,33,7,mw,,,,1.3,us,usp0003c61,2022-04-28T20:56:23.832Z,"77 km N of Taltal, Chile",earthquake,,,,,reviewed,us,nc
11
+ 1988-01-19T13:17:43.260Z,-24.918,-70.566,33,5.1,mb,,,,1.2,us,usp0003c6b,2014-11-07T00:41:31.599Z,"54 km N of Taltal, Chile",earthquake,,,,2,reviewed,us,us
12
+ 1988-01-19T18:26:25.500Z,-27.59,-71.046,33,4.8,mb,,,,1.3,us,usp0003c6h,2014-11-07T00:41:31.624Z,"74 km WSW of Copiapó, Chile",earthquake,,,,3,reviewed,us,us
13
+ 1988-01-19T19:46:06.050Z,-24.641,-70.532,33,4.9,mb,,,,1.3,us,usp0003c6k,2014-11-07T00:41:31.630Z,"84 km N of Taltal, Chile",earthquake,,,,4,reviewed,us,us
14
+ 1988-01-20T02:54:26.000Z,-21.182,-70.364,33,4.8,mb,,,,1.2,us,usp0003c7a,2014-11-07T00:41:31.693Z,"102 km N of Tocopilla, Chile",earthquake,,,,10,reviewed,us,us
15
+ 1988-01-20T10:52:04.720Z,-27.94,-70.856,33,5,mb,,,,1.2,us,usp0003c7m,2014-11-07T00:41:31.717Z,"71 km N of Vallenar, Chile",earthquake,,,,6,reviewed,us,us
16
+ 1988-01-20T15:01:29.660Z,-24.69,-70.521,32.9,5.9,mw,,,,1.2,us,usp0003c7t,2022-04-28T20:56:27.217Z,"79 km N of Taltal, Chile",earthquake,,13.5,,,reviewed,us,hrv
17
+ 1988-01-21T03:57:18.610Z,-15.049,-73.417,102.6,4.9,mb,,,,1.2,us,usp0003c83,2014-11-07T00:41:31.759Z,"12 km SSW of Pacapausa, Peru",earthquake,,9.3,,4,reviewed,us,us
18
+ 1988-01-22T05:28:01.920Z,-15.241,-70.457,202,5.1,mb,,,,1.2,us,usp0003c9f,2014-11-07T00:41:31.957Z,"15 km E of Palca, Peru",earthquake,,6.3,,17,reviewed,us,us
19
+ 1988-01-24T04:26:58.610Z,7.368,-81.745,33,4.8,mb,,,,1.4,us,usp0003cbm,2014-11-07T00:41:32.264Z,"59 km SW of Río Grande, Panama",earthquake,,,,11,reviewed,us,us
20
+ 1988-01-25T07:15:53.470Z,-10.584,-78.083,52.6,5.5,mw,,,,1,us,usp0003ccg,2022-04-28T20:57:02.877Z,"28 km WNW of Paramonga, Peru",earthquake,,,,,reviewed,us,hrv
21
+ 1988-01-26T09:20:59.330Z,7.285,-81.597,32.6,4.5,mb,,,,1,us,usp0003cdy,2014-11-07T00:41:32.580Z,"56 km SSW of Río Grande, Panama",earthquake,,5.6,,2,reviewed,us,us
22
+ 1988-01-28T20:44:34.620Z,-22.661,-68.952,88.3,4.7,mb,,,,1.1,us,usp0003chb,2014-11-07T00:41:33.324Z,"22 km S of Calama, Chile",earthquake,,,,2,reviewed,us,us
23
+ 1988-01-30T10:27:58.120Z,-17.983,-69.717,150,4.8,mb,,,,1.6,us,usp0003cjn,2014-11-07T00:41:33.591Z,"34 km SE of Palca, Peru",earthquake,,18,,1,reviewed,us,us
24
+ 1988-02-01T13:32:51.940Z,-24.675,-70.405,30.3,5.3,mw,,,,1.1,us,usp0003cms,2022-04-28T20:53:15.749Z,"81 km N of Taltal, Chile",earthquake,,,,,reviewed,us,hrv
25
+ 1988-02-02T23:46:16.770Z,6.857,-73.016,152.9,5.2,mb,,,,1,us,usp0003cp3,2014-11-07T00:41:36.298Z,"12 km NNW of Cepitá, Colombia",earthquake,,5.1,,17,reviewed,us,us
26
+ 1988-02-05T14:01:02.750Z,-24.753,-70.433,36.9,7.2,mw,,,,1.1,us,usp0003crv,2022-04-28T20:53:20.470Z,"72 km N of Taltal, Chile",earthquake,,,,,reviewed,us,hrv
27
+ 1988-02-05T18:49:31.850Z,-24.893,-70.554,30.7,6.5,mw,,,,1,us,usp0003cs5,2022-04-28T20:53:21.904Z,"57 km N of Taltal, Chile",earthquake,,,,,reviewed,us,nc
28
+ 1988-02-06T07:09:39.990Z,-25.027,-70.776,33,4.7,mb,,,,1.1,us,usp0003csn,2014-11-07T00:41:37.932Z,"51 km NW of Taltal, Chile",earthquake,,,,7,reviewed,us,us
29
+ 1988-02-06T07:42:34.720Z,-20.094,-68.543,132.1,5.4,mw,,,,1.2,us,usp0003csr,2025-12-19T21:12:06.355Z,"168 km E of Iquique, Chile",earthquake,,6.1,,,reviewed,us,hrv
30
+ 1988-02-06T18:03:54.780Z,-17.756,-66.958,285.2,6.5,mw,,,,1.1,us,usp0003cte,2022-04-28T20:53:33.351Z,"32 km NE of Oruro, Bolivia",earthquake,,,,,reviewed,us,hrv
31
+ 1988-02-06T21:40:41.420Z,-24.573,-70.934,33,4.8,mb,,,,1.1,us,usp0003ctm,2014-11-07T00:41:38.442Z,"102 km NNW of Taltal, Chile",earthquake,,,,1,reviewed,us,us
32
+ 1988-02-06T23:03:51.410Z,-25.017,-71.127,10,4.8,mb,,,,1.4,us,usp0003ctr,2014-11-07T00:41:38.464Z,"77 km NW of Taltal, Chile",earthquake,,,,4,reviewed,us,us
33
+ 1988-02-07T05:35:00.450Z,-10.102,-75.172,174.1,4.7,mb,,,,1,us,usp0003cu0,2014-11-07T00:41:38.520Z,"56 km SSW of Yuyapichis, Peru",earthquake,,30.2,,3,reviewed,us,us
34
+ 1988-02-08T15:57:00.230Z,-24.801,-70.393,32,5.8,mw,,,,1.1,us,usp0003cvg,2022-04-28T20:53:45.115Z,"67 km N of Taltal, Chile",earthquake,,6.3,,,reviewed,us,hrv
35
+ 1988-02-09T03:15:34.830Z,-25.022,-70.832,33,5,mb,,,,1.1,us,usp0003cvy,2014-11-07T00:41:38.965Z,"55 km NW of Taltal, Chile",earthquake,,,,6,reviewed,us,us
36
+ 1988-02-09T04:32:30.640Z,-24.916,-70.783,33.1,5.1,mb,,,,0.9,us,usp0003cw1,2014-11-07T00:41:38.977Z,"62 km NNW of Taltal, Chile",earthquake,,,,16,reviewed,us,us
37
+ 1988-02-10T15:14:20.040Z,-17.779,-69.802,161.7,4.7,mb,,,,0.7,us,usp0003cxg,2014-11-07T00:41:39.128Z,"16 km E of Palca, Peru",earthquake,,6.3,,2,reviewed,us,us
38
+ 1988-02-10T22:19:00.160Z,-24.996,-71.361,32.9,5.1,mb,,,,1.4,us,usp0003cxr,2014-11-07T00:41:39.144Z,"99 km WNW of Taltal, Chile",earthquake,,10.1,,4,reviewed,us,us
39
+ 1988-02-10T23:05:58.570Z,6.875,-73.035,147.8,4.9,mb,,,,1,us,usp0003cxu,2014-11-07T00:41:39.155Z,"12 km S of Piedecuesta, Colombia",earthquake,,16.5,,8,reviewed,us,us
40
+ 1988-02-11T21:31:00.990Z,-39.957,-71.198,149.7,4.8,mb,,,,1.2,us,usp0003cym,2014-11-07T00:41:39.263Z,"11 km W of Junín de los Andes, Argentina",earthquake,,16.7,,4,reviewed,us,us
41
+ 1988-02-12T01:19:17.730Z,-24.942,-71.054,29.1,4.5,mb,,,,1.3,us,usp0003cyq,2014-11-07T00:41:39.277Z,"77 km NW of Taltal, Chile",earthquake,,11,,1,reviewed,us,us
42
+ 1988-02-12T03:35:39.060Z,-24.949,-70.962,41,4.8,mb,,,,1.6,us,usp0003cyt,2014-11-07T00:41:39.285Z,"69 km NW of Taltal, Chile",earthquake,,11.3,,6,reviewed,us,us
43
+ 1988-02-13T03:15:35.560Z,-22.326,-68.333,127,5.1,mb,,,,1.1,us,usp0003czq,2014-11-07T00:41:39.453Z,"62 km ENE of Calama, Chile",earthquake,,6.7,,11,reviewed,us,us
44
+ 1988-02-15T18:44:21.030Z,-13.148,-76.12,71.6,5.1,mb,,,,0.7,us,usp0003d1r,2014-11-07T00:41:39.769Z,"22 km ESE of Nuevo Imperial, Peru",earthquake,,6.1,,13,reviewed,us,us
45
+ 1988-02-15T18:49:18.200Z,-25.216,-70.932,9.5,5.6,mw,,,,1.4,us,usp0003d1s,2022-04-28T20:53:54.545Z,"49 km WNW of Taltal, Chile",earthquake,,7.3,,,reviewed,us,hrv
46
+ 1988-02-17T23:30:58.960Z,-23.862,-66.506,234.1,4.7,mb,,,,0.8,us,usp0003d41,2014-11-07T00:41:40.131Z,"43 km NNW of San Antonio de los Cobres, Argentina",earthquake,,5.8,,2,reviewed,us,us
47
+ 1988-02-18T13:52:36.090Z,-23.513,-67.706,142.3,5.9,mw,,,,1,us,usp0003d4q,2022-04-28T20:54:04.106Z,"83 km SE of San Pedro de Atacama, Chile",earthquake,,3.9,,,reviewed,us,hrv
48
+ 1988-02-18T14:37:09.630Z,-21.343,-66.544,234.7,4.8,mb,,,,1.2,us,usp0003d4t,2014-11-07T00:41:40.250Z,"56 km SW of Atocha, Bolivia",earthquake,,5,,10,reviewed,us,us
49
+ 1988-02-20T04:45:23.400Z,-24.051,-66.975,199.4,4.7,mb,,,,1.1,us,usp0003d6a,2014-11-07T00:41:40.513Z,"69 km WNW of San Antonio de los Cobres, Argentina",earthquake,,6.7,,4,reviewed,us,us
50
+ 1988-02-20T22:51:12.670Z,4.387,-73.708,26,5,mb,,,,1.4,us,usp0003d70,2014-11-07T00:41:40.602Z,"3 km N of El Calvario, Colombia",earthquake,,5.8,,15,reviewed,us,us
51
+ 1988-02-20T23:08:39.740Z,-17.076,-70.122,169.3,5.4,mb,,,,0.7,us,usp0003d71,2014-11-07T00:41:40.606Z,"24 km NNW of Chuquitira, Peru",earthquake,,5.4,,1,reviewed,us,us
52
+ 1988-02-21T21:26:06.090Z,7.977,-71.811,33,4.6,mb,,,,0.6,us,usp0003d81,2014-11-07T00:41:40.726Z,"48 km ENE of Táriba, Venezuela",earthquake,,,,4,reviewed,us,us
53
+ 1988-02-22T18:43:02.930Z,-17.524,-69.541,177.3,4.6,mb,,,,0.4,us,usp0003d8w,2014-11-07T00:41:40.809Z,"Peru-Bolivia border region",earthquake,,7.2,,1,reviewed,us,us
54
+ 1988-02-22T19:13:17.740Z,-20.833,-69.785,70.3,6.7,mw,,,,1.1,us,usp0003d8y,2022-04-28T20:54:42.957Z,"78 km SSE of Iquique, Chile",earthquake,,,,,reviewed,us,nc
55
+ 1988-02-23T08:01:54.070Z,-17.872,-69.358,162.4,4.6,mb,,,,1,us,usp0003d9d,2014-11-07T00:41:40.905Z,"Peru-Bolivia border region",earthquake,,11.1,,1,reviewed,us,us
56
+ 1988-02-25T02:55:33.620Z,-31.381,-69.678,130.2,4.6,mb,,,,0.3,us,usp0003db8,2014-11-07T00:41:41.156Z,"25 km WSW of Calingasta, Argentina",earthquake,,22,,1,reviewed,us,us
57
+ 1988-02-25T10:47:48.660Z,8.084,-71.89,30.3,4.6,mb,,,,0.8,us,usp0003dbf,2014-11-07T00:41:41.174Z,"41 km E of Colón, Venezuela",earthquake,,8.9,,7,reviewed,us,us
58
+ 1988-02-25T18:39:26.710Z,-27.725,-71.728,33,5.1,mb,,,,1.2,us,usp0003dbr,2014-11-07T00:41:41.195Z,"133 km NW of Vallenar, Chile",earthquake,,,,2,reviewed,us,us
59
+ 1988-02-26T02:31:20.140Z,-18.011,-69.605,124.4,5.5,mw,,,,1,us,usp0003dc0,2022-04-28T20:55:09.280Z,"45 km SE of Palca, Peru",earthquake,,,,,reviewed,us,hrv
60
+ 1988-02-26T09:36:23.470Z,-18.24,-69.062,150.5,4.5,mb,,,,1.3,us,usp0003dc8,2014-11-07T00:41:41.317Z,"78 km WSW of Curahuara de Carangas, Bolivia",earthquake,,,,10,reviewed,us,us
61
+ 1988-02-27T04:50:27.110Z,6.822,-73.019,157.6,4.9,mb,,,,0.8,us,usp0003dd5,2014-11-07T00:41:41.408Z,"8 km NNW of Cepitá, Colombia",earthquake,,,,24,reviewed,us,us
62
+ 1988-02-27T07:11:39.450Z,-41.467,-73.274,33,4.8,mb,,,,0.9,us,usp0003dd7,2014-11-07T00:41:41.420Z,"27 km W of Puerto Montt, Chile",earthquake,,,,1,reviewed,us,us
63
+ 1988-02-28T10:24:10.830Z,-17.051,-70.906,33,4.9,mb,,,,0.8,us,usp0003dek,2014-11-07T00:41:41.923Z,"7 km WNW of Torata, Peru",earthquake,,,,1,reviewed,us,us
64
+ 1988-02-29T10:56:21.350Z,-29.252,-68.899,104.1,5,mb,,,,1.4,us,usp0003dfn,2014-11-07T00:41:42.192Z,"86 km SW of Vinchina, Argentina",earthquake,,8,,1,reviewed,us,us
65
+ 1988-03-02T22:44:53.200Z,-32.952,-71.99,33,4.9,mb,,,,1.2,us,usp0003dhw,2014-11-07T00:41:44.718Z,"34 km WNW of Valparaíso, Chile",earthquake,,,,3,reviewed,us,us
66
+ 1988-03-04T00:31:08.180Z,-22.111,-68.795,109.4,4.5,mb,,,,1.2,us,usp0003djz,2014-11-07T00:41:45.052Z,"40 km NNE of Calama, Chile",earthquake,,9.5,,2,reviewed,us,us
67
+ 1988-03-04T05:11:05.250Z,-22.769,-70.293,62.7,4.8,mb,,,,1.4,us,usp0003dk8,2014-11-07T00:41:45.190Z,"75 km S of Tocopilla, Chile",earthquake,,10,,8,reviewed,us,us
68
+ 1988-03-05T00:04:25.110Z,-27.67,-69.477,34.1,4.8,mb,,,,1.2,us,usp0003dkn,2014-11-07T00:41:45.309Z,"90 km ESE of Copiapó, Chile",earthquake,,7.8,,10,reviewed,us,us
69
+ 1988-03-06T15:00:58.550Z,-23.678,-68.017,143.9,4.8,mb,,,,1.2,us,usp0003dn5,2014-11-07T00:41:45.689Z,"86 km SSE of San Pedro de Atacama, Chile",earthquake,,7.8,,6,reviewed,us,us
70
+ 1988-03-07T11:20:04.030Z,-11.678,-74.071,43.2,5.1,mb,,,,1.2,us,usp0003dpf,2022-04-28T20:51:25.082Z,"63 km SE of Mazamari, Peru",earthquake,,11.4,,18,reviewed,us,us
71
+ 1988-03-09T05:00:34.910Z,-31.232,-68.642,111.2,5.4,mb,,,,0.9,us,usp0003drd,2014-11-07T00:41:46.801Z,"25 km NNW of Albardón, Argentina",earthquake,,,,20,reviewed,us,us
72
+ 1988-03-09T17:29:49.940Z,6.835,-73.037,157.6,4.7,mb,,,,1,us,usp0003ds1,2014-11-07T00:41:46.861Z,"11 km NW of Cepitá, Colombia",earthquake,,6.5,,11,reviewed,us,us
73
+ 1988-03-09T20:56:10.770Z,-24.737,-70.138,51.6,5,mb,,,,1.4,us,usp0003ds6,2014-11-07T00:41:46.874Z,"82 km NNE of Taltal, Chile",earthquake,,,,5,reviewed,us,us
74
+ 1988-03-09T21:33:53.790Z,-17.327,-74.154,32.3,6,mw,,,,1,us,usp0003ds8,2022-04-28T20:51:45.375Z,"136 km SSW of Atico, Peru",earthquake,,,,,reviewed,us,nc
75
+ 1988-03-09T21:41:10.810Z,-18.313,-69.543,118.6,5.4,mb,,,,1.1,us,usp0003ds9,2022-04-28T20:51:46.578Z,"74 km SE of Palca, Peru",earthquake,,5.4,,48,reviewed,us,us
76
+ 1988-03-09T23:19:44.050Z,-20.319,-68.714,126.7,4.7,mb,,,,1.4,us,usp0003dsc,2014-11-07T00:41:47.006Z,"150 km E of Iquique, Chile",earthquake,,8.5,,6,reviewed,us,us
77
+ 1988-03-12T17:22:56.250Z,-32.229,-71.53,50.8,5.3,mb,,,,1.1,us,usp0003dwk,2014-11-07T00:41:47.946Z,"37 km NW of La Ligua, Chile",earthquake,,7.1,,9,reviewed,us,us
78
+ 1988-03-13T11:31:32.860Z,-33.673,-72.216,41.2,5.9,mw,,,,1.4,us,usp0003dx7,2022-04-28T20:52:02.121Z,"57 km W of San Antonio, Chile",earthquake,,10.6,,,reviewed,us,hrv
79
+ 1988-03-14T09:34:14.360Z,-23.639,-68.322,142,4.8,mb,,,,1.5,us,usp0003dyb,2014-11-07T00:41:48.201Z,"81 km S of San Pedro de Atacama, Chile",earthquake,,8.6,,2,reviewed,us,us
80
+ 1988-03-14T10:32:45.520Z,-14.538,-73.603,87,5.2,mw,,,,1,us,usp0003dye,2025-12-19T21:11:51.587Z,"39 km S of Pampachiri, Peru",earthquake,,8.9,,,reviewed,us,hrv
81
+ 1988-03-14T12:29:49.450Z,-7.38,-74.783,141,5.4,mb,,,,0.8,us,usp0003dyk,2022-04-28T20:52:06.709Z,"26 km ESE of Contamana, Peru",earthquake,,,,64,reviewed,us,us
82
+ 1988-03-16T06:08:38.090Z,-21.117,-70.214,64,5,mb,,,,1.3,us,usp0003e0h,2014-11-07T00:41:48.481Z,"100 km S of Iquique, Chile",earthquake,,,,8,reviewed,us,us
83
+ 1988-03-16T22:55:24.210Z,-21.183,-68.535,116.3,5.1,mb,,,,0.9,us,usp0003e10,2014-11-07T00:41:48.546Z,"146 km NNE of Calama, Chile",earthquake,,,,10,reviewed,us,us
84
+ 1988-03-17T12:02:42.430Z,-5.853,-76.414,33,4.9,mb,,,,1,us,usp0003e1k,2014-11-07T00:41:48.599Z,"32 km W of Yurimaguas, Peru",earthquake,,,,11,reviewed,us,us
85
+ 1988-03-18T05:57:08.330Z,-19.222,-69.722,114.9,5,mb,,,,1.1,us,usp0003e2h,2014-11-07T00:41:48.724Z,"102 km SE of Arica, Chile",earthquake,,7.7,,15,reviewed,us,us
86
+ 1988-03-18T07:54:12.980Z,-23.495,-68.945,93.6,4.9,mb,,,,1.3,us,usp0003e2m,2014-11-07T00:41:48.736Z,"99 km SW of San Pedro de Atacama, Chile",earthquake,,,,5,reviewed,us,us
87
+ 1988-03-18T22:17:55.810Z,-19.311,-70.127,77.6,4.9,mb,,,,1.1,us,usp0003e35,2014-11-07T00:41:48.781Z,"94 km S of Arica, Chile",earthquake,,9.2,,2,reviewed,us,us
88
+ 1988-03-19T01:19:01.140Z,-23.741,-66.357,220.6,4.9,mb,,,,1,us,usp0003e3b,2014-11-07T00:41:48.819Z,"52 km N of San Antonio de los Cobres, Argentina",earthquake,,4.5,,11,reviewed,us,us
89
+ 1988-03-20T03:34:13.390Z,-19.454,-69.333,127.4,5.2,mb,,,,1.5,us,usp0003e4c,2014-11-07T00:41:48.930Z,"119 km NE of Iquique, Chile",earthquake,,8.5,,2,reviewed,us,us
90
+ 1988-03-20T04:08:25.830Z,4.412,-73.673,10,5,ms,,,,1,us,usp0003e4g,2014-11-07T00:41:48.948Z,"7 km NNE of El Calvario, Colombia",earthquake,,,,2,reviewed,us,us
91
+ 1988-03-20T04:08:48.760Z,4.135,-73.533,10,4.7,ms,,,,1,us,usp0003e4h,2014-11-07T00:41:48.950Z,"10 km E of Villavicencio, Colombia",earthquake,,,,1,reviewed,us,us
92
+ 1988-03-21T02:55:07.620Z,-34.441,-70.408,33,4.5,mb,,,,1.3,us,usp0003e5e,2014-11-07T00:41:49.040Z,"36 km SE of Machalí, Chile",earthquake,,11.5,,4,reviewed,us,us
93
+ 1988-03-21T20:44:37.210Z,-22.648,-68.647,152.9,4.6,mb,,,,1.4,us,usp0003e68,2014-11-07T00:41:49.115Z,"35 km SE of Calama, Chile",earthquake,,11,,2,reviewed,us,us
94
+ 1988-03-24T15:30:09.390Z,-21.905,-68.357,124.7,5.1,mb,,,,1.2,us,usp0003e90,2014-11-07T00:41:49.460Z,"84 km NE of Calama, Chile",earthquake,,6.4,,13,reviewed,us,us
95
+ 1988-03-25T03:25:44.380Z,-12.276,-74.165,272.7,4.5,mb,,,,0.8,us,usp0003e9q,2014-11-07T00:41:49.524Z,"49 km NNW of Ayna, Peru",earthquake,,36.6,,1,reviewed,us,us
96
+ 1988-03-25T17:20:53.100Z,-31.336,-67.822,26.4,5.3,mb,,,,1.1,us,usp0003eag,2022-04-28T20:52:31.764Z,"55 km NE of Caucete, Argentina",earthquake,,4.3,,7,reviewed,us,us
97
+ 1988-03-26T04:03:32.600Z,-33.541,-71.718,70.5,4.7,mb,,,,0.8,us,usp0003eb5,2014-11-07T00:41:49.815Z,"10 km W of Cartagena, Chile",earthquake,,8,,6,reviewed,us,us
98
+ 1988-03-26T21:01:44.350Z,-25.753,-70.773,43.6,5,mb,,,,1.1,us,usp0003ebz,2014-11-07T00:41:49.928Z,"Near the coast of Antofagasta, Chile",earthquake,,8.9,,4,reviewed,us,us
99
+ 1988-03-27T09:09:34.690Z,3.868,-77.145,71.7,4.8,mb,,,,1.1,us,usp0003ecg,2014-11-07T00:41:50.012Z,"12 km W of Buenaventura, Colombia",earthquake,,11.3,,30,reviewed,us,us
100
+ 1988-03-27T18:57:30.750Z,6.886,-72.945,157.5,4.6,mb,,,,1.1,us,usp0003ecu,2014-11-07T00:41:50.040Z,"9 km W of Guaca, Colombia",earthquake,,9.1,,2,reviewed,us,us
101
+ 1988-03-30T15:28:25.920Z,-16.837,-69.588,202.1,4.5,mb,,,,1.4,us,usp0003eft,2014-11-07T00:41:50.520Z,"17 km SE of Mazo Cruz, Peru",earthquake,,6.7,,2,reviewed,us,us
102
+ 1988-03-30T23:50:56.940Z,-24.926,-70.461,40.9,6.2,mw,,,,1.1,us,usp0003ega,2022-04-28T20:52:50.487Z,"Near the coast of Antofagasta, Chile",earthquake,,,,,reviewed,us,hrv
103
+ 1988-03-31T21:26:12.110Z,-9.094,-78.872,59,5,mb,,,,0.6,us,usp0003eh8,2014-11-07T00:41:51.504Z,"27 km WSW of Puerto Santa, Peru",earthquake,,,,10,reviewed,us,us
104
+ 1988-04-01T23:37:38.390Z,-30.428,-72.105,53.3,4.6,mb,,,,1,us,usp0003ejf,2014-11-07T00:41:53.672Z,"89 km WNW of Ovalle, Chile",earthquake,,10.6,,3,reviewed,us,us
105
+ 1988-04-01T23:52:00.320Z,-25.46,-69.681,314.4,4.5,mb,,,,1.4,us,usp0003ejh,2014-11-07T00:41:53.707Z,"81 km E of Taltal, Chile",earthquake,,15.7,,1,reviewed,us,us
106
+ 1988-04-02T19:45:03.840Z,-5.777,-80.927,33,5.4,mw,,,,1.1,us,usp0003ekj,2022-04-28T20:48:31.155Z,"26 km SSW of Sechura, Peru",earthquake,,,,,reviewed,us,hrv
107
+ 1988-04-07T14:26:30.660Z,-11.045,-74.724,10,5.1,mb,,,,1,us,usp0003esm,2014-11-07T00:41:56.313Z,"22 km SE of Santa Rosa, Peru",earthquake,,,,23,reviewed,us,us
108
+ 1988-04-09T01:16:53.540Z,-20.03,-69.334,157.8,4.9,mb,,,,1.4,us,usp0003eup,2014-11-07T00:41:56.657Z,"87 km ENE of Iquique, Chile",earthquake,,13.9,,1,reviewed,us,us
109
+ 1988-04-09T23:55:15.710Z,-33.695,-72.222,50.2,4.5,mb,,,,1.2,us,usp0003evp,2014-11-07T00:41:56.757Z,"58 km W of San Antonio, Chile",earthquake,,11.2,,2,reviewed,us,us
110
+ 1988-04-11T00:52:12.950Z,-33.051,-68.49,150.4,4.5,mb,,,,1,us,usp0003ex9,2014-11-07T00:41:56.866Z,"3 km NNW of San Martín, Argentina",earthquake,,11.1,,1,reviewed,us,us
111
+ 1988-04-11T20:53:13.890Z,-27.539,-67.354,136,5,mb,,,,1.3,us,usp0003ey2,2014-11-07T00:41:56.939Z,"29 km NW of Londres, Argentina",earthquake,,9,,4,reviewed,us,us
112
+ 1988-04-12T15:26:19.770Z,-2.787,-77.649,27.2,5.2,mw,,,,1,us,usp0003ez2,2022-04-28T20:48:55.564Z,"68 km ESE of Sucúa, Ecuador",earthquake,,5.9,,,reviewed,us,hrv
113
+ 1988-04-12T23:19:55.570Z,-17.192,-72.305,33.1,7.1,mw,,,,1.2,us,usp0003ezg,2022-04-28T20:48:57.908Z,"30 km SW of Islay (Matarani), Peru",earthquake,,,,,reviewed,us,hrv
114
+ 1988-04-12T23:36:30.790Z,-17.191,-72.186,33,5.2,mb,,,,1.3,us,usp0003ezh,2014-11-07T00:41:57.256Z,"23 km SSW of Islay (Matarani), Peru",earthquake,,,,7,reviewed,us,us
115
+ 1988-04-12T23:55:23.430Z,-17.478,-72.503,33,5.4,mb,,,,1.1,us,usp0003ezj,2022-04-28T20:48:59.088Z,"68 km SW of Islay (Matarani), Peru",earthquake,,,,27,reviewed,us,us
116
+ 1988-04-13T00:37:21.950Z,-17.318,-72.371,33,5.3,mb,,,,1.1,us,usp0003ezm,2014-11-07T00:41:57.283Z,"45 km SW of Islay (Matarani), Peru",earthquake,,,,14,reviewed,us,us
117
+ 1988-04-13T00:39:31.170Z,-17.256,-72.518,16.1,6.2,mw,,,,1.2,us,usp0003ezn,2022-04-28T20:49:00.218Z,"52 km WSW of Islay (Matarani), Peru",earthquake,,6.5,,,reviewed,us,hrv
118
+ 1988-04-13T01:59:48.570Z,-17.67,-72.655,33,4.8,mb,,,,1.5,us,usp0003ezp,2014-11-07T00:41:57.314Z,"95 km SW of Islay (Matarani), Peru",earthquake,,,,3,reviewed,us,us
119
+ 1988-04-13T02:16:01.820Z,-17.222,-72.277,33,4.9,mb,,,,1,us,usp0003ezq,2014-11-07T00:41:57.316Z,"31 km SW of Islay (Matarani), Peru",earthquake,,,,7,reviewed,us,us
120
+ 1988-04-13T06:22:31.530Z,-17.489,-72.505,36.7,5.5,mw,,,,1.4,us,usp0003ezu,2025-12-19T21:11:40.076Z,"69 km SW of Islay (Matarani), Peru",earthquake,,12.4,,,reviewed,us,hrv
121
+ 1988-04-13T10:43:40.510Z,-17.393,-72.742,45.2,4.9,mb,,,,1.3,us,usp0003f00,2014-11-07T00:41:57.357Z,"81 km WSW of Islay (Matarani), Peru",earthquake,,13.7,,11,reviewed,us,us
122
+ 1988-04-13T12:07:32.770Z,-17.485,-72.446,67.1,4.9,mb,,,,1.2,us,usp0003f04,2014-11-07T00:41:57.379Z,"65 km SW of Islay (Matarani), Peru",earthquake,,12.4,,10,reviewed,us,us
123
+ 1988-04-13T22:06:22.470Z,-3.347,-75.861,138.4,4.9,mb,,,,1.2,us,usp0003f0g,2014-11-07T00:41:57.443Z,"65 km ENE of Alianza Cristiana, Peru",earthquake,,10.2,,4,reviewed,us,us
124
+ 1988-04-14T08:09:49.670Z,-17.547,-72.83,48.2,4.7,mb,,,,1.3,us,usp0003f0y,2014-11-07T00:41:57.520Z,"98 km SW of Islay (Matarani), Peru",earthquake,,13,,6,reviewed,us,us
125
+ 1988-04-14T09:03:06.260Z,-17.269,-72.46,33,5.1,mb,,,,1.2,us,usp0003f11,2014-11-07T00:41:57.529Z,"48 km SW of Islay (Matarani), Peru",earthquake,,,,18,reviewed,us,us
126
+ 1988-04-14T10:43:41.270Z,-3.856,-77.6,113.6,5,mb,,,,1.1,us,usp0003f16,2014-11-07T00:41:57.544Z,"119 km ESE of Gualaquiza, Ecuador",earthquake,,11.3,,11,reviewed,us,us
127
+ 1988-04-17T02:50:37.740Z,-17.42,-72.387,33,5.6,mw,,,,1.1,us,usp0003f3f,2022-04-28T20:49:16.907Z,"55 km SSW of Islay (Matarani), Peru",earthquake,,,,,reviewed,us,hrv
128
+ 1988-04-19T01:36:24.790Z,-17.899,-69.328,164,4.9,mb,,,,0.4,us,usp0003f59,2014-11-07T00:41:57.962Z,"68 km ESE of Palca, Peru",earthquake,,5.8,,1,reviewed,us,us
129
+ 1988-04-21T08:48:15.730Z,-17.575,-72.324,52.3,5,mb,,,,1.4,us,usp0003f7f,2014-11-07T00:41:58.331Z,"68 km SSW of Islay (Matarani), Peru",earthquake,,15.1,,2,reviewed,us,us
130
+ 1988-05-01T18:43:04.960Z,-23.821,-70.942,10,4.9,mb,,,,1,us,usp0003fk2,2014-11-07T00:42:02.394Z,"58 km WSW of Antofagasta, Chile",earthquake,,,,1,reviewed,us,us
131
+ 1988-05-05T17:39:20.220Z,-29.418,-71.656,53.6,5.4,mw,,,,1,us,usp0003fph,2022-04-28T20:46:08.662Z,"66 km NNW of Coquimbo, Chile",earthquake,,3.8,,,reviewed,us,hrv
132
+ 1988-05-06T16:34:05.560Z,-13.39,-76.226,50.5,5.9,mb,,,,0.9,us,usp0003fqa,2022-05-09T22:49:50.295Z,"10 km WNW of Chincha Alta, Peru",earthquake,,,,75,reviewed,us,us
133
+ 1988-05-08T00:33:04.960Z,-21.509,-70.767,33,4.6,mb,,,,0.5,us,usp0003frx,2014-11-07T00:42:06.486Z,"87 km NW of Tocopilla, Chile",earthquake,,,,1,reviewed,us,us
134
+ 1988-05-10T17:59:22.730Z,-24.246,-67.131,180.6,4.7,mb,,,,1.3,us,usp0003fuk,2014-11-07T00:42:07.974Z,"82 km W of San Antonio de los Cobres, Argentina",earthquake,,15,,4,reviewed,us,us
135
+ 1988-05-15T09:08:42.740Z,-31.69,-71.421,109.7,5.3,mb,,,,1.2,us,usp0003fz6,2014-11-07T00:42:09.180Z,"24 km WSW of Illapel, Chile",earthquake,,10.6,,1,reviewed,us,us
136
+ 1988-05-20T03:19:54.190Z,-17.473,-69.47,124.8,5.7,mw,,,,1,us,usp0003g46,2022-04-28T20:47:13.474Z,"58 km E of Estique, Peru",earthquake,,,,,reviewed,us,hrv
137
+ 1988-05-21T05:24:17.500Z,-32.87,-72.181,32.8,4.5,mb,,,,0.8,us,usp0003g5c,2014-11-07T00:42:10.668Z,"54 km WNW of Valparaíso, Chile",earthquake,,8.2,,1,reviewed,us,us
138
+ 1988-05-21T05:32:05.270Z,-28.298,-67.287,138.1,4.7,mb,,,,1,us,usp0003g5d,2014-11-07T00:42:10.670Z,"37 km SE of Tinogasta, Argentina",earthquake,,,,7,reviewed,us,us
139
+ 1988-05-21T14:28:39.790Z,-32.833,-71.704,42.1,6.1,mw,,,,1.2,us,usp0003g5z,2022-04-28T20:47:39.444Z,"23 km NNW of Valparaíso, Chile",earthquake,,7.7,,,reviewed,us,hrv
140
+ 1988-05-21T19:34:28.290Z,-33.071,-71.802,49,4.6,mb,,,,0.9,us,usp0003g6q,2014-11-07T00:42:10.828Z,"16 km WSW of Valparaíso, Chile",earthquake,,8.8,,8,reviewed,us,us
141
+ 1988-05-22T10:35:52.590Z,-31.247,-68.824,116.7,4.7,mb,,,,0.8,us,usp0003g7z,2014-11-07T00:42:11.075Z,"34 km NNW of Villa Basilio Nievas, Argentina",earthquake,,6.5,,9,reviewed,us,us
142
+ 1988-05-22T12:47:25.820Z,-17.376,-69.381,169.9,5.5,mw,,,,1,us,usp0003g85,2025-12-19T21:11:32.182Z,"70 km E of Tarata, Peru",earthquake,,,,,reviewed,us,hrv
143
+ 1988-05-23T00:28:04.810Z,-28.439,-68.634,117.1,5.4,mw,,,,0.9,us,usp0003g90,2025-12-19T21:11:32.984Z,"54 km NW of Vinchina, Argentina",earthquake,,,,,reviewed,us,hrv
144
+ 1988-05-24T14:22:22.230Z,-26.665,-67.448,33,4.6,mb,,,,1.2,us,usp0003gb9,2014-11-07T00:42:11.371Z,"67 km S of Antofagasta de la Sierra, Argentina",earthquake,,,,1,reviewed,us,us
145
+ 1988-05-28T02:21:51.680Z,-20.947,-68.001,88.4,4.7,mb,,,,1.4,us,usp0003gf8,2014-11-07T00:42:11.798Z,"132 km WSW of Colchani, Bolivia",earthquake,,16.8,,1,reviewed,us,us
146
+ 1988-05-28T05:54:13.350Z,-19.87,-69.199,129.6,4.6,mb,,,,1,us,usp0003gfg,2014-11-07T00:42:11.828Z,"106 km ENE of Iquique, Chile",earthquake,,8.1,,2,reviewed,us,us
147
+ 1988-05-28T10:05:45.390Z,-24.264,-67.053,177.2,5.1,mb,,,,1.1,us,usp0003gfq,2014-11-07T00:42:11.850Z,"74 km W of San Antonio de los Cobres, Argentina",earthquake,,6.6,,5,reviewed,us,us
148
+ 1988-05-29T05:35:00.480Z,-19.729,-69.018,128.1,4.8,mb,,,,1.6,us,usp0003gge,2014-11-07T00:42:11.933Z,"130 km ENE of Iquique, Chile",earthquake,,11.9,,1,reviewed,us,us
149
+ 1988-05-29T10:05:35.580Z,-8.302,-79.773,33,4.7,mb,,,,0.7,us,usp0003ggp,2014-11-07T00:42:11.960Z,"70 km WSW of Santiago de Cao, Peru",earthquake,,,,1,reviewed,us,us
150
+ 1988-05-30T21:22:12.520Z,-31.515,-69.061,93.9,5.8,mb,,,,1,us,usp0003gj4,2022-04-28T20:48:27.652Z,"31 km W of Villa Basilio Nievas, Argentina",earthquake,,3.2,,25,reviewed,us,us
151
+ 1988-05-31T06:48:09.630Z,-21.54,-66.563,227.6,4.7,mb,,,,1.5,us,usp0003gje,2014-11-07T00:42:12.331Z,"75 km SSW of Atocha, Bolivia",earthquake,,12.3,,2,reviewed,us,us
152
+ 1988-06-01T07:41:18.430Z,-29.84,-71.657,49.9,4.9,mb,,,,1.1,us,usp0003gkp,2014-11-07T00:42:13.905Z,"33 km WNW of Coquimbo, Chile",earthquake,,9.2,,9,reviewed,us,us
153
+ 1988-06-02T03:03:29.730Z,6.866,-73.031,156,5.1,mb,,,,0.9,us,usp0003gmc,2014-11-07T00:42:14.357Z,"13 km S of Piedecuesta, Colombia",earthquake,,4.4,,22,reviewed,us,us
154
+ 1988-06-03T23:22:13.560Z,2.782,-79.544,33,4.9,mb,,,,0.9,us,usp0003gpd,2014-11-07T00:42:15.594Z,"125 km WNW of Mosquera, Colombia",earthquake,,,,5,reviewed,us,us
155
+ 1988-06-07T05:26:02.130Z,-30.239,-68.804,106.5,4.8,mb,,,,1.1,us,usp0003gt0,2014-11-07T00:42:17.978Z,"5 km W of San José de Jáchal, Argentina",earthquake,,4.9,,11,reviewed,us,us
156
+ 1988-06-14T04:36:45.750Z,-21.366,-67.937,176.2,4.7,mb,,,,1.5,us,usp0003gzb,2014-11-07T00:42:19.494Z,"153 km SW of Uyuni, Bolivia",earthquake,,,,11,reviewed,us,us
157
+ 1988-06-16T15:42:30.980Z,-31.965,-67.181,133.7,4.8,mb,,,,1.1,us,usp0003h16,2014-11-07T00:42:19.684Z,"103 km NW of Villa General Roca, Argentina",earthquake,,,,13,reviewed,us,us
158
+ 1988-06-16T16:33:02.790Z,-0.163,-77.793,26.6,4.8,mb,,,,1,us,usp0003h18,2014-11-07T00:42:19.694Z,"45 km ESE of Cayambe, Ecuador",earthquake,,5.8,,30,reviewed,us,us
159
+ 1988-06-16T23:39:09.580Z,-21.746,-69.875,87.5,5.2,mb,,,,1.1,us,usp0003h1e,2014-11-07T00:42:19.711Z,"50 km NE of Tocopilla, Chile",earthquake,,8.2,,11,reviewed,us,us
160
+ 1988-06-17T08:25:37.030Z,-32.382,-69.71,117,4.5,mb,,,,0.9,us,usp0003h1n,2014-11-07T00:42:19.727Z,"97 km ENE of Los Andes, Chile",earthquake,,4,,6,reviewed,us,us
161
+ 1988-06-20T06:09:30.760Z,-15.408,-75.57,39.7,4.7,mb,,,,1.3,us,usp0003h4g,2014-11-07T00:42:20.318Z,"44 km W of San Juan, Peru",earthquake,,11.8,,7,reviewed,us,us
162
+ 1988-06-20T16:45:28.440Z,10.969,-69.305,27.6,4.6,mb,,,,0.8,us,usp0003h4z,2014-11-07T00:42:20.384Z,"62 km SE of Coro, Venezuela",earthquake,,3.7,,13,reviewed,us,us
163
+ 1988-06-21T10:36:48.280Z,-24.348,-67.026,186.3,4.5,mb,,,,1.3,us,usp0003h5j,2014-11-07T00:42:20.458Z,"73 km W of San Antonio de los Cobres, Argentina",earthquake,,6,,6,reviewed,us,us
164
+ 1988-06-21T19:55:12.270Z,-22.052,-66.042,293.8,4.5,mb,,,,0.8,us,usp0003h5u,2014-11-07T00:42:20.481Z,"46 km W of Villazón, Bolivia",earthquake,,8.3,,2,reviewed,us,us
165
+ 1988-06-25T05:49:12.280Z,-4.106,-80.452,55.3,4.8,mb,,,,0.9,us,usp0003h9e,2014-11-07T00:42:21.545Z,"28 km SE of Cañaveral, Peru",earthquake,,,,8,reviewed,us,us
166
+ 1988-06-26T13:51:16.340Z,-21.845,-67.442,199.5,5,mb,,,,1.5,us,usp0003hb8,2014-11-07T00:42:21.898Z,"141 km NNE of San Pedro de Atacama, Chile",earthquake,,7.9,,2,reviewed,us,us
167
+ 1988-06-30T05:44:37.400Z,7.303,-72.046,33,4.5,mb,,,,1.2,us,usp0003hfc,2014-11-07T00:42:22.876Z,"33 km NNE of Cubará, Colombia",earthquake,,,,4,reviewed,us,us
168
+ 1988-06-30T09:11:41.650Z,6.881,-73.14,155.3,4.5,mb,,,,1.1,us,usp0003hff,2014-11-07T00:42:22.883Z,"15 km SW of Piedecuesta, Colombia",earthquake,,7.8,,3,reviewed,us,us
169
+ 1988-06-30T14:58:57.210Z,-23.766,-67.457,124.8,5.3,mw,,,,1.1,us,usp0003hfs,2025-12-19T21:11:14.407Z,"121 km SE of San Pedro de Atacama, Chile",earthquake,,5.5,,,reviewed,us,hrv
170
+ 1988-06-30T15:21:08.200Z,-23.824,-67.06,143.8,5.4,mw,,,,1.1,us,usp0003hfu,2025-12-19T20:57:12.515Z,"87 km WNW of San Antonio de los Cobres, Argentina",earthquake,,7.9,,,reviewed,us,hrv
171
+ 1988-07-02T05:27:40.840Z,-20.885,-70.827,33,4.7,mb,,,,1.2,us,usp0003hha,2014-11-07T00:42:26.119Z,"102 km SW of Iquique, Chile",earthquake,,,,1,reviewed,us,us
172
+ 1988-07-02T06:30:08.690Z,-12.16,-75.931,73.1,4.9,mb,,,,1,us,usp0003hhc,2014-11-07T00:42:26.290Z,"10 km ESE of Tanta, Peru",earthquake,,22,,1,reviewed,us,us
173
+ 1988-07-04T13:54:14.220Z,-17.636,-71.718,19.8,5.8,mw,,,,0.9,us,usp0003hk4,2022-04-28T20:40:18.431Z,"39 km W of Pacocha, Peru",earthquake,,,,,reviewed,us,hrv
174
+ 1988-07-04T15:12:29.200Z,-9.562,-75.667,33,4.6,mb,,,,1.2,us,usp0003hk8,2014-11-07T00:42:28.495Z,"46 km SE of Tingo María, Peru",earthquake,,,,4,reviewed,us,us
175
+ 1988-07-07T21:45:22.710Z,-16.493,-73.029,66.7,5.1,mb,,,,1,us,usp0003hpg,2014-11-07T00:42:29.780Z,"34 km WNW of El Cardo, Peru",earthquake,,7.6,,29,reviewed,us,us
176
+ 1988-07-08T10:29:40.220Z,-18.82,-69.611,145.8,4.9,mb,,,,1.4,us,usp0003hpu,2014-11-07T00:42:29.854Z,"81 km ESE of Arica, Chile",earthquake,,10,,2,reviewed,us,us
177
+ 1988-07-08T18:44:00.100Z,-16.369,-69.72,217.9,4.9,mb,,,,1.1,us,usp0003hq6,2014-11-07T00:42:29.981Z,"32 km S of Ilave, Peru",earthquake,,6.3,,2,reviewed,us,us
178
+ 1988-07-09T18:25:54.670Z,-32.372,-69.361,121.3,4.9,mb,,,,0.9,us,usp0003hr2,2014-11-07T00:42:30.226Z,"76 km NW of Mendoza, Argentina",earthquake,,3,,15,reviewed,us,us
179
+ 1988-07-11T21:28:59.090Z,-35.528,-71.522,87.3,4.5,mb,,,,0.8,us,usp0003hsu,2014-11-07T00:42:30.408Z,"3 km WNW of San Clemente, Chile",earthquake,,8.3,,3,reviewed,us,us
180
+ 1988-07-12T09:55:54.040Z,9.852,-71.379,29.3,5.2,mw,,,,0.8,us,usp0003ht9,2022-04-28T20:41:06.438Z,"33 km SSW of Lagunillas, Venezuela",earthquake,,5.1,,,reviewed,us,hrv
181
+ 1988-07-12T15:00:24.020Z,-32.162,-70.699,108.4,4.7,mb,,,,1.4,us,usp0003htf,2014-11-07T00:42:30.505Z,"49 km SSE of Salamanca, Chile",earthquake,,11.2,,2,reviewed,us,us
182
+ 1988-07-13T03:12:54.930Z,-12.326,-74.424,33,4.9,mb,,,,1.6,us,usp0003htz,2014-11-07T00:42:30.617Z,"27 km NNE of Paucarbamba, Peru",earthquake,,,,5,reviewed,us,us
183
+ 1988-07-17T21:23:10.130Z,6.807,-73.087,155.3,4.9,mb,,,,1,us,usp0003hy7,2014-11-07T00:42:31.160Z,"8 km N of Jordán, Colombia",earthquake,,5.5,,22,reviewed,us,us
184
+ 1988-07-18T02:30:29.370Z,-22.068,-69.961,18.8,5.3,mb,,,,1,us,usp0003hyf,2022-04-28T20:41:44.599Z,"24 km E of Tocopilla, Chile",earthquake,,7.9,,26,reviewed,us,us
185
+ 1988-07-18T20:00:02.530Z,-21.609,-68.287,124.3,4.8,mb,,,,1.2,us,usp0003hz6,2014-11-07T00:42:31.291Z,"114 km NE of Calama, Chile",earthquake,,,,14,reviewed,us,us
186
+ 1988-07-19T23:43:21.940Z,-31.187,-68.858,109.3,5,mb,,,,1,us,usp0003j0m,2014-11-07T00:42:31.462Z,"41 km NNW of Villa Basilio Nievas, Argentina",earthquake,,,,14,reviewed,us,us
187
+ 1988-07-20T04:14:42.330Z,-22.391,-68.43,124.6,4.8,mb,,,,1,us,usp0003j0t,2014-11-07T00:42:31.482Z,"51 km E of Calama, Chile",earthquake,,,,2,reviewed,us,us
188
+ 1988-07-29T12:07:57.950Z,-22.769,-70.651,10,4.8,mb,,,,1.2,us,usp0003jbw,2014-11-07T00:42:33.473Z,"88 km SSW of Tocopilla, Chile",earthquake,,,,4,reviewed,us,us
189
+ 1988-07-29T14:10:58.700Z,-5.934,-80.875,33,5.4,mb,,,,1,us,usp0003jbz,2022-04-28T20:43:02.550Z,"42 km S of Sechura, Peru",earthquake,,,,13,reviewed,us,us
190
+ 1988-07-30T06:54:40.200Z,-22.542,-70.201,34.7,4.5,mb,,,,1.4,us,usp0003jcq,2014-11-07T00:42:33.547Z,"49 km S of Tocopilla, Chile",earthquake,,,,1,reviewed,us,us
191
+ 1988-08-02T08:54:41.450Z,-5.743,-80.896,33,4.9,mb,,,,0.8,us,usp0003jj9,2014-11-07T00:42:36.856Z,"22 km SSW of Sechura, Peru",earthquake,,,,8,reviewed,us,us
192
+ 1988-08-03T07:52:25.710Z,-16.552,-72.732,10,5.4,mb,,,,0.2,us,usp0003jkb,2014-11-07T00:42:37.295Z,"5 km N of El Cardo, Peru",earthquake,,,,1,reviewed,us,us
193
+ 1988-08-03T14:18:47.030Z,-7.346,-75.823,133.7,4.8,mb,,,,0.9,us,usp0003jks,2014-11-07T00:42:37.394Z,"73 km SE of Picota, Peru",earthquake,,14.6,,6,reviewed,us,us
194
+ 1988-08-04T06:00:50.230Z,-28.822,-67.461,140.2,4.8,mb,,,,1.1,us,usp0003jme,2014-11-07T00:42:37.592Z,"37 km N of Chilecito, Argentina",earthquake,,12.1,,2,reviewed,us,us
195
+ 1988-08-04T08:48:34.380Z,-31.688,-72.278,33,4.9,mb,,,,1.1,us,usp0003jmt,2014-11-07T00:42:37.690Z,"105 km W of Illapel, Chile",earthquake,,,,2,reviewed,us,us
196
+ 1988-08-04T11:38:09.960Z,-2.413,-80.184,33,4.7,mb,,,,1.1,us,usp0003jn2,2014-11-07T00:42:37.746Z,"32 km SW of Santa Lucía, Ecuador",earthquake,,,,8,reviewed,us,us
197
+ 1988-08-05T03:13:33.670Z,-31.667,-69.293,118.9,4.7,mb,,,,0.9,us,usp0003jny,2014-11-07T00:42:37.895Z,"38 km SSE of Calingasta, Argentina",earthquake,,4.2,,8,reviewed,us,us
198
+ 1988-08-05T04:08:31.970Z,-30.014,-72.099,21.8,4.6,mb,,,,1.3,us,usp0003jnz,2014-11-07T00:42:37.907Z,"73 km W of Coquimbo, Chile",earthquake,,7.1,,3,reviewed,us,us
199
+ 1988-08-09T20:05:29.100Z,5.37,-78.2,33,4.7,mb,,,,1,us,usp0003jte,2014-11-07T00:42:39.194Z,"103 km WNW of Pizarro, Colombia",earthquake,,,,8,reviewed,us,us
200
+ 1988-08-12T13:32:10.820Z,-36.467,-72.395,59,5,mb,,,,1,us,usp0003jwy,2014-11-07T00:42:40.009Z,"24 km SSE of Quirihue, Chile",earthquake,,10.6,,7,reviewed,us,us
201
+ 1988-08-14T12:08:56.840Z,6.892,-73.163,161.9,4.6,mb,,,,0.7,us,usp0003jze,2014-11-07T00:42:40.371Z,"13 km E of Betulia, Colombia",earthquake,,16.9,,1,reviewed,us,us
202
+ 1988-08-14T13:11:43.440Z,-21.845,-69.997,71.9,5.1,mw,,,,1.1,us,usp0003jzf,2025-12-19T21:09:56.434Z,"34 km NE of Tocopilla, Chile",earthquake,,,,,reviewed,us,hrv
203
+ 1988-08-14T14:58:24.290Z,7.064,-79.616,33,4.5,mb,,,,1.3,us,usp0003jzh,2014-11-07T00:42:40.393Z,"68 km SE of Pedasí, Panama",earthquake,,,,2,reviewed,us,us
204
+ 1988-08-14T17:48:03.070Z,-33.162,-71.907,49.9,4.9,mb,,,,1.4,us,usp0003jzp,2014-11-07T00:42:40.405Z,"29 km WSW of Valparaíso, Chile",earthquake,,10.5,,9,reviewed,us,us
205
+ 1988-08-14T17:53:09.750Z,-27.26,-71.092,32.5,6.7,mw,,,,1,us,usp0003jzr,2022-04-28T20:38:10.784Z,"76 km W of Copiapó, Chile",earthquake,,,,,reviewed,us,hrv
206
+ 1988-08-16T09:41:38.160Z,-27.407,-67.354,124.9,4.5,mb,,,,1.2,us,usp0003k1z,2014-11-07T00:42:40.665Z,"36 km WNW of La Puerta de San José, Argentina",earthquake,,8.7,,4,reviewed,us,us
207
+ 1988-08-16T13:59:34.400Z,-27.096,-71.158,10,5.4,mb,,,,1.2,us,usp0003k24,2014-11-07T00:42:40.692Z,"87 km WNW of Copiapó, Chile",earthquake,,,,17,reviewed,us,us
208
+ 1988-08-17T08:16:22.970Z,-27.04,-70.974,29.7,5.4,mw,,,,0.9,us,usp0003k2u,2022-04-28T20:38:37.711Z,"73 km WNW of Copiapó, Chile",earthquake,,,,,reviewed,us,hrv
209
+ 1988-08-17T11:34:52.250Z,-27.001,-70.948,38.5,6.1,mw,,,,1,us,usp0003k30,2024-01-17T20:44:54.936Z,"73 km WNW of Copiap?, Chile",earthquake,,,,,reviewed,us,hrv
210
+ 1988-08-17T12:38:15.520Z,-26.924,-70.985,37.2,5.7,mw,,,,1.1,us,usp0003k33,2022-04-28T20:38:46.033Z,"81 km NW of Copiapó, Chile",earthquake,,,,,reviewed,us,hrv
211
+ 1988-08-17T13:47:53.170Z,-27.717,-70.405,33,4.8,mb,,,,1.3,us,usp0003k34,2014-11-07T00:42:40.968Z,"39 km S of Copiapó, Chile",earthquake,,,,5,reviewed,us,us
212
+ 1988-08-17T13:59:28.700Z,-27.027,-71.243,33,4.7,mb,,,,1.4,us,usp0003k35,2014-11-07T00:42:40.970Z,"97 km WNW of Copiapó, Chile",earthquake,,,,2,reviewed,us,us
213
+ 1988-08-17T14:26:03.560Z,-27.062,-71.06,31.1,5.5,mw,,,,1,us,usp0003k36,2022-04-28T20:38:51.884Z,"79 km WNW of Copiapó, Chile",earthquake,,,,,reviewed,us,hrv
214
+ 1988-08-18T09:51:49.560Z,-27.036,-71.095,32.1,5,mb,,,,1,us,usp0003k43,2014-11-07T00:42:41.081Z,"84 km WNW of Copiapó, Chile",earthquake,,,,7,reviewed,us,us
215
+ 1988-08-18T21:36:43.110Z,-27.122,-71.423,33,4.8,mb,,,,1.4,us,usp0003k4m,2014-11-07T00:42:41.372Z,"111 km WNW of Copiapó, Chile",earthquake,,,,3,reviewed,us,us
216
+ 1988-08-18T22:48:01.760Z,-27.195,-71.262,31.7,4.8,mb,,,,1.3,us,usp0003k4n,2014-11-07T00:42:41.375Z,"94 km WNW of Copiapó, Chile",earthquake,,,,6,reviewed,us,us
217
+ 1988-08-19T03:01:50.570Z,-26.962,-71.03,31.4,4.9,mb,,,,1.3,us,usp0003k4x,2014-11-07T00:42:41.391Z,"82 km WNW of Copiapó, Chile",earthquake,,,,2,reviewed,us,us
218
+ 1988-08-19T06:54:23.740Z,-26.92,-71.794,33,4.5,mb,,,,1.1,us,usp0003k52,2014-11-07T00:42:41.399Z,"Off the coast of Atacama, Chile",earthquake,,,,2,reviewed,us,us
219
+ 1988-08-20T03:06:31.410Z,-2.506,-79.587,47.4,5,mb,,,,0.9,us,usp0003k5u,2014-11-07T00:42:41.485Z,"18 km N of Naranjal, Ecuador",earthquake,,9.4,,14,reviewed,us,us
220
+ 1988-08-20T16:02:22.600Z,-22.687,-66.145,241.8,4.7,mb,,,,1.2,us,usp0003k6c,2014-11-07T00:42:41.579Z,"46 km W of Abra Pampa, Argentina",earthquake,,9.8,,3,reviewed,us,us
221
+ 1988-08-20T19:11:27.190Z,-24.263,-67.079,178.1,4.5,mb,,,,1.3,us,usp0003k6m,2014-11-07T00:42:41.598Z,"77 km W of San Antonio de los Cobres, Argentina",earthquake,,9,,4,reviewed,us,us
222
+ 1988-08-21T13:38:28.430Z,-37.36,-73.795,10,5,mb,,,,1.2,us,usp0003k7x,2014-11-07T00:42:41.796Z,"30 km NNW of Lebu, Chile",earthquake,,,,6,reviewed,us,us
223
+ 1988-08-21T19:40:29.300Z,-23.523,-66.465,216.6,4.7,mb,,,,1,us,usp0003k8c,2014-11-07T00:42:41.868Z,"78 km N of San Antonio de los Cobres, Argentina",earthquake,,6.5,,7,reviewed,us,us
224
+ 1988-08-22T08:57:02.180Z,-1.879,-77.402,59.4,4.6,mb,,,,1,us,usp0003k8v,2014-11-07T00:42:41.916Z,"65 km ESE of Palora, Ecuador",earthquake,,20.9,,1,reviewed,us,us
225
+ 1988-08-22T22:30:08.370Z,-27.525,-69.404,119.9,4.7,mb,,,,1.3,us,usp0003k9u,2014-11-07T00:42:42.032Z,"93 km E of Copiapó, Chile",earthquake,,16.5,,1,reviewed,us,us
226
+ 1988-08-24T09:23:21.530Z,-21.956,-68.306,129.8,5,mb,,,,1,us,usp0003kbk,2014-11-07T00:42:42.220Z,"84 km NE of Calama, Chile",earthquake,,,,14,reviewed,us,us
227
+ 1988-08-24T15:20:33.380Z,-31.12,-67.965,92,4.7,mb,,,,0.8,us,usp0003kby,2014-11-07T00:42:42.260Z,"61 km NE of San Martín, Argentina",earthquake,,10.3,,2,reviewed,us,us
228
+ 1988-08-26T03:41:35.150Z,-21.699,-67.569,240.8,4.5,mb,,,,1.1,us,usp0003kda,2014-11-07T00:42:42.376Z,"149 km NNE of San Pedro de Atacama, Chile",earthquake,,25.8,,1,reviewed,us,us
229
+ 1988-08-26T22:15:08.400Z,-31.117,-70.818,88.4,5,mb,,,,1.2,us,usp0003ke0,2014-11-07T00:42:42.457Z,"48 km SSE of Monte Patria, Chile",earthquake,,,,14,reviewed,us,us
230
+ 1988-08-27T00:22:07.480Z,-33.899,-70.209,10,4.9,mb,,,,1.3,us,usp0003ke4,2014-11-07T00:42:42.481Z,"46 km SE of Puente Alto, Chile",earthquake,,,,7,reviewed,us,us
231
+ 1988-08-28T02:15:00.150Z,-26.165,-67.644,33,4.7,mb,,,,0.8,us,usp0003kf7,2014-11-07T00:42:42.642Z,"26 km WSW of Antofagasta de la Sierra, Argentina",earthquake,,,,1,reviewed,us,us
232
+ 1988-08-28T18:47:43.370Z,-21.165,-68.824,154.7,5,mb,,,,1.4,us,usp0003kfs,2014-11-07T00:42:42.686Z,"143 km N of Calama, Chile",earthquake,,18.4,,1,reviewed,us,us
233
+ 1988-08-29T21:33:22.660Z,-6.012,-80.044,66.6,5.1,mb,,,,1.1,us,usp0003kgm,2014-11-07T00:42:42.745Z,"33 km W of Olmos, Peru",earthquake,,,,14,reviewed,us,us
234
+ 1988-08-31T14:16:47.400Z,-37.207,-73.938,33,4.6,mb,,,,1,us,usp0003kj2,2014-11-07T00:42:42.902Z,"51 km NNW of Lebu, Chile",earthquake,,,,3,reviewed,us,us
235
+ 1988-09-01T05:36:11.850Z,-16.743,-69.46,187.1,4.8,mb,,,,1.2,us,usp0003kjv,2014-11-07T00:42:44.303Z,"27 km E of Mazo Cruz, Peru",earthquake,,4.8,,20,reviewed,us,us
236
+ 1988-09-05T09:57:40.170Z,-32.979,-72.015,43.8,4.7,mb,,,,1.1,us,usp0003kpq,2014-11-07T00:42:47.357Z,"36 km W of Valparaíso, Chile",earthquake,,11.9,,3,reviewed,us,us
237
+ 1988-09-06T12:24:27.520Z,-19.293,-66.987,249.6,4.9,mb,,,,1.2,us,usp0003kqt,2014-11-07T00:42:47.599Z,"48 km SSW of Challapata, Bolivia",earthquake,,,,10,reviewed,us,us
238
+ 1988-09-09T02:20:21.190Z,-30.2,-67.574,39.5,5.1,mb,,,,1.1,us,usp0003ktp,2014-11-07T00:42:48.411Z,"49 km NNW of San Agustín de Valle Fértil, Argentina",earthquake,,14,,7,reviewed,us,us
239
+ 1988-09-09T23:07:47.790Z,-7.157,-81.547,35.8,5.5,mw,,,,1,us,usp0003kud,2022-04-28T20:35:03.876Z,"181 km W of Pimentel, Peru",earthquake,,,,,reviewed,us,hrv
240
+ 1988-09-10T06:02:26.030Z,-10.449,-75.456,33,4.8,mb,,,,1.3,us,usp0003kuu,2014-11-07T00:42:48.641Z,"15 km NNW of Oxapampa, Peru",earthquake,,,,1,reviewed,us,us
241
+ 1988-09-14T21:22:59.880Z,-21.553,-68.784,172.4,4.8,mb,,,,1.3,us,usp0003kz8,2014-11-07T00:42:49.322Z,"101 km N of Calama, Chile",earthquake,,13.9,,2,reviewed,us,us
242
+ 1988-09-14T22:14:07.540Z,-23.424,-67.997,122.6,6,mw,,,,1.1,us,usp0003kzb,2022-04-28T20:35:36.119Z,"60 km SSE of San Pedro de Atacama, Chile",earthquake,,,,,reviewed,us,hrv
243
+ 1988-09-15T18:48:01.110Z,-1.442,-77.866,170.2,6.2,mw,,,,1,us,usp0003m02,2022-04-28T20:35:42.428Z,"15 km ENE of Puyo, Ecuador",earthquake,,,,,reviewed,us,nc
244
+ 1988-09-20T16:20:22.390Z,-16.284,-73.002,106.2,4.8,mb,,,,1.4,us,usp0003m4a,2014-11-07T00:42:49.929Z,"33 km SSE of Urasqui, Peru",earthquake,,11.8,,2,reviewed,us,us
245
+ 1988-09-20T17:56:18.070Z,4.669,-77.423,34.7,5.8,mw,,,,1.1,us,usp0003m4d,2022-04-28T20:35:52.504Z,"32 km SSW of Pizarro, Colombia",earthquake,,5.3,,,reviewed,us,hrv
246
+ 1988-09-21T13:57:44.730Z,-1.484,-77.956,163.8,4.9,mb,,,,0.8,us,usp0003m55,2014-11-07T00:42:50.074Z,"5 km E of Puyo, Ecuador",earthquake,,4.8,,40,reviewed,us,us
247
+ 1988-09-22T05:47:40.850Z,-32.695,-71.555,55.8,4.7,mb,,,,1.1,us,usp0003m5w,2014-11-07T00:42:50.179Z,"33 km WNW of Hacienda La Calera, Chile",earthquake,,6.7,,7,reviewed,us,us
248
+ 1988-09-23T04:37:53.770Z,-22.01,-68.11,138.6,4.7,mb,,,,1.2,us,usp0003m6u,2014-11-07T00:42:50.292Z,"97 km ENE of Calama, Chile",earthquake,,15.5,,3,reviewed,us,us
249
+ 1988-09-25T08:56:45.080Z,-27.955,-66.539,160.6,4.6,mb,,,,1.1,us,usp0003m8k,2014-11-07T00:42:51.300Z,"46 km SSW of Andalgalá, Argentina",earthquake,,7,,10,reviewed,us,us
250
+ 1988-09-25T22:23:51.870Z,-21.016,-67.503,162.9,4.7,mb,,,,0.8,us,usp0003m93,2014-11-07T00:42:51.413Z,"93 km SW of Uyuni, Bolivia",earthquake,,14.5,,1,reviewed,us,us
251
+ 1988-09-27T14:40:23.900Z,-27.879,-66.651,171.2,4.9,mb,,,,1.1,us,usp0003maa,2014-11-07T00:42:51.603Z,"46 km SW of Andalgalá, Argentina",earthquake,,16.2,,4,reviewed,us,us
252
+ 1988-09-29T02:46:49.560Z,-33.244,-71.811,61.9,4.5,mb,,,,1.4,us,usp0003mbd,2014-11-07T00:42:51.684Z,"28 km SW of Valparaíso, Chile",earthquake,,12.7,,2,reviewed,us,us
253
+ 1988-09-29T03:32:51.550Z,-33.234,-71.846,57.3,4.5,mb,,,,1.3,us,usp0003mbf,2014-11-07T00:42:51.688Z,"29 km SW of Valparaíso, Chile",earthquake,,11.4,,2,reviewed,us,us
254
+ 1988-09-30T03:23:47.240Z,-19.56,-68.921,111.8,5.5,mw,,,,1.2,us,usp0003mct,2025-12-19T21:09:35.979Z,"147 km ENE of Iquique, Chile",earthquake,,,,,reviewed,us,hrv
255
+ 1988-10-02T04:37:38.650Z,-34.81,-70.469,19.5,4.6,mb,,,,1.2,us,usp0003mew,2014-11-07T00:42:54.763Z,"Chile-Argentina border region",earthquake,,5.6,,5,reviewed,us,us
256
+ 1988-10-02T06:18:08.150Z,-22.774,-66.261,238.1,5.4,mw,,,,1.1,us,usp0003mex,2025-12-19T20:56:59.919Z,"58 km W of Abra Pampa, Argentina",earthquake,,4.6,,,reviewed,us,hrv
257
+ 1988-10-03T20:54:06.740Z,-19.45,-69.697,107.3,4.9,mb,,,,0.9,us,usp0003mgh,2014-11-07T00:42:55.475Z,"Tarapaca, Chile",earthquake,,8.6,,2,reviewed,us,us
258
+ 1988-10-05T12:11:59.200Z,-12.466,-74.038,45.5,4.9,mb,,,,1.4,us,usp0003mhv,2014-11-07T00:42:55.911Z,"24 km NNW of Ayna, Peru",earthquake,,15.1,,10,reviewed,us,us
259
+ 1988-10-08T23:39:33.170Z,-17.086,-71.499,90.5,4.6,mb,,,,1.4,us,usp0003mnc,2014-11-07T00:42:56.917Z,"27 km E of Cocachacra, Peru",earthquake,,8.7,,5,reviewed,us,us
260
+ 1988-10-14T19:11:40.980Z,-23.208,-68.178,97.4,5.4,mw,,,,1.2,us,usp0003mtx,2025-12-19T21:08:49.159Z,"32 km S of San Pedro de Atacama, Chile",earthquake,,6.7,,,reviewed,us,hrv
261
+ 1988-10-15T08:58:57.180Z,-40.311,-74.285,33,4.5,mb,,,,1.1,us,usp0003muk,2014-11-07T00:42:58.030Z,"86 km WSW of Corral, Chile",earthquake,,,,1,reviewed,us,us
262
+ 1988-10-17T15:48:38.020Z,-30.515,-71.965,33,4.6,mb,,,,1.3,us,usp0003mwz,2014-11-07T00:42:58.388Z,"74 km W of Ovalle, Chile",earthquake,,,,1,reviewed,us,us
263
+ 1988-10-17T20:33:25.200Z,-24.023,-69.405,75.4,5.3,mb,,,,1,us,usp0003mx9,2014-11-07T00:42:58.431Z,"108 km ESE of Antofagasta, Chile",earthquake,,,,10,reviewed,us,us
264
+ 1988-10-17T21:39:30.880Z,-25.503,-70.169,48.1,5.2,mb,,,,1,us,usp0003mxc,2014-11-07T00:42:58.442Z,"33 km ESE of Taltal, Chile",earthquake,,,,10,reviewed,us,us
265
+ 1988-10-21T02:52:06.180Z,-31.745,-72.167,33,5.2,mb,,,,1.3,us,usp0003n15,2014-11-07T00:42:58.876Z,"95 km W of Illapel, Chile",earthquake,,,,3,reviewed,us,us
266
+ 1988-10-22T11:51:17.250Z,-52.997,-73.651,10,4.8,mb,,,,1.3,us,usp0003n30,2014-11-07T00:42:59.036Z,"161 km SSW of Puerto Natales, Chile",earthquake,,,,2,reviewed,us,us
267
+ 1988-10-25T19:01:07.800Z,-18.215,-72.817,37.7,4.6,mb,,,,1,us,usp0003n72,2014-11-07T00:42:59.579Z,"Off the coast of southern Peru",earthquake,,19.9,,1,reviewed,us,us
268
+ 1988-10-31T02:08:15.300Z,-23.565,-66.618,242.9,5.3,mw,,,,1.3,us,usp0003ncf,2025-12-19T21:09:01.145Z,"78 km NNW of San Antonio de los Cobres, Argentina",earthquake,,,,,reviewed,us,hrv
269
+ 1988-11-01T01:05:49.950Z,-22.879,-66.543,246.3,4.7,mb,,,,1.2,us,usp0003ndg,2014-11-07T00:43:02.015Z,"88 km WSW of Abra Pampa, Argentina",earthquake,,6,,5,reviewed,us,us
270
+ 1988-11-05T08:51:13.020Z,-37.869,-72.808,33,4.8,mb,,,,0.9,us,usp0003nja,2014-11-07T00:43:04.269Z,"11 km SW of Angol, Chile",earthquake,,,,4,reviewed,us,us
271
+ 1988-11-06T17:03:01.530Z,8.28,-73.151,181.6,4.5,mb,,,,0.9,us,usp0003nmd,2014-11-07T00:43:05.146Z,"4 km S of Hacarí, Colombia",earthquake,,27.5,,3,reviewed,us,us
272
+ 1988-11-12T19:03:28.340Z,-28.433,-70.441,96.2,4.9,mb,,,,1.1,us,usp0003ntw,2014-11-07T00:43:06.027Z,"34 km ENE of Vallenar, Chile",earthquake,,7.8,,2,reviewed,us,us
273
+ 1988-11-14T10:06:59.130Z,-4.893,-77.46,73.3,4.5,mb,,,,0.8,us,usp0003nuv,2014-11-07T00:43:06.267Z,"87 km W of Barranca, Peru",earthquake,,17.8,,2,reviewed,us,us
274
+ 1988-11-14T16:55:34.830Z,-32.529,-71.587,53.4,5.1,mw,,,,1.2,us,usp0003nuz,2022-04-28T20:30:48.075Z,"34 km WSW of La Ligua, Chile",earthquake,,6.9,,,reviewed,us,hrv
275
+ 1988-11-15T01:05:55.290Z,-30.125,-71.245,86.7,4.8,mb,,,,1.4,us,usp0003nvf,2014-11-07T00:43:06.324Z,"21 km SSE of Coquimbo, Chile",earthquake,,13.6,,2,reviewed,us,us
276
+ 1988-11-15T06:27:00.010Z,-30.972,-67.189,33,4.7,mb,,,,1.3,us,usp0003nvt,2014-11-07T00:43:06.363Z,"46 km SE of San Agustín de Valle Fértil, Argentina",earthquake,,,,2,reviewed,us,us
277
+ 1988-11-19T13:24:37.260Z,-52.902,-73.369,33,4.7,mb,,,,1.4,us,usp0003nz9,2014-11-07T00:43:07.398Z,"143 km SSW of Puerto Natales, Chile",earthquake,,,,1,reviewed,us,us
278
+ 1988-11-19T23:29:52.600Z,-30.515,-71.559,33,5.2,mb,,,,1,us,usp0003nzz,2014-11-07T00:43:07.450Z,"36 km WNW of Ovalle, Chile",earthquake,,,,15,reviewed,us,us
279
+ 1988-11-22T21:45:59.680Z,-3.871,-80.047,33,4.5,mb,,,,1,us,usp0003p3k,2014-11-07T00:43:08.521Z,"26 km SE of Matapalo, Peru",earthquake,,,,3,reviewed,us,us
280
+ 1988-11-25T02:19:55.980Z,-21.287,-66.498,270.4,4.5,mb,,,,0.5,us,usp0003p61,2014-11-07T00:43:08.784Z,"48 km SW of Atocha, Bolivia",earthquake,,7.9,,2,reviewed,us,us
281
+ 1988-11-25T20:37:55.440Z,-23.175,-66.781,239.2,4.5,mb,,,,0.6,us,usp0003p6j,2014-11-07T00:43:09.407Z,"112 km W of El Aguilar, Argentina",earthquake,,8.7,,2,reviewed,us,us
282
+ 1988-11-26T18:40:12.260Z,6.696,-77.535,5,5.4,mw,,,,1,us,usp0003p7m,2022-04-28T20:31:50.212Z,"51 km SSE of Juradó, Colombia",earthquake,,,,,reviewed,us,hrv
283
+ 1988-11-28T00:31:22.940Z,-21.316,-68.408,121.9,5.3,mw,,,,1.1,us,usp0003p9c,2025-12-19T21:08:39.687Z,"137 km NNE of Calama, Chile",earthquake,,,,,reviewed,us,hrv
284
+ 1988-11-29T11:23:38.710Z,5.1,-76.572,85.2,5.7,mw,,,,0.9,us,usp0003pbh,2022-04-28T20:32:21.530Z,"8 km E of Condoto, Colombia",earthquake,,,,,reviewed,us,hrv
285
+ 1988-11-29T20:17:43.930Z,-29.191,-67.958,121.1,5.1,mb,,,,1.2,us,usp0003pbw,2014-11-07T00:43:10.596Z,"44 km W of Chilecito, Argentina",earthquake,,6.8,,3,reviewed,us,us
286
+ 1988-12-05T14:37:51.580Z,-24.269,-67.076,182.9,4.6,mb,,,,1.4,us,usp0003pjn,2014-11-07T00:43:15.342Z,"77 km W of San Antonio de los Cobres, Argentina",earthquake,,6.9,,6,reviewed,us,us
287
+ 1988-12-06T00:18:33.300Z,-17.908,-73.089,51.1,5.1,mb,,,,1.2,us,usp0003pk6,2014-11-07T00:43:15.645Z,"145 km SW of Islay (Matarani), Peru",earthquake,,,,7,reviewed,us,us
288
+ 1988-12-09T20:29:29.120Z,-2.867,-77.706,26.6,5.4,mw,,,,1,us,usp0003pqm,2022-04-28T20:28:59.316Z,"68 km SE of Sucúa, Ecuador",earthquake,,6.1,,,reviewed,us,hrv
289
+ 1988-12-10T17:05:43.840Z,-24.02,-69.887,49.8,4.9,mb,,,,0.9,us,usp0003prb,2014-11-07T00:43:16.815Z,"65 km SE of Antofagasta, Chile",earthquake,,,,3,reviewed,us,us
290
+ 1988-12-11T08:49:33.880Z,-2.579,-77.695,56.1,5.2,mb,,,,1,us,usp0003pru,2014-11-07T00:43:16.896Z,"54 km ESE of Sucúa, Ecuador",earthquake,,6.5,,37,reviewed,us,us
291
+ 1988-12-11T09:05:22.630Z,-2.45,-77.524,79.8,4.7,mb,,,,1,us,usp0003prv,2014-11-07T00:43:16.905Z,"67 km ESE of Macas, Ecuador",earthquake,,9.9,,6,reviewed,us,us
292
+ 1988-12-11T18:04:36.340Z,8.991,-77.896,68.4,4.8,mb,,,,0.8,us,usp0003ps7,2014-11-07T00:43:16.939Z,"15 km SSE of Ustupo, Panama",earthquake,,11.4,,23,reviewed,us,us
293
+ 1988-12-11T18:32:45.590Z,-20.534,-70.333,85.8,4.8,mb,,,,1.5,us,usp0003ps9,2014-11-07T00:43:16.946Z,"40 km SSW of Iquique, Chile",earthquake,,17.1,,1,reviewed,us,us
294
+ 1988-12-16T04:19:18.240Z,-9.764,-75.631,33,4.7,mb,,,,0.9,us,usp0003pwa,2014-11-07T00:43:17.460Z,"56 km E of Churubamba, Peru",earthquake,,,,1,reviewed,us,us
295
+ 1988-12-16T05:05:46.800Z,-24.122,-66.92,169.7,5.2,mw,,,,1.2,us,usp0003pwb,2025-12-19T20:56:56.252Z,"62 km W of San Antonio de los Cobres, Argentina",earthquake,,6.4,,,reviewed,us,hrv
296
+ 1988-12-16T12:26:35.590Z,-22.958,-66.376,220.2,5.2,mb,,,,0.9,us,usp0003pwr,2014-11-07T00:43:17.584Z,"74 km WSW of Abra Pampa, Argentina",earthquake,,4.3,,25,reviewed,us,us
297
+ 1988-12-18T08:58:53.470Z,-25.395,-69.244,95.9,4.9,mb,,,,1.2,us,usp0003pxs,2014-11-07T00:43:17.753Z,"124 km E of Taltal, Chile",earthquake,,6.2,,11,reviewed,us,us
298
+ 1988-12-20T14:17:08.820Z,-19.648,-68.917,110.9,5,mb,,,,1.2,us,usp0003q0g,2014-11-07T00:43:18.048Z,"143 km ENE of Iquique, Chile",earthquake,,,,11,reviewed,us,us
299
+ 1988-12-22T16:43:17.920Z,-38.224,-71.729,33,4.7,mb,,,,1.2,us,usp0003q38,2014-11-07T00:43:18.425Z,"52 km E of Victoria, Chile",earthquake,,,,1,reviewed,us,us
300
+ 1988-12-23T03:15:53.510Z,-19.459,-70.056,81.3,4.7,mb,,,,0.4,us,usp0003q3q,2014-11-07T00:43:18.469Z,"84 km N of Iquique, Chile",earthquake,,17.3,,1,reviewed,us,us
301
+ 1988-12-24T04:26:54.560Z,-23.522,-66.666,193.6,6.1,mw,,,,1,us,usp0003q4s,2022-04-28T20:29:54.574Z,"84 km NNW of San Antonio de los Cobres, Argentina",earthquake,,2.6,,,reviewed,us,hrv
302
+ 1988-12-24T11:33:45.850Z,-38.354,-71.351,33,4.6,mb,,,,0.9,us,usp0003q56,2014-11-07T00:43:19.040Z,"71 km WSW of Loncopué, Argentina",earthquake,,,,5,reviewed,us,us
303
+ 1988-12-24T17:57:59.110Z,7.102,-72.272,51.4,4.6,mb,,,,0.8,us,usp0003q5e,2014-11-07T00:43:19.087Z,"21 km WNW of Cubará, Colombia",earthquake,,24.2,,3,reviewed,us,us
304
+ 1988-12-25T05:11:30.180Z,-38.385,-71.472,33,4.8,mb,,,,0.9,us,usp0003q5s,2014-11-07T00:43:19.116Z,"72 km ENE of Vilcún, Chile",earthquake,,,,6,reviewed,us,us
305
+ 1988-12-27T04:05:53.490Z,-19.971,-68.642,151.6,4.8,mb,,,,1.2,us,usp0003q7g,2014-11-07T00:43:19.283Z,"160 km E of Iquique, Chile",earthquake,,7,,5,reviewed,us,us
306
+ 1988-12-27T10:06:36.760Z,-29.112,-68.34,117.1,5.2,mb,,,,1.1,us,usp0003q7s,2014-11-07T00:43:19.303Z,"41 km SSW of Vinchina, Argentina",earthquake,,,,12,reviewed,us,us
307
+ 1988-12-28T14:59:24.890Z,-38.304,-71.28,33,4.7,mb,,,,0.9,us,usp0003q98,2014-11-07T00:43:19.515Z,"63 km WSW of Loncopué, Argentina",earthquake,,,,2,reviewed,us,us
308
+ 1988-12-28T18:50:11.920Z,-29.853,-70.029,125.2,4.7,mb,,,,0.8,us,usp0003q9h,2014-11-07T00:43:19.533Z,"69 km ENE of Vicuña, Chile",earthquake,,36.7,,1,reviewed,us,us
309
+ 1988-12-29T15:29:10.230Z,-17.647,-69.505,169.2,5.2,mb,,,,1,us,usp0003qa3,2014-11-07T00:43:19.584Z,"50 km ENE of Palca, Peru",earthquake,,6.2,,1,reviewed,us,us
310
+ 1988-12-30T01:43:10.150Z,-35.039,-70.011,150,4.6,mb,,,,0.7,us,usp0003qaq,2014-11-07T00:43:19.679Z,"101 km ESE of Chimbarongo, Chile",earthquake,,9,,1,reviewed,us,us
311
+ 1988-12-30T22:31:37.660Z,-22.835,-66.408,242.8,5,mb,,,,1.3,us,usp0003qbs,2014-11-07T00:43:19.782Z,"74 km W of Abra Pampa, Argentina",earthquake,,7.8,,6,reviewed,us,us
312
+ 1988-12-31T04:43:56.920Z,-22.11,-67.233,183.8,4.6,mb,,,,1.1,us,usp0003qc0,2014-11-07T00:43:19.806Z,"133 km NE of San Pedro de Atacama, Chile",earthquake,,7.1,,6,reviewed,us,us
313
+ 1988-12-31T15:12:20.410Z,-21.324,-68.675,124.8,5,mb,,,,1.5,us,usp0003qcd,2014-11-07T00:43:19.858Z,"128 km NNE of Calama, Chile",earthquake,,,,8,reviewed,us,us
314
+ 1988-12-31T20:26:06.990Z,-32.475,-71.726,40.6,5.1,mb,,,,1.1,us,usp0003qck,2014-11-07T00:43:19.875Z,"46 km W of La Ligua, Chile",earthquake,,,,10,reviewed,us,us
315
+ 1988-12-31T20:40:28.770Z,-32.525,-71.865,36,5,mb,,,,1.1,us,usp0003qcn,2014-11-07T00:43:19.883Z,"60 km W of La Ligua, Chile",earthquake,,12.4,,4,reviewed,us,us
316
+ 1988-12-31T20:58:31.090Z,5.074,-75.78,118.4,4.8,mb,,,,1,us,usp0003qcr,2014-11-07T00:43:19.896Z,"1 km SE of San José, Colombia",earthquake,,3.5,,45,reviewed,us,us
317
+ 1988-12-31T21:46:44.440Z,-32.536,-71.915,31,5.3,mb,,,,1.3,us,usp0003qcs,2014-11-07T00:43:19.907Z,"61 km NNW of Valparaíso, Chile",earthquake,,5.5,,8,reviewed,us,us
318
+ 1989-01-01T10:16:16.320Z,-11.728,-77.438,45.8,5.2,mb,,,,0.7,us,usp0003qd8,2014-11-07T00:43:21.432Z,"25 km SW of Chancay, Peru",earthquake,,,,10,reviewed,us,us
319
+ 1989-01-01T15:52:13.300Z,-32.641,-72.012,50.7,5.1,mb,,,,1.2,us,usp0003qdj,2014-11-07T00:43:22.035Z,"56 km NW of Valparaíso, Chile",earthquake,,11.7,,1,reviewed,us,us
320
+ 1989-01-01T16:24:53.150Z,-32.655,-71.944,53.4,4.8,mb,,,,1.3,us,usp0003qdm,2014-11-07T00:43:22.208Z,"51 km NW of Valparaíso, Chile",earthquake,,12,,2,reviewed,us,us
321
+ 1989-01-04T19:01:32.120Z,-21.001,-68.919,122.4,4.8,mb,,,,1.4,us,usp0003qh7,2014-11-07T00:43:23.822Z,"155 km SE of Iquique, Chile",earthquake,,8.8,,6,reviewed,us,us
322
+ 1989-01-05T06:39:34.150Z,8.898,-77.425,33,4.8,mb,,,,1,us,usp0003qhw,2014-11-07T00:43:23.928Z,"25 km N of Puerto Obaldía, Panama",earthquake,,,,17,reviewed,us,us
323
+ 1989-01-07T07:26:11.460Z,-23.258,-68.41,121.6,5.6,mw,,,,1.2,us,usp0003qm2,2022-04-28T20:27:43.877Z,"43 km SSW of San Pedro de Atacama, Chile",earthquake,,,,,reviewed,us,hrv
324
+ 1989-01-07T09:39:33.430Z,6.81,-72.979,166.7,5,mb,,,,0.9,us,usp0003qm3,2014-11-07T00:43:24.623Z,"6 km N of Cepitá, Colombia",earthquake,,5.5,,15,reviewed,us,us
325
+ 1989-01-11T11:58:21.030Z,-32.568,-71.849,58.6,5,mb,,,,1.2,us,usp0003qs4,2014-11-07T00:43:25.562Z,"55 km NNW of Valparaíso, Chile",earthquake,,12.6,,8,reviewed,us,us
326
+ 1989-01-13T04:26:48.040Z,-38.531,-71.473,33,5,mb,,,,1.3,us,usp0003qu3,2014-11-07T00:43:25.841Z,"67 km ENE of Vilcún, Chile",earthquake,,,,1,reviewed,us,us
327
+ 1989-01-13T16:54:35.540Z,-38.481,-71.402,33,4.6,mb,,,,1.4,us,usp0003quu,2014-11-07T00:43:25.922Z,"74 km ENE of Vilcún, Chile",earthquake,,,,2,reviewed,us,us
328
+ 1989-01-14T09:25:44.880Z,-22.197,-67.269,183.4,4.7,mb,,,,1.5,us,usp0003qvf,2014-11-07T00:43:26.048Z,"124 km NE of San Pedro de Atacama, Chile",earthquake,,14.7,,2,reviewed,us,us
329
+ 1989-01-14T14:11:59.380Z,-29.274,-67.933,131.6,4.6,mb,,,,1.3,us,usp0003qvk,2014-11-07T00:43:26.076Z,"44 km WSW of Chilecito, Argentina",earthquake,,13.8,,1,reviewed,us,us
330
+ 1989-01-15T01:27:46.350Z,-31.733,-71.813,50.3,5.4,mw,,,,1.1,us,usp0003qvz,2022-04-28T20:28:07.369Z,"61 km W of Illapel, Chile",earthquake,,6.2,,,reviewed,us,hrv
331
+ 1989-01-15T03:19:50.630Z,-31.75,-71.847,49.9,5.6,ms,,,,1.2,us,usp0003qw1,2020-08-28T22:28:40.923Z,"65 km W of Illapel, Chile",earthquake,,6.7,,1,reviewed,us,us
332
+ 1989-01-17T11:20:43.540Z,5.468,-79.195,10,5.1,mw,,,,1.5,us,usp0003qy3,2025-12-19T21:07:51.947Z,"210 km WNW of Pizarro, Colombia",earthquake,,,,,reviewed,us,hrv
333
+ 1989-01-18T17:32:11.620Z,-7.025,-74.598,147.3,5.4,mw,,,,0.9,us,usp0003qz2,2025-12-19T21:07:53.035Z,"57 km NE of Contamana, Peru",earthquake,,,,,reviewed,us,hrv
334
+ 1989-01-19T20:35:41.120Z,-18.848,-67.21,236.4,4.6,mb,,,,1.1,us,usp0003r0k,2014-11-07T00:43:27.951Z,"46 km W of Challapata, Bolivia",earthquake,,4.3,,17,reviewed,us,us
335
+ 1989-01-20T01:55:18.000Z,-10.297,-74.885,129.1,5.1,mb,,,,0.8,us,usp0003r0u,2014-11-07T00:43:27.974Z,"64 km ENE of Oxapampa, Peru",earthquake,,,,43,reviewed,us,us
336
+ 1989-01-24T05:47:08.280Z,-44.56,-78.56,10,4.6,mb,,,,1.3,us,usp0003r5x,2014-11-07T00:43:28.739Z,"Off the coast of Aisen, Chile",earthquake,,,,1,reviewed,us,us
337
+ 1989-01-28T09:44:53.580Z,-33.247,-70.211,10,4.6,mb,,,,1.1,us,usp0003raa,2014-11-07T00:43:29.276Z,"41 km E of Chicureo Abajo, Chile",earthquake,,,,3,reviewed,us,us
338
+ 1989-01-29T01:37:18.550Z,6.914,-72.883,135.2,4.7,mb,,,,0.9,us,usp0003rb4,2014-11-07T00:43:29.385Z,"5 km NW of Guaca, Colombia",earthquake,,25.1,,7,reviewed,us,us
339
+ 1989-01-30T07:45:44.540Z,7.882,-72.07,39.8,5.4,mb,,,,0.8,us,usp0003rcf,2022-04-28T20:28:42.579Z,"18 km ENE of Táriba, Venezuela",earthquake,,3.4,,65,reviewed,us,us
340
+ 1989-01-30T08:38:41.460Z,-30.809,-71.307,95.8,4.8,mb,,,,0.9,us,usp0003rch,2014-11-07T00:43:30.190Z,"25 km SSW of Ovalle, Chile",earthquake,,9.7,,3,reviewed,us,us
341
+ 1989-01-31T23:23:13.480Z,-33.964,-70.127,127.1,4.7,mb,,,,0.9,us,usp0003re7,2014-11-07T00:43:30.336Z,"53 km ENE of Machalí, Chile",earthquake,,10.8,,2,reviewed,us,us
342
+ 1989-02-01T03:34:15.890Z,-24.382,-67.588,180.9,4.7,mb,,,,1.1,us,usp0003reg,2014-11-07T00:43:31.837Z,"130 km W of San Antonio de los Cobres, Argentina",earthquake,,8,,3,reviewed,us,us
343
+ 1989-02-02T09:52:32.350Z,-21.051,-68.21,154.7,4.8,mb,,,,0.6,us,usp0003rfm,2014-11-07T00:43:32.497Z,"156 km WSW of Colchani, Bolivia",earthquake,,8.4,,2,reviewed,us,us
344
+ 1989-02-03T13:43:16.480Z,-24.024,-66.882,190.5,4.8,mb,,,,1,us,usp0003rgh,2014-11-07T00:43:32.869Z,"61 km WNW of San Antonio de los Cobres, Argentina",earthquake,,6.8,,8,reviewed,us,us
345
+ 1989-02-04T18:32:13.080Z,7.957,-72.054,46.4,4.7,mb,,,,0.8,us,usp0003rj4,2014-11-07T00:43:33.494Z,"Colombia-Venezuela border region",earthquake,,6.7,,30,reviewed,us,us
346
+ 1989-02-05T13:55:20.400Z,-17.23,-70.181,131.8,5.1,mb,,,,1,us,usp0003rk2,2014-11-07T00:43:33.925Z,"8 km ENE of Candarave, Peru",earthquake,,4.9,,37,reviewed,us,us
347
+ 1989-02-07T04:03:00.220Z,-22.087,-67.223,179.5,5.5,mw,,,,0.8,us,usp0003rmv,2022-04-28T20:24:25.532Z,"135 km NE of San Pedro de Atacama, Chile",earthquake,,,,,reviewed,us,hrv
348
+ 1989-02-08T11:34:25.200Z,-1.561,-77.422,193.6,4.5,mb,,,,0.8,us,usp0003rnu,2014-11-07T00:43:34.898Z,"62 km ENE of Palora, Ecuador",earthquake,,9.3,,4,reviewed,us,us
349
+ 1989-02-09T22:49:02.110Z,-22.611,-66.086,247.3,5.4,mw,,,,1,us,usp0003rq5,2025-12-19T21:07:15.429Z,"41 km WNW of Abra Pampa, Argentina",earthquake,,4.5,,,reviewed,us,hrv
350
+ 1989-02-12T20:03:16.740Z,2.742,-79.727,33,5.1,mw,,,,1.2,us,usp0003ruk,2025-12-19T21:07:20.264Z,"141 km WNW of Salahonda, Colombia",earthquake,,,,,reviewed,us,hrv
351
+ 1989-02-14T22:25:41.480Z,7.034,-72.885,142,4.6,mb,,,,1.2,us,usp0003rx9,2014-11-07T00:43:36.449Z,"5 km NNE of Santa Bárbara, Colombia",earthquake,,20.3,,3,reviewed,us,us
352
+ 1989-02-15T10:46:09.220Z,5.829,-77.742,33,4.9,mb,,,,1.5,us,usp0003ry1,2014-11-07T00:43:36.521Z,"53 km WNW of Nuquí, Colombia",earthquake,,,,6,reviewed,us,us
353
+ 1989-02-17T13:43:26.650Z,-22.175,-68.41,122.2,4.7,mb,,,,1.3,us,usp0003s06,2014-11-07T00:43:36.785Z,"61 km ENE of Calama, Chile",earthquake,,,,3,reviewed,us,us
354
+ 1989-02-17T15:12:52.640Z,-17.492,-72.59,45.7,5.2,mw,,,,1.2,us,usp0003s0a,2025-12-19T21:07:31.931Z,"75 km SW of Islay (Matarani), Peru",earthquake,,6.3,,,reviewed,us,hrv
355
+ 1989-02-19T04:23:44.660Z,-7.887,-73.966,47.5,5.2,mb,,,,1.2,us,usp0003s2a,2014-11-07T00:43:37.001Z,"84 km NE of Pucallpa, Peru",earthquake,,,,44,reviewed,us,us
356
+ 1989-02-19T22:26:24.340Z,-32.143,-72.09,46.3,4.8,mb,,,,0.9,us,usp0003s35,2014-11-07T00:43:37.296Z,"87 km WNW of La Ligua, Chile",earthquake,,11.6,,2,reviewed,us,us
357
+ 1989-02-21T13:16:28.380Z,-31.308,-67.183,48.8,4.9,mb,,,,0.9,us,usp0003s50,2014-11-07T00:43:37.568Z,"79 km SSE of San Agustín de Valle Fértil, Argentina",earthquake,,5.5,,10,reviewed,us,us
358
+ 1989-02-21T22:08:54.760Z,-44.462,-78.766,25.6,5.6,mw,,,,1,us,usp0003s5j,2022-04-28T20:26:25.197Z,"Off the coast of Aisen, Chile",earthquake,,,,,reviewed,us,hrv
359
+ 1989-02-22T12:44:12.190Z,-32.397,-68.954,55.5,4.8,mb,,,,1.3,us,usp0003s6m,2014-11-07T00:43:37.955Z,"56 km NNW of Mendoza, Argentina",earthquake,,6.7,,10,reviewed,us,us
360
+ 1989-02-23T03:05:38.790Z,3.076,-78.591,18.7,4.9,mb,,,,1.2,us,usp0003s77,2014-11-07T00:43:37.998Z,"64 km NNW of Mosquera, Colombia",earthquake,,4.6,,28,reviewed,us,us
361
+ 1989-02-24T01:59:54.590Z,-24.057,-66.558,204.4,4.8,mb,,,,1.1,us,usp0003s8p,2014-11-07T00:43:38.153Z,"30 km NW of San Antonio de los Cobres, Argentina",earthquake,,5.1,,11,reviewed,us,us
362
+ 1989-02-24T12:36:59.870Z,-38.287,-71.151,33,5.3,mw,,,,1,us,usp0003s9e,2022-04-28T20:26:41.312Z,"52 km WSW of Loncopué, Argentina",earthquake,,,,,reviewed,us,hrv
363
+ 1989-02-26T10:12:29.210Z,-4.852,-76.748,33,4.8,mb,,,,1,us,usp0003sc7,2020-04-16T19:30:32.268Z,"8 km WSW of Barranca, Peru",earthquake,,,,10,reviewed,us,us
364
+ 1989-02-27T01:09:42.450Z,-24.147,-66.889,199.8,4.5,mb,,,,1.2,us,usp0003scz,2014-11-07T00:43:38.675Z,"58 km W of San Antonio de los Cobres, Argentina",earthquake,,9.2,,3,reviewed,us,us
365
+ 1989-02-27T21:07:31.730Z,-17.666,-69.786,144.3,4.9,mb,,,,1.6,us,usp0003sdj,2014-11-07T00:43:38.712Z,"22 km ENE of Palca, Peru",earthquake,,,,3,reviewed,us,us
366
+ 1989-02-27T23:46:22.370Z,6.897,-72.804,141.2,4.9,mb,,,,1,us,usp0003sdn,2014-11-07T00:43:38.741Z,"6 km ENE of Guaca, Colombia",earthquake,,7.2,,6,reviewed,us,us
367
+ 1989-02-28T06:07:30.890Z,-23.217,-70.628,33,4.7,mb,,,,1.4,us,usp0003sdz,2014-11-07T00:43:38.800Z,"53 km NNW of Antofagasta, Chile",earthquake,,,,4,reviewed,us,us
368
+ 1989-03-01T13:31:22.160Z,-4.372,-80.564,33,4.8,mb,,,,1.3,us,usp0003sfx,2014-11-07T00:43:41.487Z,"37 km SSE of Papayal, Peru",earthquake,,,,1,reviewed,us,us
369
+ 1989-03-02T11:32:54.830Z,-4.246,-78.121,40.7,4.9,mb,,,,1.1,us,usp0003sgp,2014-11-07T00:43:42.052Z,"84 km ESE of Yantzaza, Ecuador",earthquake,,,,12,reviewed,us,us
370
+ 1989-03-02T14:10:28.570Z,-0.593,-77.514,41.5,5,mb,,,,1,us,usp0003sh0,2014-11-07T00:43:42.697Z,"43 km WNW of Boca Suno, Ecuador",earthquake,,8.4,,15,reviewed,us,us
371
+ 1989-03-05T14:18:18.400Z,-31.173,-72.315,47.7,5,mb,,,,1,us,usp0003smj,2014-11-07T00:43:46.541Z,"120 km WNW of Illapel, Chile",earthquake,,8.7,,3,reviewed,us,us
372
+ 1989-03-06T09:16:07.970Z,-42.186,-73.441,10,4.8,mb,,,,1,us,usp0003snm,2014-11-07T00:43:46.805Z,"27 km NE of Dalcahue, Chile",earthquake,,,,6,reviewed,us,us
373
+ 1989-03-06T11:44:05.430Z,-3.111,-80.488,38.7,4.7,mb,,,,0.9,us,usp0003snr,2014-11-07T00:43:46.825Z,"49 km NNW of Aguas Verdes, Peru",earthquake,,,,12,reviewed,us,us
374
+ 1989-03-07T12:24:37.940Z,-29.456,-70.701,106.6,5,mb,,,,0.7,us,usp0003sq3,2014-11-07T00:43:47.651Z,"64 km N of Vicuña, Chile",earthquake,,8.2,,2,reviewed,us,us
375
+ 1989-03-07T22:54:24.110Z,-40.397,-75.51,10,5,mb,,,,1.1,us,usp0003sqn,2014-11-07T00:43:47.747Z,"185 km WSW of Corral, Chile",earthquake,,,,5,reviewed,us,us
376
+ 1989-03-14T11:42:56.940Z,-32.11,-71.631,33,4.9,mb,,,,0.9,us,usp0003sxj,2014-11-07T00:43:49.011Z,"53 km NW of La Ligua, Chile",earthquake,,,,6,reviewed,us,us
377
+ 1989-03-19T10:16:43.800Z,-21.089,-68.424,118.2,4.9,mb,,,,0.9,us,usp0003t2p,2014-11-07T00:43:50.000Z,"160 km NNE of Calama, Chile",earthquake,,,,13,reviewed,us,us
378
+ 1989-03-23T17:50:03.470Z,-5.383,-80.523,70.6,4.9,mb,,,,0.7,us,usp0003t7y,2014-11-07T00:43:50.779Z,"21 km SE of Catacaos, Peru",earthquake,,9.7,,14,reviewed,us,us
379
+ 1989-03-23T21:22:38.270Z,-28.858,-67.326,134.3,4.9,mb,,,,1.2,us,usp0003t83,2014-11-07T00:43:50.790Z,"37 km NNE of Chilecito, Argentina",earthquake,,,,10,reviewed,us,us
380
+ 1989-03-25T16:31:42.920Z,6.762,-73.105,161.6,4.9,mb,,,,1,us,usp0003t9q,2014-11-07T00:43:51.074Z,"3 km NNW of Jordán, Colombia",earthquake,,4.5,,17,reviewed,us,us
381
+ 1989-03-26T06:39:49.150Z,-14.765,-73.963,108,5.4,mw,,,,0.9,us,usp0003tae,2025-12-19T21:07:02.919Z,"5 km NW of Tambo, Peru",earthquake,,,,,reviewed,us,hrv
382
+ 1989-03-26T23:58:55.670Z,5.557,-77.593,10,4.8,mb,,,,0.9,us,usp0003tbf,2014-11-07T00:43:51.367Z,"39 km WSW of Nuquí, Colombia",earthquake,,,,2,reviewed,us,us
383
+ 1989-03-29T04:06:12.320Z,-18.35,-72.279,41.8,5.4,mw,,,,1.1,us,usp0003tdw,2025-12-19T21:07:06.807Z,"125 km SW of Pacocha, Peru",earthquake,,,,,reviewed,us,hrv
384
+ 1989-03-31T05:45:58.110Z,5.584,-77.483,26.6,4.8,mb,,,,1.4,us,usp0003tg1,2014-11-07T00:43:51.898Z,"27 km WSW of Nuquí, Colombia",earthquake,,8.8,,2,reviewed,us,us
385
+ 1989-03-31T09:31:56.010Z,-24.115,-66.672,197.7,4.6,mb,,,,0.7,us,usp0003tgb,2014-11-07T00:43:51.927Z,"37 km WNW of San Antonio de los Cobres, Argentina",earthquake,,5.8,,9,reviewed,us,us
386
+ 1989-04-01T21:58:14.190Z,-32.797,-69.947,109.7,5.3,mw,,,,1,us,usp0003thm,2025-12-19T21:06:10.392Z,"61 km E of Los Andes, Chile",earthquake,,,,,reviewed,us,hrv
387
+ 1989-04-05T11:27:48.090Z,-20.79,-69.923,36.9,4.8,mb,,,,1.1,us,usp0003tmm,2014-11-07T00:43:56.241Z,"68 km SSE of Iquique, Chile",earthquake,,,,11,reviewed,us,us
388
+ 1989-04-05T23:47:49.390Z,-20.857,-69.028,112,6.2,mw,,,,1.1,us,usp0003tn3,2022-04-28T20:19:56.369Z,"137 km ESE of Iquique, Chile",earthquake,,,,,reviewed,us,hrv
389
+ 1989-04-06T16:54:29.910Z,-19.072,-67.13,242.4,4.8,mb,,,,1.1,us,usp0003tnv,2014-11-07T00:43:56.968Z,"42 km WSW of Challapata, Bolivia",earthquake,,6,,3,reviewed,us,us
390
+ 1989-04-06T18:50:44.480Z,-40.321,-75.036,33,5.2,mb,,,,1.1,us,usp0003tnz,2014-11-07T00:43:56.992Z,"145 km WSW of Corral, Chile",earthquake,,,,16,reviewed,us,us
391
+ 1989-04-07T12:54:41.610Z,6.809,-73.036,150.6,4.9,mb,,,,1.1,us,usp0003tpt,2014-11-07T00:43:57.996Z,"9 km NW of Cepitá, Colombia",earthquake,,7.5,,22,reviewed,us,us
392
+ 1989-04-08T00:24:32.540Z,-32.012,-71.545,72.4,5.5,mb,,,,1,us,usp0003tqq,2022-04-28T20:20:11.337Z,"54 km SW of Illapel, Chile",earthquake,,9.8,,15,reviewed,us,us
393
+ 1989-04-13T00:43:11.280Z,-39.533,-75.002,33,5.8,mw,,,,1,us,usp0003twh,2022-04-28T20:20:25.344Z,"Off the coast of Los Lagos, Chile",earthquake,,,,,reviewed,us,hrv
394
+ 1989-04-14T07:56:45.120Z,6.954,-72.998,150.3,4.6,mb,,,,1,us,usp0003tyf,2014-11-07T00:43:59.923Z,"6 km ESE of Piedecuesta, Colombia",earthquake,,15.5,,4,reviewed,us,us
395
+ 1989-04-17T04:55:26.770Z,-30.644,-71.683,43.8,5.2,mw,,,,1.4,us,usp0003u1u,2022-04-28T20:20:41.903Z,"46 km W of Ovalle, Chile",earthquake,,12,,,reviewed,us,hrv
396
+ 1989-04-18T09:54:51.980Z,-30.648,-71.99,40.6,4.6,mb,,,,1.2,us,usp0003u3b,2014-11-07T00:44:00.583Z,"76 km W of Ovalle, Chile",earthquake,,12.9,,7,reviewed,us,us
397
+ 1989-04-20T08:08:51.090Z,-9.259,-79.033,63,5.6,mw,,,,1,us,usp0003u5p,2022-04-28T20:20:46.540Z,"51 km SW of Puerto Santa, Peru",earthquake,,,,,reviewed,us,hrv
398
+ 1989-04-20T13:06:00.380Z,-46.223,-75.631,33,4.9,ms,,,,1.6,us,usp0003u62,2014-11-07T00:44:00.884Z,"234 km WSW of Puerto Chacabuco, Chile",earthquake,,,,1,reviewed,us,us
399
+ 1989-04-20T15:02:16.520Z,-45.712,-75.56,10,5.5,mb,,,,1.6,us,usp0003u64,2022-04-28T20:20:52.408Z,"Off the coast of Aisen, Chile",earthquake,,,,14,reviewed,us,us
400
+ 1989-04-26T19:35:19.890Z,-27.942,-66.846,191.8,4.6,mb,,,,0.9,us,usp0003uex,2014-11-07T00:44:02.169Z,"37 km SE of Londres, Argentina",earthquake,,8.7,,2,reviewed,us,us
401
+ 1989-04-27T08:38:44.740Z,-24.008,-67.182,178.4,4.8,mb,,,,0.9,us,usp0003ufr,2014-11-07T00:44:02.426Z,"90 km WNW of San Antonio de los Cobres, Argentina",earthquake,,5.5,,8,reviewed,us,us
402
+ 1989-04-28T03:54:31.820Z,-23.523,-68.008,121.8,4.8,mb,,,,1,us,usp0003uhm,2014-11-07T00:44:02.595Z,"70 km SSE of San Pedro de Atacama, Chile",earthquake,,6.5,,7,reviewed,us,us
403
+ 1989-04-29T22:01:45.720Z,-0.903,-80.406,33,4.6,mb,,,,1.3,us,usp0003ung,2014-11-07T00:44:03.202Z,"5 km ENE of Rocafuerte, Ecuador",earthquake,,,,7,reviewed,us,us
404
+ 1989-04-30T00:29:44.990Z,11.297,-68.071,10,4.9,mb,,,,1.3,us,usp0003unr,2014-11-07T00:44:03.218Z,"46 km NNE of Chichiriviche, Venezuela",earthquake,,,,18,reviewed,us,us
405
+ 1989-04-30T08:22:54.010Z,10.96,-68.325,20.3,6,ms,,,,1,us,usp0003upc,2022-04-28T20:22:25.163Z,"6 km WNW of Chichiriviche, Venezuela",earthquake,,,,31,reviewed,us,us
406
+ 1989-04-30T09:30:06.490Z,11.758,-68.416,10,4.6,mb,,,,1.2,us,usp0003upe,2014-11-07T00:44:03.682Z,"44 km SSW of Dorp Tera Kora, Bonaire, Saint Eustatius and Saba ",earthquake,,,,3,reviewed,us,us
407
+ 1989-04-30T11:49:25.920Z,-30.743,-72.066,62,4.8,mb,,,,1.4,us,usp0003upm,2014-11-07T00:44:03.696Z,"84 km W of Ovalle, Chile",earthquake,,16.3,,1,reviewed,us,us
408
+ 1989-04-30T21:24:52.680Z,11.238,-68.053,10,4.6,mb,,,,1.3,us,usp0003uq7,2014-11-07T00:44:03.780Z,"41 km NE of Chichiriviche, Venezuela",earthquake,,,,3,reviewed,us,us
409
+ 1989-05-02T02:33:30.610Z,-41.737,-73.589,28.6,5.1,mb,,,,1,us,usp0003urz,2014-11-07T00:44:06.262Z,"24 km NE of Ancud, Chile",earthquake,,,,14,reviewed,us,us
410
+ 1989-05-02T06:58:41.350Z,-26.521,-67.466,139.3,5.1,mb,,,,1.4,us,usp0003usa,2014-11-07T00:44:06.623Z,"51 km S of Antofagasta de la Sierra, Argentina",earthquake,,10.3,,7,reviewed,us,us
411
+ 1989-05-04T00:22:06.740Z,11.038,-68.27,15.5,5.5,mw,,,,1,us,usp0003uvd,2022-04-28T20:16:58.204Z,"12 km N of Chichiriviche, Venezuela",earthquake,,4.2,,,reviewed,us,hrv
412
+ 1989-05-04T10:30:06.960Z,-6.609,-75.76,33,5.2,mw,,,,0.8,us,usp0003uw1,2022-04-28T20:16:59.303Z,"30 km S of Navarro, Peru",earthquake,,,,,reviewed,us,hrv
413
+ 1989-05-04T18:32:55.690Z,-13.039,-76.195,72.1,5.1,mw,,,,1,us,usp0003uwq,2025-12-19T21:05:35.218Z,"13 km ENE of Nuevo Imperial, Peru",earthquake,,3.9,,,reviewed,us,hrv
414
+ 1989-05-05T18:28:39.450Z,-8.281,-71.381,593.4,7.1,mw,,,,1,us,usp0003uxu,2022-04-28T20:17:07.050Z,"69 km W of Tarauacá, Brazil",earthquake,,,,,reviewed,us,hrv
415
+ 1989-05-05T19:10:45.010Z,-7.254,-71.08,600,4.9,mb,,,,0.8,us,usp0003uxv,2014-11-07T00:44:09.243Z,"Amazonas, Brazil",earthquake,,,,5,reviewed,us,us
416
+ 1989-05-07T12:27:32.960Z,-8.69,-75.443,127,4.8,mb,,,,0.7,us,usp0003uzt,2014-11-07T00:44:09.631Z,"29 km WNW of San Alejandro, Peru",earthquake,,,,21,reviewed,us,us
417
+ 1989-05-10T22:18:46.190Z,-23.282,-69.19,95.7,5.3,mb,,,,1,us,usp0003v4g,2014-11-07T00:44:10.387Z,"95 km SSW of Calama, Chile",earthquake,,,,39,reviewed,us,us
418
+ 1989-05-15T06:13:31.370Z,-18.365,-67.937,203,4.8,mb,,,,1.1,us,usp0003v8d,2014-11-07T00:44:12.391Z,"76 km SE of Curahuara de Carangas, Bolivia",earthquake,,,,37,reviewed,us,us
419
+ 1989-05-17T08:24:24.120Z,-22.872,-66.306,256.9,4.5,mb,,,,1,us,usp0003vau,2014-11-07T00:44:12.921Z,"64 km WSW of Abra Pampa, Argentina",earthquake,,7.1,,4,reviewed,us,us
420
+ 1989-05-18T07:46:19.270Z,-7.724,-74.403,160.4,4.8,mb,,,,0.9,us,usp0003vbs,2014-11-07T00:44:13.000Z,"74 km NNE of Pucallpa, Peru",earthquake,,9.9,,6,reviewed,us,us
421
+ 1989-05-19T02:46:47.960Z,-1.71,-77.832,163.9,4.7,mb,,,,0.7,us,usp0003vcp,2014-11-07T00:44:13.129Z,"14 km E of Palora, Ecuador",earthquake,,3.6,,37,reviewed,us,us
422
+ 1989-05-19T11:50:54.380Z,-24.839,-70.019,52.3,5.4,mw,,,,1,us,usp0003vcz,2022-04-28T20:17:47.728Z,"78 km NE of Taltal, Chile",earthquake,,,,,reviewed,us,hrv
423
+ 1989-05-20T15:35:41.500Z,-6.727,-75.752,33,5,mb,,,,1.3,us,usp0003vdx,2014-11-07T00:44:13.351Z,"43 km S of Navarro, Peru",earthquake,,,,11,reviewed,us,us
424
+ 1989-05-23T17:52:21.200Z,-2.777,-77.431,118,4.5,mb,,,,0.9,us,usp0003vjq,2014-11-07T00:44:14.277Z,"89 km ESE of Sucúa, Ecuador",earthquake,,7.5,,5,reviewed,us,us
425
+ 1989-05-25T15:30:21.730Z,-1.392,-79.285,38.1,4.9,mb,,,,1.2,us,usp0003vmz,2014-11-07T00:44:14.666Z,"20 km ENE of Ventanas, Ecuador",earthquake,,13.5,,17,reviewed,us,us
426
+ 1989-05-28T01:22:09.110Z,-15.56,-73.918,110,4.6,mb,,,,1.4,us,usp0003vqc,2014-11-07T00:44:15.115Z,"14 km WNW of Quicacha, Peru",earthquake,,18.7,,1,reviewed,us,us
427
+ 1989-05-29T22:22:30.720Z,-23.897,-70.337,32,5.6,mw,,,,1.1,us,usp0003vsu,2022-04-28T20:19:35.414Z,"27 km SSE of Antofagasta, Chile",earthquake,,,,,reviewed,us,hrv
428
+ 1989-05-31T04:15:14.860Z,6.804,-73.023,171.5,5.1,mb,,,,0.8,us,usp0003vu1,2014-11-07T00:44:15.659Z,"7 km NW of Cepitá, Colombia",earthquake,,,,20,reviewed,us,us
429
+ 1989-05-31T16:51:05.000Z,-27.998,-66.601,167.9,4.5,mb,,,,1.4,us,usp0003vup,2014-11-07T00:44:15.757Z,"53 km SSW of Andalgalá, Argentina",earthquake,,7,,5,reviewed,us,us
430
+ 1989-06-01T16:43:07.150Z,-31.905,-71.732,69.2,4.5,mb,,,,1.3,us,usp0003vvu,2014-11-07T00:44:17.758Z,"61 km WSW of Illapel, Chile",earthquake,,11.5,,2,reviewed,us,us
431
+ 1989-06-01T20:56:00.230Z,-23.887,-70.267,43.6,5.2,mb,,,,1.1,us,usp0003vw5,2022-04-28T20:14:54.259Z,"29 km SSE of Antofagasta, Chile",earthquake,,6.1,,21,reviewed,us,us
432
+ 1989-06-01T21:14:09.940Z,9.604,-74.27,34.1,4.7,mb,,,,1.2,us,usp0003vw6,2014-11-07T00:44:17.961Z,"25 km SSE of Nueva Granada, Colombia",earthquake,,17.6,,12,reviewed,us,us
433
+ 1989-06-02T14:02:17.340Z,11.8,-73.147,60.1,4.5,mb,,,,0.9,us,usp0003vx4,2014-11-07T00:44:19.620Z,"38 km NW of Riohacha, Colombia",earthquake,,10.4,,5,reviewed,us,us
434
+ 1989-06-02T21:55:44.920Z,-9.923,-74.562,40.1,5.2,mb,,,,1,us,usp0003vxg,2022-04-28T20:15:04.788Z,"55 km SE of Yuyapichis, Peru",earthquake,,8.3,,36,reviewed,us,us
435
+ 1989-06-07T17:40:04.980Z,-9.202,-78.94,67.4,5,mb,,,,0.9,us,usp0003w26,2014-11-07T00:44:21.297Z,"39 km SW of Puerto Santa, Peru",earthquake,,,,5,reviewed,us,us
436
+ 1989-06-07T18:53:12.670Z,-40.048,-74.623,33,4.9,mb,,,,1.4,us,usp0003w2b,2014-11-07T00:44:21.326Z,"103 km W of Corral, Chile",earthquake,,,,5,reviewed,us,us
437
+ 1989-06-14T12:54:41.440Z,-10.359,-78.618,33,4.7,mb,,,,0.7,us,usp0003w92,2014-11-07T00:44:22.682Z,"60 km WSW of Huarmey, Peru",earthquake,,,,4,reviewed,us,us
438
+ 1989-06-15T15:51:58.600Z,6.8,-73.019,162,5.3,mw,,,,0.9,us,usp0003w9x,2025-12-19T21:05:17.167Z,"7 km NW of Cepitá, Colombia",earthquake,,,,,reviewed,us,hrv
439
+ 1989-06-17T14:57:48.410Z,-31.419,-67.55,27.9,5.3,mb,,,,0.9,us,usp0003wc2,2022-04-28T20:16:02.097Z,"74 km ENE of Caucete, Argentina",earthquake,,5.8,,16,reviewed,us,us
440
+ 1989-06-17T18:28:08.620Z,-40.494,-74.674,33,5.6,mw,,,,1.2,us,usp0003wc9,2022-04-28T20:16:03.365Z,"125 km WSW of Corral, Chile",earthquake,,,,,reviewed,us,hrv
441
+ 1989-06-18T21:11:58.870Z,2.023,-79.017,33,4.7,mb,,,,1.4,us,usp0003wds,2014-11-07T00:44:23.392Z,"35 km NW of Tumaco, Colombia",earthquake,,,,5,reviewed,us,us
442
+ 1989-06-19T16:00:47.940Z,-22.113,-67.559,188.5,5.7,mw,,,,1.1,us,usp0003wef,2022-04-28T20:16:05.660Z,"110 km NE of San Pedro de Atacama, Chile",earthquake,,,,,reviewed,us,hrv
443
+ 1989-06-22T12:25:25.610Z,-20.303,-71.028,33,4.5,mb,,,,1.3,us,usp0003wh1,2014-11-07T00:44:23.747Z,"92 km W of Iquique, Chile",earthquake,,,,4,reviewed,us,us
444
+ 1989-06-22T15:08:46.130Z,-6.704,-81.593,32.2,4.9,mb,,,,1.1,us,usp0003wh8,2014-11-07T00:44:23.759Z,"152 km SW of Sechura, Peru",earthquake,,,,9,reviewed,us,us
445
+ 1989-06-22T19:51:48.510Z,-27.171,-71.369,36.1,5.1,mb,,,,1.2,us,usp0003whc,2014-11-07T00:44:23.770Z,"105 km WNW of Copiapó, Chile",earthquake,,,,6,reviewed,us,us
446
+ 1989-06-24T12:58:39.080Z,-28.336,-66.312,21.7,5.5,mw,,,,1,us,usp0003wkh,2022-04-28T20:16:19.918Z,"11 km NW of Pomán, Argentina",earthquake,,,,,reviewed,us,hrv
447
+ 1989-06-24T15:02:07.740Z,1.974,-79.066,25.2,5.3,mb,,,,1.1,us,usp0003wkn,2014-11-07T00:44:24.008Z,"36 km WNW of Tumaco, Colombia",earthquake,,,,43,reviewed,us,us
448
+ 1989-06-25T06:41:16.120Z,-33.269,-68.492,10,4.5,mb,,,,1,us,usp0003wmj,2014-11-07T00:44:24.094Z,"20 km S of San Martín, Argentina",earthquake,,,,4,reviewed,us,us
449
+ 1989-06-25T19:34:30.170Z,-28.034,-67.207,258.7,4.7,mb,,,,1.2,us,usp0003wnb,2014-11-07T00:44:24.172Z,"35 km E of Tinogasta, Argentina",earthquake,,14.8,,1,reviewed,us,us
450
+ 1989-06-25T20:37:32.460Z,1.134,-79.616,15.1,6.3,mw,,,,1,us,usp0003wnd,2022-04-28T20:16:22.145Z,"19 km NNE of Esmeraldas, Ecuador",earthquake,,,,,reviewed,us,nc
451
+ 1989-06-26T12:21:07.610Z,6.833,-73.009,163.4,4.7,mb,,,,1.1,us,usp0003wp7,2014-11-07T00:44:24.356Z,"9 km NNW of Cepitá, Colombia",earthquake,,8.4,,6,reviewed,us,us
452
+ 1989-06-26T14:01:14.560Z,-2.322,-79.329,114.4,4.8,mb,,,,0.9,us,usp0003wpa,2014-11-07T00:44:24.362Z,"11 km N of La Troncal, Ecuador",earthquake,,13.7,,4,reviewed,us,us
453
+ 1989-06-27T08:10:17.040Z,-15.94,-75.086,34,4.8,mb,,,,1,us,usp0003wpz,2014-11-07T00:44:24.439Z,"64 km S of San Juan, Peru",earthquake,,7.1,,11,reviewed,us,us
454
+ 1989-06-28T15:16:18.410Z,4.535,-76.066,129.4,4.7,mb,,,,0.9,us,usp0003wrk,2014-11-07T00:44:24.605Z,"3 km WNW of La Victoria, Colombia",earthquake,,5.6,,7,reviewed,us,us
455
+ 1989-07-01T20:52:35.430Z,-26.164,-70.6,46.2,5,mb,,,,1.2,us,usp0003wv8,2014-11-07T00:44:28.558Z,"59 km WNW of Diego de Almagro, Chile",earthquake,,8.1,,6,reviewed,us,us
456
+ 1989-07-02T14:07:27.330Z,-1.385,-77.977,190.4,4.5,mb,,,,0.6,us,usp0003ww5,2014-11-07T00:44:29.216Z,"11 km NNE of Puyo, Ecuador",earthquake,,4.7,,5,reviewed,us,us
457
+ 1989-07-03T11:14:06.220Z,-31.498,-71.489,62.9,4.9,mb,,,,1.1,us,usp0003www,2014-11-07T00:44:29.447Z,"33 km WNW of Illapel, Chile",earthquake,,,,10,reviewed,us,us
458
+ 1989-07-05T00:13:37.500Z,-10.407,-77.519,102.8,4.7,mb,,,,1.2,us,usp0003wz0,2014-11-07T00:44:30.053Z,"5 km SW of Copa, Peru",earthquake,,10.5,,3,reviewed,us,us
459
+ 1989-07-05T09:52:43.840Z,-30.563,-71.949,149.8,4.9,mb,,,,1.2,us,usp0003wzj,2014-11-07T00:44:30.616Z,"72 km W of Ovalle, Chile",earthquake,,14.8,,1,reviewed,us,us
460
+ 1989-07-08T22:50:44.280Z,-22.279,-68.296,118.5,4.7,mb,,,,1.3,us,usp0003x4h,2014-11-07T00:44:32.353Z,"Antofagasta, Chile",earthquake,,,,6,reviewed,us,us
461
+ 1989-07-21T01:45:46.940Z,-15.609,-73.387,136.9,4.7,mb,,,,1.1,us,usp0003xh4,2014-11-07T00:44:33.862Z,"15 km SE of Cahuacho, Peru",earthquake,,9.7,,1,reviewed,us,us
462
+ 1989-07-21T02:45:02.940Z,-11.552,-73.882,28.7,4.8,mb,,,,1,us,usp0003xh6,2014-11-07T00:44:33.872Z,"64 km SE of Puerto Ocopa, Peru",earthquake,,8.6,,8,reviewed,us,us
463
+ 1989-07-21T02:52:58.610Z,-1.371,-77.682,181.3,4.5,mb,,,,1,us,usp0003xh7,2014-11-07T00:44:33.876Z,"38 km ENE of Puyo, Ecuador",earthquake,,4.7,,8,reviewed,us,us
464
+ 1989-07-21T10:40:58.910Z,-34.364,-70.376,5,4.5,mb,,,,1.4,us,usp0003xhk,2014-11-07T00:44:33.937Z,"32 km SE of Machalí, Chile",earthquake,,4.8,,4,reviewed,us,us
465
+ 1989-07-22T09:41:35.450Z,-34.299,-70.258,12.3,4.9,mb,,,,1,us,usp0003xjn,2014-11-07T00:44:34.073Z,"38 km ESE of Machalí, Chile",earthquake,,2.4,,8,reviewed,us,us
466
+ 1989-07-23T03:23:04.810Z,-33.164,-70.284,102.4,4.7,mb,,,,0.9,us,usp0003xkj,2014-11-07T00:44:34.183Z,"36 km ENE of Chicureo Abajo, Chile",earthquake,,5.2,,2,reviewed,us,us
467
+ 1989-07-23T17:28:44.780Z,-31.302,-68.888,115.1,4.5,mb,,,,1,us,usp0003xmg,2014-11-07T00:44:34.244Z,"31 km NNW of Villa Basilio Nievas, Argentina",earthquake,,6.6,,1,reviewed,us,us
468
+ 1989-07-23T19:19:41.380Z,0.371,-80.459,33,4.8,mb,,,,1.1,us,usp0003xmk,2014-11-07T00:44:34.253Z,"55 km WSW of Muisne, Ecuador",earthquake,,,,1,reviewed,us,us
469
+ 1989-07-24T01:36:40.650Z,-7.524,-76.32,140.1,4.8,mb,,,,1,us,usp0003xmv,2014-11-07T00:44:34.278Z,"55 km ESE of Huicungo, Peru",earthquake,,,,28,reviewed,us,us
470
+ 1989-07-26T10:24:58.850Z,-38.222,-73.027,39.9,4.5,mb,,,,1.1,us,usp0003xqb,2014-11-07T00:44:34.601Z,"31 km W of Traiguén, Chile",earthquake,,14.8,,4,reviewed,us,us
471
+ 1989-07-28T23:20:23.910Z,-29.28,-71.095,65.9,4.6,mb,,,,1.1,us,usp0003xt7,2014-11-07T00:44:35.215Z,"70 km NNE of La Serena, Chile",earthquake,,15.9,,1,reviewed,us,us
472
+ 1989-07-29T11:28:30.570Z,1.565,-79.693,43.9,4.8,mb,,,,0.7,us,usp0003xtt,2014-11-07T00:44:35.273Z,"67 km N of Esmeraldas, Ecuador",earthquake,,15.3,,3,reviewed,us,us
473
+ 1989-07-29T14:55:48.900Z,-22.551,-66.019,250,4.6,mb,,,,1.2,us,usp0003xty,2014-11-07T00:44:35.283Z,"38 km WNW of Abra Pampa, Argentina",earthquake,,16.5,,6,reviewed,us,us
474
+ 1989-08-04T12:14:24.340Z,-29.576,-68.741,59.5,4.7,mb,,,,1.3,us,usp0003y1v,2014-11-07T00:44:39.667Z,"73 km N of San José de Jáchal, Argentina",earthquake,,18.4,,1,reviewed,us,us
475
+ 1989-08-06T08:19:56.120Z,-23.157,-68.321,114.6,5.3,mb,,,,1.2,us,usp0003y4t,2022-04-28T20:12:11.061Z,"29 km SSW of San Pedro de Atacama, Chile",earthquake,,,,17,reviewed,us,us
476
+ 1989-08-06T19:43:18.200Z,-31.684,-70.891,100.5,5,mb,,,,0.9,us,usp0003y57,2014-11-07T00:44:40.709Z,"12 km NNE of Salamanca, Chile",earthquake,,6.3,,4,reviewed,us,us
477
+ 1989-08-07T08:36:59.800Z,-24.442,-66.978,173.7,4.8,mb,,,,1.3,us,usp0003y6b,2014-11-07T00:44:40.877Z,"71 km WSW of San Antonio de los Cobres, Argentina",earthquake,,7.3,,6,reviewed,us,us
478
+ 1989-08-08T23:44:04.450Z,-22.723,-68.478,102,5.4,mw,,,,1.1,us,usp0003y8s,2025-12-19T21:04:45.058Z,"35 km NW of San Pedro de Atacama, Chile",earthquake,,,,,reviewed,us,hrv
479
+ 1989-08-12T03:55:43.470Z,-1.413,-77.824,169.7,4.5,mb,,,,0.8,us,usp0003ycr,2014-11-07T00:44:41.624Z,"21 km ENE of Puyo, Ecuador",earthquake,,4.9,,4,reviewed,us,us
480
+ 1989-08-12T23:02:43.160Z,-30.95,-71.609,45,4.9,mb,,,,1.4,us,usp0003ydr,2022-04-28T20:12:29.314Z,"55 km SW of Ovalle, Chile",earthquake,,,,5,reviewed,us,us
481
+ 1989-08-13T20:47:52.080Z,-25.073,-71.323,33,4.6,mb,,,,1.3,us,usp0003yej,2014-11-07T00:44:41.848Z,"92 km WNW of Taltal, Chile",earthquake,,,,1,reviewed,us,us
482
+ 1989-08-15T16:47:33.700Z,10.359,-72.964,90.8,5.1,mb,,,,1.2,us,usp0003ygn,2014-11-07T00:44:43.195Z,"8 km ESE of Manaure Balcón del Cesar, Colombia",earthquake,,13.4,,2,reviewed,us,us
483
+ 1989-08-16T00:17:21.760Z,-2.268,-77.606,41.9,4.9,mb,,,,1.1,us,usp0003yh4,2014-11-07T00:44:43.256Z,"56 km E of Macas, Ecuador",earthquake,,7.8,,16,reviewed,us,us
484
+ 1989-08-19T17:29:55.910Z,-27.641,-67.486,161.3,4.8,mb,,,,1.3,us,usp0003ymp,2014-11-07T00:44:43.601Z,"13 km ENE of Fiambalá, Argentina",earthquake,,8.9,,2,reviewed,us,us
485
+ 1989-08-20T06:21:45.830Z,-23.372,-70.967,59.9,4.7,mb,,,,1.2,us,usp0003ynd,2014-11-07T00:44:43.694Z,"66 km WNW of Antofagasta, Chile",earthquake,,12.1,,2,reviewed,us,us
486
+ 1989-08-22T00:42:02.840Z,6.762,-72.967,156.5,4.9,mb,,,,1,us,usp0003yrd,2014-11-07T00:44:44.395Z,"1 km NE of Cepitá, Colombia",earthquake,,,,40,reviewed,us,us
487
+ 1989-08-22T02:23:34.690Z,6.662,-73.259,189.1,5,mb,,,,1.3,us,usp0003yrj,2014-11-07T00:44:44.419Z,"4 km NE of Galán, Colombia",earthquake,,6.2,,10,reviewed,us,us
488
+ 1989-08-26T02:59:54.080Z,4.295,-76.61,113.8,4.6,mb,,,,1.3,us,usp0003yx3,2014-11-07T00:44:45.005Z,"33 km WNW of Trujillo, Colombia",earthquake,,11.7,,4,reviewed,us,us
489
+ 1989-08-26T15:43:42.970Z,-22.794,-68.199,148.1,4.7,mb,,,,1.8,us,usp0003yxr,2014-11-07T00:44:45.055Z,"Antofagasta, Chile",earthquake,,15.5,,2,reviewed,us,us
490
+ 1989-08-26T20:10:36.130Z,-21.96,-68.423,114.4,5.1,mb,,,,1,us,usp0003yy0,2014-11-07T00:44:45.073Z,"75 km NE of Calama, Chile",earthquake,,,,12,reviewed,us,us
491
+ 1989-08-27T12:41:29.550Z,-17.616,-70.453,118.8,4.9,mb,,,,1.5,us,usp0003yz7,2014-11-07T00:44:45.242Z,"19 km NNE of Sama Grande, Peru",earthquake,,8.7,,8,reviewed,us,us
492
+ 1989-08-29T06:10:12.300Z,-40.881,-71.5,137.8,4.6,mb,,,,1.2,us,usp0003z0z,2014-11-07T00:44:45.394Z,"18 km SE of Villa La Angostura, Argentina",earthquake,,13.2,,8,reviewed,us,us
493
+ 1989-08-31T02:10:58.970Z,-24.127,-66.981,190,4.6,mb,,,,1.4,us,usp0003z30,2014-11-07T00:44:45.651Z,"68 km W of San Antonio de los Cobres, Argentina",earthquake,,7.7,,4,reviewed,us,us
494
+ 1989-08-31T08:17:22.540Z,-41.85,-71.678,154.4,5.4,mb,,,,1.2,us,usp0003z35,2014-11-07T00:44:45.663Z,"17 km NW of El Bolsón, Argentina",earthquake,,,,21,reviewed,us,us
495
+ 1989-08-31T16:02:10.250Z,3.879,-76.059,130.7,4.6,mb,,,,0.6,us,usp0003z3e,2014-11-07T00:44:45.697Z,"17 km NNW of La Cumbre, Colombia",earthquake,,4.1,,2,reviewed,us,us
496
+ 1989-09-01T10:48:32.390Z,-20.55,-69.108,105.9,4.9,mb,,,,1.4,us,usp0003z41,2014-11-07T00:44:47.804Z,"115 km ESE of Iquique, Chile",earthquake,,8,,11,reviewed,us,us
497
+ 1989-09-01T14:42:22.260Z,-28.012,-70.134,94.8,5,mb,,,,1,us,usp0003z49,2014-11-07T00:44:48.050Z,"74 km SSE of Copiapó, Chile",earthquake,,7.7,,5,reviewed,us,us
498
+ 1989-09-09T01:40:35.770Z,2.435,-79.761,6.5,5.9,mw,,,,0.9,us,usp0003zc9,2022-04-28T20:11:08.345Z,"129 km WNW of Tumaco, Colombia",earthquake,,,,,reviewed,us,nc
499
+ 1989-09-09T02:19:01.170Z,2.434,-79.657,10,4.7,mb,,,,1,us,usp0003zca,2014-11-07T00:44:50.961Z,"119 km WNW of Salahonda, Colombia",earthquake,,,,5,reviewed,us,us
500
+ 1989-09-09T22:47:49.570Z,-23.023,-66.019,254.6,4.6,mb,,,,1.1,us,usp0003zd4,2014-11-07T00:44:51.053Z,"40 km WNW of El Aguilar, Argentina",earthquake,,5.7,,9,reviewed,us,us
501
+ 1989-09-14T04:42:39.850Z,-26.141,-70.746,33,5.5,mw,,,,1.3,us,usp0003zj9,2022-04-28T20:11:16.116Z,"73 km WNW of Diego de Almagro, Chile",earthquake,,,,,reviewed,us,hrv
502
+ 1989-09-16T01:49:15.890Z,-0.592,-77.469,10,5.4,mb,,,,1.1,us,usp0003zmr,2022-04-28T20:11:28.563Z,"38 km WNW of Boca Suno, Ecuador",earthquake,,,,49,reviewed,us,us
503
+ 1989-09-18T10:28:33.140Z,-39.771,-72.287,33,4.7,mb,,,,1.1,us,usp0003zqq,2014-11-07T00:44:52.965Z,"14 km SSE of Panguipulli, Chile",earthquake,,,,4,reviewed,us,us
504
+ 1989-09-19T08:32:25.430Z,-31.467,-67.488,44.1,4.8,mb,,,,1.2,us,usp0003zsb,2014-11-07T00:44:53.255Z,"78 km ENE of Caucete, Argentina",earthquake,,6.1,,6,reviewed,us,us
505
+ 1989-09-22T07:02:59.390Z,-31.018,-67.797,5,5,mb,,,,1.6,us,usp0003zvw,2014-11-07T00:44:53.715Z,"52 km SW of San Agustín de Valle Fértil, Argentina",earthquake,,,,7,reviewed,us,us
506
+ 1989-09-22T15:43:39.230Z,-16.618,-69.487,210,4.6,mb,,,,1.2,us,usp0003zwb,2014-11-07T00:44:53.748Z,"28 km ENE of Mazo Cruz, Peru",earthquake,,5.7,,7,reviewed,us,us
507
+ 1989-09-22T16:20:57.910Z,-21.967,-68.609,33,4.6,mb,,,,1.2,us,usp0003zwc,2014-11-07T00:44:53.752Z,"63 km NNE of Calama, Chile",earthquake,,,,1,reviewed,us,us
508
+ 1989-09-23T11:11:53.110Z,6.886,-76.561,10,4.5,mb,,,,1.1,us,usp0003zx6,2014-11-07T00:44:53.825Z,"30 km ESE of Murindó, Colombia",earthquake,,,,8,reviewed,us,us
509
+ 1989-09-24T20:37:12.070Z,6.989,-73.123,175.7,4.8,mb,,,,0.9,us,usp0003zzb,2014-11-07T00:44:54.055Z,"8 km W of Piedecuesta, Colombia",earthquake,,8.8,,1,reviewed,us,us
510
+ 1989-09-25T01:46:31.720Z,-33.717,-68.615,52,4.5,mb,,,,0.8,us,usp0003zzm,2014-11-07T00:44:54.080Z,"71 km S of San Martín, Argentina",earthquake,,10.5,,4,reviewed,us,us
511
+ 1989-09-27T23:46:06.740Z,-23.194,-66.631,220.5,4.6,mb,,,,1.1,us,usp000403n,2014-11-07T00:44:54.894Z,"97 km W of El Aguilar, Argentina",earthquake,,6.4,,6,reviewed,us,us
512
+ 1989-10-02T15:22:01.940Z,4.854,-78.412,9.8,4.7,mb,,,,1,us,usp000408t,2014-11-07T00:44:57.793Z,"116 km W of Pizarro, Colombia",earthquake,,4.3,,7,reviewed,us,us
513
+ 1989-10-03T21:33:34.770Z,-24.103,-66.891,154.6,5.4,mw,,,,1,us,usp00040a5,2025-12-19T21:04:13.222Z,"59 km WNW of San Antonio de los Cobres, Argentina",earthquake,,,,,reviewed,us,hrv
514
+ 1989-10-05T13:02:04.510Z,-22.362,-70.237,53.3,4.8,mb,,,,1.4,us,usp00040bs,2014-11-07T00:44:58.914Z,"30 km S of Tocopilla, Chile",earthquake,,,,6,reviewed,us,us
515
+ 1989-10-06T21:15:41.630Z,-0.676,-77.546,10,4.6,mb,,,,1.2,us,usp00040db,2014-11-07T00:44:59.535Z,"38 km NE of Archidona, Ecuador",earthquake,,,,4,reviewed,us,us
516
+ 1989-10-09T10:03:19.490Z,-4.293,-77.563,35.4,5.5,mw,,,,1.4,us,usp00040g6,2022-04-28T20:08:55.700Z,"115 km WNW of Barranca, Peru",earthquake,,,,,reviewed,us,hrv
517
+ 1989-10-11T14:42:09.370Z,2.94,-73.635,32.9,5,mb,,,,0.9,us,usp00040jq,2020-04-16T19:26:49.646Z,"24 km SSE of Vistahermosa, Colombia",earthquake,,5.1,,11,reviewed,us,us
518
+ 1989-10-12T18:33:08.480Z,-2.12,-79.581,102.9,4.8,mb,,,,1.2,us,usp00040m3,2014-11-07T00:45:01.364Z,"2 km NE of Milagro, Ecuador",earthquake,,6.5,,16,reviewed,us,us
519
+ 1989-10-15T16:44:33.930Z,-12.797,-76.691,71.5,5,mb,,,,0.8,us,usp00040r2,2014-11-07T00:45:01.948Z,"14 km W of Asia, Peru",earthquake,,5.1,,1,reviewed,us,us
520
+ 1989-10-18T20:15:40.870Z,-15.011,-70.808,191.5,4.7,mb,,,,0.6,us,usp00040xd,2014-11-07T00:45:02.847Z,"13 km SSE of Cupi, Peru",earthquake,,40.6,,1,reviewed,us,us
521
+ 1989-10-22T11:59:21.550Z,-22.254,-70.453,66.8,4.8,mb,,,,0.5,us,usp000413r,2014-11-07T00:45:03.987Z,"31 km SW of Tocopilla, Chile",earthquake,,13,,1,reviewed,us,us
522
+ 1989-10-22T17:29:50.280Z,-20.665,-70.813,33,4.9,mb,,,,1,us,usp0004140,2014-11-07T00:45:04.044Z,"85 km SW of Iquique, Chile",earthquake,,,,4,reviewed,us,us
523
+ 1989-10-22T21:28:49.370Z,-20.466,-70.748,52.3,4.6,mb,,,,1.5,us,usp0004146,2014-11-07T00:45:04.080Z,"68 km WSW of Iquique, Chile",earthquake,,13.3,,1,reviewed,us,us
524
+ 1989-10-22T21:45:57.910Z,-20.735,-71.066,37.3,4.7,mb,,,,1.5,us,usp0004148,2014-11-07T00:45:04.084Z,"111 km WSW of Iquique, Chile",earthquake,,16.3,,2,reviewed,us,us
525
+ 1989-10-23T08:13:13.780Z,-19.101,-66.613,267.8,4.8,mb,,,,0.8,us,usp0004150,2014-11-07T00:45:04.159Z,"27 km SE of Challapata, Bolivia",earthquake,,4.4,,22,reviewed,us,us
526
+ 1989-10-23T23:41:26.320Z,-27.916,-66.856,167.5,5.4,mw,,,,1.5,us,usp0004160,2025-12-19T21:04:26.534Z,"35 km SE of Londres, Argentina",earthquake,,,,,reviewed,us,hrv
527
+ 1989-10-24T00:28:31.860Z,-20.728,-71.371,33,4.8,mb,,,,0.9,us,usp0004164,2014-11-07T00:45:04.293Z,"139 km WSW of Iquique, Chile",earthquake,,,,1,reviewed,us,us
528
+ 1989-10-24T04:27:19.590Z,0.934,-78.936,57.1,4.6,mb,,,,1.2,us,usp000416d,2014-11-07T00:45:04.309Z,"35 km S of Valdez, Ecuador",earthquake,,11.4,,3,reviewed,us,us
529
+ 1989-10-24T17:29:42.460Z,-2.706,-77.702,37.5,5,mb,,,,1.2,us,usp0004176,2014-11-07T00:45:04.464Z,"58 km ESE of Sucúa, Ecuador",earthquake,,6.6,,13,reviewed,us,us
530
+ 1989-10-25T05:56:13.070Z,-4.83,-81.072,38.7,4.7,mb,,,,1,us,usp0004180,2014-11-07T00:45:04.523Z,"8 km N of San Lucas ( Pueblo Nuevo de Colan), Peru",earthquake,,13.9,,5,reviewed,us,us
531
+ 1989-10-25T09:43:00.790Z,-13.585,-70.303,61.2,4.7,mb,,,,1.2,us,usp0004188,2014-11-07T00:45:04.552Z,"45 km NE of Corani, Peru",earthquake,,10.1,,4,reviewed,us,us
532
+ 1989-10-25T17:30:51.630Z,-20.936,-67.307,208.9,4.6,mb,,,,1.3,us,usp000418v,2014-11-07T00:45:04.599Z,"72 km SW of Uyuni, Bolivia",earthquake,,6.6,,10,reviewed,us,us
533
+ 1989-10-26T15:17:12.210Z,-31.289,-68.603,118.1,4.8,mb,,,,0.9,us,usp00041aa,2014-11-07T00:45:04.728Z,"18 km NNW of Albardón, Argentina",earthquake,,5.8,,7,reviewed,us,us
534
+ 1989-10-27T08:24:24.670Z,6.826,-73.063,159.3,5.1,mb,,,,1,us,usp00041bh,2014-11-07T00:45:05.081Z,"10 km NNE of Jordán, Colombia",earthquake,,8.3,,11,reviewed,us,us
535
+ 1989-10-28T13:10:10.700Z,-32.177,-71.717,69.2,4.5,mb,,,,0.7,us,usp00041cv,2014-11-07T00:45:05.228Z,"55 km NW of La Ligua, Chile",earthquake,,12,,1,reviewed,us,us
536
+ 1989-10-29T04:56:15.570Z,-2.701,-79.772,71.5,4.7,mb,,,,0.9,us,usp00041dk,2014-11-07T00:45:05.308Z,"17 km W of Naranjal, Ecuador",earthquake,,15.5,,6,reviewed,us,us
537
+ 1989-10-30T18:12:07.130Z,6.618,-76.027,75,4.6,mb,,,,1.5,us,usp00041gr,2014-11-07T00:45:06.004Z,"4 km ESE of Abriaquí, Colombia",earthquake,,14.6,,2,reviewed,us,us
538
+ 1989-11-01T06:40:30.330Z,-20.995,-67.954,139.5,6.1,mw,,,,0.9,us,usp00041jg,2022-04-28T20:06:16.480Z,"131 km SW of Colchani, Bolivia",earthquake,,,,,reviewed,us,hrv
539
+ 1989-11-01T07:11:39.100Z,7.263,-80.888,10,4.9,mb,,,,1.2,us,usp00041jh,2014-11-07T00:45:08.204Z,"12 km SSW of Arenas, Panama",earthquake,,,,9,reviewed,us,us
540
+ 1989-11-02T10:12:20.890Z,-22.21,-68.426,113.6,5.4,mw,,,,1.2,us,usp00041ms,2025-12-19T21:03:43.392Z,"58 km ENE of Calama, Chile",earthquake,,,,,reviewed,us,hrv
541
+ 1989-11-04T15:39:15.450Z,-3.484,-80.321,36,5,mb,,,,1.2,us,usp00041qs,2014-11-07T00:45:10.561Z,"5 km WNW of Zarumilla, Peru",earthquake,,,,13,reviewed,us,us
542
+ 1989-11-04T22:19:57.280Z,-31.699,-72.105,42.8,4.9,mb,,,,1,us,usp00041r8,2014-11-07T00:45:10.848Z,"88 km W of Illapel, Chile",earthquake,,11.1,,1,reviewed,us,us
543
+ 1989-11-05T23:22:49.510Z,-22.417,-69.623,214.7,4.7,mb,,,,0.6,us,usp00041sm,2014-11-07T00:45:11.072Z,"69 km ESE of Tocopilla, Chile",earthquake,,13.7,,1,reviewed,us,us
544
+ 1989-11-06T21:00:38.180Z,-3.191,-80.584,33,5.3,ms,,,,1.2,us,usp00041tq,2014-11-07T00:45:11.381Z,"44 km NNW of Tumbes, Peru",earthquake,,,,2,reviewed,us,us
545
+ 1989-11-07T03:24:54.810Z,7.068,-77.667,10,4.9,mb,,,,1.2,us,usp00041u0,2022-04-28T20:06:48.689Z,"11 km ESE of Juradó, Colombia",earthquake,,,,35,reviewed,us,us
546
+ 1989-11-08T05:12:42.170Z,-27.655,-69,117.6,4.9,mb,,,,1.3,us,usp00041v4,2014-11-07T00:45:11.520Z,"135 km ESE of Copiapó, Chile",earthquake,,,,8,reviewed,us,us
547
+ 1989-11-08T10:15:09.440Z,-5.623,-76.026,33,4.9,mb,,,,1.5,us,usp00041v8,2014-11-07T00:45:11.534Z,"32 km NNE of Yurimaguas, Peru",earthquake,,,,1,reviewed,us,us
548
+ 1989-11-08T11:23:02.230Z,-23.711,-67.755,136.1,5.4,mw,,,,1.3,us,usp00041va,2025-12-19T21:03:51.747Z,"99 km SSE of San Pedro de Atacama, Chile",earthquake,,,,,reviewed,us,hrv
549
+ 1989-11-09T04:15:50.990Z,-15.282,-72.548,124.2,5,mb,,,,1.4,us,usp00041w4,2014-11-07T00:45:11.645Z,"22 km W of Orcopampa, Peru",earthquake,,8.3,,16,reviewed,us,us
550
+ 1989-11-09T09:07:56.740Z,-33.909,-70.553,96.4,5,mb,,,,0.9,us,usp00041w9,2014-11-07T00:45:11.668Z,"20 km ESE of Paine, Chile",earthquake,,2.6,,14,reviewed,us,us
551
+ 1989-11-09T10:39:45.780Z,-22.509,-70.691,100,4.5,mb,,,,0.9,us,usp00041we,2014-11-07T00:45:11.705Z,"68 km SW of Tocopilla, Chile",earthquake,,17.6,,2,reviewed,us,us
552
+ 1989-11-11T15:04:51.040Z,-14.303,-72.209,63,5.2,mb,,,,0.9,us,usp00041ya,2014-11-07T00:45:11.970Z,"7 km W of Quiñota, Peru",earthquake,,7.6,,13,reviewed,us,us
553
+ 1989-11-12T10:20:45.700Z,-21.866,-68.576,148,4.7,mb,,,,1.3,us,usp00041yz,2014-11-07T00:45:12.058Z,"74 km NNE of Calama, Chile",earthquake,,10.6,,2,reviewed,us,us
554
+ 1989-11-13T06:59:20.210Z,-21.879,-68.904,167.5,4.6,mb,,,,0.6,us,usp00041zr,2014-11-07T00:45:12.124Z,"63 km N of Calama, Chile",earthquake,,17.4,,1,reviewed,us,us
555
+ 1989-11-14T06:07:53.380Z,-27.428,-71.052,33,5.4,mw,,,,1.1,us,usp000420q,2022-04-28T20:07:01.855Z,"71 km W of Copiapó, Chile",earthquake,,,,,reviewed,us,hrv
556
+ 1989-11-20T18:42:14.270Z,-24.22,-67.099,190.1,4.6,mb,,,,1.1,us,usp000428m,2014-11-07T00:45:13.170Z,"79 km W of San Antonio de los Cobres, Argentina",earthquake,,8.6,,3,reviewed,us,us
557
+ 1989-11-23T15:34:22.040Z,-13.901,-70.598,33,4.5,mb,,,,1.4,us,usp00042bh,2014-11-07T00:45:13.925Z,"3 km S of Corani, Peru",earthquake,,,,2,reviewed,us,us
558
+ 1989-11-25T11:53:44.660Z,6.75,-73.017,176,4.6,mb,,,,0.6,us,usp00042du,2014-11-07T00:45:14.203Z,"4 km W of Cepitá, Colombia",earthquake,,9.1,,8,reviewed,us,us
559
+ 1989-11-27T08:07:50.890Z,-4.75,-81.201,73.8,4.6,mb,,,,0.9,us,usp00042fp,2014-11-07T00:45:14.520Z,"20 km SSE of Talara, Peru",earthquake,,26.6,,3,reviewed,us,us
560
+ 1989-11-29T01:00:14.850Z,-15.808,-73.242,70.8,6.3,mw,,,,1.1,us,usp00042hr,2022-04-28T20:08:22.259Z,"southern Peru",earthquake,,,,,reviewed,us,hrv
561
+ 1989-11-29T03:02:44.990Z,-15.936,-73.463,92.5,4.7,mb,,,,1.2,us,usp00042hu,2014-11-07T00:45:14.742Z,"32 km WNW of Urasqui, Peru",earthquake,,,,8,reviewed,us,us
562
+ 1989-12-03T14:16:48.790Z,-7.631,-74.459,153,6.6,mw,,,,1.1,us,usp00042pu,2022-04-28T20:03:32.059Z,"69 km ESE of Contamana, Peru",earthquake,,,,,reviewed,us,nc
563
+ 1989-12-07T16:38:32.790Z,-4.276,-76.526,124.2,5,mb,,,,1.2,us,usp00042uu,2014-11-07T00:45:20.069Z,"63 km NNE of Barranca, Peru",earthquake,,8.8,,5,reviewed,us,us
564
+ 1989-12-10T10:41:12.200Z,-27.489,-71.806,40.1,4.8,mb,,,,1.1,us,usp00042xn,2014-11-07T00:45:20.681Z,"146 km W of Copiapó, Chile",earthquake,,12.3,,1,reviewed,us,us
565
+ 1989-12-12T16:15:36.670Z,-20.809,-67.171,211.2,5,mb,,,,1.1,us,usp000430k,2014-11-07T00:45:20.964Z,"52 km SW of Uyuni, Bolivia",earthquake,,,,35,reviewed,us,us
566
+ 1989-12-13T04:03:56.000Z,-32.654,-71.839,46.7,4.9,mb,,,,1.3,us,usp0004314,2014-11-07T00:45:21.031Z,"46 km NNW of Valparaíso, Chile",earthquake,,9.1,,9,reviewed,us,us
567
+ 1989-12-14T09:52:56.280Z,-22.626,-68.709,111.2,4.8,mb,,,,1.1,us,usp0004329,2014-11-07T00:45:21.133Z,"28 km SE of Calama, Chile",earthquake,,,,7,reviewed,us,us
568
+ 1989-12-16T20:28:45.740Z,6.807,-71.778,35.8,4.7,mb,,,,1,us,usp000435w,2014-11-07T00:45:21.946Z,"1 km N of Fortul, Colombia",earthquake,,11.9,,4,reviewed,us,us
569
+ 1989-12-17T07:32:29.610Z,-1.262,-78.348,33,4.9,mb,,,,1.5,us,usp000436j,2014-11-07T00:45:22.092Z,"17 km NNE of Baños, Ecuador",earthquake,,,,15,reviewed,us,us
570
+ 1989-12-25T21:25:07.570Z,-21.328,-67.34,235.3,4.6,mb,,,,0.7,us,usp00043jn,2014-11-07T00:45:23.756Z,"110 km SSW of Uyuni, Bolivia",earthquake,,10.6,,1,reviewed,us,us
571
+ 1989-12-25T23:14:47.900Z,-21.295,-68.189,94.5,5.3,mb,,,,0.9,us,usp00043jq,2014-11-07T00:45:23.759Z,"149 km NNE of Calama, Chile",earthquake,,6.3,,23,reviewed,us,us
572
+ 1989-12-28T13:41:15.510Z,-16.526,-69.423,210.2,5,mb,,,,1.2,us,usp00043p7,2014-11-07T00:45:24.184Z,"34 km S of Juli, Peru",earthquake,,,,52,reviewed,us,us
573
+ 1989-12-30T00:22:48.190Z,-24.132,-68.958,88.4,4.7,mb,,,,0.7,us,usp00043r2,2014-11-07T00:45:24.685Z,"155 km ESE of Antofagasta, Chile",earthquake,,,,3,reviewed,us,us
574
+ 1989-12-30T12:38:11.240Z,-26.209,-70.507,32.1,5.5,mw,,,,1.2,us,usp00043rm,2022-04-28T20:06:05.046Z,"48 km WNW of Diego de Almagro, Chile",earthquake,,7,,,reviewed,us,hrv
20260906-225059-science-environment-679c04/environment/public_data/main.py ADDED
@@ -0,0 +1,180 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import annotations
2
+
3
+ import importlib.util
4
+ import json
5
+ import os
6
+ import shlex
7
+ import shutil
8
+ from pathlib import Path
9
+ from typing import Any
10
+
11
+
12
+ class Task:
13
+ def __init__(self, task_id: str, description: str, metadata: dict[str, Any]):
14
+ self.task_id = task_id
15
+ self.description = description
16
+ self.prompt = description
17
+ self.metadata = metadata
18
+ self.computer = {"setup_config": {"os_type": "linux"}}
19
+
20
+
21
+ def _task_dir() -> Path:
22
+ return Path(__file__).resolve().parent
23
+
24
+
25
+ def _load_card() -> dict[str, Any]:
26
+ path = _task_dir() / "task_card.json"
27
+ if not path.is_file():
28
+ return {
29
+ "taskId": os.environ.get("ALE_TASK_ID", "science_environment/usgs_andes_annual_focal_depth_audit"),
30
+ "taskPrompt": "Task card has not been rendered yet; this fallback exists for stage-03 hook smoke only.",
31
+ "metadata": {
32
+ "domain": "science_environment",
33
+ "task": "usgs_andes_annual_focal_depth_audit",
34
+ "variant": "base",
35
+ "domain_name": "science_environment",
36
+ "task_name": "usgs_andes_annual_focal_depth_audit",
37
+ "variant_name": "base",
38
+ "requires_task_data": True,
39
+ "task_dir": "/media/user/data/agenthle/science_environment/usgs_andes_annual_focal_depth_audit/base",
40
+ "input_dir": "/media/user/data/agenthle/science_environment/usgs_andes_annual_focal_depth_audit/base/input",
41
+ "software_dir": "/media/user/data/agenthle/science_environment/usgs_andes_annual_focal_depth_audit/base/software",
42
+ "remote_output_dir": "/media/user/data/agenthle/science_environment/usgs_andes_annual_focal_depth_audit/base/output",
43
+ "reference_dir": "/media/user/data/agenthle/science_environment/usgs_andes_annual_focal_depth_audit/base/reference",
44
+ },
45
+ }
46
+ with path.open("r", encoding="utf-8") as handle:
47
+ return json.load(handle)
48
+
49
+
50
+ def load() -> list[Task]:
51
+ card = _load_card()
52
+ metadata = dict(card.get("metadata") or {})
53
+ if not metadata:
54
+ domain, _, task = str(card["taskId"]).partition("/")
55
+ variant = "base"
56
+ task_dir = f"/media/user/data/agenthle/{domain}/{task}/{variant}"
57
+ metadata.update({
58
+ "domain": domain,
59
+ "task": task,
60
+ "variant": variant,
61
+ "domain_name": domain,
62
+ "task_name": task,
63
+ "variant_name": variant,
64
+ "requires_task_data": True,
65
+ "task_dir": task_dir,
66
+ "input_dir": f"{task_dir}/input",
67
+ "software_dir": f"{task_dir}/software",
68
+ "remote_output_dir": f"{task_dir}/output",
69
+ "reference_dir": f"{task_dir}/reference",
70
+ })
71
+ return [Task(task_id=card["taskId"], description=card["taskPrompt"], metadata=metadata)]
72
+
73
+
74
+ def _metadata(cfg: Any = None) -> dict[str, Any]:
75
+ if cfg is None:
76
+ return {}
77
+ value = getattr(cfg, "metadata", None)
78
+ return value if isinstance(value, dict) else {}
79
+
80
+
81
+ def _remote_path(metadata: dict[str, Any], key: str, fallback: str) -> str:
82
+ value = str(metadata.get(key) or "").strip()
83
+ return value or fallback
84
+
85
+
86
+ async def _remote_run(session: Any, command: str, *, check: bool = False) -> Any:
87
+ try:
88
+ return await session.run_command(command, check=check)
89
+ except TypeError:
90
+ return await session.run_command(command)
91
+
92
+
93
+ async def _remote_start(cfg: Any, session: Any) -> dict[str, Any]:
94
+ metadata = _metadata(cfg)
95
+ output_dir = _remote_path(metadata, "remote_output_dir", "output")
96
+ input_dir = _remote_path(metadata, "input_dir", "input")
97
+ software_dir = _remote_path(metadata, "software_dir", "software")
98
+ command = (
99
+ "set -eu\n"
100
+ f"mkdir -p {shlex.quote(output_dir)}\n"
101
+ f"find {shlex.quote(output_dir)} -mindepth 1 -maxdepth 1 -exec rm -rf -- {{}} +\n"
102
+ )
103
+ await _remote_run(session, command, check=True)
104
+ return {"ok": True, "input_dir": input_dir, "software_dir": software_dir, "output_dir": output_dir}
105
+
106
+
107
+ def start(cfg: Any = None, session: Any = None) -> dict[str, Any]:
108
+ if session is not None:
109
+ return _remote_start(cfg, session)
110
+ del cfg
111
+ output_dir = Path(os.environ.get("ALE_OUTPUT_DIR", "output"))
112
+ output_dir.mkdir(parents=True, exist_ok=True)
113
+ for child in output_dir.iterdir():
114
+ if child.is_dir():
115
+ shutil.rmtree(child)
116
+ else:
117
+ child.unlink()
118
+ input_dir = Path(os.environ.get("ALE_INPUT_DIR", "input"))
119
+ software_dir = Path(os.environ.get("ALE_SOFTWARE_DIR", "software"))
120
+ return {
121
+ "ok": True,
122
+ "input_dir": str(input_dir),
123
+ "software_dir": str(software_dir),
124
+ "output_dir": str(output_dir),
125
+ }
126
+
127
+
128
+ async def _remote_evaluate(cfg: Any, session: Any) -> list[float]:
129
+ metadata = _metadata(cfg)
130
+ output_dir = _remote_path(metadata, "remote_output_dir", "output")
131
+ reference_dir = _remote_path(metadata, "reference_dir", "reference")
132
+ script = f"""
133
+ import importlib.util
134
+ import json
135
+ import pathlib
136
+
137
+ output_dir = pathlib.Path({output_dir!r})
138
+ reference_dir = pathlib.Path({reference_dir!r})
139
+ evaluator_path = reference_dir / "evaluator.py"
140
+ if not evaluator_path.is_file():
141
+ raise FileNotFoundError(f"hidden evaluator is missing: {{evaluator_path}}")
142
+ spec = importlib.util.spec_from_file_location("hidden_ale_evaluator", evaluator_path)
143
+ if spec is None or spec.loader is None:
144
+ raise RuntimeError(f"cannot import hidden evaluator: {{evaluator_path}}")
145
+ module = importlib.util.module_from_spec(spec)
146
+ spec.loader.exec_module(module)
147
+ result = module.evaluate(output_dir, reference_dir)
148
+ print(json.dumps(result))
149
+ """
150
+ command = "python3 - <<'PY'\n" + script + "\nPY"
151
+ result = await _remote_run(session, command, check=True)
152
+ stdout = getattr(result, "stdout", "") or ""
153
+ for line in reversed([item.strip() for item in stdout.splitlines() if item.strip()]):
154
+ try:
155
+ payload = json.loads(line)
156
+ if isinstance(payload, list):
157
+ return [float(max(0.0, min(1.0, value))) for value in payload]
158
+ except Exception:
159
+ continue
160
+ raise RuntimeError("hidden evaluator did not emit a JSON score list")
161
+
162
+
163
+ def evaluate(cfg: Any = None, session: Any = None) -> list[float]:
164
+ if session is not None:
165
+ return _remote_evaluate(cfg, session)
166
+ del cfg
167
+ output_dir = Path(os.environ.get("ALE_OUTPUT_DIR", "output"))
168
+ reference_dir = Path(os.environ.get("ALE_REFERENCE_DIR", "reference"))
169
+ evaluator_path = reference_dir / "evaluator.py"
170
+ if not evaluator_path.is_file():
171
+ raise FileNotFoundError(f"hidden evaluator is missing: {evaluator_path}")
172
+ spec = importlib.util.spec_from_file_location("hidden_ale_evaluator", evaluator_path)
173
+ if spec is None or spec.loader is None:
174
+ raise RuntimeError(f"cannot import hidden evaluator: {evaluator_path}")
175
+ module = importlib.util.module_from_spec(spec)
176
+ spec.loader.exec_module(module)
177
+ result = module.evaluate(output_dir, reference_dir)
178
+ if not isinstance(result, list):
179
+ raise TypeError("hidden evaluator must return list[float]")
180
+ return [float(max(0.0, min(1.0, value))) for value in result]