\(~\) \(~\) \(~\)
books_small<- books %>%
select(title, authors, average_rating,publication_date)
\(~\) \(~\)
books %>%
mutate(tot_points= average_rating * ratings_count)
\(~\) \(~\) \(~\)
There are 2313 books that begin with the word “The” in the books dataset \(~\)
book_3 <- str_subset(books$title,"^The")
summary(book_3)
## Length Class Mode
## 2313 character character
\(~\) \(~\)
The publihsers with the highest ratings, 5.00, are Teaching Resources, Courage Books & Disney Press. \(~\)
books_4 <-books %>%
select(publisher,average_rating, num_pages) %>%
filter(num_pages<100) %>%
arrange(desc(average_rating))
\(~\) \(~\)
\(~\) Based on the number of books written, the top 5 authors are Stephen King, William Shakespeare, J.R.R. Tolkien, James Patterson & Mercedes Lackey (in that order).
\(~\)
book_5 <- books %>%
select(authors) %>%
group_by(authors) %>%
summarise(no_of_books= n()) %>%
arrange(desc(no_of_books)) %>%
top_n(5)
book_5 %>%
ggplot(mapping = aes(x =reorder(authors, -no_of_books), y=no_of_books), color=drv) +
geom_point(color = "blue", size=5) +
labs(y="Number of books written", x="Authors")