Title image Spring 2018

Integrating Data and View

Due 12 March 2018

The goal of this project is to bring together all of the elements--data, GUI, and viewing--into a single application that enables interactive visualization of data sets in the proper format. The result of this project should be an application that can read a data set and enable the user to interactively view it in up to 5 user-selected dimensions (3 spatial, color, and size).


  1. Create an updatePoints method that is analogous to the updateAxes function. It should build a new VTM, use the VTM to transform the matrix of data points, then update the coordinates of each data point using the canvas.coords function. Note, if there are no data objects (len(self.objects) == 0), then updatePoints should return without doing anything.

    You should add a call to updatePoints wherever you have a call to updateAxes.

    Test your program with the two data sets provided on the lab page.

  2. Go back and create a proper handleChooseAxes function. This function should let the user select the data column to use for each of five different axes: X, Y, Z, Color, and Size. The user must select at least the X and Y spatial axes, but the Z, Color, and Size axes are all optional and can be used in any combination with X and Y.

    You have some flexibility as to how you implement this capability. You can create a single dialog that lets the user specify all of the information. Alternatively, you can put popup menus on your main screen that let the user select each axis and then have a Plot button that clears the screen and then uses the current selections to plot the data. The choice is yours, but focus on the workflow aspects of the design. It should be easy to generate plots with different columns in different axes.

    In particular, make sure it is easy for the user to know which columns are which by using the proper headers. Do not use column indices, and do not require the user to type a header name in order to select a column.

  3. Add the necessary code to handleChooseAxes and buildPoints to support the color and size aspects of the plotting. Your handleChooseAxes will need to return whether the user chose a column to use for either color or size, both should be optional. Your buildPoints will need to modify the color and size of the points when it plots them.

    A reasonable design is to use an Nx1 matrix to store the normalized size values and another Nx1 matrix (or list) to store the colors. If the user doesn't choose a size, set the size matrix to all ones. if the user doesn't choose a color, set the color matrix (or list) to be the default color. If you have a default size and color matrix, then you can write a single loop to generate the graphical points. You may want to write generateSizes and generateColors functions to generate the appropriate matrices (or lists).

    A nice extension is to add legends to your main screen that show the values corresponding to different colors and sizes.

  4. Test your system on the Australia Coast data. Try plotting using latitude and longitude as (x, y) with other dimensions as z, color, and size. Capture some screen shots. An extension is to enable the user to select an Eckert projection for the latitude and longitude variables (or some other projection for mapping latitude and longitude to a plane).

    Required picture 1: A screen shot of a plot of the AustraliaCoast data using longitude (x), latitude (y), premax (z)

    Required picture 2: A screen shot of a plot of the AustraliaCoast data using longitude (x), latitude (y), runoffnew (z), premax (size), maxairtemp (color).

  5. Test your system on the data set you used last in project 2 or a new one of your choice.

    Required picture 3: A screen shot of plot of at least three variables from your selected data set.


As always, extensions are a way for you to explore other aspects of the project of interest to you. The following are some options for making your application more interesting and useful. You are also welcome to pursue other ideas related to the project concept.


Make a wiki page for the project report.

  • Write a brief summary, separate from the body of your report, of your project that describes the purpose, the task, and your solution to it. It should describe the task, the key parts of your solution, and the result of your work (did it work, what can you do with your GUI?). The summary should be 200 words or less.
  • Write a brief description of the workflow for a user to open data, select columns, and generate the plot. You might want to include a screen shot showing how the user selects axes.
  • Include the required screen shots for the provided data set and for your own. Be sure to note what axes are being plotted in any images you show.
  • Describe any extensions or enhancements you implemented.
  • Acknowledgements: a list of people you worked with, including TAs, and instructors. Include in that list anyone whose code you may have seen, such as those of friends who have taken the course in a previous semester.
  • Handin

    Once you have written up your assignment, give the page the label:


    Put your code in the Private subdirectory of your folder on Courses. Please make sure you are organizing your code by project. Your handin code should include all the python files necessary to run your program as well as data files you used to test your code and generate plots in your report.