Case Study (Mock)

Mock Case Study

Background

This case study asks you to submit a review of one article that uses data visualizations to answer a specific question. (You’ll do something similar for your final case study.) This is a “mock” case study, as the goal is to practice the case study process. You’ll be writing a review of a professional data science article and learning to create your own R Markdown file as part of the process. You can use any website, blog, or article with a good visualization. Some fun websites to try are pudding.cool, fivethiryeight, Our World in Data, and priceonomics.

Being Reading

Each case study will involve a reading assignment that leads to a discussion in class. The reading assignment for this case study is:

Read the entire article, and come to class with two or three things to share. These could be a favorite quote, a question you had while reading, a thought or idea that spring boarded from the reading, etc.

Resources

Learning to create and customize R Markdown reports is a good skill to have. (And something you’ll use every week in this class.) These reading links may give you some ideas:

Tasks

Visualization Report

  1. Find an example of an article that uses data and visualizations to answer a question. Write a brief one paragraph review of the article.

    • What is unique or good about the visualization? List a few ideas.
    • What could be better? Identify at least one issue with the visualization.
  2. Create a new .Rmd file in R-Studio. Adjust the YAML (the top few lines of code) to match the YAML below.

    ---
    title: "YOUR TITLE"
    author: "YOUR NAME"
    date: "`r format(Sys.time(), '%B %d, %Y')`"
    output:
     html_document:
      keep_md: true
      toc: true
      toc_float: true
      code_folding: hide
      fig_height: 6
      fig_width: 12
      fig_align: 'center'
    ---
    • Change the title to “Mock Case Study” in the YAML and add your name.
    • Create a new R chunk and add the following to adjust the default knit options.
    knitr::opts_chunk$set(echo = TRUE, message = FALSE, warning = FALSE, error = TRUE)
    #The error = TRUE option allows knitting even if there are errors. 
    • Create a section for your article. Include a link to the article, and your brief one paragraph review.
    • Create another section called “Testing.” In that section, add the R code below to your .Rmd file in an R chunk. The last line will produce an error (which it should). Leave the line as is, to verify that your file will knit even with an error in your work.
    R.version.string    
    plot(x = iris$Sepal.Length,
     y = iris$Petal.Length, 
     col = iris$Species, pch = 19)
    plot (x,y)
  3. Knit the file, creating both an .html and .md file, along with an associated image directory.

  4. Push your .Rmd, .html, and .md files, along with the associated image directory, to your class GitHub repository. The navigate to your .md file on GitHub to verify that your file is correctly displaying your work.

Submission

  1. Head to I-Learn to complete the rest of this assignment. You’ll submit a link to your .md file, as well as write a short reflection.