Skip to content

Commit

Permalink
Starting Lesson 10
Browse files Browse the repository at this point in the history
  • Loading branch information
mattahrens committed Nov 4, 2023
1 parent d2df1b7 commit 6bf532e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docs/10-Data-visualization-in-python.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,18 @@ description: Lesson 10 - Data visualization in Python

## Concept

We're going to go beyond querying data and now visualizing data. Data visualization is important because it can help us understand data in different ways than looking at records. It can show us relationships or trends in the data that we are analyzing.
We're going to go beyond querying data and now visualizing data. Data visualization is important because it can help us understand data in different ways than looking at records. It can show us relationships or trends in the data that we are analyzing. We're going to look at 4 basic data visualizations and how to use Python to display them. We'll start by generating data that represents the count of ratings per rating (0 - 10). Here is the query:

![image](images/10-ratings_data.png)

Now that we have the data, we can plot the data with different `plot` functions. The plot function is called against the dataframe that we created (`rating_counts`). We'll start with a line chart, which will display a continuous line across the data. The `plot.line()` function takes two items -- the x-axis and the y-axis for the chart. For our data, we will use the rating as the x-axis and the count of ratings as the y-axis.

![image](images/10-line_chart.png)

The line chart is good for showing trends across data on the x-axis. The bar chart shows a similar view but it has a bar for each item on the x-axis instead of a continuous line. The `plot.bar()` function also takes the same items as input to the function.

![image](images/10-bar_chart.png)

![image](images/10-pie_chart.png)
![image](images/10-scatter_plot.png)
## Practice:
Expand Down

0 comments on commit 6bf532e

Please sign in to comment.