Conversation
…ect full df of npa_projects
src/npa_howtopay/params.py
Outdated
| class ScenarioParams: | ||
| gas_electric: Literal["gas", "electric"] = field(validator=validators.in_(["gas", "electric"])) | ||
| capex_opex: Literal["capex", "opex"] = field(validator=validators.in_(["capex", "opex"])) | ||
| electric_fixed_cost_pct: float = field(validator=validators.and_(validators.ge(0.0), validator=validators.le(1.0))) |
There was a problem hiding this comment.
does this belong int ElectricParams?
There was a problem hiding this comment.
Yea probably, since we aren't going to vary it across scenarios to make plots. Will move
src/npa_howtopay/model.py
Outdated
| pl.col("gas_inflation_adjusted_revenue_requirement") | ||
| + pl.col("electric_inflation_adjusted_revenue_requirement") | ||
| ).alias("total_inflation_adjusted_revenue_requirement"), | ||
| (pl.col("gas_inflation_adjusted_revenue_requirement") / pl.col("num_users")).alias("gas_bill_per_user"), |
There was a problem hiding this comment.
change num_users to gas_num_users
src/npa_howtopay/model.py
Outdated
| + pl.col("electric_inflation_adjusted_revenue_requirement") | ||
| ).alias("total_inflation_adjusted_revenue_requirement"), | ||
| (pl.col("gas_inflation_adjusted_revenue_requirement") / pl.col("num_users")).alias("gas_bill_per_user"), | ||
| (pl.col("gas_inflation_adjusted_revenue_requirement") / pl.col("num_gas_users")).alias( |
There was a problem hiding this comment.
change num_gas_users to gas_num_users
src/npa_howtopay/model.py
Outdated
| "nonconverts_gas_bill_per_user" | ||
| ), | ||
| (pl.lit(0)).alias("converts_gas_bill_per_user"), | ||
| (pl.col("electric_inflation_adjusted_revenue_requirement") / pl.col("num_users")).alias( |
There was a problem hiding this comment.
change num_users to electric_num_users
src/npa_howtopay/model.py
Outdated
| ( | ||
| pl.lit(scenario_params.electric_fixed_cost_pct) | ||
| * pl.col("electric_inflation_adjusted_revenue_requirement") | ||
| / pl.col("num_users") |
There was a problem hiding this comment.
change num_users to electric_num_users
| return df.filter(year_filter & npa_filter).select(pl.col("num_converts")).sum().item() | ||
|
|
||
|
|
||
| def compute_npa_install_costs_from_df(year: int, df: pl.DataFrame, npa_install_cost: float) -> float: |
There was a problem hiding this comment.
i created a duplicate function but we can clean it up when we merge
src/npa_howtopay/params.py
Outdated
| electric: ElectricParams | ||
| shared: SharedParams | ||
|
|
||
| def __attrs_post_init__(self): |
There was a problem hiding this comment.
Are these getting used anywhere?
There was a problem hiding this comment.
Yea, in the inflation calcs
Also addressses: