Import Your Data

In the following code hunk, import your data.

#### Use read_csv() or another function

#### Make sure your data is converted into a tibble. 

#### For demonstration purposes, this example uses the mtcars data.

data<-read.csv("Fake News Detection Dataset.csv")

Part 1

ggplot(data,aes(x=Number_of_Sentence,y=Average_Word_Length))+labs(x="Number_of_Sentence",y="Average_Word_Length",title="Number_of_Sentence vs Average_Word_Length")+geom_line()

ggplot(data,aes(x=Number_of_Sentence,y=Label))+geom_jitter()+labs(x="Number_of_Sentence",y="Label",title="Number_of_Sentence vs Label")+geom_smooth()
## `geom_smooth()` using method = 'gam' and formula = 'y ~ s(x, bs = "cs")'

library(gcookbook) 
ggplot(data, aes(x = Unique_Words, y = Average_Word_Length, fill = Label)) +
  geom_area()+labs(x="Unique_Words",y="Average_Word_Length",title="Fake news")

rsconnect::setAccountInfo(name='barry0708', token='D9EBC0836E102985CD51B9C157A911E4', secret='VQwQgQXYXZhpDKjOOPkHxdnaVzgIwFccfRF/EisG')
ggplot(data,aes(x=Unique_Words,fill=Average_Word_Length))+labs(title="Unique_Words vs Average_Word_Length")+geom_bar()
## Warning: The following aesthetics were dropped during statistical transformation: fill.
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
##   the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
##   variable into a factor?

ggplot(data,aes(x=Word_Count,fill=Number_of_Sentence))+labs(title="Number_of_Sentence vs Word_Count")+geom_bar()
## Warning: The following aesthetics were dropped during statistical transformation: fill.
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
##   the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
##   variable into a factor?

ggplot(data,aes(x=Unique_Words,y=Label))+labs(x="Unique_Words",y="Label",title="Unique_Words vs Label")+geom_line()

library(gganimate)
library(gifski)
ggplot(data, aes(x=Number_of_Sentence, y=Unique_Words, fill=Average_Word_Length)) +labs(x="Unique_Words",y="Label",title="Number_of_Sentence vs Unique_Words")+geom_bar(stat='identity')+transition_states(Average_Word_Length)+enter_fade()+exit_fade()

group.exp1=data%>% select(Word_Count)
group.exp2=data%>% select(Number_of_Sentence)
group.exp3=data%>% select(Unique_Words)
data <- data.frame(group.exp1,group.exp2,group.exp3) 

boxplot(data,main = "boxplot")