Transportation Costs and Distance to Work Factors
Two possible indicators for absenteeism may also be the distance between home and work (the Distance from Residence to Work
column) and transportation costs (the Transportation expense
column). Employees who have to travel longer, or whose costs for commuting to work are high, might be more prone to absenteeism.
In this section, we will investigate the relationship between these variables and the absence time in hours. Since we do not believe the aforementioned factors might be indicative of disease problems, we will not consider a possible relationship with the Reason for absence
column.
First, let's start our analysis by plotting the previously mentioned columns (Distance from Residence to Work
and Transportation expense
) against the Absenteeism time in hours
column:
# plot transportation costs and distance to work against hours plt.figure(figsize=(10, 6)) sns.jointplot(x="Distance from Residence to Work",...