# Load packages and data
library(ggplot2)
tailgatesv <- read.csv ("/Users/squishy/Dropbox/Recycling GRA/Tailgating Study/Tailgating Data/Tailgating Data - Survey Data.csv") # Load, examine, and clean dataset
str(tailgatesv)
## 'data.frame': 94 obs. of 26 variables:
## $ BagID : Factor w/ 93 levels "106","107","108",..: 75 76 62 58 79 71 84 68 70 64 ...
## $ Interviewer : Factor w/ 9 levels "","AH","AP","JB",..: 2 2 7 8 6 3 3 5 5 5 ...
## $ Date : int 151017 151017 151017 151017 151017 151017 151017 151017 151017 151017 ...
## $ Lot : Factor w/ 3 levels "Duane","Franklin",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ SurveyAgreement : int 1 1 1 1 0 1 1 1 1 1 ...
## $ PassOwnership : int 0 1 0 1 NA 1 1 1 1 0 ...
## $ PrevTailgate : int 0 1 1 1 NA 1 1 1 1 1 ...
## $ PrevReceiveBag : int NA 1 1 1 NA 1 1 1 1 1 ...
## $ BagUse : int NA 3 1 3 NA 3 1 3 3 3 ...
## $ WhyNotUse : Factor w/ 5 levels "","Bring thier own",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ ReWhyNotUse : Factor w/ 3 levels "","Brought own bag",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ ClearHowUse : int 1 1 1 1 NA 1 1 1 1 1 ...
## $ RegularRecycle : int 1 1 1 1 NA 1 1 1 1 1 ...
## $ RegularCompost : int 0 1 0 0 NA 1 0 1 1 0 ...
## $ SchoolSustainImp: int 2 3 2 2 NA 3 3 3 1 2 ...
## $ CUSustainGrade : num 4 4 4 3 NA 4 3 3.3 4 4 ...
## $ RecycleRecomm : Factor w/ 46 levels "Already does a good job.",..: NA NA 32 26 NA 31 NA 12 42 NA ...
## $ ReRecycleRecom : Factor w/ 16 levels "Add composting ",..: NA NA 16 11 NA 16 NA 10 15 NA ...
## $ SustainRecomm : Factor w/ 28 levels "Already do a great job",..: NA NA 28 NA NA 13 NA 6 23 NA ...
## $ ReSustainRecomm : Factor w/ 7 levels "Add solar and wind to CU's power supply",..: NA NA 5 NA NA 6 NA 3 5 NA ...
## $ Gender : int 0 1 1 1 1 0 1 0 0 0 ...
## $ AgeRange : int 1 1 2 1 3 3 3 3 3 1 ...
## $ CarPeople : int 6 4 3 7 10 8 7 3 3 7 ...
## $ FanTeam : Factor w/ 3 levels "C","O","X": 2 1 1 1 1 1 1 1 1 1 ...
## $ BagVisible : int 0 1 1 1 1 1 1 1 1 0 ...
## $ AddtlComment : Factor w/ 37 levels "25+ years been tailgaiting at CU! Didn't like that we were handing out pins b/c ppl will just be throwing them away. Wasteful. "| __truncated__,..: NA NA 1 16 21 36 NA 2 31 25 ...
Dates
tailgatesv$Date <- factor(tailgatesv$Date) #Tell R dates are factors
summary(tailgatesv$Date)
## 151017 151107
## 29 65
There were 94 attempted surveys over the two days of fieldwork. 29 were conducted on October 17, 65 on November 7.
Interviewers
summary(tailgatesv$Interviewer) # Overall summary
## AH AP JB JN KH MO NH TG
## 3 26 18 7 15 7 2 6 10
Lots
summary(tailgatesv$Lot) # Overall summary
## Duane Franklin Lot169
## 29 44 21
Surveys were conducted in Duane only on October 17 and conducted in Franklin and Lot 169 only on November 7.
Survey Agreement
tailgatesv$SurveyAgreement <- factor(tailgatesv$SurveyAgreement) # # Factor variable
DuaneAccept <- nrow(tailgatesv[tailgatesv$Lot=="Duane" & tailgatesv$SurveyAgreement==1,]) # Agreements in Duane
DuaneReject <- nrow(tailgatesv[tailgatesv$Lot=="Duane" & tailgatesv$SurveyAgreement==0,]) # Rejections in Duane
FranklinAccept <- nrow(tailgatesv[tailgatesv$Lot=="Franklin" & tailgatesv$SurveyAgreement==1,]) # Agreements in Franklin
FranklinReject <- nrow(tailgatesv[tailgatesv$Lot=="Franklin" & tailgatesv$SurveyAgreement==0,]) # Rejections in Franklin
Lot169Accept <- nrow(tailgatesv[tailgatesv$Lot=="Lot169" & tailgatesv$SurveyAgreement==1,]) # Agreements in Lot 169
Lot169Reject <- nrow(tailgatesv[tailgatesv$Lot=="Lot169" & tailgatesv$SurveyAgreement==0,]) # Rejections in Lot 169
# Summary stats
summary(tailgatesv$SurveyAgreement) # Overall summary
## 0 1
## 15 79
79/(length(tailgatesv$SurveyAgreement)) #Overall acceptance %
## [1] 0.8404255
DuaneAccept
## [1] 22
DuaneReject
## [1] 7
DuaneAccept/(DuaneAccept+DuaneReject) # Duane acceptance %
## [1] 0.7586207
FranklinAccept
## [1] 37
FranklinReject
## [1] 7
FranklinAccept/(FranklinAccept + FranklinReject) # Franklin acceptance %
## [1] 0.8409091
Lot169Accept
## [1] 20
Lot169Reject
## [1] 1
Lot169Accept/(Lot169Accept + Lot169Reject) # Lot 169 acceptance %
## [1] 0.952381
surveys <- 79 # Number of accepted surveys
# Subset data to survey reponses only
tailgatesvA <- subset(tailgatesv, SurveyAgreement==1)
summary(tailgatesvA$Date)
## 151017 151107
## 22 57
summary(tailgatesvA$Lot)
## Duane Franklin Lot169
## 22 37 20
Of the 94 surveys offered, 79 were accepted, which is an 84% acceptance rate. By lot, 75% fans in Duane accepted a survey, 84% in Franklin, and 95% in Lot 169.
Fan Gender
tailgatesvA$Gender <- factor(tailgatesvA$Gender)
summary(tailgatesvA$Gender)
## 0 1
## 53 26
53/surveys # Male
## [1] 0.6708861
26/surveys # Female
## [1] 0.3291139
66% of approaches fans were male, 31% female, and 3% were NA.
Fan Age
tailgatesvA$AgeRange <- factor(tailgatesvA$AgeRange)
summary(tailgatesvA$AgeRange)
## 1 2 3
## 21 42 16
21/surveys # Age 18-35
## [1] 0.2658228
42/surveys # Age 35-55
## [1] 0.5316456
16/surveys # Age 55+
## [1] 0.2025316
27% were in age group 18-35, 53% were in age group 35-55, 20% were age 55+.
Number of People in the Group
tailgatesvA$CarPeople <- factor(tailgatesvA$CarPeople)
summary(tailgatesvA$CarPeople)
## 1 2 3 4 5 6 7 8 9 10 12 15 NA's
## 1 5 13 14 8 10 9 10 4 2 1 1 1
1/surveys # 1 person
## [1] 0.01265823
5/surveys # 2 people
## [1] 0.06329114
13/surveys # 3 people
## [1] 0.164557
14/surveys # 4 people
## [1] 0.1772152
8/surveys # 5 people
## [1] 0.1012658
10/surveys # 6 people
## [1] 0.1265823
9/surveys # 7 people
## [1] 0.1139241
10/surveys # 8 people
## [1] 0.1265823
4/surveys # 9 people
## [1] 0.05063291
2/surveys # 10 people
## [1] 0.02531646
1/surveys # 12 people
## [1] 0.01265823
1/surveys # 15 people
## [1] 0.01265823
1/surveys # NA
## [1] 0.01265823
Tailgating groups ranged from groups of 1 to 15 individuals, with most groups consisting of 3 to 8 individuals.
Fan Affiliation
summary(tailgatesvA$FanTeam)
## C O X
## 77 1 1
77/surveys # CU fan
## [1] 0.9746835
1/surveys # Other team's fan
## [1] 0.01265823
1/surveys # NA
## [1] 0.01265823
Almost all the respondent (97%) were identified as CU fans.
Recycling Bag Visibility
summary(tailgatesvA$BagVisible)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 0.0000 0.0000 1.0000 0.7288 1.0000 1.0000 20
tailgatesvA$BagVisible[is.na(tailgatesvA$BagVisible)] <- 0 # Assume NA's mean the bag was not visible, recode as 0's
summary(tailgatesvA$BagVisible)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 0.0000 0.0000 1.0000 0.5443 1.0000 1.0000
43/surveys # Visible
## [1] 0.5443038
36/surveys # Not visible
## [1] 0.4556962
54% of survey responents were seen visibly using the recycling bag. 46% were not visibly using the bag.
Pass Ownership
tailgatesvA$PassOwnership <- factor(tailgatesvA$PassOwnership) # Factor variable
summary(tailgatesvA$PassOwnership)
## 0 1
## 36 43
43/surveys # Owns pass
## [1] 0.5443038
36/surveys # Doesn't own pass
## [1] 0.4556962
54% of respondents owned a tailgating pass, 46% did not. There were no NA’s since there were 15 fans who did not accept the survey.
Previous Experiences wtih CU Tailgating
tailgatesvA$PrevTailgate <- factor(tailgatesvA$PrevTailgate) # Factor variable
summary(tailgatesvA$PrevTailgate)
## 0 1 NA's
## 3 75 1
75/surveys # Yes
## [1] 0.9493671
3/surveys # No
## [1] 0.03797468
1/surveys # NA
## [1] 0.01265823
95% of respondents have had previous tailgating experience. 4% did not. 1% did not respond.
Previous Experience with Receiving Recyling Bags
tailgatesvA$PrevReceiveBag <- factor(tailgatesvA$PrevReceiveBag) # Factor variable
summary(tailgatesvA$PrevReceiveBag)
## 0 1 NA's
## 16 61 2
61/surveys # Yes
## [1] 0.7721519
16/surveys # No
## [1] 0.2025316
2/surveys # NA
## [1] 0.02531646
77% of respondents previously received recycling bags. 20% did not. And 3% did not respond.
Frequency of Using EC Recycling Bag
tailgatesvA$BagUse <- factor(tailgatesvA$BagUse) # Factor variable
summary(tailgatesvA$BagUse) # There is one data point that is a "0". I believe this is an error in data entry. "1", "2", "3"" corresponds with "no", "sometimes", "yes" respectively, so I'm recoding the "0" as a "1"
## 0 1 2 3 NA's
## 1 7 2 52 17
tailgatesvA$BagUse[tailgatesvA$BagUse=="0"] <- "1" # Reassign 0 with a 1
summary(tailgatesvA$BagUse)
## 0 1 2 3 NA's
## 0 8 2 52 17
52/surveys # Yes
## [1] 0.6582278
2/surveys # Sometimes
## [1] 0.02531646
8/surveys # No
## [1] 0.1012658
17/surveys #NA's
## [1] 0.2151899
summary(tailgatesvA$ReWhyNotUse) # Why respondents did not use the EC bags
## Brought own bag
## 75 3
## Didn't have anything to recyle
## 1
65% of respondents said they recycle. 3% said they sometimes do. 10% said they do not recycle. 22% did not respond.
Two who did not use recycling bags given by the Environmental Center and one who sometimes do explained why they do not always use the bags. Two said they bring their own bags, one said they did not receive a bag
It is interesting to compare survey responses with the team’s observations of recycling bag use. 54% were seen visibly using the recycling bag. 46% were not visibly using the bag.
Bag Use Clarity
tailgatesvA$ClearHowUse <- factor(tailgatesvA$ClearHowUse)
summary(tailgatesvA$ClearHowUse)
## 0 1
## 2 77
77/surveys # Yes
## [1] 0.9746835
2/surveys # No
## [1] 0.02531646
97% of respondents said it was clear how to use the bag. 3% said it was not clear.
Habits at Home
# Factor variables
tailgatesvA$RegularRecycle <- factor(tailgatesvA$RegularRecycle)
tailgatesvA$RegularCompost <- factor(tailgatesvA$RegularCompost)
# Recycling habits
summary(tailgatesvA$RegularRecycle)
## 0 1
## 4 75
75/surveys # Yes
## [1] 0.9493671
4/surveys # No
## [1] 0.05063291
# Composting habits
summary(tailgatesvA$RegularCompost)
## 0 1
## 53 26
26/surveys # Yes
## [1] 0.3291139
53/surveys # No
## [1] 0.6708861
95% of respondents said they recycle at home (5% said they did not).
33% of respondents said they compost at home (67% said they did not).
School Sustainability
# Factor variables
tailgatesvA$SchoolSustainImp <- factor(tailgatesvA$SchoolSustainImp)
tailgatesvA$CUSustainGrade <- factor(tailgatesvA$CUSustainGrade)
# Sustainability importance to fan
summary(tailgatesvA$SchoolSustainImp)
## 1 2 3
## 7 23 49
49/surveys # Very
## [1] 0.6202532
23/surveys # Somewhat
## [1] 0.2911392
7/surveys # Not very
## [1] 0.08860759
# Fan's grade for CU's sustainability
summary(tailgatesvA$CUSustainGrade)
## 2 2.7 3 3.3 3.7 4 4.3
## 4 1 11 2 5 48 8
8/surveys # A+ (4.3)
## [1] 0.1012658
48/surveys # A (4.0)
## [1] 0.6075949
5/surveys # A- (3.7)
## [1] 0.06329114
2/surveys # B+ (3.3)
## [1] 0.02531646
11/surveys # B (3.0)
## [1] 0.1392405
1/surveys # B- (2.7)
## [1] 0.01265823
4/surveys # C (2.0)
## [1] 0.05063291
# Recollapse grades
tailgatesvA$CUSustainGrade[tailgatesvA$CUSustainGrade==4.3 | tailgatesvA$CUSustainGrade==3.7] <- 4 # Reassign A's
tailgatesvA$CUSustainGrade[tailgatesvA$CUSustainGrade==3.3 | tailgatesvA$CUSustainGrade==2.7] <- 3 # Reassign B's
summary(tailgatesvA$CUSustainGrade) # Recheck all grades are collapsed
## 2 2.7 3 3.3 3.7 4 4.3
## 4 0 14 0 0 61 0
61/surveys # A
## [1] 0.7721519
14/surveys # B
## [1] 0.1772152
4/surveys # C
## [1] 0.05063291
62% of respondents said that it is very important that CU take steps to reduce its environmental impact (29% said it’s somewhat important, 9% said it’s not very important). The majority of respondents (77%) gave CU an ‘A’ for its sustainability efforts (18% gave a ‘B’, 5% gave a ‘C’, and 16% did not give a grade).
How Can CU Improve
summary(tailgatesvA$ReRecycleRecom) # How to make it easier to recycle at Buffs games
## Add composting
## 1
## Bigger common trash and reycling bins
## 1
## Give out reycling bags at the entrance
## 2
## Have different-sized recycling bags
## 2
## Have separate bins for different recyclables
## 2
## Have someone on site to help people reycle
## 2
## Increase visibility of the common bins
## 2
## Install water filling stations
## 1
## Make common recycling bins permanent fixtures in the lots
## 1
## Make it easier to know what can be recycled
## 4
## More common trash and recycling bins
## 6
## More common trash and recycling bins. Add composting
## 1
## More common trash and recycling bins. Install water filling stations
## 1
## Other
## 4
## The benefits of recycling are not worth the resources
## 1
## Things are good as is
## 14
## NA's
## 34
summary(tailgatesvA$ReSustainRecomm) # Other recommendations for sustability efforts
## Add solar and wind to CU's power supply
## 6
## Encourage statewide efforts to recycle. Encourage better ways to reduce waste. Create non-recycleable products.
## 1
## Increase education and awareness
## 1
## Increase education and awareness. Add water filling stations
## 1
## Other
## 8
## Things are good as is
## 7
## Use less plastic water bottles
## 1
## NA's
## 54
# Convert variables back to numeric
tailgatesvA$CUSustainGrade <- as.numeric(as.character(tailgatesvA$CUSustainGrade)) # Convert factor back to integers
Sustainability Grades
# Grades by gender
gen <- table(tailgatesvA$CUSustainGrade, tailgatesvA$Gender)
gen
##
## 0 1
## 2 2 2
## 3 10 4
## 4 41 20
colSums(gen)
## 0 1
## 53 26
a <- gen[1, ]/colSums(gen) # Find grade % by row
b <- gen[2, ]/colSums(gen)
c <- gen[3, ]/colSums(gen)
genPC <- genPC <- matrix(c(a,b,c), nrow=3, byrow=T) # Rebuild dataframe
rownames(genPC) <- c("C", "B", "A") # Rename rows
colnames(genPC) <- c("Male", "Female") # Rename columns
genPC
## Male Female
## C 0.03773585 0.07692308
## B 0.18867925 0.15384615
## A 0.77358491 0.76923077
barplot(height=genPC, main="Sustainability Grade by Gender", col=c("powderblue","skyblue3", "royalblue4"))
# Grades by age
age <- table(tailgatesvA$CUSustainGrade, tailgatesvA$AgeRange)
age
##
## 1 2 3
## 2 1 1 2
## 3 2 8 4
## 4 18 33 10
a <- age[1, ]/colSums(age) # Find grade % by row
b <- age[2, ]/colSums(age)
c <- age[3, ]/colSums(age)
agePC <- agePC <- matrix(c(a,b,c), nrow=3, byrow=T) # Rebuild dataframe
rownames(agePC) <- c("C", "B", "A") # Rename rows
colnames(agePC) <- c("18-35", "35-55", "55+") # Rename columns
agePC
## 18-35 35-55 55+
## C 0.04761905 0.02380952 0.125
## B 0.09523810 0.19047619 0.250
## A 0.85714286 0.78571429 0.625
barplot(height=agePC, main="Sustainability Grade by Age Group", col=c("powderblue","skyblue3", "royalblue4"))
# Grades by bag use
bag <- table(tailgatesvA$CUSustainGrade, tailgatesvA$BagVisible)
bag
##
## 0 1
## 2 1 3
## 3 7 7
## 4 28 33
a <- bag[1, ]/colSums(bag) # Find opinion % by row
b <- bag[2, ]/colSums(bag)
c <- bag[3, ]/colSums(bag)
bagPC <- matrix(c(a,b,c), nrow=3, byrow=T) # Rebuild dataframe
rownames(bagPC) <- c("C", "B", "A") # Rename rows
colnames(bagPC) <- c("No visible bag", "Visible bag") # Rename columns
bagPC
## No visible bag Visible bag
## C 0.02777778 0.06976744
## B 0.19444444 0.16279070
## A 0.77777778 0.76744186
barplot(height=bagPC, main="Sustainability Grade by Bag Use", col=c("powderblue","skyblue3", "royalblue4"))
Opinion on the Importance of Sustainability
# Sustainability importance by gender
opGen <- table(tailgatesvA$SchoolSustainImp, tailgatesvA$Gender)
opGen
##
## 0 1
## 1 7 0
## 2 16 7
## 3 30 19
a <- opGen[1, ]/colSums(opGen) # Find opinion % by row
b <- opGen[2, ]/colSums(opGen)
c <- opGen[3, ]/colSums(opGen)
opGenPC <- matrix(c(a,b,c), nrow=3, byrow=T) # Rebuild dataframe
rownames(opGenPC) <- c("Not very", "Somewhat", "Very") # Rename rows
colnames(opGenPC) <- c("Male", "Female") # Rename columns
opGenPC
## Male Female
## Not very 0.1320755 0.0000000
## Somewhat 0.3018868 0.2692308
## Very 0.5660377 0.7307692
barplot(height=opGenPC, main="Sustainability Importance by Gender", col=c("powderblue","skyblue3", "royalblue4"))
# Sustainability importance by age
opAge <- table(tailgatesvA$SchoolSustainImp, tailgatesvA$AgeRange)
opAge
##
## 1 2 3
## 1 0 4 3
## 2 7 13 3
## 3 14 25 10
a <- opAge[1, ]/colSums(opAge) # Find opinion % by row
b <- opAge[2, ]/colSums(opAge)
c <- opAge[3, ]/colSums(opAge)
opAgePC <- matrix(c(a,b,c), nrow=3, byrow=T) # Rebuild dataframe
rownames(opAgePC) <- c("Not very", "Somewhat", "Very") # Rename rows
colnames(opAgePC) <- c("18-35", "35-55", "55+") # Rename columns
opAgePC
## 18-35 35-55 55+
## Not very 0.0000000 0.0952381 0.1875
## Somewhat 0.3333333 0.3095238 0.1875
## Very 0.6666667 0.5952381 0.6250
barplot(height=opAgePC, main="Sustainability Importance by Age Group", col=c("powderblue","skyblue3", "royalblue4"))
# Sustainability importance by bag use
opBag <- table(tailgatesvA$SchoolSustainImp, tailgatesvA$BagVisible)
opBag
##
## 0 1
## 1 2 5
## 2 13 10
## 3 21 28
a <- opBag[1, ]/colSums(opBag) # Find opinion % by row
b <- opBag[2, ]/colSums(opBag)
c <- opBag[3, ]/colSums(opBag)
opBagPC <- matrix(c(a,b,c), nrow=3, byrow=T) # Rebuild dataframe
rownames(opBagPC) <- c("Not very", "Somewhat", "Very") # Rename rows
colnames(opBagPC) <- c("No visible bag", "Visible bag") # Rename columns
opBagPC
## No visible bag Visible bag
## Not very 0.05555556 0.1162791
## Somewhat 0.36111111 0.2325581
## Very 0.58333333 0.6511628
barplot(height=opBagPC, main="Sustainability Importance by Bag Use", col=c("powderblue","skyblue3", "royalblue4"))
Recycling Behaviors
# Bag use by gender
bagGen <- table(tailgatesvA$BagVisible, tailgatesvA$Gender)
bagGen
##
## 0 1
## 0 28 8
## 1 25 18
bagGenPC <- bagGen[2, ]/colSums(bagGen)
bagGenPC
## 0 1
## 0.4716981 0.6923077
barplot(bagGenPC, main="Recycling by Gen", col="royalblue4")
# Bag use by age group
bagAge <- table(tailgatesvA$BagVisible, tailgatesvA$AgeRange)
bagAge
##
## 1 2 3
## 0 9 23 4
## 1 12 19 12
bagAgePC <- bagAge[2, ]/colSums(bagAge)
bagAgePC
## 1 2 3
## 0.5714286 0.4523810 0.7500000
barplot(bagAgePC, main="Recycling by Age Group", col="royalblue4")
# Bag use by stated bag use
bagStated <- table(tailgatesvA$BagVisible, tailgatesvA$BagUse)
bagStated
##
## 0 1 2 3
## 0 0 4 1 21
## 1 0 4 1 31
bagStatedPC <- bagStated[2, ]/colSums(bagStated)
bagStatedPC
## 0 1 2 3
## NaN 0.5000000 0.5000000 0.5961538
barplot(bagStatedPC, main="Recycling by Stated Recycling Bag Use", col="royalblue4")
# Bag use by opinion on sustainability
bagSus <- table(tailgatesvA$BagVisible, tailgatesvA$SchoolSustainImp)
bagSus
##
## 1 2 3
## 0 2 13 21
## 1 5 10 28
bagSusPC <- bagSus[2, ]/colSums(bagSus)
bagSusPC
## 1 2 3
## 0.7142857 0.4347826 0.5714286
barplot(bagSusPC, main="Recycling by Sustainability Opinion", col="royalblue4")
# Bag use by recycling habits at home
bagRec <- table(tailgatesvA$BagVisible, tailgatesvA$RegularRecycle)
bagRec
##
## 0 1
## 0 2 34
## 1 2 41
bagRecPC <- bagRec[2, ]/colSums(bagRec)
bagRecPC
## 0 1
## 0.5000000 0.5466667
barplot(bagRecPC, main="Recycling by Recycling Habits at Home", col="royalblue4")
# Bag use by composting habits at home
bagCom <- table(tailgatesvA$BagVisible, tailgatesvA$RegularCompost)
bagCom
##
## 0 1
## 0 26 10
## 1 27 16
bagComPC <- bagCom[2, ]/colSums(bagCom)
bagComPC
## 0 1
## 0.5094340 0.6153846
barplot(bagComPC, main="Recycling by Composting Habits at Home", col="royalblue4")
measures <- read.csv ("/Users/squishy/Dropbox/Recycling GRA/Tailgating Study/Tailgating Data/Tailgating Data - Individual Cars.csv") # Load, examine, and clean dataset
str(measures) # 116 observations
## 'data.frame': 116 obs. of 10 variables:
## $ BagID : Factor w/ 86 levels "106","107","111",..: 36 36 35 35 47 33 48 38 38 55 ...
## $ BagType : Factor w/ 2 levels "Recycling","Trash": 1 2 1 2 2 2 2 1 2 1 ...
## $ PreSortWeight : num 2.7 4.8 1.8 10.7 1.1 0.1 1.6 14.1 8.5 3.1 ...
## $ PostSortWeight: num 2.6 3.4 1.5 5.7 0.7 0 1.6 13.6 3.6 3.1 ...
## $ Difference : num 0.1 1.4 0.3 5 0.4 0.1 0 0.5 4.9 0 ...
## $ Contamination : int 1 1 1 1 1 1 0 1 1 0 ...
## $ Lot : Factor w/ 3 levels "Duane","Franklin",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Recorder : Factor w/ 2 levels "AC","XW": 1 1 1 1 1 1 1 1 1 1 ...
## $ Date : int 151017 151017 151017 151017 151017 151017 151017 151017 151017 151017 ...
## $ Comments : Factor w/ 6 levels "","All recycling in bag",..: 1 1 1 1 1 1 1 1 1 1 ...
Diversion rate
# Subset into recycling and trash
measuresR <- subset(measures, BagType=="Recycling") # Recycling obs
str(measuresR) # 80 observations
## 'data.frame': 80 obs. of 10 variables:
## $ BagID : Factor w/ 86 levels "106","107","111",..: 36 35 38 55 39 44 40 42 45 46 ...
## $ BagType : Factor w/ 2 levels "Recycling","Trash": 1 1 1 1 1 1 1 1 1 1 ...
## $ PreSortWeight : num 2.7 1.8 14.1 3.1 5.6 2.1 3.6 9.7 2 2.1 ...
## $ PostSortWeight: num 2.6 1.5 13.6 3.1 5.6 2.1 2.1 7.8 2 2.1 ...
## $ Difference : num 0.1 0.3 0.5 0 0 0 1.5 1.9 0 0 ...
## $ Contamination : int 1 1 1 0 0 0 1 1 0 0 ...
## $ Lot : Factor w/ 3 levels "Duane","Franklin",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Recorder : Factor w/ 2 levels "AC","XW": 1 1 1 1 1 1 1 1 1 1 ...
## $ Date : int 151017 151017 151017 151017 151017 151017 151017 151017 151017 151017 ...
## $ Comments : Factor w/ 6 levels "","All recycling in bag",..: 1 1 1 1 1 1 1 1 1 1 ...
measuresT <- subset(measures, BagType=="Trash") # Trash obs
str(measuresT) # 36 observations
## 'data.frame': 36 obs. of 10 variables:
## $ BagID : Factor w/ 86 levels "106","107","111",..: 36 35 47 33 48 38 37 44 56 80 ...
## $ BagType : Factor w/ 2 levels "Recycling","Trash": 2 2 2 2 2 2 2 2 2 2 ...
## $ PreSortWeight : num 4.8 10.7 1.1 0.1 1.6 8.5 2.1 1.5 9.5 0.6 ...
## $ PostSortWeight: num 3.4 5.7 0.7 0 1.6 3.6 2.1 1.5 0.1 0.6 ...
## $ Difference : num 1.4 5 0.4 0.1 0 4.9 0 0 9.4 0 ...
## $ Contamination : int 1 1 1 1 0 1 1 0 1 0 ...
## $ Lot : Factor w/ 3 levels "Duane","Franklin",..: 1 1 1 1 1 1 1 1 1 2 ...
## $ Recorder : Factor w/ 2 levels "AC","XW": 1 1 1 1 1 1 1 1 1 1 ...
## $ Date : int 151017 151017 151017 151017 151017 151017 151017 151017 151017 151017 ...
## $ Comments : Factor w/ 6 levels "","All recycling in bag",..: 1 1 1 1 1 1 1 2 2 1 ...
# Total weight and diversion rates
wtT <- sum(measuresT$PreSortWeight)
wtT # Total trash weight
## [1] 122.6
wtR <- sum(measuresR$PreSortWeight)
wtR # Total recycling weight, aka waste diversion weight
## [1] 330.7
wtTot = wtT + wtR
wtTot # Total combined weight
## [1] 453.3
The team measured 116 bags. There were 80 recycling bags (330.7lbs) and 36 trash bags (122.6 lbs). Note that it doesn’t make sense to talk about diversion rates here because we do not have corresponding numbers of trash and recycling bags (i.e., we have many more reycling bags, which would mislead us ot think we have a high diversion rate).
Contamination rate
sWtT <- sum(measuresT$Difference)
sWtT # Trash contamination
## [1] 49.4
sWtT/wtT # Trash contamination rate
## [1] 0.4029364
sWtR <- sum(measuresR$Difference)
sWtR # Recycling contamination
## [1] 60.05
sWtR/wtR # Recycling contamination rate
## [1] 0.1815845
sum(measuresT$Contamination)/length(measuresT$Contamination) # Trash bags contamination rate
## [1] 0.9166667
sum(measuresR$Contamination)/length(measuresR$Contamination) # Recycling bags contamination rate
## [1] 0.775
mean(measuresT$Difference) # Avg trash contamination weight
## [1] 1.372222
mean(measuresR$Difference) # Avg recycling contamination weight
## [1] 0.750625
In terms of weight, 40% of the trash was contaminated. With 92% of the trash bags having some sort of contamination. On average, contaminated trash bags had about 1.37 lbs of contamination.
In terms of weight, 18% of the recycling was contaminated. With 78% of the recycling bags having some sort of contamination. On average, contaminated recycling bags had about 0.75 lbs of contamination.
# Load, examine, and clean dataset
paired <- read.csv ("/Users/squishy/Dropbox/Recycling GRA/Tailgating Study/Tailgating Data/Tailgating Data - IC - Paired.csv")
unpaired <- read.csv ("/Users/squishy/Dropbox/Recycling GRA/Tailgating Study/Tailgating Data/Tailgating Data - IC - Unpaired.csv")
str(paired) # 57 observations
## 'data.frame': 57 obs. of 10 variables:
## $ BagID : Factor w/ 27 levels "205","211","212",..: 13 13 12 17 11 18 15 15 1 16 ...
## $ BagType : Factor w/ 2 levels "Recycling","Trash": 1 2 2 2 2 2 1 2 2 1 ...
## $ PreSortWeight : num 2.7 4.8 10.7 1.1 0.1 1.6 14.1 8.5 3.9 2.1 ...
## $ PostSortWeight: num 2.6 3.4 5.7 0.7 0 1.6 13.6 3.6 2.1 2.1 ...
## $ Difference : num 0.1 1.4 5 0.4 0.1 0 0.5 4.9 1.8 0 ...
## $ Contamination : int 1 1 1 1 1 0 1 1 1 0 ...
## $ Lot : Factor w/ 3 levels "Duane","Franklin",..: 1 1 1 1 1 1 1 1 3 1 ...
## $ Recorder : Factor w/ 2 levels "AC","XW": 1 1 1 1 1 1 1 1 1 1 ...
## $ Date : int 151017 151017 151017 151017 151017 151017 151017 151017 151107 151017 ...
## $ Comments : Factor w/ 2 levels "","All recycling in bag": 1 1 1 1 1 1 1 1 1 1 ...
str(unpaired) # 59 observations
## 'data.frame': 59 obs. of 10 variables:
## $ BagID : Factor w/ 59 levels "106","107","111",..: 24 30 25 27 29 35 28 31 23 26 ...
## $ BagType : Factor w/ 2 levels "Recycling","Trash": 1 1 1 1 1 1 1 1 1 1 ...
## $ PreSortWeight : num 5.6 2.1 3.6 9.7 2 3.1 1.3 7 0.8 0.7 ...
## $ PostSortWeight: num 5.6 2.1 2.1 7.8 2 3.1 1.3 4.9 0.7 0.7 ...
## $ Difference : num 0 0 1.5 1.9 0 0 0 2.1 0.1 0 ...
## $ Contamination : int 0 0 1 1 0 0 1 1 1 0 ...
## $ Lot : Factor w/ 3 levels "Duane","Franklin",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Recorder : Factor w/ 2 levels "AC","XW": 1 1 1 1 1 1 1 1 1 1 ...
## $ Date : int 151017 151017 151017 151017 151017 151017 151017 151017 151017 151017 ...
## $ Comments : Factor w/ 6 levels "","All recycling in bag",..: 1 1 1 1 1 1 1 1 1 1 ...
57+59 # Checks total obs
## [1] 116
Diversion rate
# Subset into recycling and trash
pairedR <- subset(paired, BagType=="Recycling") # Recycling obs
str(pairedR) # 28 observations
## 'data.frame': 28 obs. of 10 variables:
## $ BagID : Factor w/ 27 levels "205","211","212",..: 13 15 16 18 11 14 17 12 20 10 ...
## $ BagType : Factor w/ 2 levels "Recycling","Trash": 1 1 1 1 1 1 1 1 1 1 ...
## $ PreSortWeight : num 2.7 14.1 2.1 2.7 9.6 3.1 2.2 1.8 8.6 1.4 ...
## $ PostSortWeight: num 2.6 13.6 2.1 2.4 6.4 2.9 2.1 1.5 8.3 1 ...
## $ Difference : num 0.1 0.5 0 0.3 3.2 0.2 0.1 0.3 0.3 0.4 ...
## $ Contamination : int 1 1 0 1 1 1 1 1 1 1 ...
## $ Lot : Factor w/ 3 levels "Duane","Franklin",..: 1 1 1 1 1 1 1 1 2 3 ...
## $ Recorder : Factor w/ 2 levels "AC","XW": 1 1 1 1 1 1 1 1 2 1 ...
## $ Date : int 151017 151017 151017 151017 151017 151017 151017 151017 151107 151107 ...
## $ Comments : Factor w/ 2 levels "","All recycling in bag": 1 1 1 1 1 1 1 1 1 1 ...
pairedT <- subset(paired, BagType=="Trash") # Trash obs
str(pairedT) # 29 observations
## 'data.frame': 29 obs. of 10 variables:
## $ BagID : Factor w/ 27 levels "205","211","212",..: 13 12 17 11 18 15 1 16 25 10 ...
## $ BagType : Factor w/ 2 levels "Recycling","Trash": 2 2 2 2 2 2 2 2 2 2 ...
## $ PreSortWeight : num 4.8 10.7 1.1 0.1 1.6 8.5 3.9 1.5 0.6 16 ...
## $ PostSortWeight: num 3.4 5.7 0.7 0 1.6 3.6 2.1 1.5 0.6 12.5 ...
## $ Difference : num 1.4 5 0.4 0.1 0 4.9 1.8 0 0 3.5 ...
## $ Contamination : int 1 1 1 1 0 1 1 0 0 1 ...
## $ Lot : Factor w/ 3 levels "Duane","Franklin",..: 1 1 1 1 1 1 3 1 2 3 ...
## $ Recorder : Factor w/ 2 levels "AC","XW": 1 1 1 1 1 1 1 1 1 1 ...
## $ Date : int 151017 151017 151017 151017 151017 151017 151107 151017 151017 151107 ...
## $ Comments : Factor w/ 2 levels "","All recycling in bag": 1 1 1 1 1 1 1 2 1 1 ...
# Total weight and diversion rates
pairWtT <- sum(pairedT$PreSortWeight)
pairWtT # Total trash weight
## [1] 91
pairWtR <- sum(pairedR$PreSortWeight)
pairWtR # Total recycling weight, aka waste diversion weight
## [1] 103.35
pairWtTot = pairWtT + pairWtR
pairWtTot # Total combined weight
## [1] 194.35
pairWtTotCheck <- sum(paired$PreSortWeight)
pairWtTotCheck # Checks
## [1] 194.35
pairWtR/pairWtTot # % Diversion
## [1] 0.5317726
The team measured 57 paired bags, totaling 194.35 lbs. There were 28 recycling bags (103.35 lbs) and 29 trash bags (91.00 lbs). The waste diversion rate was 53%.
Contamination rate
pairTCon <- sum(pairedT$Difference)
pairTCon # Trash contamination
## [1] 28.8
pairTCon/pairWtT # Trash contamination rate
## [1] 0.3164835
pairRCon <- sum(pairedR$Difference)
pairRCon # Recycling contamination
## [1] 9.8
pairRCon/pairWtR # Recycling contamination rate
## [1] 0.09482342
sum(pairedT$Contamination)/length(pairedT$Contamination) # Trash bags contamination rate
## [1] 0.8965517
sum(pairedR$Contamination)/length(pairedR$Contamination) # Recycling bags contamination rate
## [1] 0.8571429
mean(pairedT$Difference) # Avg trash contamination weight
## [1] 0.9931034
mean(pairedR$Difference) # Avg recycling contamination weight
## [1] 0.35
In terms of weight, 32% of the paired trash was contaminated. With 90% of the trash bags having some sort of contamination. On average, contaminated trash bags had about 1 lb of contamination.
In terms of weight, 9.5% of the paired recycling was contaminated. With 86% of the recycling bags having some sort of contamination. On average, contaminated recycling bags had about 0.35 lbs of contamination.
Diversion rate
# Subset into recycling and trash
unpairedR <- subset(unpaired, BagType=="Recycling") # Recycling obs
str(unpairedR) # 52 observations
## 'data.frame': 52 obs. of 10 variables:
## $ BagID : Factor w/ 59 levels "106","107","111",..: 24 30 25 27 29 35 28 31 23 26 ...
## $ BagType : Factor w/ 2 levels "Recycling","Trash": 1 1 1 1 1 1 1 1 1 1 ...
## $ PreSortWeight : num 5.6 2.1 3.6 9.7 2 3.1 1.3 7 0.8 0.7 ...
## $ PostSortWeight: num 5.6 2.1 2.1 7.8 2 3.1 1.3 4.9 0.7 0.7 ...
## $ Difference : num 0 0 1.5 1.9 0 0 0 2.1 0.1 0 ...
## $ Contamination : int 0 0 1 1 0 0 1 1 1 0 ...
## $ Lot : Factor w/ 3 levels "Duane","Franklin",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Recorder : Factor w/ 2 levels "AC","XW": 1 1 1 1 1 1 1 1 1 1 ...
## $ Date : int 151017 151017 151017 151017 151017 151017 151017 151017 151017 151017 ...
## $ Comments : Factor w/ 6 levels "","All recycling in bag",..: 1 1 1 1 1 1 1 1 1 1 ...
unpairedT <- subset(unpaired, BagType=="Trash") # Trash obs
str(unpairedT) # 7 observations
## 'data.frame': 7 obs. of 10 variables:
## $ BagID : Factor w/ 59 levels "106","107","111",..: 43 45 52 36 53 59 42
## $ BagType : Factor w/ 2 levels "Recycling","Trash": 2 2 2 2 2 2 2
## $ PreSortWeight : num 4.2 1.2 1.9 9.5 1.9 10 2.9
## $ PostSortWeight: num 1.4 1.1 1.8 0.1 0.7 3.4 2.5
## $ Difference : num 2.8 0.1 0.1 9.4 1.2 6.6 0.4
## $ Contamination : int 1 1 1 1 1 1 1
## $ Lot : Factor w/ 3 levels "Duane","Franklin",..: 2 2 3 1 3 2 2
## $ Recorder : Factor w/ 2 levels "AC","XW": 2 2 1 1 1 2 2
## $ Date : int 151107 151107 151107 151017 151107 151017 151107
## $ Comments : Factor w/ 6 levels "","All recycling in bag",..: 1 1 1 2 1 5 1
# Total weight and diversion rates
unpairWtT <- sum(unpairedT$PreSortWeight)
unpairWtT # Total trash weight
## [1] 31.6
unpairWtR <- sum(unpairedR$PreSortWeight)
unpairWtR # Total recycling weight, aka waste diversion weight
## [1] 227.35
unpairWtTot = unpairWtT + unpairWtR
unpairWtTot # Total combined weight
## [1] 258.95
unpairWtTotCheck <- sum(unpaired$PreSortWeight)
unpairWtTotCheck # Checks
## [1] 258.95
The team measured 59 unpaired bags. There were 59 recycling bags (227.35 lbs) and 7 trash bags (31.6 lbs).
Contamination rate
unpairTCon <- sum(unpairedT$Difference)
unpairTCon # Trash contamination
## [1] 20.6
unpairTCon/unpairWtT # Trash contamination rate
## [1] 0.6518987
unpairRCon <- sum(unpairedR$Difference)
unpairRCon # Recycling contamination
## [1] 50.25
unpairRCon/unpairWtR # Recycling contamination rate
## [1] 0.2210249
sum(unpairedT$Contamination)/length(unpairedT$Contamination) # Trash bags contamination rate
## [1] 1
sum(unpairedR$Contamination)/length(unpairedR$Contamination) # Recycling bags contamination rate
## [1] 0.7307692
mean(unpairedT$Difference) # Avg trash contamination weight
## [1] 2.942857
mean(unpairedR$Difference) # Avg recycling contamination weight
## [1] 0.9663462
In terms of weight, 65% of the unpaired trash was contaminated. With 100% of the trash bags having some sort of contamination. On average, contaminated trash bags had about 2.94 lb of contamination.
In terms of weight, 22% of the unpaired recycling was contaminated. With 73% of the recycling bags having some sort of contamination. On average, contaminated recycling bags had about 0.97 lbs of contamination.