Get All Week Data Analysis with R Programming Coursera Quiz AnswersThis course is the seventh course in the Google Data Analytics Certificate. These courses will equip you with the skills needed to apply to introductory-level data analyst jobs. In this course, you’ll learn about the programming language known as R. You’ll find out how to use RStudio, the environment that allows you to work with R. This course will also cover the software applications and tools that are unique to R, such as R packages. You’ll discover how R lets you clean, organize, analyze, visualize, and report data in new and more powerful ways. Current Google data analysts will continue to instruct and provide you with hands-on ways to accomplish common data analyst tasks with the best tools and resources. Show
SKILLS YOU WILL GAIN
Here you will Get Data Analysis with R Programming Coursera Quiz AnswersAll Quiz Answers for Week 1Quiz 1 >>Weekly challenge 1Q1. A data analyst uses words and symbols to give instructions to a computer. What are the words and symbols known as?
Q2. Many data analysts prefer to use a programming language for which of the following reasons? Select all that apply.
Q3. Which of the following are benefits of open-source code? Select all that apply.
Q4. For what reasons do many data analysts choose to use R? Select all that apply.
Q5. A data analyst needs to quickly create a series of scatterplots to visualize a very large dataset. What should they use for the analysis?
Q6. RStudio’s integrated development environment includes which of the following? Select all that apply.
Q7. Fill in the blank: When you execute code in the source editor, the code automatically also appears in the _____.
Q8. In RStudio, where can you find and manage all the data you currently have loaded?
All Quiz Answers for Week 2Quiz 1 >>Weekly challengeQ1. A data analyst is assigning a variable to a value in their company’s sales dataset for 2020. Which variable name uses the correct syntax?
Q2. You want to create a vector with the values 12, 23, 51, in that exact order. After specifying the variable, what R code chunk allows you to create the vector?
Q3. If you use the mdy() function in R to convert the string “April 10, 2019”, what will return when you run your code?
Q4. A data analyst inputs the following code in RStudio: change_1 <- 70 Which of the following types of operators does the analyst use in the code?
Q5. A data analyst is deciding on naming conventions for an analysis that they are beginning in R. Which of the following rules are widely accepted stylistic conventions that the analyst should use when naming variables? Select all that apply.
Q6. In R, what includes reusable functions and documentation about how to use the functions?
Q7. Packages installed in RStudio are called from CRAN. CRAN is an online archive with R packages and other R-related resources.
Q8. A data analyst previously created a series of nested functions that carry out multiple operations on some data in R. The analyst wants to complete the same operations but make the code easier to understand for their stakeholders. Which of the following can the analyst use to accomplish this?
All Quiz Answers for Week 3Quiz 1 >>Weekly challenge 3Q1. A data analyst creates a data frame with data that has more than 50,000 observations in it. When they print their data frame, it slows down their console. To avoid this, they decide to switch to a tibble. Why would a tibble be more useful in this situation?
Q2. A data analyst is working with a large data frame. It contains so many columns that they don’t all fit on the screen at once. The analyst wants a quick list of all of the column names to get a better idea of what is in their data. What function should they use?
Q3. You are working with the ToothGrowth dataset. You want to use the glimpse() function to get a quick summary of the dataset. Write the code chunk that will give you this summary. How many variables does the ToothGrowth dataset contain?
Q4. A data analyst is working with a data frame named sales. They write the following code:
The data frame contains a column named q1_sales. What code chunk does the analyst add to change the name of the column from q1_sales to quarter1_sales ?
Q5. A data analyst is working with the penguins data. The variable species includes three penguin species: Adelie, Chinstrap, and Gentoo. The analyst wants to create a data frame that only includes the Adelie species. The analyst receives an error message when they run the following code:
How can the analyst change the second line of code to correct the error?
Q6. You are working with the penguins dataset. You want to use the summarize() and mean() functions to find the mean value for the variable body_mass_g. You write the following code: penguins %>% drop_na() %>% group_by(species) %>% Add the code chunk that lets you find the mean value for the variable body_mass_g.
What is the mean body mass in g for the Adelie species?
Q7. A data analyst is working with a data frame called salary_data. They want to create a new column named total_wages that adds together data in the standard_wages and overtime_wages columns. What code chunk lets the analyst create the total_wages column?
Q8. A data analyst is working with a data frame named retail. It has separate columns for dollars (price_dollars) and cents (price_cents). The analyst wants to combine the two columns into a single column named price, with the dollars and cents separated by a decimal point. For example, if the value in the price_dollars column is 10, and the value in the price_cents column is 50, the value in the price column will be 10.50. What code chunk lets the analyst create the price column?
Q9. In R, which statistical measure demonstrates how strong the relationship is between two variables?
Q10. A data analyst uses the bias() function to compare the actual outcome with the predicted outcome to determine if the model is biased. They get a score of 0.8. What does this mean?
All Quiz Answers for Week 4Quiz 1 >>Weekly challenge 4Q1. Which of the following tasks can you complete with ggplot2 features? Select all that apply.
Q2. 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?
Q3. 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.
Q4. Fill in the blank: In ggplot2, the term mapping refers to the connection between variables and _____ .
Q5. 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?
Q6. 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.
Which penguin species does your visualization display?
Q7. 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?
Q8. 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 clarity.
How many subplots does your visualization show?
Q9. A data analyst creates a scatterplot. The analyst wants to put a text label on the plot to call out specific data points. What function does the analyst use?
Q10. 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?
All Quiz Answers for Week 5Quiz 1 >>Weekly challenge 5Q1. A data analyst wants to create a shareable report of their analysis with documentation of their process and notes explaining their code to stakeholders. What tool can they use to generate this?
Q2. A data analyst finishes editing an R Markdown notebook and wants to convert it to a new format they can share. What are their options? Select all that apply.
Q3. A data analyst notices that their header is much smaller than they wanted it to be. What happened?
Q4. Fill in the blank: A data analyst includes _____ in their R Markdown notebook so that they can refer to it directly in their explanation of their analysis.
Q5. A data analyst wants to add a bulleted list to their R Markdown document. What symbol can they type to create this formatting?
Q6. A data analyst adds a section of executable code to their .rmd file so users can execute it and generate the correct output. What is this section of code called?
Q7. A data analyst adds specific characters before and after their code chunk to mark where the data item begins and ends in the .rmd file. What are these characters called?
Q8. Why would a data analyst create a template of their .rmd file? Select all that apply.
Quiz 1 >>Course challengeQ1. Scenario 1, questions 1-7 As part of the data science team at Gourmet Analytics, you use data analytics to advise companies in the food industry. You clean, organize, and visualize data to arrive at insights that will benefit your clients. As a member of a collaborative team, sharing your analysis with others is an important part of your job. Your current client is Chocolate and Tea, an up-and-coming chain of cafes. The eatery combines an extensive menu of fine teas with chocolate bars from around the world. Their diverse selection includes everything from plantain milk chocolate, to tangerine white chocolate, to dark chocolate with pistachio and fig. The encyclopedic list of chocolate bars is the basis of Chocolate and Tea’s brand appeal. Chocolate bar sales are the main driver of revenue. Chocolate and Tea aims to serve chocolate bars that are highly rated by professional critics. They also continually adjust the menu to make sure it reflects the global diversity of chocolate production. The management team regularly updates the chocolate bar list in order to align with the latest ratings and to ensure that the list contains bars from a variety of countries. They’ve asked you to collect and analyze data on the latest chocolate ratings. In particular, they’d like to know which countries produce the highest-rated bars of super dark chocolate (a high percentage of cocoa). This data will help them create their next chocolate bar menu. Your team has received a dataset that features the latest ratings for thousands of chocolates from around the world. Click here to access the dataset. Given the data and the nature of the work you will do for your client, your team agrees to use R for this project. Your supervisor asks you to write a short summary of the benefits of using R for the project. Which of the following benefits would you include in your summary? Select all that apply.
Q2. Scenario 1, continued Before you begin working with your data, you need to import it and save it as a data frame. To get started, you open your RStudio workspace and load the tidyverse library. You upload a .csv file containing the data to RStudio and store it in a project folder named flavors_of_cacao.csv. You use the read_csv() function to import the data from the .csv file. Assume that the name of the data frame is bars_df and the .csv file is in the working directory. What code chunk lets you create the data frame?
Q3. Scenario 1, continued Now that you’ve created a data frame, you want to find out more about how the data is organized. The data frame has hundreds of rows and lots of columns. Assume the name of your data frame is flavors_df. What code chunk lets you get a glimpse of the contents of the data frame?
Q4. Scenario 1, continued Next, you begin to clean your data. When you check out the column headings in your data frame you notice that the first column is named Company…Maker.if.known. (Note: The period after known is part of the variable name.) For the sake of clarity and consistency, you decide to rename this column Company (without a period at the end). Assume the first part of your code chunk is: flavors_df %>% What code chunk do you add to change the column name?
Q5. After previewing and cleaning your data, you determine what variables are most relevant to your analysis. Your main focus is on Rating, Cocoa.Percent, and Bean.Type. You decide to use the select() function to create a new data frame with only these three variables. Assume the first part of your code is: trimmed_flavors_df <- flavors_df %>% Add the code chunk that lets you select the three variables.
What bean type appears in row 6 of your tibble?
Q6. Next, you select the basic statistics that can help your team better understand the ratings system in your data. Assume the first part of your code is: trimmed_flavors_df %>% You want to use the summarize() and sd() functions to find the standard deviation of the rating for your data. Add the code chunk that lets you find the standard deviation for the variable Rating.
What is the standard deviation of the rating?
Q7. After completing your analysis of the rating system, you determine that any rating greater than or equal to 3.9 points can be considered a high rating. You also know that Chocolate and Tea considers a bar to be super dark chocolate if the bar’s cocoa percent is greater than or equal to 75%. You decide to create a new data frame to find out which chocolate bars meet these two conditions. Assume the first part of your code is: best_trimmed_flavors_df <- trimmed_flavors_df %>% You want to apply the filter() function to the variables Cocoa.Percent and Rating. Add
the code chunk that lets you filter the data frame for chocolate bars that contain at least 75% cocoa and have a rating of at least 3.9 points.
What value for cocoa percent appears in row 1 of your tibble?
Q8. Now that you’ve cleaned and organized your data, you’re ready to create some useful data visualizations. Your team assigns you the task of creating a series of visualizations based on requests from the Chocolate and Tea management team. You decide to use ggplot2 to create your visuals. Assume your first line of code is: ggplot(data = best_trimmed_flavors_df) + You want to use the geom_bar() function to create a bar
chart. Add the code chunk that lets you create a bar chart with the variable Rating on the x-axis.
How many bars does your bar chart display? 1 point
Q9. Your bar chart reveals the locations that produce the highest rated chocolate bars. To get a better idea of the specific rating for each location, you’d like to highlight each bar. Assume that you are working with the following code: ggplot(data = best_trimmed_flavors_df) + geom_bar(mapping = aes(x = Company.Location)) Add a code chunk to the second line of code to map the aesthetic fill to the variable Rating. NOTE: the three dots (…) indicate where to add the code chunk.
According to your bar chart, which two company locations produce the highest rated chocolate bars?
Q10. Scenario 2, continued A teammate creates a new plot based on the chocolate bar data. The teammate asks you to make some revisions to their code. Assume your teammate shares the following code chunk: ggplot(data = best_trimmed_flavors_df) + geom_bar(mapping = aes(x = Rating)) + What code chunk do you add to the third line to create wrap around facets of the variable Rating?
Q11. Scenario 2, continued Your team has created some basic visualizations to explore different aspects of the chocolate bar data. You’ve volunteered to add titles to the plots. You begin with a scatterplot. Assume the first part of your code chunk is: ggplot(data = trimmed_flavors_df) + geom_point(mapping = aes(x = Cocoa.Percent, y = Rating)) + What code chunk do you add to the third line to add the title Recommended Bars to your plot?
Q12. Scenario 2, continued Next, you create a new scatterplot to explore the relationship between different variables. You want to save your plot so you can access it later on. You know that the ggsave() function defaults to saving the last plot that you displayed in RStudio, so you’re ready to write the code to save your scatterplot. Assume your first two lines of code are: ggplot(data = trimmed_flavors_df) + geom_point(mapping = aes(x = Cocoa.Percent, y = Rating)) + What code chunk do you add to the third line to save your plot as a jpeg file with chocolate as the file name?
Q13. Scenario 2, continued As a final step in the analysis process, you create a report to document and share your work. Before you share your work with the management team at Chocolate and Tea, you are going to meet with your team and get feedback. Your team wants the documentation to include all your code and display all your visualizations. You decide to create an R Markdown notebook to document your work. What are your reasons for choosing an R Markdown notebook? Select all that apply.
Recap:I hope
this article would be helpful for you to find all the coursera Quiz Answers. Enroll on Coursera <<<Check out another Coursera Quiz Answers >>> Crash Course on Python Coursera Quiz Answers The Bits and Bytes of Computer Networking Coursera Quiz Answers Introduction to User Experience Design Coursera Quiz Answers Django Features and Libraries Coursera Quiz Answers Using JavaScript JQuery and JSON in Django Coursera Quiz Answers What are the data types in R?R's basic data types are character, numeric, integer, complex, and logical. R's basic data structures include the vector, list, matrix, data frame, and factors.
Which of the following are included in R packages select all that apply 1 point?R packages include reusable R functions, sample datasets, and tests for checking your code. R packages also include documentation about how to use the included functions.
What should you use to assign a value to a variable in R?In R programming, assign() method is used to assign the value to a variable in an environment.
When using RStudio What does the installed packages () function do?Packages are collections of R functions, data, and compiled code in a well-defined format. When you install a package it gives you access to a set of commands that are not available in the base R set of functions. The directory where packages are stored is called the library. R comes with a standard set of packages.
|