You have a request ? Contact Us Join Us

Data Visualization with R

Find Coursera's Data Visualization with R answers here. Enhance your skills with verified solutions for effective learning.
Estimated read time: 8 min
Coursera: IBM Data Visualization with R
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
2. Which chart is a type of part to the whole chart?
  • Horizontal bar chart
  • Stacked bar chart
  • Bar chart
  • Grouped bar chart
3. 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

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”)
2. 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.
3. 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.

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.
2. Which plot type helps you visualize time series data?
  • Histograms
  • Line plots
  • Box plots
  • Scatter plots
3. 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

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.
2. 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()
3. 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.
4. 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.

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
2. Which two components of a dashboard happen on the front end?
  • Visualize
  • Serve
  • Analyze
  • Interact
3. Complete the sentence: You use the Layout functions to organize ____________________ containing user interface elements in the application.
  • Outputs
  • Layouts
  • Panels
  • Inputs
4. 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

1. In a Shiny application, where do you add input widgets?
  • A panel.
  • A tabset panel.
  • A layout.
  • A title panel.
2. 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
3. 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.
Related Articles

Post a Comment

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.