Due: 08 December by 11:00 pm

Weight: This assignment is worth 4% of your final grade.

Purpose, Skills, & Knowledge: The purposes of this assignment are:

Assessment: Each question indicates the % of the assignment grade, summing to 100%. The credit for each question will be assigned as follows:

Rules: This entire assignment is SOLO. You may not work with other classmates, though you may consult instructors for help.

1) Staying organized [5%]

Download and use this template for your assignment. Inside the “hw12” folder, open and edit the YAML at the top of the “hw12.Rmd” file.

This week’s main task is simple: Create a html document of HW 11.

For this last assignment, all you need to do is convert what you did in HW 11 into a .Rmd file that compiles to a html document. So you’re going to repeat the same steps as in HW 11, except this time your result will be a much nicer, well-formatted html page. If you want, you may choose to work with a different dataset from HW 11, but you may also just use the same dataset and plots from your HW 11 submission.

2) Choose and load some data [5%]

For this assignment, you will need to find a dataset of your choosing and create three summary visualizations. To keep things manageable, choose one of the following datasets from the following libraries. Note that to load any of these data frames, all you need to do is install and load the library.




3) Inspect your data [10%]

Once you’ve chosen a data set, open your hw12.Rmd file and begin exploring the data (be sure to load the library that contains the dataset at the top of your file). Write some code in code chunks to preview and summarize the data frame using some of the methods we’ve used in class. You should be able to quickly get an understanding of what variables are included and their nature. Consider the following questions in your exploration (you don’t have to write out answers to these questions - just write code to help you answer them by previewing the data in different ways):

4) Make plots [50%]

Now that you have a basic understanding of the dataset, make some plots to explore the variables in the data and their potential relationships. You may use base R plotting functions or the ggplot2 library to make your figures, but you must make at least two different types of figures, including:

  1. A scatterplot of involving at least two variables.
  2. A bar chart involving at least one variable.

You can choose to plot whichever variables you wish, but you must be able to interpret the results of your plot.

5) Interpret your plots [15%]

Below the plot code for each of your plots, write a description and interpretation of your plot in a comment. Make sure you address at least the following questions:

  1. Describe what variables you are plotting and why.
  2. Describe the primary relationship / trend / information you hope the reader will gain from your visualization.

6) Compile your RMarkdown document [10%]

When you’re done, click the “knit” button to compile your .Rmd file into a html page. Make sure you’ve used code chunk settings to make the outputs pretty (e.g. nice figure dimensions, no warning messages, etc.).

7) Submit your files on Blackboard [5%]

Create a zip file of all files in your R project folder for this assignment and submit the zip file on Blackboard by the due deadline.

EMSE 4574: Programming for Analytics (Fall 2020) |
Tuesdays | 12:45 - 3:15 PM | Dr. John Paul Helveston | jph@gwu.edu
Content 2020 John Paul Helveston. See the licensing page for details.