Payroll expenditure and the number of employees over different years

Creating a bar plot with subplots to visualize information related to payroll expenditure and the number of employees over different years. Let’s break down the code and its implications:

Data Aggregation:

The data is first grouped by the ‘year’ column.

For each year, it calculates the total regular earnings (‘REGULAR’), total gross earnings (‘TOTAL_GROSS’), and the count of employees (‘NAME’).

Derived Metrics:

Two additional columns, ‘epc’ (average total earnings per capita) and ‘rpc’ (average regular earnings per capita), are calculated by dividing total gross earnings and regular earnings by the number of employees, respectively.

Plotting:

Creating a bar plot with two subplots.

The first subplot (ax1) represents the annual payroll expenditure in millions of dollars over different years.

The second subplot (ax2) represents the number of employees over different years.

Visualization:

The first subplot helps visualize how the total annual payroll expenditure changes over the years.

The second subplot shows the trend in the number of employees each year.

Saving the Plot:

 

The final plot is saved as an image file named ‘test.png’ with a resolution of 300 dpi.

Interpretation:

 

If the total payroll expenditure increases over the years, it might indicate growth or changes in salary structures.

The second subplot provides insights into employee count trends, which might be useful for understanding workforce dynamics.

Leave a Reply

Your email address will not be published. Required fields are marked *