py-ewr 2.1.5__py3-none-any.whl → 2.1.6__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.
@@ -143,9 +143,18 @@ def build_MDBA_columns(input_data: pd.DataFrame, input_header: pd.DataFrame) ->
143
143
  numRows = int(input_header['Field'].iloc[1])
144
144
  df = input_header.drop([0,1])
145
145
  df = df.astype(str)
146
- df['Site'] = df['Site'].map(lambda x: x.strip("'"))
147
- df['Measurand'] = df['Measurand'].map(lambda x: x.strip("'"))
148
- df['Quality'] = df['Quality'].map(lambda x: x.strip("'"))
146
+ # Remove rogue quotes, spaces, and apostrophes
147
+ df['Site'] = df['Site'].map(lambda x: x.replace("'", ""))
148
+ df['Site'] = df['Site'].map(lambda x: x.replace('"', ''))
149
+ df['Site'] = df['Site'].map(lambda x: x.replace(" ", ""))
150
+
151
+ df['Measurand'] = df['Measurand'].map(lambda x: x.replace("'", ""))
152
+ df['Measurand'] = df['Measurand'].map(lambda x: x.replace('"', ''))
153
+ df['Measurand'] = df['Measurand'].map(lambda x: x.replace(" ", ""))
154
+
155
+ df['Quality'] = df['Quality'].map(lambda x: x.replace("'", ""))
156
+ df['Quality'] = df['Quality'].map(lambda x: x.replace('"', ''))
157
+ df['Quality'] = df['Quality'].map(lambda x: x.replace(" ", ""))
149
158
 
150
159
  # Construct refs and save to list:
151
160
  listOfCols = []
@@ -449,10 +458,6 @@ class ScenarioHandler:
449
458
  elif self.model_format == 'ten thousand year':
450
459
  df = pd.read_csv(scenarios[scenario], index_col = 'Date')
451
460
  df_F, df_L = cleaner_ten_thousand_year(df, self.parameter_sheet)
452
-
453
- elif self.model_format == 'Source - Qld':
454
- df = pd.read_csv(scenarios[scenario], index_col = 'Date')
455
- df_F, df_L = cleaner_Qld_source(data)
456
461
 
457
462
  gauge_results = {}
458
463
  gauge_events = {}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: py_ewr
3
- Version: 2.1.5
3
+ Version: 2.1.6
4
4
  Summary: Environmental Water Requirement calculator
5
5
  Home-page: https://github.com/MDBAuth/EWR_tool
6
6
  Author: Martin Job
