Data Visualization: From Numbers to Insights

Where This Fits Now

This Is Primarily Doc 1 Support

Note

Because the calendar is compressed:

  • Mar 31: Professional Discovery presentations begin
  • Apr 7: no class
  • Apr 14: Doc 0.2 + Professional Discovery Documentation
  • Apr 21: Doc 1 due + final presentations start

That means this visualization deck is less about “one more theory lecture” and more about helping you present findings clearly in Doc 1 and in your final presentation.

If your data is not collected yet, use this session selectively: decide what figures you will need later based on the method you already chose in Week 8.

What is Data Visualization?

  • Definition: Data visualization is the graphical representation of information and data. By using visual elements like charts, graphs, and maps, it provides an accessible way to see and understand trends, outliers, patterns, and insights in data (Presenting Data | Digital Experience Studio | Michigan State University).
  • Why it matters: Visualizing data helps turn raw numbers into a story or insight. It’s much easier for humans to spot patterns or comparisons in a chart than in a table of numbers.
  • In this session: We will explore visualization techniques for quantitative data (numbers) and qualitative data (text), and practice creating these visualizations.

Common Tools for Data Visualization

  • Spreadsheets (Excel, Google Sheets): Easiest starting point for beginners. Create bar charts, pie charts, etc. with a few clicks.
  • Business Intelligence Tools (Tableau, Power BI): User-friendly, drag-and-drop interfaces for more advanced visuals (maps, interactive dashboards) without coding. Require some learning but widely used.
  • Programming Libraries: Python’s Matplotlib/Seaborn are strong for reproducible static charts, Plotly is a practical route to interactive notebook visuals, and D3.js is the web-native option when you need fully custom interactive storytelling.
  • Which are easiest? For absolute beginners, spreadsheets and GUI tools are most accessible. For this class, Python is the practical middle ground: easier than D3.js, but more flexible than spreadsheets.

From Static Charts to Interactive Stories

  • Plotly: Best next step if you already have data in Python and want hover labels, zooming, Sankey diagrams, treemaps, and maps without leaving the notebook.
  • D3.js: Most flexible if you want custom interaction, animation, or a scrollytelling website. It is powerful, but it is also the steepest learning curve.
  • Tableau / Power BI / Flourish: Fastest route to presentation-ready dashboards and embeddable interactive visuals when coding is not the main goal.
  • Rule of thumb for DESN2003: Start with clear static charts. Move to interactive tools only when the interaction itself helps explain the insight.

Quantitative vs Qualitative Data

  • Quantitative data: Numbers and figures (e.g. test scores, survey ratings). We visualize distributions, comparisons, relationships (charts like bar graphs, box plots, scatter plots, etc.).
  • Qualitative data: Non-numeric information, often text (e.g. interview transcripts, open-ended responses). We use techniques like thematic analysis to categorize themes, and visualize using word clouds, concept maps, etc.
  • In this workshop, we examine both: for example, survey results (quantitative) and interview excerpts (qualitative) about students using GenAI for learning.

Quantitative Data Visualization

Diagrammatic Comparison: Bar Charts vs Histograms

  • Bar Charts: Used to compare discrete categories. For example, comparing counts or averages between groups. (A bar graph is essentially a diagrammatic comparison of discrete variables (Exploring and Analyzing Data: Create basic charts | by Deepak Holla | Medium).)
  • Histograms: Used to show the distribution of continuous data. Values are grouped into bins; bars touch each other (continuous scale). Histograms plot how many data points fall into ranges of a numeric variable (Exploring and Analyzing Data: Create basic charts | by Deepak Holla | Medium).
  • Key difference: In a bar chart, categories (e.g. Group A vs Group B) have gaps between bars and can be reordered; in a histogram, the x-axis is numeric with no gaps (e.g. 0–10, 10–20, …), showing the shape of data distribution.
Side-by-side bar chart and histogram using the Week 10 teaching dataset.

