-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgraph_data.R
More file actions
52 lines (39 loc) · 1.47 KB
/
graph_data.R
File metadata and controls
52 lines (39 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
library(tidyverse)
ggplot(dailyActivity, aes(x = date, y = Calories)) +
geom_line() +
geom_smooth()
ggplot(dailyActivity, aes(x = TotalSteps, y = Calories)) +
geom_point() +
xlim(0,25000) + # 3 obs > 25k skew the smoothed conf int
geom_smooth()
ggplot(dailyActivity, aes(x = active, y = Calories)) +
geom_point() +
geom_smooth()
ggplot(dailyActivity, aes(x = modActive, y = Calories)) +
geom_point() +
geom_smooth()
ggplot(dailyActivityNoZero, aes(x = TotalSteps, y = Calories)) +
geom_point() +
geom_smooth()
ggplot(dailyActivityNoZero, aes(x = active, y = Calories)) +
geom_point() +
geom_smooth()
ggplot(dailyActivityNoModZero, aes(x = modActive, y = Calories)) +
geom_point() +
geom_smooth()
ggplot(dailyCalories, aes(x = date, y = Calories, color = Id)) +
geom_line(show.legend = FALSE)
ggplot(Calories, aes(x = reorder(Id, average), y = average)) +
geom_col() +
scale_x_discrete(name = "users", labels = NULL)
ggplot(dailySteps, aes(x = date, y = StepTotal, color = Id)) +
geom_line(show.legend = FALSE)
ggplot(Steps, aes(x = reorder(Id, average), y = average)) +
geom_col() +
scale_x_discrete(name = "users", labels = NULL)
ggplot(Intensity, aes(x = reorder(factor(Id), -average), y = average, fill = intensity)) +
geom_col() +
scale_x_discrete(name = "users", labels = NULL)
ggplot(ActiveIntensity, aes(x = reorder(factor(Id), -average), y = average, fill = intensity)) +
geom_col() +
scale_x_discrete(name = "users", labels = NULL)