-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTragicallyHip.R
51 lines (33 loc) · 1.17 KB
/
TragicallyHip.R
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
library(tidyverse)
library(ggplot2)
library(ggdark)
library(lubridate)
hip = read_csv("../TragicallyHip.csv")
head(hip)
hip = hip %>%
mutate(Album = as_factor(Album),
Released = ymd(Released))
max(hip$Song_Length)
min(hip$Song_Length)
mean(hip$Song_Length)
ggplot(hip, aes(x= Song_Length, y=Song, fill= Album))+
geom_bar(stat="identity")+
ggdark::dark_mode()
ggplot(hip, aes(x= Song_Length, y=Album))+
geom_point(stat="identity", size=3, alpha=0.5, color="#ff3333")+
ggdark::dark_mode()
ggplot(hip, aes(x= Song_Length, y=Album))+
geom_boxplot(color="#ff3333")+
ggdark::dark_mode()
ggplot(hip, aes(x= Song_Length, y=Album))+
geom_violin(color="#ff3333")+
ggdark::dark_mode()
library(ggridges)
ggplot(hip, aes(x= Song_Length, y=Album), fill=Song_Length)+
geom_density_ridges(color="#ff3333")+
ggdark::dark_mode()+
labs(x="Song Length",
caption = "@StarTrek_Lt") + theme(plot.caption = element_text(size = 10,
colour = "coral1", hjust = 0), axis.title = element_text(size = 13),
axis.text = element_text(size = 12))
hip$Album