Communicating Ideas with Great Graphs in R

Data Dance
From The Coffeelicious

Syllabus Contents

Catalog Description

Student will use the “grammar of graphics” to create elegant and engaging graphs for communicating ideas to scientific and lay audiences. Foundational principles of the grammar of graphics will be emphasized so that students can make any graph they can imagine. Class examples will be drawn from a variety of fields including the environmental, natural resources, and social sciences; business; and sports. Prerequisite is MTH107 or instructor’s consent after demonstrating a simple familiarity with the R software (instructor can provide preparatory resources).

Learning Outcomes

Outcomes In this course, you will have the opportunity to:

  1. Describe the foundational principles of the “grammar of graphics”;
  2. Use the grammar of graphics to construct traditional graphs such as histograms, barplots, scatterplots, line plots, and time series plots;
  3. Use “aesthetics”, “scales”, “annotations”, and “facets” to modify traditional graphs to display multiple levels of information;
  4. Explain how colors and typography affect the audience’s appreciation of graphs;
  5. Construct composites of multiple graphs to illustrate a complete narrative with data;
  6. Become proficient with using the ggplot2 package in the R environment to construct elegant and informative graphs;
  7. Explain the importance of “tidy data” with respect to the “grammar of graphics”; and
  8. Use some R functions to create “tidy data” from “untidy data.”

While this course does not fulfill any requirements in the General Education Program it does support the “[c]ommunicate mathematical information … visually …” outcome.


Online Delivery This course will be delivered in a synchronous “on-line” format through the “Big Blue Button” online meeting app on from 4-6pm on Monday, Wednesday, and Friday of May term. You should make every effort to attend these online sessions as this will be the best opportunity to ask questions and get help from me and others in the class.

I do understand during this “period of disruption” that you may miss an occasional class period. A video will be made of each synchronous meeting and will be available on to view asychronously (i.e., at other times). Also see the Assistance section next for other ways to receive help with course material.

During this period of remote instruction I can also set up “GoToMeetings” where we can “video chat”, which will allow you to share your computer screen with me (provided you have a webcam). This can be invaluable for troubleshooting code issues as I can see exactly what you are doing on your computer. To setup a “video chat” with me, send me an e-mail with some preferred times and I will send you back an invitation to “meet” that will contain directions for how to do so.


This class will have lots of coding in R. Learning R can be difficult at first — it’s like learning a new language, just like Spanish, French, or Chinese.1 Hadley Wickham, chief data scientist at RStudio and author of ggplot2, said this:2

It’s easy when you start out programming to get really frustrated and think, “Oh it’s me, I’m really stupid,” or, “I’m not made out to program.” But, that is absolutely not the case. Everyone gets frustrated. I still get frustrated occasionally when writing R code. It’s just a natural part of programming. So, it happens to everyone and gets less and less over time. Don’t blame yourself. Just take a break, do something fun, and then come back and try again later.

This cartoon illustrates what Hadley explains and how you may feel at some point this term.3

If you find yourself in this situation follow the advice of Hadley above and Allison below.

This advice is predicated on two things. First, you start early enough that you have time to ask for help and wait for a response. Second, that you will ask for help when you need it. I am here to help you and I want to help you learn. You can succeed in this class, especially if you are organized and reach out for help when you have questions or are stuck.

I will, however, not be able to monitor my e-mail constantly during this May term. Thus, please use the Piazza forum to ask questions that may be able to be answered by others in class or if the eventual answer might be useful to others in class.4 Please also answer questions posted by others on Piazza if you feel that you know the answer. I will make every attempt to check my e-mail and Piazza every day in the later afternoons.5 Questions that are specific to you should be sent directly to me.6

If you do ask questions on Piazza or directly to me, please include the following items in your question:

  1. A clear explanation of the problem, with as much detail as you can offer.
  2. Which data your are using. If you are using your own data then please attach the CSV file.
  3. An attachment of your R script so that, with your data, I can re-create your analyses.

Note that you can only include the attachments in direct e-mails to me (i.e., not on Piazza).



