![]() |
Data Visualization with R | Coursera IBM |
In this course, you will explore the Grammar of Graphics, a framework for creating and describing graphs, and learn how the ggplot2 data visualization package in R utilizes this framework for creating bar charts, histograms, pie charts, scatter plots, line plots, and box plots. Additionally, you will discover how to customize these charts using themes and various techniques. You will also dive into the Leaflet package in R to create map plots, enabling the visualization of geolocation data. Furthermore, you will be introduced to the R Shiny package for developing interactive dashboards, where you'll learn to create and customize Shiny apps, modify their appearance with HTML and images, and deploy your interactive data apps online.
You'll gain practical experience through hands-on labs in each module and a final project at the course's conclusion.
Engage with the videos, complete the labs, and watch your data science skills flourish. Good luck!
NOTE: This course assumes familiarity with R and data handling. If you're new to these topics, it's highly recommended to first complete the Introduction to R Programming for Data Science and Data Analysis with R courses from IBM. Note: Basic R programming skills are a prerequisite for this course.
Notice!
Always refer to the module on your for the most accurate and up-to-date information.
Week 01 Quiz Answers
Quiz 1: Graded Quiz answers
1. Which R packages will this course use to create data visualizations? Select two answers.- None, you will use base R
- Leaflet
- ggplot2
- qplot
- Horizontal bar chart
- Stacked bar chart
- Bar chart
- Grouped bar chart
- ggplot()
- qplot()
- ggplot2()
- geom()
Quiz 2: Graded Quiz Answers
1. Which parameter of the qplot() function changes the border color of the bars in a bar chart to blue?- border = I(“blue”)
- fill = I(“blue”)
- outline = I(“blue”)
- colour = I(“blue”)
- Reduce the number of bins to increase the bin width.
- Changing the number of bins has no impact of the smoothness of the histogram.
- Always go with the default number of bins.
- Increase the number of bins to reduce the bin width.
- Add the geom_bar(position = “stack”) command to the ggplot() function.
- Add the geom_bar(position = “dodge”) command to the ggplot() function.
- Set the x argument of the aes() function used in the ggplot() function to the factor.
- Add the geom_circle() command to the ggplot() function.
Week 02 Quiz Answers
Quiz 1: Graded Quiz Answers
1. In a scatter plot, what is the best way to change the color of the points based on a categorical variable?- Convert the categorical variable to a factor and then assign it to the “color” argument of the aes() function within the ggplot() function.
- Convert the categorical variable to a factor and then assign it to the “color” argument of the geom_point() function.
- Assign the variable to the “color” argument of the aes() function within the ggplot() function.
- Assign the variable to the “color” argument of the geom_point() function.
- Histograms
- Line plots
- Box plots
- Scatter plots
- First quartile
- Second quartile
- Third quartile
- Fourth quartile
Quiz 2: Graded Quiz Answers
1. You added text labels to the data points on your plot, but now the plot looks messy because there are so many of them. What should you do?- Set the overlap parameter of geom_text() to TRUE.
- Set the check_overlap parameter of geom_text() to FALSE.
- Set the overlap parameter of geom_text() to FALSE.
- Set the check_overlap parameter of geom_text() to TRUE.
- theme_classic()
- theme_gray()
- theme_light()
- theme_minimal()
- Assign the element.remove() function to the element.
- Assign the element.delete() function to the element.
- Assign the element.empty() function to the element.
- Assign the element.blank() function to the element.
- Markers created with addCircleMarkers() remain a constant size.
- Markers created with addCircles() remain a constant size.
- Markers created with addCircles() can be rescaled.
- Markers created with addCircleMarkers() can be rescaled.
Week 03 Quiz Answers
Quiz 1: Graded Quiz Answers
1. True or False: A Shiny app consists of two parts, the server that the user interacts with and the UI that powers the app.- True
- False
- Visualize
- Serve
- Analyze
- Interact
- Outputs
- Layouts
- Panels
- Inputs
- input, response
- input, output
- input, plotOutput
- input, renderPlot
Quiz 2: Graded Quiz Answers
1. In a Shiny application, where do you add input widgets?- A panel.
- A tabset panel.
- A layout.
- A title panel.
- Shiny Server
- shinyapps.io
- RStudio Connect
- None of these options
- A dashboard can contain text, images, plots, and other information, while an R Markdown document contains only easy-to-write plain text.
- A dashboard always reflects current data, while an R Markdown document produces a snapshot of the data at the time the report is generated.
- A dashboard can be interactive, while an R Markdown document is static.
- A dashboard is reusable, while an R Markdown file can only be generated once.