Lecture Notes: Rethinking Research Visualization in the AI Era

阅读中文版 →

Shanghai Medical College, Fudan University
Lecture Notes: Research Visualization in the AI Era

From passive reading to interactive, end-to-end reconstruction

Audience
Senior undergraduates / master's and PhD students
Length
About 90 minutes
Goal
Learn to think in terms of "AI logic + HTML presentation", and pick up tools that make a real difference at every stage of research.

Introduction: Cognitive Friction and the Bridge Between Us

In the previous chapter we looked at how AI drives scientific discovery as a “fourth paradigm”. The more practical bottleneck is this: how can our human brains read and understand what AI produces, efficiently?

We face a degree of cognitive friction we have not had before. It comes from the large gap between how humans and machines fundamentally process information.

Where AI is comfortable

Structured logic and linear streams

AI (especially a large language model) is a probabilistic prediction engine, and its output is forced into a linear stream of text. It is best at producing structured languages (JSON, Python, HTML, XML), and nested brackets or deep hierarchies do not bother it.

Where humans are comfortable

Visual perception and pattern recognition

Humans are visual animals. We process images, colour, spatial layout and interaction far faster than plain text.

  • Reading long stretches of plain text takes a lot of effort, especially unformatted data or code.
  • That effort slows research down and makes it easy to miss insights.

The core mismatch: AI produces “dense code and text”, while humans want “high-bandwidth visuals and interaction”.

The way out is to translate the structured code AI is good at, in real time, into a visual experience that people grasp more easily. That bridge is HTML + the browser.

The Internet’s Gift to Science

To see why HTML makes sense as the core medium for research visualization, it helps to look at where it came from: Web technology was created in the first place to serve scientific communication.

1989 The Web is born at CERN (European Organization for Nuclear Research)

Physicist Tim Berners-Lee invented HTML to fix a real problem: papers came in incompatible formats and information could not be shared. Origin: built for scientific communication

2004 Markdown is released

John Gruber created Markdown to make writing HTML simpler. It has become the default format for AI output.

2008 Chrome and the V8 engine

Google released the very fast V8 engine, and the browser grew into something close to an operating system.

2011-2014 Visualization libraries and front-end frameworks take off

D3.js (2011) made data move on web pages;
Vue.js (2014) let developers assemble complex applications from building blocks.

Now The AI coding era

You no longer need to write V8-level JavaScript or Vue syntax by hand. A natural-language prompt is enough to draw on all of this history and generate research tools.

1.2 Markdown vs. HTML: What’s the Difference?

Markdown
2004 minimalism

You have seen it before: asterisks in **key point** and hashes in # Heading are markup. It is the default format every AI model uses for text output.

Limitation: it is "digital paper". Sortable tables, zoomable images and interactive buttons are all out of reach.
HTML
A full-featured digital container

What it is: a combination of structure, presentation and behavior. AI can generate HTML easily, and the browser turns it straight into interactive software.

Advantage: information moves from a flat page to something you can interact with, which suits how humans see.
Takeaway: Markdown is for talking to AI (input); HTML is for receiving what AI produces (output).

The Spectrum of Visualization Tools: Finding the Middle Ground

Research visualization has a whole spectrum of tools. Knowing where each one stops is the first step to choosing the right one.

2.1 Base layer: Markdown (the scratch pad)

The format you see most often when chatting with ChatGPT, and the default output of today's AI.

Plain text Simple formatting Limitation: static and linear
Source (Markdown)
# Introduction to immune checkpoint blockade

PD-1 inhibitors can reactivate exhausted T cells.

  • nivolumab
  • pembrolizumab
Rendered (in a paper / web page)
Introduction to immune checkpoint blockade

PD-1 inhibitors can reactivate exhausted T cells.

  • nivolumab
  • pembrolizumab

2.2 Rigor layer: Python / R (the printing press)

The plotting tools most often used for journal figures (Matplotlib, ggplot2).

Background: John Hunter (Matplotlib, 2003) / Hadley Wickham (ggplot2, 2005)
Static, high resolution Precise control Limitation: heavy and slow
Source (Python / Matplotlib)
import matplotlib.pyplot as plt

groups = [“CR”, “PR”, “SD”, “PD”] values = [12, 25, 18, 9]

plt.bar(groups, values, color=“#3b82f6”) plt.ylabel(“Patients”) plt.title(“Response to PD-1 Blockade”) plt.tight_layout() plt.show()

Rendered (static figure in a paper)
CR
PR
SD
PD

A static PNG / PDF embedded in the article.

2.3 Core layer: HTML + JS (the dashboard)

The focus of this course, and the often-overlooked "middle ground".

Background: Mike Bostock (D3.js, 2011) opened the era of "data-driven documents".
  • Collapse: keep the main view clean.
  • Filter: find the data you care about instantly.
  • Respond: show values on hover, zoom by box-selecting.

Why it matters: it is a container for thinking, and gives the best experience for exploratory data analysis (EDA).

Source (HTML + JS dashboard snippet)
<div id="response-dashboard">
  <select id="group-filter">
    <option value="all">All patients</option>
    <option value="responder">Responders (CR+PR)</option>
  </select>
  <div class="bar" data-type="CR">CR: 12</div>
  <div class="bar" data-type="PR">PR: 25</div>
  <div class="bar" data-type="SD">SD: 18</div>
  <div class="bar" data-type="PD">PD: 9</div>
</div>
Rendered (colourful interactive dashboard)
CR
PR
SD
PD
Gradient highlight Filter to highlight CR/PR

In Practice: Interactive Reconstruction Across the Whole Workflow

Theory has to serve practice. Below are 5 scenarios you can use right away, each with steps and a prompt you can copy directly.

### 3.1 Rethinking reading: from linear text to an interactive app
The idea: most papers we read are PDFs with tight line spacing and crowded pages. Figures often land on a different page, so we keep flipping back and forth. It is hard on the eyes and hard on concentration.
Rather than accept the layout as given, take the paper apart and reassemble it: if there is a web version, right-click and choose View Page Source, hand that HTML to an AI, and ask it to rebuild the content as an HTML reader that suits the way you read.
The source already contains the image URLs, heading structure and so on, so one conversion gives you a reading page with larger type, more white space, and figures next to the text that discusses them.
Even without the web source, or if you simply prefer copying text from the PDF, you can ask the AI to re-lay it out as "key points as a list + wider line spacing + important sentences in bold". Lower information density and clearer emphasis make long papers much more comfortable and faster to read.

Steps

  1. 1 Open the paper's web (HTML) version, right-click on an empty area and choose View Page Source.
  2. 2 Press Ctrl+A to select all and Ctrl+C to copy.
  3. 3 Open Gemini/ChatGPT and enter the prompt on the right.
  4. 4 When the AI replies "please paste the code", paste the source you copied.

AI Prompt (copy as is)

You are a senior front-end engineer and a biomedical expert. Task: rebuild the paper HTML source I provide as a single-file HTML page. Requirements: 1. **Layout**: use Tailwind CSS, a minimal academic style, large type and an easy-on-the-eyes background colour. 2. **Interactive contents**: generate a floating table of contents (TOC) on the left; clicking an entry jumps to it. 3. **Figures beside text**: find the `<img>` tags in the source and keep the original image links. Move each figure next to the place in the text that cites it (e.g. "Fig 1"), so text and figures sit side by side. 4. **Term explanations**: identify 5 key medical abbreviations in the text (e.g. tumour markers, gene names) and add a hover tooltip explaining each one. First reply "Ready, please paste the HTML source", and then I will send the code.
Preview

Immune checkpoint blockade (example)

Recent studies show that PD-1 inhibitors can reactivate exhausted T cells and markedly improve outcomes in metastatic melanoma. Click for a schematic.

✨ Bonus: an academic explainer powered by Gemini

Not sure what a passage means? Paste it here and let Gemini write a plain-language explanation for you.

Which prompt for which task?

  • · Basic layout (re-laying out one paper, a first try): use "1. Paper-to-web-page prompt (basic)".
  • · Deeper rebuild (TOC, term tooltips, figures beside text): use "2. Paper rebuild, improved (main one)" or "13. Paper rebuild, revised".
  • · Popular-science / WeChat article rewrite: use "23. Paper rebuild (WeChat article)" or "24. AI article rebuild".
  • · Gemini-specific version: use "22. Paper rebuild (Gemini 3 version)".

Jump straight to the prompts in Notion

Each link opens the corresponding entry in a new tab, ready to copy and adapt (the prompts themselves are in Chinese):

Anatomy of a prompt: what paper-rebuild prompts share

  1. System role: e.g. "front-end engineer + medical expert", so the AI understands both layout and the domain.
  2. Input description: tell the AI whether it will receive HTML source, Markdown, or plain paragraphs.
  3. Output structure: state which modules you need, such as "single-file HTML", "TOC", "figures beside text", "term tooltips".
  4. Constraints and safety: stress that it must not invent data or change what the figures mean; it only re-lays out and adds explanations.
  5. Interaction and style: specify font, colours, white space and mobile support, so you end up with a reusable "visual template".

3.2 Rethinking presentations: from static PPT to interactive slides

The idea: traditional PPT talks come with familiar problems: large files, version chaos (final_v3_real_final.pptx), animations that do not survive a change of platform, and no easy way to embed interactive charts.
HTML slides built on Reveal.js are simply a web page: a single index.html plays in any modern browser without special software, and is easier to keep and share long-term through Git or cloud storage.
In this mode you only give the AI an outline + the key content blocks in words (e.g. "code example", "interactive results chart"), and it writes a complete deck with transitions, code highlighting and Plotly chart placeholders.
For a journal club or lab meeting, this frees you from the cosmetic work of fixing slides. You can spend the time on the logic and on choosing the key figures, and still get a more modern presentation that works well for sharing online.

Steps

  1. 1 Prepare your talk outline (a simple Markdown list).
  2. 2 Send the prompt on the right to the AI.
  3. 3 Save the generated code as presentation.html.
  4. 4 Double-click to open it and press the space bar to advance.

AI Prompt (copy as is)

I need to give an academic talk (journal club). Using the Reveal.js framework, generate a single-file HTML presentation for me. Topic: [fill in the topic, e.g. applications of single-cell sequencing in lung cancer] Outline: 1. [Background: ...] 2. [Methods: ...] 3. [Results: ...] Requirements: - Use the 'white' theme. - In the "Methods" section, embed a Python code example with syntax highlighting enabled. - In the "Results" section, reserve a spot for an interactive bar chart (using Plotly.js). - Load all JS/CSS from a CDN so nothing needs to be downloaded locally.
index.html (Reveal.js Mockup)

Exercise: have AI help you read code

These notes already include several small HTML + JS apps (the Reveal slides, the GCS calculator and so on). I suggest you work backwards from these examples: use a dedicated code-reading prompt and ask the AI to turn the code into a human-friendly tutorial.

  1. 1 Copy a piece of front-end code from these notes or your own project (a component or a small tool both work).
  2. 2 In your AI tool, send the code-reading prompt first and wait for it to reply "please paste the code".
  3. 3 Paste the code and ask the AI to explain it along three lines (module structure / data flow / interaction logic) and to suggest changes you can make directly.

Tip: use a code-reading prompt first to understand an existing demo, then use the "front-end engineer / AI research engineer" prompt to have the AI build a small tool of your own from scratch (a new scoring scale, an experiment logger, and so on).

3.3 Rethinking concepts: from static diagrams to living models

The idea: research training constantly asks us to draw flowcharts, signalling pathways or diagnostic decision trees. Drawing them by hand or in PowerPoint is slow, and when the protocol changes you more or less start over.
Mermaid.js lets you "draw with text": you describe the nodes and arrows in something close to natural language (what points to what, where a branch happens), the AI writes standard Mermaid code, and the browser renders it as a vector diagram.
The benefit is that the diagram's source of truth is no longer the picture but the text logic behind it. When your protocol changes, you edit a few lines and the diagram updates itself, with no manual alignment or layout.
For complex concepts (multi-step signal transduction, clinical stratification pathways and so on), this "text as model" approach is especially good for quick iteration and discussion in lab meetings or class.

Steps

  1. 1 Work out the logic you want to show (a signalling pathway, a diagnostic workflow).
  2. 2 Send the prompt to the AI.
  3. 3 The AI returns a piece of HTML that contains Mermaid code.
  4. 4 Open the HTML and the diagram draws itself. To change the logic, edit the text; no redrawing.

AI Prompt (copy as is)

Please generate a single-file HTML page that uses Mermaid.js to draw a flowchart. Logic: [Wet Lab: sample collection -> RNA extraction -> QC -> library prep and sequencing] -> [Dry Lab: alignment -> differential expression analysis -> pathway enrichment] Requirements: 1. Load mermaid.min.js from a CDN. 2. Make the chart look clean; use rounded rectangles for nodes. 3. Separate 'Wet Lab' and 'Dry Lab' into two subgraphs and fill them with different colours.
Mermaid.js Protocol Demo

style Wet_Lab fill:#e0f2fe,stroke:#3b82f6 style Dry_Lab fill:#f3e8ff,stroke:#a855f7

Graph will render here...
CSS Animation: Receptor Binding
L

3.4 Rethinking logic: from passive lookup to tools built for you

The idea: in clinical work and research we make "if... then..." judgements every day: scoring scales (GCS, CHA2DS2-VASc), staging and grading, dose adjustments. The usual approach is either a paper form or rules memorised by rote, which is error-prone and hard to share across a team.
With a reactive framework such as Vue.js, we can have the AI turn these rules into small tools: change an input and the score and risk message update immediately; when the total crosses a threshold, the background turns red and a warning appears.
More importantly, each of these tools is a single HTML file. You can save it offline on a phone or tablet and open it on the ward, in clinic or at a meeting. When a rule changes, you edit the logic in one place and everyone gets the same version of the decision support.
Over time, this lets each clinician and researcher build up a small toolkit specific to their own project or field, rather than a pile of scattered screenshots and notes.

Steps

  1. 1 Pin down your calculation logic (e.g. A+B=C; if C>10, raise an alert).
  2. 2 Send the prompt to the AI.
  3. 3 The AI generates a single HTML file containing the calculation logic.
  4. 4 Save it to your phone or computer and use it offline whenever you need.

AI Prompt (copy as is)

You are a senior front-end engineer. Please build me a small single-file HTML app. Function: a GCS (Glasgow Coma Scale) calculator. Logic: - Eye opening (4 points), verbal response (5 points), motor response (6 points). - Total = sum of the three. Interface requirements: - Use Vue.js (CDN) for the reactive logic. - iOS-like style with large buttons, suitable for touch screens. - Visual feedback: when the total is <= 8, turn the result area red and show the text "Note: intubation required".
9:41
GCS Calculator
Total
15
Normal

3.5 Rethinking knowledge: from textbooks to a multi-step flashcard pipeline

The idea: rather than rereading a thick textbook from the start again and again, break the knowledge into self-contained cards that you can review and track. With a set of prompts that hand off to one another, we can build a pipeline:
Book images / PDF → Markdown text → structured knowledge extraction → ANKI / USMLE flashcards
Each step is handled by its own system prompt, which cuts out mechanical repetition while keeping as much of the original's rigour as possible.

Steps (suggested workflow)

  1. 1 Use 20. Book images to Markdown to turn scanned textbook pages or question-bank screenshots into clean Markdown.
  2. 2 Use a paper-rebuild prompt (e.g. "2. Paper rebuild, improved", "13. Paper rebuild, revised") to organise the structure: extract the section hierarchy and mark key points and frequently tested topics.
  3. 3 Pass the organised content to the USMLE / ANKI prompts (5 / 6 / 8 / 21 / 17-19) to generate layered, self-contained cards as JSON or as text you can import directly.
  4. 4 Use 10. USMLE tutor or another tutor-style prompt to quiz you on the cards regularly: weekly review plans and mock oral exam questions.
ANKI Preview
Q. A 24-year-old man is admitted with high fever and cough; bacterial pneumonia is suspected. List three factors to prioritise when choosing empirical intravenous antibiotics.

Tip: with the ANKI/USMLE prompts above, you can turn a whole chapter into self-contained cards in this style in one batch.

Appendix: My Prompt Library (AI Studio)

The small window below embeds, live, the Prompts List table I keep in Notion. It collects the system prompts and task prompts used in this course (the prompts are written in Chinese).

  • Tags such as html / code / knowledge / agent match the main threads of these notes: rebuilding papers, reading code, flashcards (USMLE / ANKI), and multi-step agents.
  • While reading, you can filter the table by tag, copy the prompts that suit you into your AI tool, and refine them over time.
  • When I add new cases to the notes, I only need to add rows in Notion and they show up here automatically, so the library keeps growing.
A suggested "AI team"

Note: if the embedded window does not load because of browser or network settings, click "Open in Notion" on the right.

Table · My Prompt For AI Studio Open in Notion

Closing: Be the Product Manager of Your Own Knowledge

Looking back over the history of science, each change in tools has brought a jump in how efficiently we understand things: from hand-copied manuscripts to printing, from static PDFs to today’s interactive HTML. In the AI era, natural language is a programming language.

1 Ask
2 Wrap
3 View

Welcome to a new way of doing research visualization.