officerReportsIncludeNoNameData = {
const allResults = [...officerReportsRawData]
const oneOrTwoReports = allResults.splice(0, 2)
const threeReportsOrMore = allResults
const noName = allResults.pop()
const one = oneOrTwoReports[0].total_reports
const two = oneOrTwoReports[1].total_reports
const threeOrMore = threeReportsOrMore.reduce((int, item) => {
int += item.total_reports
return int
}, 0)
return [
{ value: one, label:'One report' },
{ value: two, label:'Two reports' },
{ value: threeOrMore, label:'Three or more reports' },
{ value: noName.total_reports, label:'Reports without officer name'}
]
}