Properly assign representative income#1478
Merged
Merged
Conversation
lixiliu
reviewed
Aug 22, 2025
|
|
||
| import sys | ||
|
|
||
| sys.path.append(str(Path(__file__).resolve().parents[1])) |
Contributor
There was a problem hiding this comment.
I had to add this to import the income mapper. Maybe keep it until we have a default env for resstock? @rajeee
rajeee
commented
Aug 22, 2025
lixiliu
reviewed
Aug 22, 2025
|
|
||
| out_space_col = "out.panel.constraint.breaker_space" | ||
| space_constraint = pl.when(pl.col(space_col) <= 0).then(True).otherwise(False).alias(out_space_col) | ||
| space_constraint = pl.when(pl.col(space_col) < 0).then(True).otherwise(False).alias(out_space_col) |
Contributor
There was a problem hiding this comment.
0 headroom is technically not a constraint, so revising the logic here.
If the panel's breaker space becomes fully occupied after the upgrade, it's a tight fit but no intervention is needed, so no constraint.
rajeee
commented
Aug 22, 2025
lixiliu
reviewed
Aug 22, 2025
| income_expr = income_expr.when(pl.col("in.income").str.contains("\+")) | ||
| income_expr = income_expr.then( | ||
| pl.col("in.income").str.extract(r"(\d+)\+", 1).cast(pl.Float64, strict=False) | ||
| # Reassign negative or zero dollar income to 1 dollar |
Contributor
There was a problem hiding this comment.
There's a bunch of changes to this file b/c I formatted it with black.
The core change is here. In addition to the income mapper, I reassign 0 and negative income to 1 so we can approximate energy burden. @rajeee
lixiliu
approved these changes
Aug 23, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Description
Assigned income based on lookup derived from 2019 5-yrs ACS PUMS, same dataset for income characterization
Minor revision to panel constraint determination
Related Pull Requests
[related PRs from different repositories]
Related Issues
[What issue(s) is the PR addressing]
Checklist
Required:
Optional (not all items may apply):
openstudio tasks.rb update_measureshas been run