Skip to content

Commit 31ee241

Browse files
author
Mo Chen
committed
Initial Commit
0 parents  commit 31ee241

File tree

7 files changed

+1325
-0
lines changed

7 files changed

+1325
-0
lines changed

Diff for: autotrader.R

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
tesla <- read.csv('dataset.processed.csv')
2+
3+
library(ggplot2)
4+
tesla$year <- factor(tesla$year)
5+
ggplot(tesla, aes(miles, price, color=year)) + geom_point() + geom_smooth(method = lm, se = FALSE)
6+
ggplot(tesla, aes(miles, price, color=year, size=battery, shape=factor(awd))) + geom_point() + scale_color_discrete('year') + scale_size('battery size', range=c(0.5,3)) + scale_shape_manual('AWD', values=c(1,16))
7+
ggplot(tesla, aes(miles, price, color=factor(performance))) + geom_point() + geom_smooth(method = lm, se = FALSE)
8+
ggplot(tesla, aes(miles, price, color=factor(awd))) + geom_point() + geom_smooth(method = lm, se = FALSE)
9+
10+
11+
ggplot(tesla, aes(miles, price, color=battery)) + geom_point() + scale_color_continuous('battery') + facet_grid(. ~ year)
12+
13+
14+
options("scipen"=100, "digits"=4)
15+
m <- lm(price ~ year * miles + performance + awd + battery, tesla)

Diff for: dataset.csv

+484
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)