Employees by Population (Per Million)
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © barnabygraham

// For easier reading, this indicator multiplies it's output by 1,000,000 to measure how many employees there are per million people.
//@version=5

indicator("Employees by Population (Per Million)")
employees = request.financial(syminfo.tickerid,'NUMBER_OF_EMPLOYEES','FY')
USpopulation = request.security('FRED:POPTHM','',close)
USemployedPopulation = request.security('FRED:CNP16OV','',close)
populationChoice = input.string('US Total','Population',['US Total','US Employed'])
population = populationChoice == 'US Total' ? USpopulation : USemployedPopulation
employeesByPopulation = employees / population
plot(1000000*employeesByPopulation)