Home » Data Science » Data Analysis » A data analyst creates a plot using the following code chunk:ggplot(data = penguins) +geom_point(mapping = aes(x = flipper_length_mm, y = body_mass_g))Which of the following represents a variable in the code chunk? Select all that apply. Q: Practice More Questions From: Visualizations Aesthetics and Annotations Created with Fabric.js 4.6.0 Practice More Questions Data Analysis 2000+ Qs Machine Learning 1000+ Qs Created with Fabric.js 4.6.0 Similar Questions A data analyst is working with the penguins data. The analyst creates a scatterplot with the following code:ggplot(data = penguins) +geom_point(mapping = aes(x = flipper_length_mm, y = body_mass_g, alpha = species))What does the alpha aesthetic do to the appearance of the points on the plot? You are working with the penguins dataset. You create a scatterplot with the following code:ggplot(data = penguins) +geom_point(mapping = aes(x = flipper_length_mm, y = body_mass_g))You want to highlight the different years of data collection on your plot. Add a code chunk to the second line of code to map the aesthetic size to the variable year. NOTE: the three dots (…) indicate where to add the code chunk.geom_point(mapping = aes(x = flipper_length_mm, y = body_mass_g, size = year))What years does your visualization display? You are working with the penguins dataset. You create a scatterplot with the following lines of code:ggplot(data = penguins) +geom_point(mapping = aes(x = flipper_length_mm, y = body_mass_g)) +What code chunk do you add to the third line to save your plot as a pdf file with “penguins” as the file name? Which of the following tasks can you complete with ggplot2 features? Select all that apply. In ggplot2, which of the following aesthetic attributes can you use to map variables to points? Select all that apply. The _____ aesthetic makes some points on a plot more transparent, or see-through, than others. You are working with the penguins dataset. You create a scatterplot with the following code:ggplot(data = penguins) +geom_point(mapping = aes(x = flipper_length_mm, y = body_mass_g))You want to highlight the different penguin species on your plot. Add a code chunk to the second line of code to map the aesthetic shape to the variable species.NOTE: the three dots (…) indicate where to add the code chunk.geom_point(mapping = aes(x = flipper_length_mm, y = body_mass_g, shape = species))Which penguin species does your visualization display? A data analyst creates a plot with the following code chunk:ggplot(data = penguins) +geom_jitter(mapping = aes(x = flipper_length_mm, y = body_mass_g))What does the geom_jitter() function do to the points in the plot? A data analyst uses the annotate() function to create a text label for a plot. Which attributes of the text can the analyst change by adding code to the argument of the annotate() function? Select all that apply. You are working with the penguins dataset. You create a scatterplot with the following lines of code:ggplot(data = penguins) +geom_point(mapping = aes(x = flipper_length_mm, y = body_mass_g)) +What code chunk do you add to the third line to save your plot as a png file with “penguins” as the file name? Which of the following are operations you can perform in ggplot2? Select all that apply. A data analyst creates a bar chart with the diamonds dataset. They begin with the following line of code:ggplot(data = diamonds)What symbol should the analyst put at the end of the line of code to add a layer to the plot? A data analyst creates a plot using the following code chunk:ggplot(data = penguins) +geom_point(mapping = aes(x = flipper_length_mm, y = body_mass_g))Which of the following represents a variable in the code chunk? Select all that apply. A data analyst creates a scatterplot with a lot of data points. The analyst wants to make some points on the plot more transparent than others. What aesthetic should the analyst use? Fill in the blank: The _____ creates a scatterplot and then adds a small amount of random noise to each point in the plot to make the points easier to find. You are working with the diamonds dataset. You create a bar chart with the following code:ggplot(data = diamonds) +geom_bar(mapping = aes(x = color, fill = cut)) +You want to use the facet_wrap() function to display subsets of your data. Add the code chunk that lets you facet your plot based on the variable cut.facet_wrap(~cut)How many subplots does your visualization show? Fill in the blank: In ggplot2, you use the _____ to add layers to your plot. In ggplot2, what symbol do you use to add layers to your plot? What function creates a scatterplot and then adds a small amount of random noise to each point in the plot to make the points easier to find? You are working with the diamonds dataset. You create a bar chart with the following code:ggplot(data = diamonds) +geom_bar(mapping = aes(x = color, fill = cut)) +You want to use the facet_wrap() function to display subsets of your data. Add the code chunk that lets you facet your plot based on the variable color.facet_wrap(~color)How many subplots does your visualization show? Fill in the blank: You can use the _____ function to put a text label on your plot to call out specific data points. A data analyst uses the aes() function to define the connection between their data and the plots in their visualization. What argument is used to refer to matching up a specific variable in your data set with a specific aesthetic? Created with Fabric.js 4.6.0 Practice More Questions Data Analysis 200+ Qs Machine Learning 100+ Qs