mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
minor exporting data
This commit is contained in:
parent
a1b207ba55
commit
87afac8631
2 changed files with 9 additions and 9 deletions
|
|
@ -83,7 +83,7 @@ def process_export(
|
||||||
else:
|
else:
|
||||||
scenario_recs = recommendations_df[
|
scenario_recs = recommendations_df[
|
||||||
recommendations_df["scenario_id"] == group_key
|
recommendations_df["scenario_id"] == group_key
|
||||||
]
|
]
|
||||||
|
|
||||||
if scenario_recs.empty:
|
if scenario_recs.empty:
|
||||||
logger.info(
|
logger.info(
|
||||||
|
|
@ -140,8 +140,8 @@ def handler(
|
||||||
body_dict = {
|
body_dict = {
|
||||||
"task_id": "test",
|
"task_id": "test",
|
||||||
"subtask_id": "test",
|
"subtask_id": "test",
|
||||||
"portfolio_id": 682,
|
"portfolio_id": 632,
|
||||||
"scenario_ids": [1210],
|
"scenario_ids": [1144],
|
||||||
"default_plans_only": False,
|
"default_plans_only": False,
|
||||||
}
|
}
|
||||||
:param event: Lambda event containing export request details
|
:param event: Lambda event containing export request details
|
||||||
|
|
|
||||||
|
|
@ -26,13 +26,13 @@ from backend.app.db.functions.materials_functions import get_materials
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from sqlalchemy import func
|
from sqlalchemy import func
|
||||||
|
|
||||||
PORTFOLIO_ID = 711
|
PORTFOLIO_ID = 632
|
||||||
SCENARIOS = [1233]
|
SCENARIOS = [1144]
|
||||||
scenario_names = {
|
scenario_names = {
|
||||||
1233: "Reach EPC C",
|
1144: "EPC C",
|
||||||
}
|
}
|
||||||
|
|
||||||
project_name = "Novus"
|
project_name = "Calico"
|
||||||
|
|
||||||
|
|
||||||
def get_data(portfolio_id, scenario_ids):
|
def get_data(portfolio_id, scenario_ids):
|
||||||
|
|
@ -230,7 +230,7 @@ for scenario_id in SCENARIOS:
|
||||||
# Get recs for this scenario
|
# Get recs for this scenario
|
||||||
recommended_measures_df = recommendations_df[
|
recommended_measures_df = recommendations_df[
|
||||||
recommendations_df["scenario_id"] == scenario_id
|
recommendations_df["scenario_id"] == scenario_id
|
||||||
][["property_id", "measure_type", "estimated_cost", "default"]]
|
][["property_id", "measure_type", "estimated_cost", "default"]]
|
||||||
recommended_measures_df = recommended_measures_df[
|
recommended_measures_df = recommended_measures_df[
|
||||||
recommended_measures_df["default"]
|
recommended_measures_df["default"]
|
||||||
]
|
]
|
||||||
|
|
@ -238,7 +238,7 @@ for scenario_id in SCENARIOS:
|
||||||
|
|
||||||
post_install_sap = recommendations_df[
|
post_install_sap = recommendations_df[
|
||||||
recommendations_df["scenario_id"] == scenario_id
|
recommendations_df["scenario_id"] == scenario_id
|
||||||
][["property_id", "default", "sap_points"]]
|
][["property_id", "default", "sap_points"]]
|
||||||
post_install_sap = post_install_sap[post_install_sap["default"]]
|
post_install_sap = post_install_sap[post_install_sap["default"]]
|
||||||
# Sum up the sap points by property id
|
# Sum up the sap points by property id
|
||||||
post_install_sap = (
|
post_install_sap = (
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue