Summary Week 8
The text is Mastering Spark with R. Making sure that you are using the sc connection and the correct version of Java, install the ggplot2 library. Run the following code: >car_group <- cars %>% + group_by(cyl) %>% + summarize(mpg = sum(mpg, =true)) + collect() %>% + print() Using similar code determine the average mpg for each cylinder count. Plot both results using the following code: >ggplot(aes(r(cyl), mpg), data = car_group) + geom_col(fill = #) + coord_flip() Change the fill to red color and the display to vertical from horizontal.
Connected book
Written for
- Institution
- Big Data Tools & Architecture
- Course
- Big Data Tools & Architecture
Document information
- Summarized whole book?
- No
- Which chapters are summarized?
- Unknown
- Uploaded on
- July 15, 2023
- File latest updated on
- February 22, 2024
- Number of pages
- 4
- Written in
- 2022/2023
- Type
- Summary