Introduction:
I wanted to see if there were any trends within the Cloudy Nights Classifieds. I obtained the data using R. I also used R for the analysis. If you have any questions or concerns you can reach out to me via shockley7772@icloud.com
Histogram of the number of Views per Ad.
ggplot(data, aes(Views_final)) + geom_bar(col = "steelblue") + labs(title = "Histogram of Views per Classified ad", subtitle = "Eyepiece Classifieds Only", x= "Number of Views per Ad", y = "Frequency", caption = "Source: Cloudy Nights Classifieds") + theme_bw()
Looks as if most of the classified ads get around 250 looks. But what are the items that are getting over 500?
dt <- data%>%
select(titles, date, Views_final)%>%
filter(Views_final>750)
datatable(dt, rownames = F, filter = 'top')
Looks like Garage Sales get the most Views.
Are there any trends with the number of Views for each Classified ad over time?
data%>%
filter(data$date > "2017-01-01")%>%
group_by(week = floor_date(date, "week"))%>%
summarise(n = n(), mean_views = mean(Views_final, na.rm = T))%>%
ggplot(aes(week, n, colour = mean_views)) + theme(axis.text.x = element_text(angle = 90, hjust = 1)) + geom_line(fill='steelblue', size = 2) + theme_bw() + geom_smooth(method = "lm", col = "firebrick") + labs(title = "Number of Classified Ads increasing over time?", subtitle = "Number of Classified Ads aggregated by Week", y = "Number of Ads", x = "Months", caption = "Source: Cloudy Nights")
## Warning: Ignoring unknown parameters: fill
It appears that there is a strong upward trend in ads over the two year time period, however there has been a drop since the beginning of the year. It also seems like the market may be softening since the mean number of views is declining.
How about Views per Ad over time?
data%>%
filter(data$date > "2017-01-01")%>%
group_by(week = floor_date(date, "week"))%>%
summarise(Average_Number_of_Ads = n(), mean_views = mean(Views_final, na.rm = T))%>%
ggplot(aes(week, mean_views, colour = Average_Number_of_Ads)) + theme(axis.text.x = element_text(angle = 90, hjust = 1)) + geom_line(fill='steelblue', size = 2) + theme_bw() + geom_smooth(method = "lm", col = "firebrick") + labs(title = "Number of Views increasing over time?", subtitle = "Number of Views (aggregated by Week)", y = "Average Number of Views", x = "Months", caption = "Source: Cloudy Nights")
## Warning: Ignoring unknown parameters: fill
It appears again that the amount of Ads is increasing but the Views is decreasing.
Let’s look at Avg Weekly Ads and Avg Weekly Views
data%>%
filter(data$date > "2017-01-01")%>%
group_by(week = floor_date(date, "week"))%>%
summarise(Average_Number_of_Ads = n(), mean_views = mean(Views_final, na.rm = T))%>%
ggplot(aes(Average_Number_of_Ads, mean_views)) + theme(axis.text.x = element_text(angle = 90, hjust = 1)) + geom_point(fill='steelblue', size = 2) + theme_bw() + geom_smooth(method = "lm", col = "firebrick") + labs(title = "Are Views on Ads decreasing?", subtitle = "Views/Ads (aggregated by Week)", y = "Average Weekly Number of Views", x = "Avg Weekly Ads", caption = "Source: Cloudy Nights")
Based on the Chart it appears that there is a loose correlation.
cor.test <- data%>%
filter(data$date > "2017-01-01")%>%
group_by(week = floor_date(date, "week"))%>%
summarise(Average_Number_of_Ads = n(), mean_views = mean(Views_final, na.rm = T))
cor.test(cor.test$Average_Number_of_Ads, cor.test$mean_views)
##
## Pearson's product-moment correlation
##
## data: cor.test$Average_Number_of_Ads and cor.test$mean_views
## t = -6.2022, df = 80, p-value = 2.304e-08
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## -0.7002475 -0.4026097
## sample estimates:
## cor
## -0.5698311
The Corellation Test shows a corellation of 56, which isn’t that strong. But there is a corrlation since the p value is significant < .05
How about Regression?
summary(lm(cor.test$mean_views ~ cor.test$Average_Number_of_Ads, cor.test))
##
## Call:
## lm(formula = cor.test$mean_views ~ cor.test$Average_Number_of_Ads,
## data = cor.test)
##
## Residuals:
## Min 1Q Median 3Q Max
## -68.959 -19.900 -0.025 22.122 96.552
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 306.6173 17.7145 17.309 < 2e-16 ***
## cor.test$Average_Number_of_Ads -1.5921 0.2567 -6.202 2.3e-08 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 31.85 on 80 degrees of freedom
## Multiple R-squared: 0.3247, Adjusted R-squared: 0.3163
## F-statistic: 38.47 on 1 and 80 DF, p-value: 2.304e-08
Multiple R Squared is .324. This means that 34% of the weekly mean views can be explained by the weekly mean ads.
Conclusion: It appears that the views are declining and after testing the hypothesis they are indeed decreasing slightly. The cause is unknown.
Here’s the data in DT for you to filter and look at. I filtered out those with Views less than 250 for size concerns.
dt2 <- data%>%
filter(data$date > "2017-01-01")
datatable(dt2, filter = "top")