Left: a bar chart comparing recommendation outcomes by group. Right: a histogram showing the distribution of scores. Same dataset, different question.

Box Plots (Box-and-Whisker Plots)

  • What they show: A box plot uses boxes and lines to summarize a distribution of a numeric dataset (A Complete Guide to Box Plots | Atlassian). It displays the median (central line), the interquartile range (the box spans the 25th to 75th percentiles), and “whiskers” extending to cover most of the range. Points outside the whiskers are plotted as outliers.
  • Use case: Great for comparing distributions between multiple groups (A Complete Guide to Box Plots | Atlassian). For example, we can compare test scores of students who used GenAI vs those who did not, all in one concise chart. You can quickly see which group tends to score higher or has more variability.
  • Insight: Look at the median lines and box spans – are they higher or lower for one group? A higher median or a smaller IQR (box) might indicate one group generally performed better or had more consistent results.
Example box plot comparing score distributions across GenAI and Traditional groups.

Example of a box plot comparing test score distributions for two groups (GenAI vs Traditional). The median score for the GenAI group is higher, and the distribution is slightly tighter than the Traditional group.

Heatmaps and Confusion Matrices

  • Heatmap: A heatmap is a visualization that uses color to represent the magnitude of values in a matrix (table) (What is: Heatmaps In Data Visualization Explained). Darker or brighter colors indicate larger values. Heatmaps make it easy to spot high or low values and patterns across two dimensions.
    – Example: A correlation heatmap can show the correlation coefficients between multiple variables, with color intensity indicating strength of correlation.
  • Confusion Matrix: A specific type of heatmap used in classification results. It is a table that describes the performance of a classification model by showing actual vs predicted counts (Simple guide to confusion matrix terminology). For example, in a binary classification, it shows how many true positives, true negatives, false positives, and false negatives the model produced.
    • Even outside machine learning, you can use a similar matrix for analysis. E.g., in our context, imagine a table with one axis = “Group (GenAI or Traditional)” and the other = “Did student recommend the method (Yes/No)”. This 2x2 table is essentially a confusion-matrix-like view of how outcomes differ by group (we will visualize that in the hands-on section).
  • Reading heatmaps: Pay attention to the color legend. For a correlation heatmap, for instance, a darker color between “Score” and “Satisfaction” might indicate a strong positive relationship (we will see an example).
Side-by-side correlation heatmap and group-versus-recommend matrix heatmap.

Left: a correlation heatmap. Right: a confusion-matrix-style table showing how recommendation outcomes differ across groups.

Treemaps

  • What is a Treemap? A treemap uses a series of nested rectangles to visualize hierarchical data (What is a treemap? | Definition from TechTarget). Each rectangle represents a category (and sub-category) and its size is proportional to the value it represents (What is a treemap? | Definition from TechTarget). Color is often used to distinguish categories or encode an additional variable.
  • Use cases: Treemaps are great for showing parts-of-a-whole and hierarchies. For example, imagine we surveyed students in different regions and asked what resources they use. A treemap could show each region as a large rectangle, subdivided by resource type usage within that region, with area indicating number of students.
  • For beginners: Treemaps can be a bit complex to create from scratch, but tools like Excel (with add-ins) or Python’s plotly library can generate them. They provide a quick sense of which categories are largest or smallest in a hierarchy at a glance.
Treemap showing student counts grouped by region and learning method.

This treemap uses the same teaching dataset, showing how a hierarchical view can reveal both region size and group composition at once.

Sankey Diagrams

  • What is a Sankey diagram? A Sankey diagram visualizes flows between stages. The width of each band represents how much of something moves from one state to another.
  • Use cases: Great for journeys, funnels, decision paths, or any process with transitions. In design research, this could mean participant flow, interview coding pathways, or movement from one category to another.
  • In our example: We can show a flow from Group → Satisfaction Band → Recommendation. That is much harder to read from a raw table, but easy to scan in a Sankey.
  • Tool note: Sankey diagrams are often built in Plotly, Flourish, or D3.js when you want a more interactive version.
