2 Running your first data story in Altair and GitHub Copilot

 

This chapter covers

  • Introducing Altair
  • A relevant use case: Describing the scenario
  • Using Altair
  • Using Copilot

One of my peculiarities is getting my hands dirty right away. If I don’t feel something right away, I’m not happy. To start using software, or anything in general, I immediately go to the “Getting Started” section. As I need more details, I consult the documentation. This chapter was born with the same idea: to see how things work immediately. We’ll look at a rough but complete sketch of what you’ll learn in the book. In this chapter, we will look at the basic concepts behind Altair, and then we will implement a practical use case, which will allow us to transform a raw dataset into a story. We will progressively apply the data, information, knowledge, wisdom (DIKW) pyramid principles in Altair and see the results achieved step by step. In the second part of the chapter, we will use Copilot to automate some steps of the story creation process. We will focus only on Copilot as a generative AI tool to keep the chapter simple and the flow understandable. In the following chapters, we will introduce ChatGPT and DALL-E to the DIKW pyramid.

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

Summary

References

EDA

Tools and libraries