Day 1 Homework
Contents
2. Day 1 Homework#
Here is a csv file that contains all of the countires that competed in the 2018 Winter Olympic games and their latitudes and longitudes.
2.1. Initial Intructions:#
Download the csv file from the link above.
Open a new Google Colab notebook and click on “New Notebook” in the corner.
Click the file icon on the left toolbar, then click on the upload icon (the button on the left).
Choose the new .csv file to upload in order to import the data.
Here’s the actual homework!
2.2. Assignment#
Open the csv file and examine what’s in it. What variable types are in here? Strings, floats, or integers?
In your empty Colab notebook, write a script that imports the data from the file and makes a scatter plot.
The
with open()
command demonstrated in lecture may be helpful.
Try to add the equator as well if you can. (Hint: the plt.hlines() function may be useful.)
The plot should somewhat look like a map of the world. Unfortunately Africa’s representation at the Winter Olympics is quite low (partially due to the climate) so there are few countries there.
If you have time, attempt to add axis labels and a title as demonstrated in the lecture.
Congrats! You are all done.