DataUSA / datausa-tracker

0 stars 0 forks source link

add percentage of workforce ratio #191

Closed jspeis closed 5 years ago

jspeis commented 6 years ago

for ACS occupation & industry cubes to add a calculated member that would show:

(number of people in occupation or industry) / (total workforce)

Would this be doable?

hwchen commented 5 years ago

I already had a stub in acs-pipe for doing percent calculations. I just need to fill in the percent calculation in the template and add calc_percent to the configs.

it'll look something like this, percent will be calculated per a particular dimension, let me know if we need something else:

     <CalculatedMember dimension="Measures" name="percent-age">
         <Annotations>
             <Annotation name="rca_dimensions">Age</Annotation>
         </Annotations>
         <Formula>
             ([Measures].[Population] / ([Age].[Age].[All Ages], [Measures].[Population]))
         </Formula>
     </CalculatedMember>
hwchen commented 5 years ago

implemented in lassen