Table of Contents
Data Visualization with R Week 01 Quiz Answers
Quiz 1: Graded Quiz answers
Q1. Which R packages will this course use to create data visualizations? Select two answers.
- None, you will use base R
- Leaflet
- ggplot2
- qplot
Q2. Which chart is a type of part to the whole chart?
- Horizontal bar chart
- Stacked bar chart
- Bar chart
- Grouped bar chart
Q3. Which ggplot2 function can create a complete plot given the data, mappings, and geom as parameters?
- ggplot()
- qplot()
- ggplot2()
- geom()
Quiz 2: Graded Quiz Answers
Q1. 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”)
Q2. How can you improve the smoothness of a histogram?
- 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.
Q3. What step must you take before you can add the coord_polar() function to ggplot() to create a pie chart?
- 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.
Data Visualization with R Week 02 Quiz Answers
Quiz 1: Graded Quiz Answers
Q1. 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.
Q2. Which plot type helps you visualize time series data?
- Histograms
- Line plots
- Box plots
- Scatter plots
Q3. In a box plot, in which quartile does 50% of the sorted data fall below?
- First quartile
- Second quartile
- Third quartile
- Fourth quartile
Quiz 2: Graded Quiz Answers
Q1. 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.
Q2. If you do not specify a theme when creating a plot with ggplot2, which theme does it use by default?
- theme_classic()
- theme_gray()
- theme_light()
- theme_minimal()
Q3. Using themes, you can change the colors and styles of the borders, backgrounds, lines, and text on a plot. What should you do if you want to completely remove one of these elements from the theme?
- 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.
Q4. In a Leaflet map, which two statements describe the difference between the addCircles() and addCircleMarkers() functions?
- 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.
Data Visualization with R Week 03 Quiz Answers
Quiz 1: Graded Quiz Answers
Q1. 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
Q2. Which two components of a dashboard happen on the front end?
- Visualize
- Serve
- Analyze
- Interact
Q3. Complete the sentence: You use the Layout functions to organize ____________________ containing user interface elements in the application.
- Outputs
- Layouts
- Panels
- Inputs
Q4. When defining the server logic for a Shiny app, you define a function that includes which of the following parameters?
- input, response
- input, output
- input, plotOutput
- input, renderPlot
Quiz 2: Graded Quiz Answers
Q1. In a Shiny application, where do you add input widgets?
- A panel.
- A tabset panel.
- A layout.
- A title panel.
Q2. Which deployment method should you select for your Shiny app if you do not want to run your own server?
- Shiny Server
- shinyapps.io
- RStudio Connect
- None of these options
Q3. What are the two main differences between an R Markdown document and a Shiny dashboard?
- 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.
Get all Course Quiz Answers of Applied Data Science with R Specialization
Introduction to R Programming for Data Science Coursera Quiz Answers
SQL for Data Science with R Coursera Quiz Answers
Data Analysis with R Coursera Quiz Answers
Data Visualization with R Coursera Quiz Answers
Data Science with R – Capstone Project Coursera Quiz Answers