@@ -31,14 +31,14 @@ items = transformer.make_items()
3131
3232# 4. The transformer creates three types of STAC items:
3333# - Source event item
34- # - Hazard item from ShakeMap
34+ # - Hazard item from ShakeMap
3535# - Impact items from PAGER data (if losses data provided)
3636
3737# Example: Print details of each item
3838for item in items:
3939 print (f " \n Item ID: { item.id} " )
4040 print (f " Type: { item.properties[' roles' ]} " )
41-
41+
4242 # Access Monty extension fields
4343 monty = MontyExtension.ext(item)
4444 if monty.is_source_event():
@@ -111,16 +111,16 @@ class USGSTransformer:
111111 def __init__ (self , data : USGSDataSource) -> None :
112112 """
113113 Initialize transformer with USGS data source.
114-
114+
115115 Args:
116116 data: USGSDataSource containing event data and optional losses data
117117 """
118-
118+
119119 def make_items (self ) -> list[Item]:
120120 """
121121 Transform USGS data into STAC Items.
122122 Creates source event, hazard, and impact items if losses data available.
123-
123+
124124 Returns:
125125 list[Item]: List of STAC Items with Monty extension
126126 """
@@ -153,7 +153,7 @@ Wrapper class for USGS data that handles both event data and optional losses dat
153153class USGSDataSource (MontyDataSource ):
154154 """
155155 USGS data source that can handle both event detail and losses data.
156-
156+
157157 Args:
158158 source_url: URL where the event data was retrieved from
159159 data: Event detail data as JSON string
@@ -163,11 +163,11 @@ class USGSDataSource(MontyDataSource):
163163 super ().__init__ (source_url, data)
164164 self .data = json.loads(data)
165165 self .losses_data = json.loads(losses_data) if losses_data else None
166-
166+
167167 def get_data (self ) -> dict :
168168 """ Get the event detail data."""
169169 return self .data
170-
170+
171171 def get_losses_data (self ) -> Optional[dict ]:
172172 """ Get the PAGER losses data if available."""
173173 return self .losses_data
@@ -177,4 +177,4 @@ The data source handles:
177177- GeoJSON event data from USGS detail API
178178- Optional PAGER losses data in JSON format
179179- Automatic JSON parsing and validation
180- - Access to both event and losses data through clean interface
180+ - Access to both event and losses data through clean interface
0 commit comments