ecopipeline 0.4.13__py3-none-any.whl → 0.4.15__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.
ecopipeline/load/load.py CHANGED
@@ -289,7 +289,7 @@ def load_event_table(config : ConfigManager, event_df: pd.DataFrame, site_name :
289
289
  site_name = config.get_site_name()
290
290
  column_names = f"start_time_pt,site_name"
291
291
  column_types = ["datetime","varchar(25)","datetime",
292
- "ENUM('HW_OUTAGE', 'HW_LOSS','PIPELINE_STATUS', 'MISC_EVENT', 'PIPELINE_UPLOAD', 'DATA_LOSS', 'DATA_LOSS_COP', 'SITE_VISIT', 'COMMISIONING', 'SYSTEM_MAINTENENCE', 'POWER_OUTAGE', 'EQUIPMENT_MALFUNCTION')",
292
+ "ENUM('HW_OUTAGE', 'HW_LOSS','PIPELINE_STATUS', 'MISC_EVENT', 'PIPELINE_UPLOAD', 'DATA_LOSS', 'DATA_LOSS_COP', 'SITE_VISIT', 'COMMISIONING', 'SYSTEM_MAINTENENCE', 'POWER_OUTAGE', 'EQUIPMENT_MALFUNCTION','PARTIAL_OCCUPANCY','INSTALLATION_ERROR')",
293
293
  "varchar(200)"]
294
294
  column_list = ['end_time_pt','event_type', 'event_detail']
295
295
  if not set(column_list).issubset(event_df.columns):
@@ -1,4 +1,4 @@
1
- from .transform import rename_sensors, avg_duplicate_times, remove_outliers, ffill_missing, nullify_erroneous, sensor_adjustment, round_time, aggregate_df, join_to_hourly, concat_last_row, join_to_daily, cop_method_1, cop_method_2, create_summary_tables, remove_partial_days,convert_c_to_f,convert_l_to_g, convert_on_off_col_to_bool, flag_dhw_outage,generate_event_log_df,convert_time_zone, shift_accumulative_columns
1
+ from .transform import rename_sensors, avg_duplicate_times, remove_outliers, ffill_missing, nullify_erroneous, sensor_adjustment, round_time, aggregate_df, join_to_hourly, concat_last_row, join_to_daily, cop_method_1, cop_method_2, create_summary_tables, remove_partial_days,convert_c_to_f,convert_l_to_g, convert_on_off_col_to_bool, flag_dhw_outage,generate_event_log_df,convert_time_zone, shift_accumulative_columns,heat_output_calc
2
2
  from .lbnl import nclarity_filter_new, site_specific, condensate_calculations, gas_valve_diff, gather_outdoor_conditions, aqsuite_prep_time, nclarity_csv_to_df, _add_date, add_local_time, aqsuite_filter_new, get_refrig_charge, elev_correction, change_ID_to_HVAC, get_hvac_state, get_cop_values, get_cfm_values, replace_humidity, create_fan_curves, lbnl_temperature_conversions, lbnl_pressure_conversions, lbnl_sat_calculations, get_site_cfm_info, get_site_info, merge_indexlike_rows
3
3
  from .bayview import calculate_cop_values, aggregate_values, get_energy_by_min, verify_power_energy, get_temp_zones120, get_storage_gals120
4
4
  __all__ = ["rename_sensors", "avg_duplicate_times", "remove_outliers", "ffill_missing", "nullify_erroneous", "sensor_adjustment", "round_time", "aggregate_df", "join_to_hourly", "concat_last_row", "join_to_daily",
@@ -6,4 +6,4 @@ __all__ = ["rename_sensors", "avg_duplicate_times", "remove_outliers", "ffill_mi
6
6
  "nclarity_csv_to_df", "_add_date", "add_local_time", "aqsuite_filter_new", "get_refrig_charge", "elev_correction", "change_ID_to_HVAC", "get_hvac_state", "get_cop_values", "get_cfm_values", "replace_humidity",
7
7
  "create_fan_curves", "lbnl_temperature_conversions", "lbnl_pressure_conversions", "lbnl_sat_calculations", "get_site_cfm_info", "get_site_info", "merge_indexlike_rows", "calculate_cop_values", "aggregate_values",
8
8
  "get_energy_by_min", "verify_power_energy", "get_temp_zones120", "get_storage_gals120","convert_c_to_f","convert_l_to_g", "convert_on_off_col_to_bool", "flag_dhw_outage","generate_event_log_df","convert_time_zone",
9
- "shift_accumulative_columns"]
9
+ "shift_accumulative_columns","heat_output_calc"]
@@ -346,6 +346,36 @@ def nullify_erroneous(original_df: pd.DataFrame, config : ConfigManager) -> pd.D
346
346
 
347
347
  return df
348
348
 
349
+ def heat_output_calc(df: pd.DataFrame, flow_var : str, hot_temp : str, cold_temp : str, heat_out_col_name : str, return_as_kw : bool = True):
350
+ """
351
+ Function will take a flow varriable and two temperature inputs to calculate heat output
352
+
353
+ Parameters
354
+ ----------
355
+ df: pd.DataFrame
356
+ Pandas dataframe with minute-to-minute data
357
+ flow_var : str
358
+ The column name of the flow varriable for the calculation. Units of the column should be gal/min
359
+ hot_temp : str
360
+ The column name of the hot temperature varriable for the calculation. Units of the column should be degrees F
361
+ cold_temp : str
362
+ The column name of the cold temperature varriable for the calculation. Units of the column should be degrees F
363
+ heat_out_col_name : str
364
+ The new column name for the heat output calculated from the varriables
365
+ return_as_kw : bool
366
+ Set to true for new heat out column to have kW units. Set to false to return column as BTU/hr
367
+
368
+ Returns
369
+ -------
370
+ pd.DataFrame:
371
+ Pandas dataframe with new heat output column of specified name.
372
+ """
373
+ df[heat_out_col_name] = 500 * df[flow_var] * (df[hot_temp] - df[cold_temp]) #BTU/hr
374
+ df[heat_out_col_name] = np.where(df[heat_out_col_name] > 0, df[heat_out_col_name], 0)
375
+ if return_as_kw:
376
+ df[heat_out_col_name] = df[heat_out_col_name]/3412 # convert to kW
377
+ return df
378
+
349
379
  #TODO investigate if this can be removed
350
380
  def sensor_adjustment(df: pd.DataFrame, config : ConfigManager) -> pd.DataFrame:
351
381
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ecopipeline
3
- Version: 0.4.13
3
+ Version: 0.4.15
4
4
  Summary: Contains functions for use in Ecotope Datapipelines
5
5
  Classifier: Programming Language :: Python :: 3
6
6
  Classifier: License :: OSI Approved :: GNU General Public License (GPL)
@@ -2,16 +2,16 @@ ecopipeline/__init__.py,sha256=vCRzwd781ciCSXMP1ycM_BXAqxj3KVaNKIjsLOPcbwc,171
2
2
  ecopipeline/extract/__init__.py,sha256=3u_CUMdCguVewU3kN8x6xhVNyo1-p-gwTrhjOh7Psqg,645
3
3
  ecopipeline/extract/extract.py,sha256=w0bbzhy42gDnkMW320yGV46Wpq642KBKIfGAtc85CVg,42673
4
4
  ecopipeline/load/__init__.py,sha256=7ipv7GJfZ5382lcrdNm4MyM-WiCEVuRWTqxyzDSZhqg,197
5
- ecopipeline/load/load.py,sha256=t3gKw-O-GS8p_4GUa8SsD72dUpLFow_sAvUSfl_hZms,17422
6
- ecopipeline/transform/__init__.py,sha256=CS8pKzX1g1bpY5DuP8UxbtZZpAMC-D-IU5WKkWF7s9U,2196
5
+ ecopipeline/load/load.py,sha256=tAnhdPBqgs36G5j9fYc29mEZEs_2wXVEKCs7QOzSP9I,17463
6
+ ecopipeline/transform/__init__.py,sha256=BjrmFNeRLMdB8HS7ckV86VE79dGXkY8JbeYidLpOfUc,2232
7
7
  ecopipeline/transform/bayview.py,sha256=TP24dnTsUD95X-f6732egPZKjepFLJgDm9ImGr-fppY,17899
8
8
  ecopipeline/transform/lbnl.py,sha256=EQ54G4rJXaZ7pwVusKcdK2KBehSdCsNo2ybphtMGs7o,33400
9
- ecopipeline/transform/transform.py,sha256=Zlj0SU7NuRVVSYYP7cG6X2Me7jB7-3Gw8Oa1_UcCzaU,40175
9
+ ecopipeline/transform/transform.py,sha256=p-QO-AW65e4Aq_jKjQeb8Uf66ERAQgt8NQUCgaAm0Fg,41578
10
10
  ecopipeline/utils/ConfigManager.py,sha256=t4sfTjGO0g5P50XBQqGVFWaXfAlW1GMDh1DLoBuFGks,9826
11
11
  ecopipeline/utils/__init__.py,sha256=ccWUR0m7gD9DfcgsxBCLOfi4lho6RdYuB2Ugy_g6ZdQ,28
12
12
  ecopipeline/utils/unit_convert.py,sha256=6wTIpwmM9vQt6WmbCfa5ABITD_-yzcCl2ZKCnl0IFag,2973
13
- ecopipeline-0.4.13.dist-info/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
- ecopipeline-0.4.13.dist-info/METADATA,sha256=7xOjRf45KHglp44ioCtrBBVjAEcVmAykb1To_BAU3nY,2308
15
- ecopipeline-0.4.13.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
16
- ecopipeline-0.4.13.dist-info/top_level.txt,sha256=WOPFJH2LIgKqm4lk2OnFF5cgVkYibkaBxIxgvLgO7y0,12
17
- ecopipeline-0.4.13.dist-info/RECORD,,
13
+ ecopipeline-0.4.15.dist-info/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
+ ecopipeline-0.4.15.dist-info/METADATA,sha256=l1iCcTqybStgyxezaqAfwXIBerCCE_dCveO9D6pjsW0,2308
15
+ ecopipeline-0.4.15.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
16
+ ecopipeline-0.4.15.dist-info/top_level.txt,sha256=WOPFJH2LIgKqm4lk2OnFF5cgVkYibkaBxIxgvLgO7y0,12
17
+ ecopipeline-0.4.15.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.5.0)
2
+ Generator: setuptools (75.6.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5