Sankey diagram showing flow from group to satisfaction band to recommendation.

This is the kind of chart you reach for when the story is about movement or transition, not just counts.

Regional Distribution Maps

  • Choropleth Maps: These are thematic maps where geographic regions are colored or shaded according to a data variable (Choropleth Map - Definitions & FAQs - Atlas.co). They allow us to visualize data distributions across locations (e.g., by country or state).
  • Use cases: To display any data that has a geographic component. For example, a choropleth could show the number of survey respondents in each region, or the average test score in each country. Darker shades might mean more respondents or higher scores, etc.
  • Example scenario: In our GenAI study, if we had enough data per region, we could create a map coloring regions by the percentage of students who found GenAI helpful. A quick glance might reveal regional differences (perhaps uptake is higher in some areas).
  • Note: Creating maps requires geographic data (like country codes) and sometimes additional libraries (e.g., geopandas or plotly). It’s an advanced visualization, but conceptually important to know.
Choropleth demonstration using representative country codes derived from the Week 10 dataset's regions.

This demo maps region-level data to representative country codes so you can see the mechanics of a choropleth. For real work, you would want actual country, district, or postcode data.

Qualitative Data Visualization

Thematic Analysis of Text Data

  • What is Thematic Analysis? It’s “a method for identifying, analyzing, and reporting patterns (themes) within data” (The interview coding – RELEARN). In qualitative research (like interview transcripts or open responses), we read through text to find recurring ideas or topics (themes).
  • How to do it: Typically, you would code the text – label segments with theme tags (e.g., “time-saving”, “frustration with AI”, “prefers self-study”). Then you might count how often each theme appears or find exemplar quotes for each theme.
  • Visualizing Qualitative Data: One quick visualization is a word cloud, which displays words by frequency. While not a rigorous analysis, it highlights prominent terms and can hint at key themes. Other visual approaches include concept maps or thematic networks, but those are more advanced.
Word cloud built from the Week 10 interview transcript sample.

Word cloud of common terms from student transcripts. Frequently mentioned words appear larger, indicating prevalent themes.

  • Interpretation: In this example, “AI” stands out (many students mention it), along with words like “time” (e.g., saving time), “tutor”, “answers”, “helpful”, and “confusing”. This suggests a divide in experiences: many found the AI helpful (saving time, getting answers), while some found it confusing. This matches what we might expect: some students praise the AI, others point out issues.

Drawing Conclusions from Visualizations

  • Look for Patterns: Once you have charts, scan for trends or differences. Is one bar taller? One box plot median higher? Identify the key pattern (e.g., “Group A’s scores are higher than Group B’s”).
  • Ask “Why”: Think about why the visual shows that pattern. Does it support your hypothesis or indicate something new? For example, if the GenAI group’s performance is better, could it be due to the tool’s help?
  • Consider Context: Always relate visuals back to context. Check if differences are meaningful (could be statistically or practically significant) and consider external factors (sample size, bias, etc.). Remember that correlation is not causation – a higher score with AI use doesn’t prove AI caused it, but it’s a clue.
  • Outliers & Anomalies: Notice any outliers or unexpected points. Discuss why they might occur. (In our box plot, one Traditional student had a very low score – perhaps they struggled significantly without AI.)
  • Summarize Insights: In presentations or reports, write a sentence or two stating what the visualization shows and what conclusion you draw. Example: “Students with GenAI support had higher median test scores and were more likely to recommend the study method. This suggests the AI assistance may have improved their learning experience.” Always tie the visual back to the research question or decision at hand.

Now that we’ve covered the theory, let’s put it into practice with some hands-on exercises. Open the Week 10 notebook or launch it in Google Colab, then work through the examples step-by-step. 🚀