Formula
answers = [e1, e2, e3, e4, e5, e6, e7] mapper = { 'Less than 250': 0, '250 to 499': 250, '500 to 999': 500, '1000 to 4999': 1000, '5000 to 19,999': 5000, '20,000 or more': 20000, 'Not Provided': 0, '0': 0, '1-9': 1, '10-49': 10, '50-249': 50, '250-999': 250, '250+': 250, '1000+': 1000, 'Less than 1000': 0, '1001-5000': 1001, '5001-10000': 5001, 'More than 10000': 10000, } isNumber = (n) -> return not isNaN(parseFloat(n)) and isFinite(n) mapAnswer = (answer) -> if answer of mapper return mapper[answer] if isNumber answer return answer 0 mappedAnswers = answers.map (answer) -> mapAnswer(answer) mappedAnswers.reduce (a,b) -> Math.max a, b
Global Reporting Initiative
e1
Employer Size
Research lock
GOV.UK Gender Pay Gap Service
e5
Number of Workers
Research lock_open
Clean Clothes Campaign
e3
Number of Workers (Range)
Research lock_open
Open Supply Hub
e7
Approximate Number of Employees
Research lock
B Lab
e6
Number of employees
Research lock
Net Zero Tracker
e4
Topics
Value Type
Number
Unit
employees
Options
Researchable
yes
Research Policy
Designer Assessed
Report Type
Company Website
, Annual Report