A synthesis of the production function and the shift-share model