Data Visualization with R
- 73Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
73 questions
- 1The Titanic data set is useful in tutorials partly because its subject matter is familiar to a broad audience, giving everyone a shared_____.
Hint
Think of the common context that helps people from different backgrounds understand the data.
Answer
problem domain
Explanation
The familiar story of the Titanic gives audiences from different industries and backgrounds a shared problem domain.
- 2The Titanic data set can serve as a proxy for_____data because its fields and imperfections resemble those found in business systems.
Hint
Think of the kind of information a company might use to understand its customers.
Answer
customer profile
Explanation
The presenter describes the Titanic data as a useful proxy for customer profile data, including data that may not be perfectly clean.
- 3The Titanic data set's columns that carry more than one meaning illustrate the business-data problem of_____.
Hint
This happens when a field is reused to represent different things over time.
Answer
overloaded data columns
Explanation
The sibsp and parch fields each combine related but distinct meanings, illustrating how business data columns can become overloaded.
- 4In the Titanic data, survived is 0 for a passenger who perished and_____for a passenger who lived.
Hint
It is the other value of this binary indicator.
Answer
1
Explanation
The survived variable is a binary indicator: 0 means the passenger perished, while 1 means the passenger survived.
- 5The pclass variable records a passenger's ticket class, which indicates their level of_____aboard the ship.
Hint
It describes the type or level of a passenger's onboard arrangements.
Answer
accommodations
Explanation
First, second, and third class distinguish passengers' levels of accommodations on the Titanic.
- 6Unlike survived or pclass, age is described as a_____variable because it is numeric and can include decimal values.
Hint
This kind of variable can take numeric values across a range rather than just categories.
Answer
continuous
Explanation
Age is continuous numeric data; the data may include values such as 33.44 years.
- 7The sibsp field can count siblings traveling with a passenger, a traveling spouse, or a_____of both.
Hint
The field's meaning can include both types of family members at once.
Answer
combination
Explanation
Sibsp is overloaded because it may represent siblings, a spouse, or siblings and a spouse together.
- 8The parch field can count a passenger's traveling parents, children, or_____.
Hint
The field may include the two family relationships together.
Answer
both
Explanation
Parch is overloaded because it may refer to parents, children, or both traveling aboard the Titanic.
- 9The ticket field contains the passenger's ticket_____.
Hint
It identifies the particular ticket rather than describing the passenger's fare or class.
Answer
serial number
Explanation
The ticket column records the serial number of a passenger's Titanic ticket.
- 10The fare field records the amount paid for a ticket in_____.
Hint
This is the currency named in the data description.
Answer
pound sterling
Explanation
Fare represents how much a passenger paid for the ticket, measured in pound sterling.
- 11A cabin value is present only for passengers who had a_____assigned to them.
Hint
It identifies a passenger's assigned onboard room.
Answer
cabin number
Explanation
Not every passenger had a cabin number assigned; when one was assigned, it was recorded in the cabin column.
- 12The embarked field identifies the port of_____where a passenger boarded the ship.
Hint
It is the location where the passenger got on the ship.
Answer
embarkation
Explanation
The embarked column records the passenger's port of embarkation, using codes for Cherbourg, Queenstown, and Southampton.
- 13In the embarked codes, C, Q, and S stand for Cherbourg, Queenstown, and_____.
Hint
It is the port represented by the final letter in that list.
Answer
Southampton
Explanation
The data uses C for Cherbourg, Q for Queenstown, and S for Southampton.
- 14The name ggplot2 refers to the_____that inspired its approach to data visualization.
Hint
The concept treats visualization as a structured visual language.
Answer
grammar of graphics
Explanation
The gg in ggplot2 comes from the grammar of graphics, the framework that informs the package's visualization approach.
- 15In R, ggplot2 is widely regarded as a_____visualization tool.
Hint
This phrase describes a tool that is accepted in practice as the standard.
Answer
de facto standard
Explanation
The tutorial characterizes ggplot2 as the de facto standard visualization tool in R.
- 16A major advantage of ggplot2 is that it can create high-quality graphics with very few_____.
Hint
Think of how much typing is required to produce a graphic.
Answer
keystrokes
Explanation
The tutorial emphasizes that ggplot2 can create print-quality graphics in seconds with few keystrokes.
- 17For detailed customization, ggplot2 provides an API that lets users build visualizations by_____aspects of a visual grammar.
Hint
The process involves adding visual components in successive parts.
Answer
layering
Explanation
The ggplot2 API supports fine-grained control by layering aspects of the visual grammar to shape the final graphic.
- 18In the grammar of graphics, the raw material used to make a visualization is the_____.
Hint
A plot cannot be produced without this input.
Answer
data
Explanation
Data is the raw material for a visualization; without data, there is no visualization to create.
- 19In ggplot2, points, lines, and bars that appear in a visualization are examples of_____.
Hint
They are the visible components drawn on the graphic.
Answer
layers
Explanation
Layers are the visible elements of a visualization, such as points, lines, and bars.
- 20In the grammar of graphics,_____map or transform data values so they fit the available graphical space.
Hint
They help translate data values into a display with limited screen area.
Answer
scales
Explanation
Scales shrink or otherwise map data values so they can be represented consistently in the limited space of a graphic.
- 21The default perspective used for many ggplot2 charts is a two-dimensional_____.
Hint
It is the familiar arrangement with horizontal and vertical axes.
Answer
grid
Explanation
The default coordinate system is a two-dimensional grid, or XY plane, used for common charts such as bars and lines.
- 22In ggplot2, faceting creates visual_____by dividing a display into panels for subsets of the data.
Hint
It lets viewers inspect the data at more specific groupings.
Answer
drill down
Explanation
Faceting provides visual drill down by displaying subsets of the data in separate panels.
- 23In ggplot2,_____control display details such as fonts, font sizes, and color schemes.
Hint
They customize the look and feel rather than the underlying data.
Answer
themes
Explanation
Themes provide fine-grained control over display details, including fonts, sizes, and color schemes.
- 24Although ggplot2 offers many customization options, its_____often work well enough to get started.
Hint
These are the settings the package supplies automatically.
Answer
defaults
Explanation
The tutorial notes that users often do not need to customize every part of the grammar because the defaults work well out of the box.
- 25The three essentials for creating a basic ggplot2 graphic are data, an aesthetic mapping, and a_____.
Hint
It specifies what kind of visible mark, such as bars, should be drawn.
Answer
layer
Explanation
A basic ggplot2 visualization needs data, an aesthetic mapping, and a layer that defines what to display.
- 26An aesthetic mapping connects data variables to visual properties, such as assigning age to the_____.
Hint
It is one of the two axes in a typical two-dimensional chart.
Answer
y-axis
Explanation
An aesthetic mapping tells ggplot2 how to map data to the display; for example, age can be mapped to the y-axis.
- 27A bar chart is especially suitable for categorical data because it displays_____.
Hint
It summarizes how many observations fall in each category.
Answer
counts
Explanation
A bar chart is a useful way to show categorical data because it represents the count in each category.
- 28In the Titanic analysis, passenger ID is ignored because it is a unique identifier with no useful analytical_____in its current form.
Hint
It does not distinguish passengers in a way that explains the outcome.
Answer
signal
Explanation
Passenger ID functions like a primary key, but its unique sequential values do not provide useful analytical signal for this analysis.
- 29The passenger names are not used as-is because all 891 are unique, although text analytics could potentially extract_____from them.
Hint
It is information that may help explain a pattern in the outcome.
Answer
signal
Explanation
Names have no analytical signal in their current form because they are all unique, though text analytics or regular expressions might reveal information.
- 30Before plotting survived, the analyst treats it as a_____rather than as a numeric measurement.
Hint
This R data type represents categories.
Answer
factor
Explanation
Survived indicates membership in one of two categories, so it should be treated as a factor rather than used for arithmetic.
- 31Although pclass contains the numbers 1, 2, and 3, it is treated as a_____because the values represent ticket categories.
Hint
The values label classes rather than quantities suitable for multiplication or division.
Answer
factor
Explanation
Pclass is categorical: class 3 is not three times class 1, so pclass should be represented as a factor.
- 32The sex column should be represented as a factor because it consists of the categories male and_____.
Hint
It is the other category in the two-value field.
Answer
female
Explanation
Sex is categorical string data with the values male and female, so it is appropriate to treat it as a factor.
- 33The embarked column should be a factor because its values identify distinct_____rather than numeric measurements.
Hint
The values correspond to Cherbourg, Queenstown, and Southampton.
Answer
ports
Explanation
Embarked contains categories for the ports of Cherbourg, Queenstown, and Southampton, so it should be treated as a factor.
- 34Treating categorical variables as factors allows ggplot2 to use them in aesthetic mappings, including for_____.
Hint
This visual technique assigns different colors to categories.
Answer
color coding
Explanation
When factor variables are used in ggplot2 aesthetic mappings, they can support useful displays such as color-coded visualizations.
- 35The Titanic data used in the tutorial contains 891 observations and_____columns.
Hint
The column count is a dozen.
Answer
12
Explanation
The data frame shown in the tutorial contains 891 observations and 12 columns.
- 36The age column contains missing observations, so a plot of age may need to proceed without some rows of_____.
Hint
It is what the missing values would otherwise contribute to the plot.
Answer
data
Explanation
Some passengers have no recorded age, meaning age-based visualizations cannot include those missing observations as measured values.
- 37The analysis aims to use the Titanic data to explain patterns of passenger_____.
Hint
The central outcome is whether passengers lived or perished.
Answer
survival
Explanation
The consulting analysis is framed around explaining who survived, who died, and what patterns in the data are associated with the outcome.
- 38Because the intended audience is not data savvy, the presenter favors intuitive visualizations over leading with complicated mathematical representations or_____.
Hint
These are numerical summaries that may be less immediately intuitive to a general audience.
Answer
summary statistics
Explanation
For a non-data-savvy audience, intuitive visuals can make patterns easier to recognize than summary statistics or complicated mathematical representations.
- 39The hypothesis that women and children were prioritized suggests examining survival in relation to_____and age.
Hint
It is the other demographic factor named in the hypothesis.
Answer
gender
Explanation
The women-and-children-first hypothesis connects survival to both gender and age.
- 40A useful first question when beginning the survival analysis is the overall_____rate.
Hint
It describes the share of passengers who lived.
Answer
survival
Explanation
The analysis first establishes the overall survival rate to give context for later comparisons.
- 41After finding a relationship with gender, the analyst considers ticket class as another possible_____of survival.
Hint
It may help explain differences in the outcome.
Answer
factor
Explanation
The analysis asks whether ticket class, in addition to gender, may have influenced or been associated with survival.
- 42A proposed explanation for better survival in higher ticket classes is that passengers may have been closer to the_____.
Hint
These were essential for escaping the sinking ship.
Answer
lifeboats
Explanation
The tutorial proposes that higher-class accommodations may have been closer to lifeboats, potentially contributing to survival differences.
- 43A bar chart mapped to survived shows the overall counts of passengers who perished and_____.
Hint
It is the outcome represented by the other category in the chart.
Answer
survived
Explanation
Mapping survived to the horizontal axis and adding a bar layer displays counts for passengers who perished and passengers who survived.
- 44The tutorial estimates that about 62% of the Titanic passengers in the data_____.
Hint
This is the larger of the two outcome groups in the overall survival chart.
Answer
perished
Explanation
The overall proportions are described as approximately 62% perished and 38% survived.
- 45To compare survival outcomes within gender categories, the plot maps sex to the x-axis and survived to the_____aesthetic.
Hint
This aesthetic colors the portions of the bars by outcome.
Answer
fill
Explanation
Mapping survived to fill color-codes each gender bar by whether passengers perished or survived.
- 46The gender comparison shows that females survived_____more often than males.
Hint
The difference is more than a small or even split between the groups.
Answer
disproportionately
Explanation
The color-coded gender bars show substantially higher survival among females than among males.
- 47The gender chart also suggests that there were approximately twice as many males as females, or about a_____ratio.
Hint
The first number is about double the second.
Answer
two to one
Explanation
The chart suggests roughly twice as many male passengers as female passengers, an approximately two-to-one ratio.
- 48To compare outcomes across ticket classes, the class variable is mapped to the_____axis.
Hint
It is the horizontal axis in the chart.
Answer
x
Explanation
The class visualization maps pclass to the horizontal axis and uses fill to show survival outcomes.
- 49The class comparison shows a general decline in survival as passengers move from first class toward_____class.
Hint
It is the lowest ticket class represented in the analysis.
Answer
third
Explanation
The visualization shows survival declining from first class through second class to third class.
- 50In the class comparison, more than half of first-class passengers survived, while the estimated survival rate in third class was about_____.
Hint
This is approximately one passenger in four.
Answer
25%
Explanation
The plot suggests that more than half of first-class passengers survived, compared with about one quarter of third-class passengers.
- 51The passenger counts by class were not simply ordered from most to fewest: second class had fewer passengers than both first and_____class.
Hint
It is the remaining class with a larger count than second class.
Answer
third
Explanation
The chart shows fewer second-class passengers than either first- or third-class passengers.
- 52The labs function can be used to change axis labels and add a plot_____.
Hint
This text names the overall graphic.
Answer
title
Explanation
The labs function modifies axis and legend labels and can set the title of a plot.
- 53The tutorial changes the default gray plot background to a clean_____background.
Hint
It is the lighter background color preferred by the presenter.
Answer
white
Explanation
The presenter uses a theme that replaces ggplot2's default gray background with a white one.
- 54A faceted gender-and-class bar chart places each ticket class in its own_____.
Hint
It is one of the separate sections in a faceted display.
Answer
panel
Explanation
Faceting by pclass creates separate panels for first, second, and third class, each showing gender categories.
- 55For an age distribution, a histogram uses age on an axis and groups numeric values into_____.
Hint
These are intervals that collect values into ranges.
Answer
bins
Explanation
A histogram groups numeric data into bins and displays the counts in those intervals.
- 56The tutorial sets the histogram bin width to five years, so each interval spans_____years.
Hint
This is the chosen width of each age interval.
Answer
five
Explanation
The example uses a bin width of five years to group passenger ages into five-year intervals.
- 57Changing a histogram's bin width changes the plot's visual_____.
Hint
It is the overall form that viewers see in the histogram.
Answer
shape
Explanation
The appearance of a histogram depends on the bin width, so different widths can produce different visual shapes.
- 58Because the default bin width may not be optimal, the analyst should compare widths and choose one that is reasonable for the_____.
Hint
The best choice depends on the values being summarized.
Answer
data
Explanation
The tutorial recommends trying different bin widths because the default may not communicate the structure of the data well.
- 59When ggplot2 encounters missing ages while making a histogram, it can remove those values and plot the remaining_____.
Hint
They are the recorded ages available to the plot.
Answer
values
Explanation
ggplot2 can omit missing age observations and create the histogram using the available values, while issuing a warning.
- 60The age histogram shows that many passengers were between 20 and_____years old.
Hint
This is the upper end of the range containing a large concentration of passengers.
Answer
40
Explanation
The tutorial describes a large concentration of passengers in the 20-to-40 age range.
- 61The age distribution has a long tail toward older passengers, with the oldest age shown at about_____years.
Hint
It is the approximate maximum age noted in the discussion.
Answer
80
Explanation
The histogram shows a long right tail and includes passengers as old as about 80.
- 62A histogram with survived mapped to fill shows the relative survival outcomes within each age_____.
Hint
It is one of the age intervals represented by a bar.
Answer
bin
Explanation
Coloring histogram bars by survived allows comparison of the proportions who lived and perished in each age bin.
- 63The filled age histogram suggests that young children survived_____often than many older passengers.
Hint
Their survival share is notably higher relative to the group.
Answer
disproportionately
Explanation
The tutorial notes that younger children appear to have survived at disproportionately high rates, supporting the children-first hypothesis.
- 64A box-and-whisker plot compares survived on the x-axis with age on the_____axis.
Hint
It is the vertical axis in the example.
Answer
y
Explanation
The box-and-whisker plot maps survival status horizontally and passenger age vertically.
- 65The box-and-whisker plot suggests that passengers who survived tended to be_____than those who perished.
Hint
Their age distribution is shifted slightly toward the lower end.
Answer
younger
Explanation
The age distributions indicate that survivors tended to be somewhat younger, although the difference is not large.
- 66Using both a histogram and a box-and-whisker plot helps provide a more complete view by examining data through multiple_____.
Hint
These are different graphical ways of inspecting the same data.
Answer
visualizations
Explanation
The tutorial recommends using multiple visualizations because each can reveal different aspects of the data.
- 67A density plot is analogous to a histogram, but its displayed shape is_____.
Hint
It replaces the jagged appearance of separate bars with a continuous-looking curve.
Answer
smoothed
Explanation
Density plots communicate information similar to histograms using smoothed shapes rather than squared-off bars.
- 68In the density plot, an alpha value of 0.5 makes the plotted shapes_____.
Hint
This allows viewers to see overlapping areas.
Answer
transparent
Explanation
Alpha controls transparency; an alpha value of 0.5 lets viewers see through overlapping density shapes.
- 69Faceting the age display by both sex and pclass lets the analyst compare age and survival across four pieces of_____.
Hint
These are the variables considered together in the analysis.
Answer
data
Explanation
The faceted view combines age, sex, pclass, and survival status to examine how the variables relate.
- 70The density plot discussion highlights that the youngest children in second class, including both girls and boys,_____.
Hint
Their outcome is shown by the survival-colored portion of the plot.
Answer
survived
Explanation
The tutorial interprets the second-class density panels as showing that the youngest children of both genders survived.
- 71The faceted age plots suggest that survival depends not on age alone, but on age combined with gender and_____.
Hint
This ticket-related variable is the third factor in the comparison.
Answer
pclass
Explanation
The tutorial emphasizes that the combination of age, gender, and pclass provides a more informative survival pattern than age alone.
- 72The histogram-based faceted comparison indicates that girls in third class also_____disproportionately.
Hint
Their outcome was more favorable than a simple even split might suggest.
Answer
survived
Explanation
The tutorial revises its initial interpretation after examining the histograms, noting that girls in third class also survived disproportionately.
- 73The faceted views show especially poor survival for older males in_____class.
Hint
It is the lowest ticket class in the comparison.
Answer
third
Explanation
The tutorial observes especially low survival among older males in third class.

Ask anything
We've read this whole study set, so questions about it get the best answers.