Added daytime property
This commit is contained in:
@@ -205,9 +205,8 @@ function summarise(slots) {
|
||||
|
||||
// Most frequent label/code by occurrence
|
||||
const labelCount = {}
|
||||
for (const s of slots) labelCount[s.label] = (labelCount[s.label] || 0) + 1
|
||||
const label = Object.entries(labelCount).filter(row => row.daytime)
|
||||
.sort((a, b) => b[1] - a[1])[0][0]
|
||||
for (const s of slots.filter(s => s.daytime)) labelCount[s.label] = (labelCount[s.label] || 0) + 1
|
||||
const label = Object.entries(labelCount).sort((a, b) => b[1] - a[1])[0][0]
|
||||
const dominant = slots.find(s => s.label === label)
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user