1 Tables

Using the data set from the reference lab of PNW flights, choose three analytical questions from the menu below, and design a table for each one that answers it in a publication-ready format (using gt), including appropriate column names, titles, captions, etc. Unless otherwise specified, all questions should be explored for flights departing from Portland. Alternatively, please feel free to come up with your own analyses!

Note: For some of these questions, you may need to make editorial/analytical choices about what data to include, how to define metrics, etc. For example, it may be the case that improvement/decline in timeliness may be tricky to measure, as naïve approachces may be easily skewed by outliers or by variation in the data. You may choose to exclude certain low-volume carriers, or only include routes that are present throughout the entire dataset, or something else altogether. Make sure your table includes sufficient information to guide the interpretation and comprehension of your analysis.

Make sure to keep in mind the design principles that we discussed on Monday regarding spacing, use of rules, row-vs-column orientation, alignment, etc. In addition to the table itself, provide a short description of your design and its motivation.

1.1 Things to consider

  1. For your analytical questions of choice, what measure of central tendency is appropriate? Does mean or median make more sense? What should you look at to try and answer that question?
  2. Pay attention to formatting in your tables- numbers should have commas in appropriate places, column headers should be human-readable, as opposed to just whatever the dataframe column was named (“Total on-time flights” as opposed to “total_on_time_flights”), etc.
  3. The flight delays dataset has month as a numerical variable; does this make sense for display in your table?
  4. The pnwflights14 dataset has several ancillary dataframes besides flights that might be useful for polishing your table.
  • For example, the airports dataframe includes both the FAA airport code (“PDX”) as well as the actual display name of each airport.
  • There are several others to explore…

2 Fonts

  1. Orient yourself to the built-in font library in RStudio.cloud. Using the fonttable() function (along with dplyr or your data-wrangling method of choice), answer the following:
  1. Spend some time on Google Fonts (or a different font repository) and pick out a serif, sanserif, and display font that “speaks to you”.
  2. Write a sentence or two about each one, including what sort of scenario you think it would work well for.
  3. Install them into your R project as shown in the reference lab, and if appropriate use them in a figure.

3 Deliverable

Your knitted .Rmd file (i.e., the HTML output).

Creative Commons License