I want to create an inclusive and accessible learning environment for those of you that have a condition (e.g., attention, learning, vision, hearing, mental, physical, or other health-related concern) that may require special accommodations. If you have already established accommodations with the Office of Accessibility Resources (OAR), please communicate your approved accommodations to me as soon as possible so that we can discuss your needs in this course. If you have a condition that requires accommodations but you have not yet established services through OAR, then you should contact Jennifer Newago as soon as possible (Ponzio 230, x1387, or It is the policy and practice of Northland College to create inclusive and accessible learning environments consistent with federal and state law. More information is available here.


An overall grade will be computed from your performance on daily exercises (75%) and a final project (25%), which are both described below. Your letter grade will be assigned from your overall percentage (rounded to a whole number) and the table below.

A 92-100A- 90-91
B+ 87-89B 82-86B- 80-81
C+ 77-79C 70-76
D+ 67-69D 60-66F 0-59


Most course modules will have exercises that will be due by 3pm on the day of the next class period after the module is completed. For example, if we complete a module in Monday’s class period then the exercises for that module will be due on Wednesday (two days later) by 3pm. We will likely complete a module during each class period, so exercises will be due before nearly every class period.

All exercises should be formatted as I described on the first day of class and handed in to me by uploading your HTML document to the appropriate assignment in the “Exercises” unit of the “Coursework” page on Each exercise set is worth 10 points and will be graded with a two-part rubric. The first part of the rubric is based on your completion of the exercise.

5 points5-1 points0 points
All parts of the exercise were completed in full and followed the required homework format.Some parts of the exercise were either not attempted or were incomplete. The required format was followed.Very little of the exercise was completed or the required format was not followed.

The second part of the rubric is based on your correctness in performing the work.

5 points5-1 points0 points
All or nearly all parts of the exercise were correct.Various amounts of the exercise were done incorrectly.Very little of the exercise was done correctly.

Exercises handed in late may still receive “completeness” points but may not receive any “correctness” points. May term moves very quickly and it is thus difficult to catch up if you fall behind. Please make every effort to not fall behind by turning in your exercises on time.


Final Project

To demonstrate your ability to communicate ideas with effective graphics created in R, I am asking you to create two graphs, from any data that you choose, as a final project. The graphs do not have to be overly complicated but they also should not be overly simple; you should strive to create a graph that elegantly demonstrates a “story” in the data. One of your two graphics should either be a composite of multiple graphics or a facet across groups. Your graphic should be formatted as with the homework exercises, but you should also include an introduction to the data and the question that you are exploring, a summary of what you observed in your graph, and a discussion of design choices that you made when making your graph (i.e., why did you choose that type of graph, those colors, that faceting, etc.).

You can choose any data that you want for this project. For your convenience, I have compiled some sources of reliable and interesting data here.

Items to be considered when grading your final project are:

  • How clearly defined the objective of or question explored by the graphic is.
  • How appropriate the graphic type is for the data and questions explored.
  • Are annotations (axis, legend, and titles) clear and appropriate.
  • Is the graph devoid of any extraneous items (i.e., do all parts of graphic have a purpose related to the objective or question)?
  • Colors and typography are appropriate and aesthetically pleasing.
  • Graph is devoid of typographical (spelling, capitalization, and grammatical) errors.
  • Is the question or topic generally interesting and creative?
  • Overall presentation … is the graph pleasing to the eye?

In addition to turning in your final graphs, you will “present” one of your graphs to the class. In this 5 minute presentation you should briefly introduce your data and your interest in the data (i.e., why did you look at those data), present your final graph, and explain design choices that you made when constructing the graph. Given the course enrollment, you will likely only present your graph to half of the class.


Note About Incomplete Grades

An incomplete grade will be given ONLY in extreme circumstances that are beyond your control, such as a major illness, and will ONLY be given if you have successfully completed the entire course except for the final exam. This is in accordance with Northland College policy (scroll down to “Incomplete Grades”).

Academic Alerts

As you adjust to college, you may benefit from working with a professional on your organization, motivation, and stress level. If I observe you struggling with the course early in the term then I may file an “Academic Alert” about you. If this happens, you will receive an e-mail from me that explains steps you can take to improve your performance in the course. Our Academic Success Coordinator, Gina Kirsten, will receive the alert and will likely also reach out to you to set up a time to further discuss ways to improve in the course. Academic Alerts are not punitive, they are simply an attempt to help you get back on track in this course as soon as possible.

Classroom Conduct and Academic Integrity

Conduct and Integrity I hope that everyone in this class will feel comfortable express themselves, asking questions, and freely participatig in this online class. Thus, please treat each other with courtesy and respect, and refrain from offensive or inappropriate language during any part of the class. Please do not post non-course related or personal or non-academic material in the Piazza discussion forum or the class “chat” area during class. Issues related to conduct and integrity should be sent directly to me via my email.

Students are expected to submit work which is their own. Plagiarism or cheating will not be tolerated. If either is the case you may have your grade for the assignment lowered or you may fail the course. The College’s Academic Integrity Statement & Policy will be followed in this course. Please make sure that you are familiar with its content.


  1. The idea for this section came from Dr. Ted Laderas

  2. This is from the last question in this interview

  3. This cartoon is from Allison Horst

  4. There are several students in this course that have used R in previous courses. They should be able to answer R related questions for those of you that are just getting started with R. 

  5. I will often check my e-mail more often, but I won’t be able to do that on a consistent basis. So, please, do not wait untl the last minute as you may not get an immediate response from me. 

  6. While I am pretty open-minded and not much of a stickler when it comes to e-mail etiquette, some professors are. And it is always better to send an appropriate rather than an inappropriate e-mail. Here and here are some good suggestions for e-mailing professors.