Developing Data Products Coursera Quiz Answers – Networking Funda

Get All Weeks Developing Data Products Coursera Quiz Answers

A data product is the production output from a statistical analysis. Data products automate complex analysis tasks or use technology to expand the utility of a data-informed model, algorithm or inference. This course covers the basics of creating data products using Shiny, R packages, and interactive graphics.

The course will focus on the statistical fundamentals of creating a data product that can be used to tell a story about data to a mass audience.

Enroll on Coursera

Developing Data Products Coursera Quiz Answers

Week 1 Quiz Answers

Quiz 1: Quiz 1

Q1. Which of the following are absolutely necessary for creating a functioning shiny app? (Check all that apply)

  • A server.R file containing a call to shinyServer()
  • A ui.R file containing a call to shinyUI()
  • A shiny.R file containing calls to shinyServer() and shinyUI()
  • A ui.R file that contains information about the CSS and styling of the App
  • A server.R file that sets configuration options for hosting the App

Q2. What is incorrect about the following syntax in ui.R?

library(shiny)
shinyUI(pageWithSidebar(
headerPanel("Data science FTW!"),
sidebarPanel(
h2('Big text')
h3('Sidebar')
),
mainPanel(
h3('Main Panel text')
)
  • The h2 command does not take text arguments
  • Missing comma after the h3 command
  • Missing a comma in the sidebar panel
  • The h3 command should be an h2 command

Q3. Consider the following in ui.R

library(UsingR)
data(galton)

shinyServer(  
    function(input, output) {    
       output$myHist <- renderPlot({      
          hist(galton$child, xlab='child height', col='lightblue',main='Histogram')      
          mu <- input$mu      
          lines(c(mu, mu), c(0, 200),col="red",lwd=5)      
          mse <- mean((galton$child - mu)^2)      
          text(63, 150, paste("mu = ", mu))      
          text(63, 140, paste("MSE = ", round(mse, 2)))      
          })      }
)

Why isn’t it doing what we want? (Check all that apply.)

The phrase “Guess at the mu value” should say “mean” instead of “mu”

It should be

mu <- input$mean

in server.R

  • The server.R output name isn’t the same as the plotOutput command used in ui.R.
  • The limits of the slider are set incorrectly and giving an error.

Q4. What are the main differences between creating a Shiny Gadget and creating a regular Shiny App? (Check all that apply)

  • Shiny Gadgets are designed to be used by R users in the middle of a data analysis.
  • Shiny Gadgets are specially designed for use on mobile phones and tablet computers.
  • Shiny Gadgets are designed to have small user interfaces that fit on one page.
  • Shiny Gadgets can be run on a user’s personal computer, unlike a regular Shiny App which needs to be hosted online.
  • Shiny Gadgets are smaller programs and therefore run faster than Shiny Apps.

Q5. Consider the following R script:

library(shiny)
library(miniUI)

pickXY <- function() {
  ui <- miniPage(
    gadgetTitleBar("Select Points by Dragging your Mouse"),
    miniContentPanel(
      plotOutput("plot", height = "100%", brush = "brush")
    )
  )

  server <- function(input, output, session) {
      output$plot <- renderPlot({
        plot(data_frame$X, data_frame$Y, main = "Plot of Y versus X",
           xlab = "X", ylab = "Y")
      })
      observeEvent(input$done, {
        stopApp(brushedPoints(data_frame, input$brush,
                          xvar = "X", yvar = "Y"))
      })
  }

  runGadget(ui, server)
}

my_data <- data.frame(X = rnorm(100), Y = rnorm(100))

pickXY(my_data)

Why isn’t it doing what we want?

  • The input data is defined in such a way that it is not compatible with pickXY()
  • The wrong column names are passed to brushedPoints()
  • No arguments are defined for pickXY()
  • The call to plot() references the column names of the data frame in the wrong order.

Week 2 Quiz Answers

Quiz 1: Quiz 2

Q1. What is rmarkdown? (Check all that apply.)

  • A format that can be interpreted into markdown (which is a simplified markup language).
  • A form of LaTeX typesetting.
  • A simplified XML format that can be interpreted into R.
  • A simplified format that, when interpreted, incorporates your R analysis into your document.

Q2. In rmarkdown presentations, in the options for code chunks, what command prevents the code from being repeated before results in the final interpreted document?

  • echo = FALSE
  • comment = FALSE
  • cache = FALSE
  • eval = FALSE

Q3. In rmarkdown presentations, in the options for code chunks, what prevents the code from being interpreted?

  • eval = FALSE
  • run = FALSE
  • cache = FALSE
  • eval = NULL

Q4. What is leaflet? (Check all that apply.)

  • An R package for creating 3D rendered isomaps
  • A javascript library for creating interactive maps
  • A tool for reproducible documents
  • An R package interface to the javascript library of the same name

Q5. The R command

df %>% leaflet() %>% addTiles()

is equivalent to what? (Check all that apply)

  • leaflet(df) %>% addTiles()
  • leaflet(addTiles(df))
  • addTiles(leaflet(df()))
  • addTiles(leaflet(df))
  • df(leaflet(addTiles()))

Q6. If I want to add popup icons to my leaflet map in R, I should use.

  • addTiles
  • leaflet
  • dplyr
  • addMarkers

Week 3 Quiz Answers

Quiz 1: Quiz 3

Q1. Which of the following items is required for an R package to pass R CMD check without any warnings or errors?

  • example data sets
  • vignette
  • unit tests
  • a demo directory
  • An explicit software license

Q2. Which of the following is a generic function in a fresh installation of R, with only the default packages loaded? (Select all that apply)

  • lm
  • colSums
  • show
  • predict
  • mean
  • dgamma

Q3. What function is used to obtain the function body for an S4 method function?

  • getS3method()
  • getMethod()
  • getClass()
  • showMethods()

Q4. Please download the R package DDPQuiz3 from the course web site. Examine the \verb|createmean|createmean function implemented in the R/ sub-directory. What is the appropriate text to place above the \verb|createmean|createmean function for Roxygen2 to create a complete help file?


#' This function calculates the mean
#'
#' @return the mean of x
#' @export
#' @examples
#' x <- 1:10
#' createmean(x)

#' This function calculates the mean
#'
#' @param x is a numeric vector
#' @return the mean of x
#' @export
#' @examples
#' x <- 1:10
#' createmean(y)
#' This function calculates the mean
#' 
#' @param x is a numeric vector
#' @return the mean of x
#' @export
#' @examples 
#' x <- 1:10
#' createmean(x)
This function calculates the mean
@param x is a numeric vector
@return the mean of x
@export
@examples
x <- 1:10
createmean(x)
Conclusion:

I hope this Developing Data Products Coursera Quiz Answers Coursera Quiz Answer would be useful for you to learn something new from this Course. If it helped you then don’t forget to bookmark our site for more Quiz Answers.

This course is intended for audiences of all experiences who are interested in learning about new skills, there are no prerequisite courses.

Keep Learning!

Leave a Reply

Your email address will not be published.

error: Content is protected !!