Skip to content

Commit

Permalink
Include exposure datasets in hazard type filter badge counts
Browse files Browse the repository at this point in the history
  • Loading branch information
lydiascarf committed Jun 15, 2024
1 parent 8e84d00 commit 722265d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/dist/bundle.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion scripts/src/components/rdl-hazard-type-filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@ export default class {
}

_hazardTypesWithCount (datasets, params) {
const exposureDatasets = datasets.filter(d => d.category.includes('Exposure'))
return chain(datasets)
.groupBy('hazard_type')
.flatMap(function (datasetsForHazardType, hazard_type) {
var hazardTypes = hazard_type.split(",")
var collated = hazardTypes.map(c => prep_hazard_type(c, params, datasetsForHazardType))
var collated = hazardTypes.map(c => prep_hazard_type(c, params, [...datasetsForHazardType,...exposureDatasets]))

return collated
})
Expand Down

0 comments on commit 722265d

Please sign in to comment.