1. Home
  2. Explore
  3. Computer Science
  4. Data Visualization with Pandas and Plotly

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Data Visualization with Pandas and Plotly

  • 46Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Visualization Foundations

What is a data visualization, in the broad sense used in the presentation?

46 questions

  1. 1

    What is a data visualization, in the broad sense used in the presentation?

    1. A

      A statistical method used to validate a dataset

    2. B

      A visual form used to communicate a message

    3. C

      A decorative graphic used to make reports attractive

    4. D

      A software tool used to transform raw data

    Correct answer
    B

    A visual form used to communicate a message

    Explanation

    A visualization is a visual form that communicates a message; it is not defined by the software used or by how attractive it looks.

  2. 2

    What message could be inferred from the worn marble steps in the Leaning Tower of Pisa?

    1. A

      The wear marks indicate which parts of the steps were made from softer marble

    2. B

      The wear marks indicate where the steps received the most foot traffic

    3. C

      The wear marks indicate which parts of the steps were repaired most often

    4. D

      The wear marks indicate where the steps were exposed to the most sunlight

    Correct answer
    B

    The wear marks indicate where the steps received the most foot traffic

    Explanation

    The presentation interprets the visible wear as evidence of where people most often walked on the steps.

  3. 3

    In the transformed stair example, what did the horizontal axis represent?

    1. A

      The widthwise location across the step

    2. B

      The amount of wear on the step

    3. C

      The number of visitors who used the step

    4. D

      The height of the stair above the ground

    Correct answer
    A

    The widthwise location across the step

    Explanation

    The x-axis represented the width of the step, from its leftmost location to its rightmost location.

  4. 4

    In the transformed stair example, what did the vertical axis represent?

    1. A

      The amount of wear visible on the step

    2. B

      The height of the step relative to the next stair

    3. C

      The number of people who entered the tower

    4. D

      The widthwise location across the step

    Correct answer
    A

    The amount of wear visible on the step

    Explanation

    The y-axis was used to represent the amount of wear on the step.

  5. 5

    What did the dotted reference line in the stair visualization communicate?

    1. A

      Wear began when the curve dipped below the line

    2. B

      The line marked the boundary between two different steps

    3. C

      Wear stopped wherever the curve rose above the line

    4. D

      The step had equal traffic on both sides of the line

    Correct answer
    A

    Wear began when the curve dipped below the line

    Explanation

    The line marked the threshold for no wear; dipping below it indicated where wear appeared.

  6. 6

    What was the main takeaway stated for the stair-wear visualization?

    1. A

      The steps wore down around shoulder-width apart, with some emphasis to the right

    2. B

      The steps wore down evenly across their width, with no side more affected

    3. C

      The steps wore down according to their height, rather than where people walked

    4. D

      The steps wore down mainly at their outer edges, with emphasis to the left

    Correct answer
    A

    The steps wore down around shoulder-width apart, with some emphasis to the right

    Explanation

    The presentation summarized the pattern as wear occurring around shoulder-width apart, with a slight emphasis to the right.

  7. 7

    What is the primary goal of a business visualization, according to the presentation?

    1. A

      To display as many available measurements as possible

    2. B

      To inspire action or help stakeholders make a decision

    3. C

      To demonstrate the analyst's technical skill to stakeholders

    4. D

      To make the underlying data look visually impressive

    Correct answer
    B

    To inspire action or help stakeholders make a decision

    Explanation

    The stated goal of a business visualization is to inspire action within its audience or help stakeholders make decisions.

  8. 8

    Which two elements combine to make an impactful visualization?

    1. A

      Art in choosing the software and science in writing code

    2. B

      Art in collecting data and science in choosing a presentation format

    3. C

      Art in crafting the message and science in mapping data to visual dimensions

    4. D

      Art in adding decoration and science in maximizing chart complexity

    Correct answer
    C

    Art in crafting the message and science in mapping data to visual dimensions

    Explanation

    The presentation describes visualization as a combination of artistic storytelling and the scientific mapping of quantitative information to visual dimensions.

  9. 9

    In a one-dimensional encoding example, how was the value 55 represented?

    1. A

      By a bar whose length corresponded to the value

    2. B

      By a label whose vertical position corresponded to the value

    3. C

      By a point whose color corresponded to the value

    4. D

      By a circle whose area corresponded to the value

    Correct answer
    A

    By a bar whose length corresponded to the value

    Explanation

    The example mapped the single quantitative value to the length of a bar.

  10. 10

    In the two-dimensional example using emoji markers, what did vertical separation communicate?

    1. A

      How uncertain the value of each data point was

    2. B

      How much each data point contributed to the total

    3. C

      How much time had passed between data points

    4. D

      How the represented data points differed from one another

    Correct answer
    D

    How the represented data points differed from one another

    Explanation

    The position of the markers showed the separation between data points, providing a second visual dimension.

  11. 11

    In the company scatter plot, which variable was mapped to horizontal position?

    1. A

      Number of employees

    2. B

      Market capitalization

    3. C

      Profit

    4. D

      Revenue

    Correct answer
    D

    Revenue

    Explanation

    Revenue was encoded by the x-position of each company in the scatter plot.

  12. 12

    In the company scatter plot, which variable was mapped to vertical position?

    1. A

      Revenue

    2. B

      Market capitalization

    3. C

      Industry category

    4. D

      Number of employees

    Correct answer
    D

    Number of employees

    Explanation

    The example mapped employee count to the y-position of each company.

  13. 13

    In the company scatter plot, what did marker size represent?

    1. A

      Number of employees

    2. B

      Profit

    3. C

      Revenue

    4. D

      Market capitalization

    Correct answer
    D

    Market capitalization

    Explanation

    Market capitalization was encoded by the size of each scatter-plot marker.

  14. 14

    What does the scatter-plot example demonstrate about visual encoding?

    1. A

      Several quantitative variables can be represented using different visual dimensions

    2. B

      A chart should use the same visual dimension for every variable

    3. C

      Industry categories must be represented by marker size rather than color

    4. D

      A scatter plot can represent only one quantitative variable at a time

    Correct answer
    A

    Several quantitative variables can be represented using different visual dimensions

    Explanation

    The example used horizontal position, vertical position, and size to encode multiple quantitative variables.

  15. 15

    Which set of variables did the New York City weather chart include?

    1. A

      Precipitation, annual sales, months, and color-coded industry categories

    2. B

      Temperature, wind speed, city neighborhoods, and color-coded population groups

    3. C

      Temperature, air pressure, years, and color-coded company performance

    4. D

      Temperature, precipitation, months, days, and color-coded highs, lows, and ranges

    Correct answer
    D

    Temperature, precipitation, months, days, and color-coded highs, lows, and ranges

    Explanation

    The chart displayed temperature and precipitation over months and days, and used color to show highs, lows, and ranges, along with data callouts.

  16. 16

    Why might a visualization include data callouts in addition to plotted measurements?

    1. A

      They make the plotted data independent of its axes

    2. B

      They can identify notable observations such as record or normalized rainfall

    3. C

      They replace the need to communicate a chart's message

    4. D

      They ensure every variable uses a separate chart

    Correct answer
    B

    They can identify notable observations such as record or normalized rainfall

    Explanation

    The weather-chart example used callouts to highlight observations such as record rainfall or normalized rainfall.

  17. 17

    How should an analyst choose among different y-axis scales that show the same conversion-rate data?

    1. A

      Always choose the scale with the narrowest possible range

    2. B

      Always choose a scale that begins at the minimum observed value

    3. C

      Choose the scale that best supports the message the visualization is meant to communicate

    4. D

      Choose the scale that makes the chart appear least dramatic

    Correct answer
    C

    Choose the scale that best supports the message the visualization is meant to communicate

    Explanation

    The presentation explains that no single scale is always correct; the appropriate scale depends on the story and the point being emphasized.

  18. 18

    What narrative is especially well supported by a conversion-rate chart with a narrow y-axis range around the observed values?

    1. A

      Conversion rates have grown substantially over the displayed range

    2. B

      Conversion rates have not changed at all over the displayed range

    3. C

      Conversion rates remain far below a much higher target

    4. D

      Conversion rates rose from zero over the entire displayed range

    Correct answer
    A

    Conversion rates have grown substantially over the displayed range

    Explanation

    A narrow scale around the observed conversion rates visually emphasizes the size of changes within that range.

  19. 19

    What message can be emphasized by showing conversion rates against a scale extending to a much higher target, such as 75 percent?

    1. A

      The observed rate remains far below the target

    2. B

      The observed rate has reached the target

    3. C

      Small changes in the observed rate are unusually large

    4. D

      The observed rate began at the top of the scale

    Correct answer
    A

    The observed rate remains far below the target

    Explanation

    A scale extending to a much higher target emphasizes the gap between the current rate and that target.

  20. 20

    What message can be emphasized by showing conversion rates on a scale that begins at zero?

    1. A

      The distance between the current rate and a higher target

    2. B

      The small variation among values near the current rate

    3. C

      The relative rank of each rate within a narrow range

    4. D

      The increase from zero to the current rate

    Correct answer
    D

    The increase from zero to the current rate

    Explanation

    A zero-based scale can emphasize the jump from zero to the observed conversion rate.

  21. 21

    What is a risk of adding many groups and subgroups to a chart when they do not support the main message?

    1. A

      The audience can identify the main message more quickly

    2. B

      The chart can become overloaded and difficult to interpret

    3. C

      The chart becomes more accurate because it includes more categories

    4. D

      The underlying data automatically becomes less biased

    Correct answer
    B

    The chart can become overloaded and difficult to interpret

    Explanation

    The presentation warns that unnecessary visual dimensions and subgroups can overload a chart and obscure its message.

  22. 22

    What makes two visual dimensions redundant?

    1. A

      They use different labels to describe the same audience

    2. B

      They encode different variables using the same chart

    3. C

      They encode the same information in different visual forms

    4. D

      They show the same variable at different points in time

    Correct answer
    C

    They encode the same information in different visual forms

    Explanation

    Redundant visual dimensions encode the same information more than once, such as using both bar length and color to show magnitude.

  23. 23

    Why can encoding the same quantity with both an area chart's vertical position and its color be confusing?

    1. A

      The area chart will become a categorical chart automatically

    2. B

      Viewers may wonder whether the color conveys something different from the y-axis

    3. C

      Viewers will assume the y-axis represents time instead of quantity

    4. D

      The chart will no longer display the underlying quantitative values

    Correct answer
    B

    Viewers may wonder whether the color conveys something different from the y-axis

    Explanation

    When color repeats the information already shown by vertical position, viewers may be unsure how to interpret the color or reconcile the encodings.

  24. 24

    What is a useful way to make a visualization's main takeaway understandable without a live presenter?

    1. A

      State the takeaway in a clear title and reinforce it with explanatory annotations

    2. B

      Use technical field names so the chart remains close to the raw dataset

    3. C

      Remove the title and rely on the audience to infer the intended message

    4. D

      Add as many variables as possible so the audience can explore independently

    Correct answer
    A

    State the takeaway in a clear title and reinforce it with explanatory annotations

    Explanation

    The example used a direct title and annotations to make its message explicit and allow the chart to speak for itself.

  25. 25

    Why should an analyst clarify a stakeholder's priorities and pain points before creating a chart?

    1. A

      To determine which software package the stakeholder prefers

    2. B

      To choose the most complex chart type available

    3. C

      To ensure the visualization includes every available data point

    4. D

      To check that the question being answered will support the stakeholder's actual goal

    Correct answer
    D

    To check that the question being answered will support the stakeholder's actual goal

    Explanation

    Understanding priorities, pain points, risks, and goals helps confirm that the analysis addresses a question relevant to the stakeholder's objective.

  26. 26

    A stakeholder wants to increase user numbers but requests an analysis unrelated to user growth. What should the analyst do first?

    1. A

      Choose a dramatic axis scale to make the requested chart persuasive

    2. B

      Add more data dimensions until the relationship becomes visible

    3. C

      Create the requested chart without discussing its relevance

    4. D

      Clarify the stakeholder's goal and whether the requested question serves it

    Correct answer
    D

    Clarify the stakeholder's goal and whether the requested question serves it

    Explanation

    The presentation emphasizes helping stakeholders clarify their thinking so the work is directed toward the goal they actually want to achieve.

  27. 27

    How can a chart's scale influence the message viewers take away?

    1. A

      It changes the underlying values in the dataset

    2. B

      It determines whether the data was collected accurately

    3. C

      It prevents the analyst from communicating a clear message

    4. D

      It can emphasize particular changes or gaps in the data

    Correct answer
    D

    It can emphasize particular changes or gaps in the data

    Explanation

    Different scales can make growth, distance from a target, or change from zero more visually prominent, thereby influencing the message.

  28. 28

    When might removing extreme data points be considered?

    1. A

      When the extremes dominate the scale and are not relevant to the intended message

    2. B

      Whenever the minimum and maximum are known

    3. C

      Whenever the analyst wants the chart to show a larger increase

    4. D

      Whenever any data point differs from the average

    Correct answer
    A

    When the extremes dominate the scale and are not relevant to the intended message

    Explanation

    The discussion notes that some analysts remove extreme points when they make the minimum and maximum overly broad, but whether to do so depends on the story.

  29. 29

    Which statement best captures the presentation's view of axis minima and maxima?

    1. A

      They must always be included, regardless of how extreme they are

    2. B

      They matter only when the chart contains categorical data

    3. C

      They can help orient viewers, but whether to include them depends on the story and data

    4. D

      They should always be removed to make trends easier to see

    Correct answer
    C

    They can help orient viewers, but whether to include them depends on the story and data

    Explanation

    Minima and maxima can help viewers orient themselves, but the presentation says they do not have to be included in every case.

  30. 30

    What makes visualization an appropriate way to communicate a business analysis?

    1. A

      It can summarize findings so stakeholders can make a decision or take action

    2. B

      It provides a more complete record than a raw spreadsheet

    3. C

      It allows stakeholders to avoid interpreting any evidence

    4. D

      It replaces the need to understand the business question

    Correct answer
    A

    It can summarize findings so stakeholders can make a decision or take action

    Explanation

    A business visualization should help stakeholders understand a finding and act or decide; a raw spreadsheet does not provide that summary by itself.

  31. 31

    In the stakeholder prompt for the coding exercise, what question was the chart intended to answer?

    1. A

      Which industries are most prevalent among the most profitable Fortune 1000 companies?

    2. B

      Which companies have the highest employee counts across all sectors?

    3. C

      Which companies have the smallest market capitalization in the dataset?

    4. D

      Which industries have experienced the fastest revenue growth over time?

    Correct answer
    A

    Which industries are most prevalent among the most profitable Fortune 1000 companies?

    Explanation

    The stakeholder wanted to understand the mix of the most profitable companies and which industries were most prevalent.

  32. 32

    Which libraries were used in the coding example?

    1. A

      R for data processing and Matplotlib for visualization

    2. B

      Excel for data processing and D3 for visualization

    3. C

      Pandas for data processing and Plotly for visualization

    4. D

      NumPy for data processing and Tableau for visualization

    Correct answer
    C

    Pandas for data processing and Plotly for visualization

    Explanation

    The example used pandas to work with the data and Plotly to create the chart.

  33. 33

    Why did the presenter choose Plotly for the example?

    1. A

      It replaced the need to prepare or transform the dataset

    2. B

      It was the only library capable of making scatter plots

    3. C

      Its hover capabilities were useful for interacting with the chart

    4. D

      It automatically determined which industries were most profitable

    Correct answer
    C

    Its hover capabilities were useful for interacting with the chart

    Explanation

    The presenter highlighted Plotly's hover behavior as a useful feature for exploring plotted companies.

  34. 34

    Why did the analysis create a helper column that classified companies as finance or technology versus other sectors?

    1. A

      To sort the dataset by market capitalization automatically

    2. B

      To calculate each company's revenue from its sector

    3. C

      To remove the need for a company-name field in the chart

    4. D

      To encode the industry grouping with color and support the stakeholder's question

    Correct answer
    D

    To encode the industry grouping with color and support the stakeholder's question

    Explanation

    The helper column allowed the chart to distinguish finance and technology companies from other sectors using color.

  35. 35

    What role did the company-name hover field serve in the scatter plot?

    1. A

      It changed the point size according to the company name

    2. B

      It identified the company when a viewer hovered over its point

    3. C

      It replaced the chart's title with a company label

    4. D

      It determined each company's horizontal position

    Correct answer
    B

    It identified the company when a viewer hovered over its point

    Explanation

    Adding company names to hover data let viewers identify individual companies without placing every name directly on the chart.

  36. 36

    Why did the presenter rename technical field labels such as profit and revenue?

    1. A

      To change the underlying profit and revenue values

    2. B

      To determine the order in which companies were plotted

    3. C

      To make the labels clearer and more appropriate for stakeholders

    4. D

      To make the dataset contain fewer columns

    Correct answer
    C

    To make the labels clearer and more appropriate for stakeholders

    Explanation

    The label changes made the chart's wording more stakeholder-friendly, such as using capitalized, descriptive labels.

  37. 37

    What was the purpose of adding a title that stated the chart's main finding?

    1. A

      To identify which visualization library was selected

    2. B

      To describe the code used to generate the chart

    3. C

      To make the key message immediately clear to the audience

    4. D

      To show the exact number of rows in the dataset

    Correct answer
    C

    To make the key message immediately clear to the audience

    Explanation

    The title was designed to state the takeaway directly, so viewers could understand the point without needing to infer it.

  38. 38

    Why did the presenter add a rectangle and explanatory text to the scatter plot?

    1. A

      To encode market capitalization a second time

    2. B

      To remove companies outside the rectangle from the dataset

    3. C

      To call attention to a region of interest and explain why it mattered

    4. D

      To replace the x- and y-axes with a text description

    Correct answer
    C

    To call attention to a region of interest and explain why it mattered

    Explanation

    The shape highlighted a region containing the most profitable companies, and the annotation explained the significance of that region.

  39. 39

    How did the presenter identify the industries among the most profitable companies before building the chart?

    1. A

      By assigning industry colors first and inferring profitability from them

    2. B

      By sorting the data by profit in descending order and inspecting the top companies

    3. C

      By averaging revenue across every sector and selecting the lowest average

    4. D

      By sorting the data by employee count and inspecting the smallest companies

    Correct answer
    B

    By sorting the data by profit in descending order and inspecting the top companies

    Explanation

    The presenter sorted the data by profit in descending order and inspected the most profitable companies to identify their sectors.

  40. 40

    What is a reasonable approach to choosing a visualization tool?

    1. A

      Always use the tool with the largest number of chart types

    2. B

      Always use the most flexible tool, regardless of learning cost

    3. C

      Use a tool that fits the task and the practitioner's workflow

    4. D

      Choose the tool before deciding what message the data should communicate

    Correct answer
    C

    Use a tool that fits the task and the practitioner's workflow

    Explanation

    The presentation says that tools such as Excel, Python libraries, Tableau, and Power BI can all be appropriate; tool choice is largely a matter of fit and preference.

  41. 41

    According to the presenter, what contributes most to the impact of a visualization?

    1. A

      The complexity of the plotting library

    2. B

      The number of colors used in the chart

    3. C

      Strategy, communication, and analysis

    4. D

      The amount of code written to generate it

    Correct answer
    C

    Strategy, communication, and analysis

    Explanation

    The presenter emphasized that strategy, communication, and analysis matter much more than the visual tool itself.

  42. 42

    Why might a presenter avoid showing code directly to a business stakeholder?

    1. A

      Stakeholders are unable to interact with any coded visualization

    2. B

      Code always makes a chart less accurate than a spreadsheet

    3. C

      Code cannot produce charts that stakeholders can understand

    4. D

      Stakeholders generally care about the data and its story rather than the code

    Correct answer
    D

    Stakeholders generally care about the data and its story rather than the code

    Explanation

    The presenter said that stakeholder presentations should focus on the data and its story, often using a slide or document rather than code.

  43. 43

    What trade-off did the presenter describe between D3 and tools such as Plotly?

    1. A

      D3 is less flexible and easier to learn, while Plotly is more difficult

    2. B

      D3 is highly flexible but harder to learn, while Plotly offers a middle ground

    3. C

      D3 is intended only for tables, while Plotly is intended only for dashboards

    4. D

      D3 and Plotly have identical flexibility and learning difficulty

    Correct answer
    B

    D3 is highly flexible but harder to learn, while Plotly offers a middle ground

    Explanation

    The presenter described D3 as very flexible but difficult to learn, and Plotly as offering a balance of flexibility and accessibility.

  44. 44

    What is one way to add text labels next to plotted points when hover labels are not sufficient?

    1. A

      Remove the axes and use the title as a label for every point

    2. B

      Replace the scatter plot with a chart that has no data points

    3. C

      Add annotations, potentially generating them programmatically for selected points

    4. D

      Encode each company name as marker size

    Correct answer
    C

    Add annotations, potentially generating them programmatically for selected points

    Explanation

    The presenter suggested using annotations, including a loop to add labels for a selected set of companies.

  45. 45

    How should an analyst decide whether to present information in a table or a chart?

    1. A

      Always use a chart when the dataset contains numerical values

    2. B

      Always use a table when stakeholders need to make a decision

    3. C

      Choose whichever format requires the least data preparation

    4. D

      Start with the intended takeaway and choose the format that best communicates it

    Correct answer
    D

    Start with the intended takeaway and choose the format that best communicates it

    Explanation

    The recommendation was to begin with the goal and takeaway, then select a table or chart that communicates that insight effectively.

  46. 46

    Which four skill areas did the presenter recommend developing for data analysis work?

    1. A

      Software engineering, graphic design, marketing, and project management

    2. B

      Database sales, presentation software, recruiting, and accounting

    3. C

      Machine learning, cloud infrastructure, product design, and public speaking

    4. D

      Storytelling and visualization, business strategy, data dexterity, and statistical analysis

    Correct answer
    D

    Storytelling and visualization, business strategy, data dexterity, and statistical analysis

    Explanation

    The presenter grouped the recommended skills into visualization and storytelling, business strategy, data dexterity, and statistical analysis.

Question 1 of 46
Question 1 of 46

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent