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 return 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+Image](https://dq06ugkuram52.cloudfront.net/files/3757091/14988950-icon.png)
GOV.UK Gender Pay Gap Service
e5
Number of Workers
Research lock_open
![Clean Clothes Campaign+Image](https://dq06ugkuram52.cloudfront.net/files/564260/12604027-icon.png)
Clean Clothes Campaign
e3
Number of Workers (Range)
Research lock_open
![Open Supply Hub+Image](https://dq06ugkuram52.cloudfront.net/files/5661929/40040943-icon.jpeg)
Open Supply Hub
e7
Approximate Number of Employees
Research lock
![B Lab+Image](https://dq06ugkuram52.cloudfront.net/files/13659783/34514228-icon.png)
B Lab
e6
Number of employees
Research lock
![Net Zero Tracker+Image](https://dq06ugkuram52.cloudfront.net/files/14312194/37081386-icon.jpg)
Net Zero Tracker
e4
Value Type
Number
Unit
employees
Options
Researchable
no
Research Policy
Community Assessed