BYU logo Computer Science

Lab 20 โ€” Plotting with pandas

In this lab you will gain practice using pandas to create plots. We will use datasets stored in files to create line plots and bar plots. Start by downloading lab20.zip. Write all your code in the lab20.ipynb Jupyter notebook.

Setup

To get things setup for this lab, do the following in a terminal:

conda activate cs110

Reminder: The easiest way for you to do this is to use the PyCharm terminal.

Then you can run jupyter from a terminal:

jupyter notebook

See the Introduction to Jupyter if you need help with using Jupyter.

Plotting

Complete all the sections of the notebook you downloaded above.

Lessons

What we want you to get from this lab:

  • You are able to use a Jupyter notebook

  • You can create line plots and bar plots with pandas using datasets stored in CSV files

  • Hopefully you had fun!

Points

Turn in a zip file with your Python notebook and the datasets.

TaskDescriptionPoints
plot of Brazil medium and momentum variantsYour plot is correct2
line plot of international and domestic box office for movies about AvengersYour plot is correct2
bar plot of international and domestic box office for movies about AvengersYour plot is correct1
stacked bar plot of international and domestic box office for movies about AvengersYour plot is correct1
line plot of Chicago water temperature for 2016 for every beachYour plot is correct2
four plots of your ownYour plot is correct2

Note, there is lots of stuff we wonโ€™t grade, but is good practice in the notebook. Do all the work! ๐Ÿ˜Š