From the course: Complete Guide to Advanced SQL Server
Unlock the full course today
Join today to access over 24,400 courses taught by industry experts.
Produce graphics with Matplotlib - SQL Server Tutorial
From the course: Complete Guide to Advanced SQL Server
Produce graphics with Matplotlib
The matplotlib package is a popular choice with Python programmers that want to export two dimensional charts and other data visualization graphics. It comes installed with the Anaconda distribution, so we can jump right in and start exporting graphics with a little Python code in SQL Server. In the WideWorldImporters database is a table called Application.Cities. Let's right click on it and choose Select top 1000 rows. Each city in this table has its own ID number, as well as the ID of the state or the province that it's in. I'm going to write a quick SELECT query to summarize this information. The result of this query is going to list out each state or province ID number here. And then we have a count of the number of cities in each one. Let's take this information and create a bar chart to visualize it, using a Python script that leverages the matplotlib library. I'm going to cut everything here to my clipboard, and then we'll start writing out the Python script. For the input data…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
(Locked)
The Anaconda open-source packages7m 27s
-
(Locked)
Functions in the revoscalepy package1m 48s
-
(Locked)
Model, train, and score with microsoftml1m 16s
-
(Locked)
Produce graphics with Matplotlib7m 53s
-
(Locked)
Get descriptive statistics with pandas7m 45s
-
(Locked)
Challenge: Sample a DataFrame1m 12s
-
(Locked)
Solution: Sample a DataFrame5m 21s
-
(Locked)
-
-
-
-
-