Module Assessment

Overview

Congratulations on completing the Data Visualization module! You've learned the principles of choosing the right chart for the right question, built static charts with Matplotlib, and created interactive visualizations with Plotly. This assessment brings those skills together in a project where you'll analyze a real dataset and communicate your findings through multiple visualizations.

Complete the assessment using this Colaboratory notebook.

Learning Objective

By the end of this assessment, you will have demonstrated your ability to:

  • Apply various visualization techniques to a given dataset.
  • Effectively communicate insights through visuals.

Key terms

Insight: A meaningful observation drawn from data — a pattern, trend, anomaly, or relationship — that answers a question or supports a decision.

Visual encoding: The way data values are mapped to visual properties (position, length, color, size, shape) in a chart.

Annotation: Text, arrows, or highlights added directly to a chart to draw attention to a specific data point or insight.

Assessment Overview

This module assessment is a coding project completed in a Google Colaboratory notebook. You will be given a dataset and asked to produce a series of charts using both Matplotlib and Plotly, each designed to answer a specific analytical question. For each chart, you will also write a one- to two-sentence interpretation explaining what the visualization reveals.

Skills Assessed

SkillLesson
Selecting appropriate chart typesIntroduction to Data Visualization
Creating scatter plots, line charts, and bar chartsMatplotlib
Customizing titles, labels, and colorsMatplotlib
Creating subplotsMatplotlib
Creating interactive charts with PlotlyPlotly
Customizing Plotly layouts and themesPlotly
Interpreting and communicating visual insightsAll lessons

Coding Assessment

Complete the project in this notebook. After completing all tasks, save your notebook to GitHub and submit the link to the AI Grader for grading.

Task Overview

The notebook provides a dataset containing information about global city populations, GDP per capita, average temperature, and quality-of-life scores across multiple years and continents. You will complete the following tasks:

  1. Line chart (Matplotlib) — Plot the average quality-of-life score over time for at least three continents on the same axes, using a different color for each. Add a title, axis labels, legend, and grid. Write one sentence explaining the trend.

  2. Bar chart (Matplotlib) — Create a horizontal bar chart comparing the average GDP per capita by continent for the most recent year in the dataset. Sort the bars from highest to lowest. Add a title and axis labels.

  3. Scatter plot (Matplotlib) — Plot GDP per capita (x-axis) vs. quality-of-life score (y-axis) for all cities in the most recent year. Color the points by continent. Add a title, axis labels, and a legend. In one sentence, describe whether a relationship is visible.

  4. Subplots (Matplotlib) — Create a figure with two side-by-side subplots: a histogram of city populations and a histogram of average temperatures. Give each subplot its own title and axis labels.

  5. Interactive scatter plot (Plotly) — Recreate the scatter plot from Task 3 using Plotly Express, adding a hover_data parameter so that city names appear when hovering. Apply the plotly_white template.

  6. Interactive bar chart (Plotly) — Create a grouped bar chart using Plotly that compares average GDP and average quality-of-life score for each continent side by side. Add a descriptive title and axis labels using update_layout().

  7. Insight summary — Write three bullet points (one per visualization of your choice) identifying the most important insight you found and which chart type made it visible.

Grading Rubric

CriteriaPoints
Matplotlib line chart with correct data, labels, and legend15
Matplotlib bar chart sorted and correctly labeled10
Matplotlib scatter plot with color encoding and legend15
Matplotlib subplots created correctly with individual labels10
Plotly interactive scatter plot with hover data15
Plotly grouped bar chart with update_layout() customization15
Written insight summary (3 bullet points)10
Code is clean, readable, and uses descriptive variable names10
Total100

Knowledge Check

Question 1: A colleague creates a pie chart to compare the revenue of 12 product categories. What is the main problem with this choice?

Question 2: What is the key advantage of Plotly charts over Matplotlib charts?

Question 3: You want to visualize the distribution of house prices in a dataset of 5,000 homes. Which chart type is most appropriate, and why?