5.3 Bar Graphs and Pie Charts
Lab 5.3.1
The latest number of coronavirus deaths (July 2021) in Chicago by race is given below. Write a Python code to construct a bar graph.
| Race | Deaths |
|---|---|
| Latinx | 1859 |
| Black | 2224 |
| White | 1233 |
| Other | 309 |
view answer
Lab 5.3.2
The latest number of coronavirus deaths in Chicago by race is given below. Write a Python code to construct a pie chart.
| Race | Deaths |
|---|---|
| Latinx | 1859 |
| Black | 2224 |
| White | 1233 |
| Other | 309 |
Adapted from Python for Introductory Statistics: Student's Lab Workbook, by Simon Aman (Truman College, City Colleges of Chicago), licensed under CC BY 4.0. Changes were made: reformatted as an accessible XYZ web edition with live in-browser code cells. License: CC-BY-4.0.