Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run UCM Valuation and display results #129

Merged
merged 20 commits into from
Jan 18, 2024

Conversation

davemfish
Copy link
Contributor

@davemfish davemfish commented Jan 17, 2024

This PR links the ucm_valuation.py module with the invest post-processing routines in the worker. Results of valuation are stored alongside other summary statistics from the invest runs.

The frontend Results component is updated to display a new metric for each scenario:
"change in cooling costs" relative to the baseline scenario.

@davemfish davemfish changed the title Feature/89 ucm valuation Run UCM Valuation and display results Jan 18, 2024
@davemfish davemfish marked this pull request as ready for review January 18, 2024 14:53
@davemfish davemfish requested a review from dcdenu4 January 18, 2024 14:53
@davemfish davemfish self-assigned this Jan 18, 2024
Copy link
Member

@dcdenu4 dcdenu4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @davemfish, I just had two minor comments / questions.

Interesting to see the libraries used in the get_building_footprints script.

Comment on lines +523 to +525
feature.SetField(field_name, field_val)

layer.SetFeature(feature)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this is necessary but we've typically set layer and vector to None before exiting the function as a precaution to having any hanging files open. I'm not sure if this is still an issue with later versions of GDAL.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if it is necessary either. I took this function wholesale from invest, where we're not cleaning them up. But I have pushed a change to clean them up here.

base_info['projection_wkt'],
target_proj_wkt
)
print(bbox)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just seeing if it's helpful to keep this print statement here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think it is. This script is not run in production, it's meant to be run interactively.

@davemfish davemfish requested a review from dcdenu4 January 18, 2024 16:03
Copy link
Member

@dcdenu4 dcdenu4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@dcdenu4 dcdenu4 merged commit 43614cf into natcap:develop Jan 18, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants