gem / oq-engine

OpenQuake Engine: a software for Seismic Hazard and Risk Analysis
https://github.com/gem/oq-engine/#openquake-engine
GNU Affero General Public License v3.0
380 stars 273 forks source link

Fixed bug in `view_aggrisk` and rewritten `oq compare assetcol` #9757

Closed micheles closed 3 months ago

micheles commented 4 months ago

So that it can be used for Aristotle comparisons. Now I get

$ oq compare assetcol 145996 145997
The assetcol arrays have different columns:
Calc 145996:
('id', 'ordinal', 'lon', 'lat', 'site_id', 'value-number', 'value-contents', 'value-nonstructural', 'value-structural', 'value-residents', 'occupants_day', 'occupants_night', 'occupants_transit', 'value-area', 'occupants_avg', 'ideductible', 'taxonomy', 'ID_0', 'ID_1', 'OCCUPANCY')
Calc 145997:
('id', 'ordinal', 'lon', 'lat', 'site_id', 'occupants_day', 'value-nonstructural', 'occupants_transit', 'value-residents', 'value-contents', 'value-structural', 'occupants_night', 'value-area', 'value-number', 'occupants_avg', 'ideductible', 'taxonomy', 'ID_1', 'NAME_1', 'NAME_0', 'OCCUPANCY', 'ID_2', 'ID_0')
Comparing kfield='id', len(val0)=18155, len(val1)=19168, len(common)=18155
The column ID_0 is okay
The column ID_1 is okay
The column OCCUPANCY is okay
The column ideductible is okay
The column lat is okay
The column lon is okay
The column occupants_avg is okay
The column occupants_day is okay
The column occupants_night is okay
The column occupants_transit is okay
There are 11179 different elements in the 'taxonomy' column:
[45 54 65 ... 55 72 56] [47 56 67 ... 57 74 58]
The column value-area is okay
The column value-contents is okay
The column value-nonstructural is okay
The column value-number is okay
The column value-residents is okay
The column value-structural is okay