0% found this document useful (0 votes)
10 views1 page

Lab10S DataViz

Uploaded by

nishu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views1 page

Lab10S DataViz

Uploaded by

nishu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

BUSN5101: Programming for Business

Lab Ten: Data Visualisation

Lab Ten: Data Visualisation


Through the completion of this lab, you should be able to:

- practice the use of Matplotlib for data visualisation within Python.

The above statements are the learning outcomes of this laboratory and will be achieved in concert
with the other learning activities that you undertake for this unit.

Task One: Undertaking Visualisation


1. Read in a copy of mtcars.csv for this Lab (it is available from LMS).

2. Create the following graphics as described in the following sub-questions, ensuring that you
configure the use of Matplotlib in such a way that all requirements of the sub-question are met:

a. A scatter plot, comparing displacement and horsepower for all vehicles, with each scatter
plot blue in colour and with an appropriate title and axis labels;

b. A bar chart, comparing the average quarter mile time for cars from each of the countries
of origin, with the bars red in colour and with an appropriate title and axis labels;

c. A pie chart, showing the proportion of vehicles in the sample (as a percentage) for each
of the different values of cylinders represented, with each of the pie segments a different
colour and with an appropriate title and labels;

d. A histogram, showing the frequency of cars within the dataset by the number of
carburettors that the vehicle has, with the bars coloured green and with appropriate title
and axis labels;

e. A line chart, showing the number of sales for each vehicle compared to the horsepower
of the vehicle, with the line coloured purple and appropriate axis labels and titles
included;

f. The most appropriate of a bar chart or a histogram, showing the frequency of each make
within the dataset (Hint: consider the first word of the model the make) with the bars
coloured yellow, with an appropriate title and axis labels.

End of Lab Ten.

UWA Business School Page 1 of 1


CRICOS: 00126G | PRV12169, Australian University

You might also like