liveBook · Manning

What you will learn in Data Storytelling with Altair and AI

by Angelica Lo Duca

Chapter by chapter

Chapter 1: Introducing data storytelling

1.1 The art of data storytelling · 1.1.1 Why should you use data storytelling? · 1.1.2 What problems can data storytelling solve? · 1.1.3 What are the challenges of data storytelling? · 1.2 Why should you use Python Altair and generative AI for data storytelling? · 1.2.1 The benefits of using Python in all the steps of the data science project life cycle · 1.2.2 The benefits of using generative AI for data storytelling · 1.3 When Altair and generative AI tools are not useful for data storytelling · 1.4 Using the data, information, knowledge, wisdom pyramid for data storytelling · 1.4.1 From data to information · 1.4.2 From information to knowledge · 1.4.3 From knowledge to wisdom · 1.5 Summary · 1.6 References

What you learn in chapter 1 →

Chapter 2: Running your first data story in Altair and GitHub Copilot

2.1 Introducing Altair · 2.1.1 Chart · 2.1.2 Mark · 2.1.3 Encodings · 2.2 Use case: Describing the scenario · 2.2.1 The dataset · 2.2.2 Data exploration · 2.3 First approach: Altair · 2.3.1 From data to information · 2.3.2 From information to knowledge · 2.3.3 From knowledge to wisdom · 2.3.4 Comparing Altair and Matplotlib · 2.4 A second approach: Copilot · 2.4.1 Loading and cleaning the dataset · 2.4.2 Calculating the percentage increase · 2.4.3 Plotting the basic chart in Altair · 2.4.4 Enriching the chart · 2.5 Summary · 2.7 EDA · 2.8 Tools and libraries · 2.9 Other

What you learn in chapter 2 →

Chapter 3: Reviewing the basic concepts of Altair

3.1 Vega and Vega-Lite · 3.1.1 Vega · 3.1.2 Vega-Lite · 3.1.3 How to render a Vega or Vega-Lite visualization · 3.2 The basic components of an Altair chart · 3.2.1 Encodings · 3.2.2 Marks · 3.2.3 Conditions · 3.2.4 Compound charts · 3.2.5 Interactivity · 3.2.6 Configurations · 3.3 Case study · 3.3.1 From data to information · 3.3.2 From information to knowledge · 3.3.3 From knowledge to wisdom · 3.4 Summary · 3.6 Data visualization · 3.7 Vega, Vega-Lite, and D3.js · 3.8 Other

What you learn in chapter 3 →

Chapter 4: Generative AI tools for data storytelling

4.1 Generative AI tools: On the giants’ shoulders · 4.1.1 What is artificial intelligence? · 4.1.2 What is machine learning? · 4.1.3 What is deep learning? · 4.1.4 What is generative AI? · 4.1.5 Generative AI tools landscape · 4.2 The basic structure of a ChatGPT prompt · 4.2.1 Defining the task · 4.2.2 Acting as a role · 4.2.3 Tailoring to an audience · 4.3 The basic structure of a DALL-E prompt · 4.3.1 Subject · 4.3.2 Style · 4.3.3 The Edit Image tool · 4.4 Using Copilot to build the components of an Altair chart · 4.4.1 Prerequisites · 4.4.2 Marks · 4.4.3 Encodings · 4.4.4 Conditions · 4.4.5 Compound charts · 4.4.6 Interactivity · 4.5 Case study: Your training team · 4.5.1 Turning data into information · 4.5.2 Turning information into knowledge · 4.5.3 Turning knowledge into wisdom · 4.6 Summary · 4.8 Prompt engineering · 4.9 Other

What you learn in chapter 4 →

Chapter 5: Crafting a data story using the DIKW pyramid

5.1 Breaking the ice: The homelessness tale · 5.1.1 What was wrong with the chart? · 5.1.2 What was wrong with the presentation? · 5.2 Uncovering the narrative: What a data story is · 5.2.1 Using the DIKW pyramid to streamline a data story · 5.2.2 DIKW in action: Completing the homelessness tale · 5.3 Incorporating generative AI into the DIKW pyramid · 5.4 Behind the scenes: The homelessness tale · 5.4.1 Creating a compelling subtitle · 5.4.2 Generating images · 5.5 Another example: Fake news · 5.5.1 From data to information · 5.5.2 From information to knowledge · 5.5.3 From knowledge to wisdom · 5.6 Summary · 5.7 References

What you learn in chapter 5 →

Chapter 6: From data to information: Extracting insights

