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. Day1CountryInfo2018.csv
Initial Instructions:
- Download the csv file from the link above.
- Open a new Google Colab notebook and click on “New Notebook” in the bottom right 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!
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.
- The
- 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.