Hurricane Tracker


Living in South Florida for the past 12 years, I am no stranger to hurricanes. Last summer, I moved from South Florida to the Tampa area, only to have 2017 bring us a very active hurricane season including Tampa's first major hurricane in 96 years, Hurricane Irma. Thus was born the Hurricane Tracking assignment.


Screenshot of Hurricane Irma's path

This assignment gives students an opportunity to work with loops, file io, and string manipulation in a graphical way. In this assignment students write a program that processes real-world hurricane data and animate the path of hurricanes.

Students are given a number of files including an image file of the atlantic basin taken from NASA -- a scaled and cropped version of quadrant B1, CSV data files, and a Python file that sets up the turtle, the window and coordinate system.

The provided with CSV text files that contains 6 columns, date, time, latitude, longitude, wind speed in mph, and barometric pressure. Here are the first 3 lines of the irma.csv file. The data were scraped from Weather Underground's website, for example,

Date Time Lat Lon Wind Pressure
30-Aug 15:00 GMT 16.4 -30.3 50 1004
30-Aug 21:00 GMT 16.4 -31.2 60 1001

The students must write the code that animates the path of the hurricane along its track, marking on the map the category of the storm at each point.


Python turtle version

Javascript/Google Maps API version


Assignment Materials


Summary Students develop a program to visualize the track of a single or multiple hurricanes.
Topics Selection, looping, file io, string processing/manipulation, and graphics.
Audience Appropriate for CS1 students familar with selection, loops, file io, strings, and graphics. The supplied materials are written in Python.
Difficulty This assignment is appropriate for a CS1 class given a week.
  • The assignment allows the students to practice with looping and processing real-world data getting immediate graphical feedback.
  • The Python version uses the turtle module in a non-obvious and, perhaps, less child-like manner.
  • As noted it can be used in classes with a section on Javascript allowing students to get experience with the Google Maps API.
  • Depending on the assignment write up there are a number of possible open ended options, including varying the way the visualization, plotting tracks of multiple hurricanes, and scraping data from the Web.
  • The final visualization is fun to watch.
  • At least one student was confused by the use of CSV file for the data. He seemed to think that processing it would require manipulating an Excel file.
  • Use of graphics makes unit testing difficult.
  • if statement
  • loops
  • reading files
  • processing strings
  • graphics
  • Could be used in a class that uses Javascript, be it CS0, or a Web Development class using Google Maps API.
  • Scraping the hurricane stats from online could be a good complementary assignment, either prior to this assignment, or afterwards.