6.1 An intuitive approach to extract insights · 6.1.1 Connection strategy · 6.1.2 Coincidence strategy · 6.1.3 Curiosity · 6.1.4 Contradictions · 6.2 Choosing the characters of your story · 6.3 Choosing the right chart · 6.3.1 The cooking charts family · 6.3.2 The bar charts family · 6.3.3 The line charts family · 6.3.4 The geographical map family · 6.3.5 Dot charts family · 6.4 Case study: Salmon aquaculture · 6.5 Summary · 6.6 References

What you learn in chapter 6 →

Chapter 7: From information to knowledge: Building textual context

7.1 Introducing context · 7.2 Calibrating the story to the audience · 7.2.1 General public · 7.2.2 Executives · 7.2.3 Professionals · 7.3 Using ChatGPT for commentaries and annotations · 7.3.1 Describing the topic · 7.3.2 Describing the type · 7.3.3 Setting custom instructions · 7.4 Using large language models for context · 7.4.1 Fine-tuning · 7.4.2 Retrieval augmented generation · 7.5 Case study: From information to knowledge (part 1) · 7.5.1 Tailoring the chart to the audience · 7.5.2 Using RAG to add a commentary · 7.5.3 Highlighting the period of decrease in sales · 7.5.4 Exercise · 7.6 Summary · 7.8 Embeddings · 7.9 Fine-tuning · 7.10 LangChain · 7.11 LLM · 7.12 RAG · 7.13 Thinking for the audience · 7.14 Transformers

What you learn in chapter 7 →

Chapter 8: From information to knowledge: Building the visual context

8.1 Emotions: The foundations of visual context · 8.2 Color · 8.2.1 Setting colors in Altair · 8.2.2 Exercise: Setting colors · 8.3 Size · 8.3.1 Font size · 8.3.2 Chart size · 8.3.3 Exercise: Setting size · 8.4 Interaction · 8.4.1 Tooltip · 8.4.2 Slider · 8.4.3 Drop-down menu · 8.4.4 Exercise: Setting interactivity · 8.5 Using DALL-E for images · 8.5.1 Adding emotions · 8.5.2 Generating consistent images · 8.5.3 Exercise: Generating images · 8.6 Strategic placement of context · 8.6.1 Top placement · 8.6.2 Left placement · 8.6.3 Within placement · 8.7 Case study: From information to knowledge (part 2) · 8.7.1 Setting a negative mood · 8.7.2 Setting a positive mood · 8.7.3 Exercise: Making the chart interactive · 8.8 Summary · 8.10 Using emotions for communication · 8.11 Images

What you learn in chapter 8 →

Chapter 9: From knowledge to wisdom: Adding next steps

9.1 Introducing wisdom · 9.1.1 Transforming knowledge into wisdom: Next steps · 9.1.2 Using ChatGPT as a source of experience · 9.1.3 Good judgment: Anchoring the action to an ethical framework · 9.2 Case studies · 9.2.1 Chapter 1: The dogs and cats campaign · 9.2.2 Chapter 2: The tourist arrivals · 9.2.3 Chapter 3: Population in North America · 9.2.4 Chapter 4: Sport disciplines · 9.2.5 Chapter 5: Homelessness · 9.2.6 Chapter 5: Fake news · 9.2.7 Chapters 6–8: The salmon aquaculture case study · 9.3 Strategic placement of next steps · 9.3.1 Title placement · 9.3.2 Right placement · 9.3.3 Below placement · 9.4 Summary · 9.5 References

What you learn in chapter 9 →

Chapter 10: Common issues while using generative AI

10.1 Hallucination, bias, and copyright · 10.1.1 AI hallucinations · 10.1.2 Bias · 10.1.3 Copyright · 10.2 Guidelines for using generative AI · 10.3 Crediting the sources · 10.3.1 Under the title or subtitle · 10.3.2 Under the main chart · 10.3.3 Under the next steps · 10.3.4 Sideways · 10.3.5 Implementing credits in Altair · 10.4 Summary · 10.6 Generative AI issues · 10.7 Ethics and AI

What you learn in chapter 10 →

Chapter 11: Publishing the data story

11.1 Exporting the story · 11.2 Publishing the story over the web: Streamlit · 11.3 Tableau · 11.4 Power BI · 11.5 Comet · 11.6 Presenting through slides · 11.7 Final thoughts · 11.8 Summary · 11.9 References

What you learn in chapter 11 →

Concepts explained in this book

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.