CSC220 Processing with Hot Spots

From CSclasswiki
Jump to: navigation, search

Brief Overview

The Hot Team

  • RB Axtell
  • Amy Tayloe
  • Julia Patterson
  • Lindsey Gregor

Goal: To use KML, SQL, and Processing to create an image where students' paths overlap and create "hot spots" of where students travel to the most on campus. The final product could also reflect most-traveled paths, and perhaps be able to distinguish the "hot spots" by major, interest on campus, day of week, etc.

Single-path Processing

Our first step was to take hard-coded coordinates in a text file, and write a Processing file which processed the coordinates and displayed them as a path, overlayed on a map of Smith's campus.


We wanted people to be able to select paths from different categories, such as affiliation to Smith (i.e. first-year, sophomore, staff, Ada, etc), phone, interest, and major. To do this, we have a form which allows you to select one of those broad categories, and then more specific data (i.e. choose to sort by Major, then select an option such as Computer Science). Our paths are all stored in an SQL database. Whichever options the user chooses are converted into an SQL query, which is sent to the database. Any paths which match the specifications will be returned, sent to Processing, and displayed on the the map.

Multi-path Processing

Because we are visualizing hot spots, we want to be able to read in multiple paths at once. It is hard to determine where students tend to gather if you only have a single path. Our first step was to get Processing to read coordinates of multiple hard-coded paths, and we later extended it to display the paths returned from the database, as selected by the user. With multiple almost transparent tracks animated, the overlap of the tracks become brighter and more pronounced. After the animation is finished, the hot spots of the selected group become apparent.


We use Processing to display our results. We originally had a program which displayed a single path. This path was drawn over a map of Smith, with several buttons at the bottom that allow the background and path colors to be changed. Later, as mentioned above, we extended it to display multiple hardcoded paths, and then multiple paths from the database.

Final Product

Main Page
Main Page
Registration Page
Registration Page
Upload Page
Upload Page
Map of all Android user's paths
Map of all Android user's paths

We had a lot of problems getting the map to display the correct paths, due to a problem exporting the Processing file. Since it read in coordinates from a text file, it would only display what had been in the text file at the time of export.

As a remedy to this problem, we passed the coordinates in as a string from the PHP portion of the web page to the imbedded Processing sketch. This was accomplished using the param function of JavaScript. After this fix, we were able to animate the selected tracks on the map.

This fix, however, brought a new bug to light. When the coordinate string gets too large, it will not pass into the map and will break the sketch. In this case, the map will not even display. We were unable to fix this issue.

Located at: