btihen
6/16/2014 - 9:32 PM

Utilization Analysis

Utilization Analysis

# returns analysis

# Utilization

# Bash

echo "count day hour techs" > util-by-hr.csv
cat laptop-inventory.csv | cut -d';' -f44 | grep 2014 | cut -d'"' -f2 | sed 's/:[0-9][0-9]:[0-9][0-9]$/:00/g' | grep '2014-05' | sed 's/2014-05-//g' | grep '2[0-9]' | sort | uniq -c | awk ' {print $1, $2, $3, 1}' >> util-by-hr.csv

echo "count day time techs" > util-by-10min.csv
cat laptop-inventory.csv | cut -d';' -f44 | grep 2014 | cut -d'"' -f2 | sed 's/[0-9]:[0-9][0-9]$/0/g' | grep '2014-05' | sed 's/2014-05-//g' | grep '2[0-9]' | sort | uniq -c | awk ' {print $1, $2, $3, 1}' >> util-by-10min.csv

#
# BY HAND 
#
# Add the times when there were two or more people
#


# Switch to R

by_hr = read.csv("returns-by-hr.csv",sep=" ")

# a tech can collect 4 computers at 100% in a ten minute time frame (there are 6 10 minute intervals in an hour)
by_hr$util  = by_hr$count/(by_hr$techs * 4 * 6) * 100

pdf(file="./util_by_hr.pdf")
plot(by_hr$util ~ by_hr$hour, main="Tech Time Utilization/Hour (May 20-29, 2014)", xlab="Hour",ylab="Percent Utilization")
dev.off()
plot(by_hr$util ~ by_hr$hour, main="Tech Time Utilization/Hour (May 20-29, 2014)", xlab="Hour",ylab="Percent Utilization")


pdf(file="./util_all_by_hr.pdf")
boxplot(by_hr$util,main="Utilization/Hour of Tech Resources during collection", ylab="Utilization")
dev.off()
boxplot(by_hr$util,main="Utilization/Hour of Tech Resources during collection", ylab="Utilization")



by_ten = read.csv("returns-by-10min.csv",sep=" ")

# a tech can collect 4 computers at 100% in a ten minute time frame 
by_ten$util = by_ten$count/(by_ten$techs * 4) * 100

pdf(file="./util_by_10min.pdf")
plot(by_ten$util ~ by_ten$time, main="Tech Time Utilization/10min (May 20-29, 2014)", xlab="Time",ylab="Percent Utilization")
dev.off()
plot(by_ten$util ~ by_ten$time, main="Tech Time Utilization/10min (May 20-29, 2014)", xlab="Time",ylab="Percent Utilization")

pdf(file="./util_all_by_10min.pdf")
boxplot(by_ten$util,main="Utilization/10min of Tech Resources during collection", ylab="Utilization")
dev.off()
boxplot(by_ten$util,main="Utilization/10min of Tech Resources during collection", ylab="Utilization")


#draw a target zone!