Mahatma Gandhi once said, "Our ability to reach unity in diversity will be the beauty and the test of our civilization." Truly, a corporation that does not admire diversity is living in dark ages. HRDM i.e. Human Resource Diversity Monitor is a quick base app that aims to help a corporation's HR leadership manage diversity in a transparent manner. The solution's core is hosted in a quick base realm. The solution has a web interface for the HR leadership hosted on On the web interface, the HR leadership can enter their desired diversity goal, for instance, we want to have 50% black or african american employees in the workforce. Clicking the get insight button will tell if they have successfully met their diversity goal. In the case, they have failed to meet their diversity goal, it offers advice mentioning the exact no. of hires of a particular category required to meet the diversity goal. The web interface also displays information from leading corporations to encourage diversity. The web interface supports 2 genders (male & female) and 6 races (white, black or african american, two or more races, asian, american indian or alaska native, & hispanic) at the moment. The web interface interacts with the core through quick base restful json apis. The web interface uses open sans font from google fonts due to its delicacy. The css code is in style.css. The container div has a width of 30vw. Margin is auto to ensure center alignment. Text is left aligned. The javascript code is in script.js. There is a function, getRandomInt that takes a minimum and a maximum integer and returns a random integer in the range (minimum: inclusive, maximum: exclusive). The returned random integer is then used to display an item of the array informationstore that contains information to encourage the HR leadership to have a diverse workforce. The information changes every 3 seconds. After entering the required information, when the user presses the get insight button, the event listener for click is called. The function prepares the headers & the body. An xml http request with method post to the endpoint url, is opened. The request header is set. When ready state changes to done, the response text is json parsed and the data is stored in the data variable. Data contains values of requested fields for all rows in the employees table. The length of data array is stored in totalno variable. The array of objects is then traversed to count the no. of records that fulfill the diversity criteria specified, for instance, where race is equal to black or african american or sex is equal to female. The no. is stored in the variable diversityno. From diversityno & totalno, the percent value is calculated. It is compared with required value entered by the user. If percent value is lower than required value the required no. of hires of the specified diversity category is calculated.

var needtohire = (
          (requiredvalueindecimal * totalno - diversityno) /
          (-requiredvalueindecimal + 1)

The result div is updated with a message to indicate failure in meeting diversity goal along with percent value and hiring advice. If percent value is higher than or equal to required value the result div is updated with a message to indicate success in meeting diversity goal along with percent value.

Built With

Share this project: