User Tools

Site Tools


cs401r_w2016:lab1

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
cs401r_w2016:lab1 [2015/12/22 19:42]
admin
cs401r_w2016:lab1 [2016/01/02 23:55]
admin
Line 1: Line 1:
 +====Objective:​====
  
-==Objective:​==+Get started with anaconda, python, ipython notebooks, and pandas. ​ Begin producing simple visualizations of data and images.
  
-Get started with python, ipython notebooks and anaconda.+---- 
 +====Deliverable:​====
  
-==Deliverable:==+For this lab, you will submit an ipython notebook. ​ This notebook will have two parts:
  
-An ipython ​notebook ​that generates ​a random image. ​ We will run this+**Part 1:**  Your notebook ​should generate ​a random image. ​ We will run this
 notebook 5 times; it should generate 5 different, moderately complex notebook 5 times; it should generate 5 different, moderately complex
 images. ​ Each image should be 512 x 288.  Have fun with it! images. ​ Each image should be 512 x 288.  Have fun with it!
  
-==Description:​==+The resulting image could, for example, look like this: 
 + 
 +{{:​cs401r_w2016:​lab1.png?​nolink|}} 
 + 
 +**Part 2:** Your notebook should use the pandas library to read in some CSV data and plot some of it. 
 +Your plot should look something like this: 
 + 
 +{{:​cs401r_w2016:​lab1_storesales.png?​direct&​700|}} 
 + 
 +---- 
 +====Description:​====
  
 Throughout this class, we will be using a combination of ipython Throughout this class, we will be using a combination of ipython
Line 26: Line 38:
  
 In preparation for future labs, we strongly encourage you to use the In preparation for future labs, we strongly encourage you to use the
-cairo package as part of your image generator.+[[http://​cairographics.org/​|cairo]] package as part of your image generator.
  
-==Installing anaconda:==+---- 
 +====Installing anaconda:====
  
 http://​docs.continuum.io/​anaconda/​install http://​docs.continuum.io/​anaconda/​install
Line 36: Line 49:
 ''​conda install cairo''​ ''​conda install cairo''​
  
-To generate random numbers, check out the numpy.random module+To generate random numbers, check out the [[http://​docs.scipy.org/​doc/​numpy-1.10.0/​reference/​routines.random.html|numpy.random]] ​module.
  
 To create a new notebook, run: To create a new notebook, run:
Line 48: Line 61:
 notebook. notebook.
  
-Here's some starter code to help you generate an image:+Here's some starter code to help you generate an image.  The ''​nbimage''​ function will display the image inline in the notebook:
  
-<​code>​+<​code ​python>
 import cairo import cairo
 import numpy import numpy
cs401r_w2016/lab1.txt · Last modified: 2021/06/30 23:42 (external edit)