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
Aggregation by tag #2943
Merged
Aggregation by tag #2943
Conversation
This file contains 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
Here's an example exposure model with two tags per asset separated by pipes, which should work with the master cases in https://github.com/gem/oq-risk-tests <?xml version='1.0' encoding='UTF-8'?>
<nrml xmlns:gml="http://www.opengis.net/gml"
xmlns="http://openquake.org/xmlns/nrml/0.5">
<exposureModel id="exp1" category="buildings">
<description>multiple assets em w/ insurance</description>
<conversions>
<area type="per_asset" unit="SQM" />
<costTypes>
<costType name="structural" type="per_asset" unit="USD" />
<costType name="nonstructural" type="per_asset" unit="USD" />
<costType name="contents" type="per_asset" unit="USD" />
<costType name="business_interruption" type="per_asset" unit="USD/month" />
</costTypes>
</conversions>
<assets>
<asset id="a1" number="1" area="100" taxonomy="tax1" tag="L1-01|L2-011" >
<location lon="-122.000" lat="38.113" />
<costs>
<cost type="structural" value="10000" deductible="0.1" insuranceLimit="0.8" />
<cost type="nonstructural" value="15000" deductible="0.1" insuranceLimit="0.8" />
<cost type="contents" value="5000" deductible="0.1" insuranceLimit="0.8" />
<cost type="business_interruption" value="2000" deductible="0.1" insuranceLimit="0.8" />
</costs>
<occupancies>
<occupancy occupants="2" period="day" />
<occupancy occupants="4" period="transit" />
<occupancy occupants="6" period="night" />
</occupancies>
</asset>
<asset id="a2" number="1" area="100" taxonomy="tax2" tag="L1-01|L2-012">
<location lon="-122.114" lat="38.113" />
<costs>
<cost type="structural" value="10000" deductible="0.1" insuranceLimit="0.8" />
<cost type="nonstructural" value="15000" deductible="0.1" insuranceLimit="0.8" />
<cost type="contents" value="5000" deductible="0.1" insuranceLimit="0.8" />
<cost type="business_interruption" value="2000" deductible="0.1" insuranceLimit="0.8" />
</costs>
<occupancies>
<occupancy occupants="2" period="day" />
<occupancy occupants="4" period="transit" />
<occupancy occupants="6" period="night" />
</occupancies>
</asset>
<asset id="a3" number="1" area="100" taxonomy="tax1" tag="L1-02|L2-021">
<location lon="-122.570" lat="38.113" />
<costs>
<cost type="structural" value="10000" deductible="0.1" insuranceLimit="0.8" />
<cost type="nonstructural" value="15000" deductible="0.1" insuranceLimit="0.8" />
<cost type="contents" value="5000" deductible="0.1" insuranceLimit="0.8" />
<cost type="business_interruption" value="2000" deductible="0.1" insuranceLimit="0.8" />
</costs>
<occupancies>
<occupancy occupants="2" period="day" />
<occupancy occupants="4" period="transit" />
<occupancy occupants="6" period="night" />
</occupancies>
</asset>
<asset id="a4" number="1" area="100" taxonomy="tax3" tag="L1-02|L2-022">
<location lon="-122.000" lat="38.000" />
<costs>
<cost type="structural" value="10000" deductible="0.1" insuranceLimit="0.8" />
<cost type="nonstructural" value="15000" deductible="0.1" insuranceLimit="0.8" />
<cost type="contents" value="5000" deductible="0.1" insuranceLimit="0.8" />
<cost type="business_interruption" value="2000" deductible="0.1" insuranceLimit="0.8" />
</costs>
<occupancies>
<occupancy occupants="2" period="day" />
<occupancy occupants="4" period="transit" />
<occupancy occupants="6" period="night" />
</occupancies>
</asset>
<asset id="a5" number="1" area="100" taxonomy="tax1" tag="L1-02|L2-023">
<location lon="-122.000" lat="37.910" />
<costs>
<cost type="structural" value="10000" deductible="0.1" insuranceLimit="0.8" />
<cost type="nonstructural" value="15000" deductible="0.1" insuranceLimit="0.8" />
<cost type="contents" value="5000" deductible="0.1" insuranceLimit="0.8" />
<cost type="business_interruption" value="2000" deductible="0.1" insuranceLimit="0.8" />
</costs>
<occupancies>
<occupancy occupants="2" period="day" />
<occupancy occupants="4" period="transit" />
<occupancy occupants="6" period="night" />
</occupancies>
</asset>
<asset id="a6" number="1" area="100" taxonomy="tax2" tag="L1-03|L2-031">
<location lon="-122.000" lat="38.225" />
<costs>
<cost type="structural" value="10000" deductible="0.1" insuranceLimit="0.8" />
<cost type="nonstructural" value="15000" deductible="0.1" insuranceLimit="0.8" />
<cost type="contents" value="5000" deductible="0.1" insuranceLimit="0.8" />
<cost type="business_interruption" value="2000" deductible="0.1" insuranceLimit="0.8" />
</costs>
<occupancies>
<occupancy occupants="2" period="day" />
<occupancy occupants="4" period="transit" />
<occupancy occupants="6" period="night" />
</occupancies>
</asset>
<asset id="a7" number="1" area="100" taxonomy="tax1" tag="L1-03|L2-032">
<location lon="-121.886" lat="38.113" />
<costs>
<cost type="structural" value="10000" deductible="0.1" insuranceLimit="0.8" />
<cost type="nonstructural" value="15000" deductible="0.1" insuranceLimit="0.8" />
<cost type="contents" value="5000" deductible="0.1" insuranceLimit="0.8" />
<cost type="business_interruption" value="2000" deductible="0.1" insuranceLimit="0.8" />
</costs>
<occupancies>
<occupancy occupants="2" period="day" />
<occupancy occupants="4" period="transit" />
<occupancy occupants="6" period="night" />
</occupancies>
</asset>
</assets>
</exposureModel>
</nrml> |
Please rename all files containing |
ptormene
reviewed
Jul 20, 2017
structural,LS1_stdv,6.673240E+02 | ||
structural,LS2_mean,1.800857E+03 | ||
structural,LS2_stdv,8.811050E+02 | ||
structural,no_damage_mean,3.394311E+03 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check if it's right that these numbers are changing
ptormene
approved these changes
Jul 20, 2017
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.
I am extending the aggregation by taxonomy to an aggregation by generic tag. The tag must not conflict with the taxonomy; except that, it can be any ASCII string up to 60 characters. If the string has spaces inside, it is split and considered as a set of tags, i.e. we multi-tag support for free, provided the tags are disjoint.
From @CatalinaYepes or @raoanirudh I need some example exposure with tags (i.e. CRESTA codes or kinds of residential buildings). We could update one of the existing demos or create a new one.
Right now the exported results are mixing together taxonomies and tags; we may want to change that in the future.
Here is a complete run: https://ci.openquake.org/job/zdevel_oq-engine/2560/