@@ -32,11 +32,11 @@ Requires-Dist: cachetools ==5.2.0
32
32
  [![PyPI](https://img.shields.io/pypi/v/py-ewr)](https://pypi.org/project/py-ewr/)
33
33
  [![DOI](https://zenodo.org/badge/342122359.svg)](https://zenodo.org/badge/latestdoi/342122359)
34
34
 
35
- ### **EWR tool version 2.1.5 README**
35
+ ### **EWR tool version 2.1.6 README**
36
36
 
37
37
  ### **Notes on recent version update**
38
38
  - Standard time-series handling added - each column needs a gauge, followed by and underscore, followed by either flow or level (e.g. 409025_flow). This handling also has missing date filling - so any missing dates will be filled with NaN values in all columns.
39
- - ten thousand year handling - the same formatting as above is required (gauge_flow OR gauge_level)
39
+ - ten thousand year handling - This has been briefly taken offline for this version.
40
40
  - bug fixes: spells of length equal to the minimum required spell length were getting filtered out of the successful events table and successful interevents table.
41
41
 
42
42
  ### **Installation**
@@ -103,7 +103,7 @@ all_successful_interEvents = ewr_oh.get_all_successful_interEvents()
103
103
  ### Option 2: Running model scenarios through the EWR tool
104
104
 
105
105
  1. Tell the tool where the model files are (can either be local or in a remote location)
106
- 2. Tell the tool what format the model files are in (Current model format options: 'Bigmod - MDBA', 'Source - NSW (res.csv)', 'IQQM - NSW 10,000 years' - see manual for formatting requirements)
106
+ 2. Tell the tool what format the model files are in (Current model format options: 'Bigmod - MDBA', 'Source - NSW (res.csv)', 'Standard time-series' - see manual for formatting requirements)
107
107
 
108
108
  ```python
109
109
  #USER INPUT REQUIRED>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@@ -2,14 +2,14 @@ py_ewr/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  py_ewr/data_inputs.py,sha256=BLJrrasZYpSUkC0yVBzVqnz6WGT2Y3SJYJJhguDi-Vo,18046
3
3
  py_ewr/evaluate_EWRs.py,sha256=1JYWNtw5MYgf92jXhDNlgGkDx2mcfBP34OO-0jgal1w,229279
4
4
  py_ewr/observed_handling.py,sha256=NaySsqe8nWgZdDRSr22EYmCwf0uNzVj9DFF6hzNr6ws,18173
5
- py_ewr/scenario_handling.py,sha256=BNMKQmDIcT7mYd0jnSGUBfcZ2AzCvxgHGwJA9KxyQ_A,28184
5
+ py_ewr/scenario_handling.py,sha256=yMAfRNIZtuGntdey2-FML5nfUaGXMIApAUvIzQbyXUs,28476
6
6
  py_ewr/summarise_results.py,sha256=7w2Tbriwob21UXG0N2rSKffneg3M49hWouJPTHVjDAU,29747
7
7
  py_ewr/model_metadata/SiteID_MDBA.csv,sha256=ZVY_P-lq_tHNELfUrTTveNPWcumKHot7yWvdjje0I2k,164412
8
8
  py_ewr/model_metadata/SiteID_NSW.csv,sha256=UVBxN43Z5KWCvWhQ5Rh6TNEn35q4_sjPxKyHg8wPFws,6805
9
- py_ewr/parameter_metadata/ewr_calc_config.json,sha256=BkuSJI6NqZzJxZMd8eh3GBs5uoHfI2joOkPrKLu9-60,17556
10
- py_ewr/parameter_metadata/parameter_sheet.csv,sha256=ufOYn59cS4kl9XF1WaNqBhodcsBxUWH8Y0g1qHVUAcg,594257
11
- py_ewr-2.1.5.dist-info/LICENSE,sha256=ogEPNDSH0_dhiv_lT3ifVIdgIzHAqNA_SemnxUfPBJk,7048
12
- py_ewr-2.1.5.dist-info/METADATA,sha256=Sw5eAbah1SeV6Bd4BUCOXOqgEl6QgHSdaAg79Qixp5k,9570
13
- py_ewr-2.1.5.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
14
- py_ewr-2.1.5.dist-info/top_level.txt,sha256=n3725d-64Cjyb-YMUMV64UAuIflzUh2_UZSxiIbrur4,7
15
- py_ewr-2.1.5.dist-info/RECORD,,
9
+ py_ewr/parameter_metadata/ewr_calc_config.json,sha256=LEnaueNT60FFEPSJDgLpD8EGo_CguTPlZJ3Q5t_-XQ4,17610
10
+ py_ewr/parameter_metadata/parameter_sheet.csv,sha256=H5f2jzR5FpsjIm9hYh26qth0Z2LNlZfeWpXysQel4y8,895653
11
+ py_ewr-2.1.6.dist-info/LICENSE,sha256=ogEPNDSH0_dhiv_lT3ifVIdgIzHAqNA_SemnxUfPBJk,7048
12
+ py_ewr-2.1.6.dist-info/METADATA,sha256=npduQ6-A-263ruoja__ytTnOOwcijpUNt51dOIjFfmY,9552
13
+ py_ewr-2.1.6.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
14
+ py_ewr-2.1.6.dist-info/top_level.txt,sha256=n3725d-64Cjyb-YMUMV64UAuIflzUh2_UZSxiIbrur4,7
15
+ py_ewr-2.1.6.dist-info/RECORD,,
File without changes