Difference between revisions of "CSC111 Lab 11 2015b"

From dftwiki3
Jump to: navigation, search
(Created page with "--~~~~ ---- <bluebox> In this lab, you need to combine together various elements that we have covered this week, and put together a digitizer that will allow you to load up a...")
 
Line 2: Line 2:
 
----
 
----
  
 +
=A Map Digitizer App=
 
<bluebox>
 
<bluebox>
In this lab, you need to combine together various elements that we have covered this week, and put together a digitizer that will allow you to load up a map of Smith College in a graphic window, and digitize various elements of the map.   The output of the digitizer will be saved in a CSV file.   The final element of the lab is to take the contents of the CSV file and share it with the class for the next phase of this project, which is  presented in the homework assignment.
+
The purpose of this lab is to crowd-source a CSV file that will be used in the homework to create a color-coded map of Smith College and its buildings, along with
 +
other map elements of your choice.
 +
We will view the program that you create in this lab as a ‘’tool’’ used to create data. The program you will create in the homework will be more sophisticated, and we will refer to it as an ‘’application’’, which will deserve closer attention to details.
 
</bluebox>
 
</bluebox>
 +
 +
=Lab Assignment=
 +
 
<br />
 
<br />
 +
Your task today is to create a Python tool that:
 +
:# loads up a gif image representing the Smith College campus.  The map can be found at the bottom of the class page, with the weekly schedule for the class.  Use the cropped gif image.  You’ll have to click on it twice before it appears by itself in your browser, at which point you can save the map to your computer.
 +
:# The tool creates one or several buttons that will allow the user to digitize elements of the map.  You are free to define how your buttons should operate.  A possible option is to have a ‘’Start’’ and ‘’Stop’’ button, but you may want to define your UI differently.
 +
:# When the digitization starts, your tool will
 +
::# prompt the user for the name of the map element you are about to digitize (input()), and
 +
::# allow the you and your partner to record the coordinates of several points in a list. 
 +
:# Upon indicating to your tool that the collection of the given item is over, it will store each list of points in a CSV file. 
 +
:# The format of your CSV file should be the format that we will have selected in class (Monday/Wednesday lectures)
 +
:# Once you have recorded a sufficient number of map elements, stop the tool, and copy/paste the contents of your CSV file to the shared Google doc we’ll use for this LAM.
 
<br />
 
<br />
 +
=Moodle Submission=
 
<br />
 
<br />
 +
* Submit your digitizer tool to Moodle. 
 +
* You will not be able to evaluate it, as it uses the graphics library, which Moodle does not know how to handle.
 +
* Submit a screen copy of your tool after it has been used to digitize a few items.
 +
<br />
 +
<br />
 +
<br />
 +
<br />
 +
<br />
 +
<br />
 +
<br />
 +
<br />
 +
<br />
 +
<br />
 +
<br />
 +
<br />
 +
<br />
 +
[[Category:CSC231]][[Category:Python]][[Category:Lab]]

Revision as of 11:38, 15 November 2015

--D. Thiebaut (talk) 10:50, 14 November 2015 (EST)


A Map Digitizer App

The purpose of this lab is to crowd-source a CSV file that will be used in the homework to create a color-coded map of Smith College and its buildings, along with other map elements of your choice. We will view the program that you create in this lab as a ‘’tool’’ used to create data. The program you will create in the homework will be more sophisticated, and we will refer to it as an ‘’application’’, which will deserve closer attention to details.

Lab Assignment


Your task today is to create a Python tool that:

  1. loads up a gif image representing the Smith College campus. The map can be found at the bottom of the class page, with the weekly schedule for the class. Use the cropped gif image. You’ll have to click on it twice before it appears by itself in your browser, at which point you can save the map to your computer.
  2. The tool creates one or several buttons that will allow the user to digitize elements of the map. You are free to define how your buttons should operate. A possible option is to have a ‘’Start’’ and ‘’Stop’’ button, but you may want to define your UI differently.
  3. When the digitization starts, your tool will
  1. prompt the user for the name of the map element you are about to digitize (input()), and
  2. allow the you and your partner to record the coordinates of several points in a list.
  1. Upon indicating to your tool that the collection of the given item is over, it will store each list of points in a CSV file.
  2. The format of your CSV file should be the format that we will have selected in class (Monday/Wednesday lectures)
  3. Once you have recorded a sufficient number of map elements, stop the tool, and copy/paste the contents of your CSV file to the shared Google doc we’ll use for this LAM.


Moodle Submission


  • Submit your digitizer tool to Moodle.
  • You will not be able to evaluate it, as it uses the graphics library, which Moodle does not know how to handle.
  • Submit a screen copy of your tool after it has been used to digitize a few items.