1. Visualizing your data
Welcome back! So far, we've seen how to connect files to DataLab, query those files, and store our queries and outputs.
2. Automated features
We'll now move on to more automated features to help us visualize our data, generate or fix code, and improve our workbook management.
3. Visualizations
Let's begin with visualizations. The introductory course taught us how to toggle between the explore and chart cells. We'll use this now to create visualizations from our SQL queries without using any visualization code.
4. Charts
For example, starting with the query for the whole dataset, we switch to the chart cell and select the options to create a bar chart counting the number of sales per representatives. We can see there are options for various chart types, including line graphs and pie charts.
5. Set up: categories
The drop-downs on the set up tab will include all the columns.
The columns are separated into categories and series, with categories often represented on the horizontal axis, as seen in our sales representative example. All data types can fall under categories, but strings and dates are the most commonly chosen.
6. Set up: series
The series grouping defines the numerical data options available for plotting.
7. Set up: aggregations
There is also a toggle for aggregations. With this toggle, we can use common aggregation functions such as sum, count, average, and more without SQL.
8. AI assistant
Another automated option is to use the AI assistant to visualize our code. To use this feature, we start by finalizing the SQL query containing the data we want to visualize and running the cell in DataFrame mode.
9. AI assistant
Next, we create a new cell, click the AI option, and tell the AI assistant what we want to visualize using natural language. The AI assistant generates the code, which we can iterate through to tweak and customize the results.
Check out the documentation for more advanced customization options.
10. Let's practice!
But for now, let's practice.