diff --git a/src/get_rupture_info.py b/src/get_rupture_info.py index a83d1e5..323ca37 100644 --- a/src/get_rupture_info.py +++ b/src/get_rupture_info.py @@ -10,7 +10,7 @@ class OqP: inputs = {'rupture_model': ""} rupture_mesh_spacing = 2.0 ses_seed = 69 - + rupture_dict = None def repture_xml_to_df(filepath, add_geometry=False): ''' diff --git a/src/usgs_stations_json_csv.py b/src/usgs_stations_json_csv.py index 55581b2..890b45e 100644 --- a/src/usgs_stations_json_csv.py +++ b/src/usgs_stations_json_csv.py @@ -1,16 +1,9 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- -import os -import glob import json -import numpy as np import pandas as pd -import geopandas as gpd -import contextily as ctx -import matplotlib.pyplot as plt - def read_usgs_json(json_path): ''' @@ -41,13 +34,13 @@ def read_usgs_json(json_path): channels = pd.DataFrame(stations.channels.to_list()) vals = pd.Series([], dtype = 'object') - for row, rec_sation in channels.iterrows(): - rec_sation.dropna(inplace=True) + for row, rec_station in channels.iterrows(): + rec_station.dropna(inplace=True) # Iterate over different columns. Each colum can be a component data = [] pgas = [] - for index, chan in rec_sation.iteritems(): + for _, chan in rec_station.items(): try: if chan["name"].endswith("Z") or chan["name"].endswith("U"): continue