Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions DailyMeetingPlot.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#Generate a scatter plot showing the average time I spent in meetings (per day) during the month of November.

data = read.table("MeetingData.csv", header = TRUE, sep = ",", stringsAsFactors = FALSE)
data$Day <- factor(data$Day, levels = data$Day)
library(ggplot2)
ggplot(data, aes(x = Day, y = Hours)) +
geom_point() +
theme_classic() +
geom_smooth(method = "lm")


1 change: 1 addition & 0 deletions MeetingData.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Day,HoursMonday,4.325Tuesday,4Wednesday,3.5Thursday,3.125Friday,2.5
Expand Down
23 changes: 23 additions & 0 deletions Problem 2.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
##Generate a barplot of the means of the four populations

#Load the data file
df <- read.table("data.txt", header = TRUE, sep=",", stringsAsFactors = TRUE)

#Create the barplot
ggplot(data = df, aes(x = region, y = observations))+
stat_summary(fun = mean, geom = "bar")+
theme_classic()

##Generate a scatterplot of all of the observations

ggplot(data = df, aes(x = region, y = observations)) +
geom_point() +
geom_jitter() +
theme_classic()

#The barplot of the means, without error bars, makes the data appear as though
#the observations from the four regions are very similar. While the means of the
#regions are similar, the scatterplot shows that the clustering of the data is
#very different across the regions and the north region is the only region with
#observations clustered around the mean. Error bars on the barplot would show
#the data more accurately.