7.4.5.Video quiz - quanganh2001/Google-Data-Analytics-Professional-Certificate-Coursera GitHub Wiki

Visualization basics in R and tidyverse

Question: Fill in the blank: In ggplot2, an _____ is a visual property of an object in your plot.

A. alpha

B. argument

C. aesthetic

D. annotation

The correct answer is C. aesthetic. Explain: In ggplot2, an aesthetic is a visual property of an object in your plot.

Enhancing visualizations in R

Question: In ggplot2, which of the following concepts refers to the shape, color, and size of data points in a plot?

A. Annotations

B. Facets

C. Geoms

D. Aesthetics

The correct answer is D. Aesthetics. Explain: In ggplot2, the shape, color, and size of data points in a plot refers to the concept of aesthetics.

Doing more with ggplot

Which of the following items can you create with the geom_point() function?

A. Line diagram

B. Bar chart

C. Scatterplot

D. Boxplot

The correct answer is C. Scatterplot. Explain: You can create a scatterplot with the geom_point() function.

Aesthetics and facets

Note: Since the 'tilde' (~) is a new symbol being introduced for the first time, the definition is as follows:

Tilde operator is used to define the relationship between dependent variable and independent variables in a statistical model formula. The variable on the left-hand side of tilde operator is the dependent variable and the variable(s) on the right-hand side of tilde operator is/are called the independent variable(s). So, tilde operator helps to define that dependent variable depends on the independent variable(s) that are on the right-hand side of tilde operator. (retrieved from tutorialspoint.com)

In the case of this example, the independent variable at the end of the syntax line would be species, and the dependent variable in this case is facet_wrap. The facet_wrap is actually a function that is being called to separate and distribute the independent data within the plot.

Question: Facet functions let you display smaller groups, or subsets, of your data.

A. True

B. False

It is true statement. Explain: Facet functions let you display smaller groups, or subsets, of your data.

Annotation layer

Question: What do the label and annotate functions do?

A. Display subsets of your data

B. Choose a geom

C. Load a dataset

D. Customize the look and feel of your plots

The correct answer is D. Customize the look and feel of your plots. Explain: The label and annotate functions customize the look and feel of your plots.

Saving your visualizations

Question: Where in RStudio can you find the export menu for saving plots?

A. The R console pane

B. The source editor pane

C. The plots tab

D. The environment pane

The correct answer is C. The plots tab. Explain: In RStudio, you can find the export menu for saving plots in the plots tab.