-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathData_vis.R
More file actions
39 lines (24 loc) · 1.48 KB
/
Data_vis.R
File metadata and controls
39 lines (24 loc) · 1.48 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
data <- read.csv('Telecom_customer_churn.csv')
library(ggplot2)
print(ggplot(data, aes(x = churn)) +
geom_bar(aes(fill = as.factor(churn))) +
geom_text(aes(label = ..count..), stat = "count", vjust = -0.2, colour = "black") +
scale_fill_manual(values = c("red","black")))
print(ggplot(data, aes(income, fill=as.factor(churn))) + geom_density() + scale_x_log10() +
scale_fill_manual(values = c("red","black")))
print(ggplot(data, aes(totrev, fill=as.factor(churn))) + geom_density() + scale_x_log10() +
scale_fill_manual(values = c("red","black")))
print(ggplot(data, aes(eqpdays, fill=as.factor(churn))) + geom_density() + scale_x_log10() +
scale_fill_manual(values = c("red","black")))
print(ggplot(data, aes(months, fill=as.factor(churn))) + geom_density() + scale_x_log10() +
scale_fill_manual(values = c("red","black")))
print(ggplot(data, aes(mou_Mean, fill=as.factor(churn))) + geom_density() +
scale_fill_manual(values = c("red","black")))
print(ggplot(data, aes(change_mou, fill=as.factor(churn))) + geom_density()+
scale_fill_manual(values = c("red","black")))
print(ggplot(data, aes(x = area, fill = as.factor(churn))) +
geom_bar(aes(fill = as.factor(churn)), position = 'dodge') +
scale_fill_manual(values = c("red","black")) + coord_flip())
ggplot(data, aes(x = refurb_new, fill = as.factor(churn))) +
geom_bar(aes(fill = as.factor(churn)), position = 'dodge') +
scale_fill_manual(values = c("red","black"))