hydroanomaly 1.2.2__py3-none-any.whl → 1.2.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
hydroanomaly/__init__.py CHANGED
@@ -10,7 +10,7 @@ A simple Python package with just 3 modules:
10
10
  That's it - nothing else!
11
11
  """
12
12
 
13
- __version__ = "1.2.2"
13
+ __version__ = "1.2.4"
14
14
  __author__ = "Ehsan Kahrizi (Ehsan.kahrizi@usu.edu)"
15
15
 
16
16
  # Import the 3 simple modules
hydroanomaly/ml.py CHANGED
@@ -13,7 +13,7 @@ def match_nearest_datetime(sentinel_dt, usgs):
13
13
  return np.nan
14
14
  # Find the closest datetime in usgs to sentinel_dt
15
15
  i = usgs.index.get_indexer([sentinel_dt], method='nearest')[0]
16
- return usgs.iloc[i]['Turbidity']
16
+ return usgs.iloc[i]['turbidity']
17
17
 
18
18
  # ============= Preprocessing and Feature Engineering ====================================================
19
19
  def preprocess_data(sentinel, usgs):
@@ -92,14 +92,14 @@ def run_oneclass_svm(sentinel, usgs, plot=True):
92
92
  df_out['predicted'] = best_y_pred
93
93
  if plot:
94
94
  plt.figure(figsize=(15,6))
95
- plt.plot(df_out.index, df_out['turbidity'], label='Turbidity', color='blue')
95
+ plt.plot(df_out.index, df_out['turbidity'], label='turbidity', color='blue')
96
96
  plt.scatter(df_out[df_out['Classe']==1].index, df_out[df_out['Classe']==1]['turbidity'],
97
97
  color='red', marker='x', label='True Anomaly', s=100)
98
98
  plt.scatter(df_out[df_out['predicted']==1].index, df_out[df_out['predicted']==1]['turbidity'],
99
99
  edgecolors='orange', facecolors='none', marker='o', label='Predicted Anomaly', s=80)
100
100
  plt.title("True vs Predicted Anomalies (OneClassSVM)")
101
101
  plt.xlabel("Datetime")
102
- plt.ylabel("Turbidity")
102
+ plt.ylabel("turbidity")
103
103
  plt.legend()
104
104
  plt.grid(True)
105
105
  plt.tight_layout()
@@ -156,14 +156,14 @@ def run_isolation_forest(sentinel, usgs, plot=True):
156
156
  df_out['predicted'] = best_y_pred
157
157
  if plot:
158
158
  plt.figure(figsize=(15,6))
159
- plt.plot(df_out.index, df_out['turbidity'], label='Turbidity', color='blue')
159
+ plt.plot(df_out.index, df_out['turbidity'], label='turbidity', color='blue')
160
160
  plt.scatter(df_out[df_out['Classe']==1].index, df_out[df_out['Classe']==1]['turbidity'],
161
161
  color='red', marker='x', label='True Anomaly', s=100)
162
162
  plt.scatter(df_out[df_out['predicted']==1].index, df_out[df_out['predicted']==1]['turbidity'],
163
163
  edgecolors='orange', facecolors='none', marker='o', label='Predicted Anomaly', s=80)
164
164
  plt.title("True vs Predicted Anomalies (Isolation Forest)")
165
165
  plt.xlabel("Datetime")
166
- plt.ylabel("Turbidity")
166
+ plt.ylabel("turbidity")
167
167
  plt.legend()
168
168
  plt.grid(True)
169
169
  plt.tight_layout()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hydroanomaly
3
- Version: 1.2.2
3
+ Version: 1.2.4
4
4
  Summary: A Python package for hydro anomaly detection with simple USGS data retrieval
5
5
  Author-email: Ehsan Kahrizi <ehsan.kahrizi@usu.edu>
6
6
  License: MIT License
@@ -51,6 +51,7 @@ Requires-Dist: flake8>=3.8; extra == "dev"
51
51
  Requires-Dist: mypy>=0.800; extra == "dev"
52
52
  Dynamic: license-file
53
53
 
54
+ ![Package Logo](logo.png)
54
55
  # HydroAnomaly
55
56
 
56
57
  A Python package for hydro anomaly detection, **USGS water data retrieval**, and **time series visualization**.
@@ -0,0 +1,10 @@
1
+ hydroanomaly/__init__.py,sha256=_UrGbuvmsEN8iZ0C2y3RQ59wXfKC-SVIkLbWZEhc-U8,1664
2
+ hydroanomaly/ml.py,sha256=mkAQkL9mw2YcOPYISiJz9opT0xDaCbv91ivWRjpXB84,7357
3
+ hydroanomaly/sentinel_bands.py,sha256=XdpXUsJ8VeRQp9akDeQaVBefuuMrQIabslu8tg_FTpk,5399
4
+ hydroanomaly/usgs_turbidity.py,sha256=k0cXRXpTe1YgjfR0Htw77SLD8hM--43jiEiJwx1vRg0,5664
5
+ hydroanomaly/visualize.py,sha256=d_Ou1sTr648TdAW-94NXwNbLPL4rvYVYb5pw4Xux3aE,7228
6
+ hydroanomaly-1.2.4.dist-info/licenses/LICENSE,sha256=OphKV48tcMv6ep-7j-8T6nycykPT0g8ZlMJ9zbGvdPs,1066
7
+ hydroanomaly-1.2.4.dist-info/METADATA,sha256=sndWmucG1lyutvBajQKIA9CnVS1EzXwi-iJ36PmaMl8,13008
8
+ hydroanomaly-1.2.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
9
+ hydroanomaly-1.2.4.dist-info/top_level.txt,sha256=t-5Lc-eTLlkxIhR_N1Cpp6_YZafKS3xLLk9D2CtbE7o,13
10
+ hydroanomaly-1.2.4.dist-info/RECORD,,
@@ -1,10 +0,0 @@
1
- hydroanomaly/__init__.py,sha256=eEPbr6I5DKj965gpDV3N3Oj6eL-QQYqG9mlV_UKCv2s,1664
2
- hydroanomaly/ml.py,sha256=PNV4iWb0NLkcdv43r6zD4NnC07DUrzfE96ON5T57xDc,7357
3
- hydroanomaly/sentinel_bands.py,sha256=XdpXUsJ8VeRQp9akDeQaVBefuuMrQIabslu8tg_FTpk,5399
4
- hydroanomaly/usgs_turbidity.py,sha256=k0cXRXpTe1YgjfR0Htw77SLD8hM--43jiEiJwx1vRg0,5664
5
- hydroanomaly/visualize.py,sha256=d_Ou1sTr648TdAW-94NXwNbLPL4rvYVYb5pw4Xux3aE,7228
6
- hydroanomaly-1.2.2.dist-info/licenses/LICENSE,sha256=OphKV48tcMv6ep-7j-8T6nycykPT0g8ZlMJ9zbGvdPs,1066
7
- hydroanomaly-1.2.2.dist-info/METADATA,sha256=jBVFAcyhIwdQlGltZK6Rwo9i6RlXVppQa8e2wL05brg,12981
8
- hydroanomaly-1.2.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
9
- hydroanomaly-1.2.2.dist-info/top_level.txt,sha256=t-5Lc-eTLlkxIhR_N1Cpp6_YZafKS3xLLk9D2CtbE7o,13
10
- hydroanomaly-1.2.2.dist-info/RECORD,,