Skip to content

Added a new output "Aggregated Exposure Values"#10268

Merged
micheles merged 4 commits into
masterfrom
agg_values
Jan 17, 2025
Merged

Added a new output "Aggregated Exposure Values"#10268
micheles merged 4 commits into
masterfrom
agg_values

Conversation

@micheles

Copy link
Copy Markdown
Contributor

For the WFP project.

@micheles micheles added this to the Engine 3.23.0 milestone Jan 16, 2025
@micheles micheles requested a review from ptormene January 16, 2025 15:31
@micheles micheles self-assigned this Jan 16, 2025

@raoanirudh raoanirudh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we call the new output and the corresponding filename agg_exposure? agg_keys is not very intuitive for the user.

@micheles

micheles commented Jan 21, 2025

Copy link
Copy Markdown
Contributor Author

I was thinking about agg_tags and aggrisk_tags since the aggregation is by tags, but I am open to suggestions. The final user will not see the name much in any case.

@raoanirudh

Copy link
Copy Markdown
Member

I was thinking about agg_tags and aggrisk_tags since the aggregation is by tag, but I am open to suggestions.

Is this aggregated risk or aggregated exposure though?

The final user will not see the name much in any case.

It does show up in the output filename, eg. agg_keys_5.csv

@micheles

micheles commented Jan 21, 2025

Copy link
Copy Markdown
Contributor Author

There is also a hidden output aggrisk_keys which is meant to be used programmatically (for instance in the risk profiles):

In [1]: ds=datastore.read(-1) # EventBasedRisk demo
In [2]: from openquake.calculators.extract import extract
In [3]: extract(ds, 'aggrisk_keys')
Out[3]: 
        NAME_1     number  nonstructural  ...  occupants_avg  nonstructural_risk  structural_risk
0      Central  1860271.0   3.691708e+10  ...      9156211.0        3.362334e+07     5.352983e+07
1         East  1222419.0   2.425890e+10  ...      5965417.0        1.321316e+07     2.064822e+07
2  Far-Western   497029.0   9.863541e+09  ...      2425532.0        9.718793e+06     1.509877e+07
3  Mid-Western   728432.0   1.445573e+10  ...      3554826.0        1.281419e+07     1.986575e+07
4         West  1057610.0   2.098827e+10  ...      5161162.0        1.890115e+07     2.950091e+07

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants