Redesign 2: Rats of New York

Due by 11:59 PM on Monday, October 2, 2017

New York City is full of urban wildlife, and rats are one of the city’s most infamous animal mascots. Rats in NYC are plentiful, but they also deliver food, so they’re useful too.

NYC keeps incredibly detailed data regarding animal sightings, including rats, and it makes this data publicly available.

For this second redesign assignment, you will use R and ggplot to tell an interesting story hidden in the data. You can recreate one of these ugly, less-than-helpful graphs, or create a new story by looking at other variables in the data:

Bad example 1

Here’s what you need to do:

  1. Download New York City’s database of rat sightings since 2010: Shredder

    NYC Rat Sightings. Place this in a folder named data in an RStudio project.As always, you’ll probably need to right click on this link and choose “Save link as…”, since your browser will want to display it as text. The data was originally uploaded by the City of New York to Kaggle, and is provided with a public domain license.

  2. Summarize the data somehow. The raw data has more than 100,000 rows, which means you’ll need to aggregate the data. Consider looking at the number of sightings per borough, per year, per dwelling type, etc., or a combination of these, like the change in the number sightings across the 5 boroughs between 2010 and 2016.
  3. Create an appropriate visualization based on the data you summarized.
  4. Write a memo (no word limit) explaining your process. I’m specifically looking for a discussion of the following:
    • What was wrong with the original graphic (if you’re fixing one of the original figures)?
    • What story are you telling with your new graphic?
    • How did you apply the principles of CRAP?
    • How did you apply Alberto Cairo’s five qualities of great visualizations?
  5. E-mail me the following outputs:
    • A PDF of your memo with your final code and graphic embedded in it.You can approach this in a couple different ways—you can write the memo and then include the full figure and code at the end, similar to this blog post, or you can write the memo in an incremental way, describing the different steps of creating the figure, ultimately arriving at a clean final figure, like this blog post.

      This means you’ll need to do all your coding in an R Markdown file and embed your code in chunks.
    • A standalone PNG version of your graphicUse ggsave(plot_name, filename = "blah.png", width = XX, height = XX)

    • A standalone PDF version of your graphicUse ggsave(plot_name, filename = "blah.pdf", width = XX, height = XX)

You will be graded based on how you use R and ggplot, how well you apply the principles of CRAP, The Truthful Art, and Effective Data Visualization, and how appropriate the graph is for the data and the story you’re telling. I will use this rubric to grade the final product. Example rubric for redesign 2

For this assignment, I am less concerned with detailed graphic design principles—select appropriate colors, change fonts if you’re brave, and choose a nice ggplot theme and perhaps make a few adjustments like moving the legend around (theme(legend.position = "bottom")) or other things you find with ggThemeAssist.

The assignment is due by midnight on Monday, October 2.

This assignment is more code-intensive than the first redesign assignment, but you have enough R skills to do this (really really). Help abounds—work in groups,Though your assignments have to be turned in individually…

consult with your classmates, meet with me, and search Google. You can do this, and you’ll hopefully feel like a dataviz wizard/witch when you’re done.

I’ve provided some starter code below. A couple comments about it:

You’ll summarize the data with functions from dplyr, including stuff like count(), arrange(), filter(), group_by(), summarize(), and mutate(). Here are some examples of ways to summarize the data: