liveBook · Manning

DALL-E

As explained in Data Storytelling with Altair and AI

A generative AI system that creates and edits images from textual descriptions or image-editing instructions.

DALL-E is a text-to-image generative AI model: it creates unique, realistic images from textual descriptions. In data storytelling, it supplies visual context that can make a chart’s topic more immediate than data marks alone. section 1.2 section 4.1.5

Start with a direct prompt that names the subject and style. For a chart comparing sports, “an enthusiastic athlete practicing [sport], in a white background, cartoon” produces focused illustrations; selecting the best output and using the editing tool can address visible imperfections. section 4.6 section 4.5.2

Use generated images as purposeful chart elements rather than decoration:

  • Add images for categories that deserve emphasis, such as the top-performing rowing and cycling bars. section 4.5.2
  • Give a human topic a face, as with selected photos representing homeless individuals. section 5.4.2
  • Create compact visual cues for calls to action, such as black-and-white customer-experience and dollar-bag icons. section 9.2.2

Adding generated images to an Altair chart

After generating and choosing images, save them in a remote repository and place their URLs in a DataFrame. An Altair mark_image() layer can then position a 35×35 image at each selected category and its percentage-improvement value. section 4.5.2

Treat outputs as draft visual assets to review before use. Generative AI can produce wrong or biased information, so generated content needs monitoring and adjustment for accuracy and fairness. It supports creativity and reasoning rather than replacing them. section 4.1.5 section 4.6

Figure 5.18 The photos generated by DALL-E when prompted with a photo of a homeless individual
figure

Four candidate photos from the prompt “a photo of a homeless individual” illustrate generation followed by human selection for a data-story visual. section 5.4.2

How Data Storytelling with Altair and AI covers it

How deep it goes
Defines text-to-image prompting and demonstrates generation, selection, editing, remote hosting, and Altair placement; defers advanced image techniques.
Examples
Uses athlete cartoons, homelessness photos, animal images, and black-and-white customer-experience and dollar-bag icons.
What it assumes
Assumes a data-storytelling task while teaching DALL-E prompting from subject and style.
What you can do after
Apply it to create, select, refine, and place prompt-generated images in Altair data stories.
How it connects
Connects DALL-E with generative AI, prompts, Altair, ChatGPT, GitHub Copilot, and data storytelling.

Also explained in

Compare how 4 books explain DALL-E →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Data Storytelling with Altair and AI. The section links point to the parts of the book it draws on.