|
3 | 3 | ### Project |
4 | 4 | To parse data from a CSV or Excel file and plot it with matplotlib. Examples include: parsing local crime data and visualizing how often crime happens on Mondays versus Thursdays, etc. |
5 | 5 |
|
6 | | - |
7 | | -### Initial Requirements: |
8 | | -* [Python 2.x](http://www.python.org/download/releases/2.7.3/) |
9 | | -* [git](http://git-scm.com/downloads) |
10 | | -* [virtualenv](http://pypi.python.org/pypi/virtualenv) You can either download directly, or: |
11 | | - * Mac: `$ sudo easy_install virtualenv` |
12 | | - * Ubuntu: `$ sudo apt-get virtualenv` |
13 | | - * Fedora: `$ sudo yum install python-virtualenv` |
14 | | - * Windows: [Download manually](http://pypi.python.org/pypi/virtualenv) |
15 | | -* [virtualenvwrapper](http://pypi.python.org/pypi/virtualenvwrapper) You can either download it directly, or: |
16 | | - * Mac: `$ sudo easy_install virtualenvwrapper` |
17 | | - * Ubuntu: `$ sudo apt-get virtualenvwrapper` |
18 | | - * Fedora: `$ sudo yum install python-virtualenvwrapper` |
19 | | - * For Mac, Ubuntu, and Fedora: |
20 | | - * `$ export WORKON_HOME=~/Envs` |
21 | | - * `$ mkdir -p $WORKON_HOME` |
22 | | - * `$ source /usr/local/bin/virtualenvwrapper.sh` |
23 | | - * Windows: [Download manually](http://pypi.python.org/pypi/virtualenvwrapper) and follow install instructions |
24 | | - |
25 | | -* _Note_: If you are running zsh, check out [oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh). You can easily activate <code>virualenv</code> and <code>virtualenvwrapper</code> as a plugin in your `.zshrc` file. |
26 | | - |
27 | | -### To Run |
28 | | -Within your terminal |
29 | | - |
30 | | -* `$ cd` to get to your 'Home' directory |
31 | | -* `$ mkdir Projects && cd Projects` to create a new 'Projects' folder and move to that directory. You can name it whatever you want, just remember what you named it, and where it is. |
32 | | -* `$ git clone https://github.com/econchick/new-coder.git` This clones the New Coder project into the directory you're currently in, which is Projects (unless you named it something else). |
33 | | -* `$ cd new-coder/dataviz` Change into the Data Viz project. |
34 | | -* `$ mkvirtualenv DataVizProj` Make a virtual environment specific to your Data Viz project. You should see (DataVizProject) before your prompt, now. |
35 | | -* `(DataVizProject) $ pip install -r requirements.txt` Now installing package requirements for this project. Your virtual environment will store the required packages in a self-contained area to not mess up with other Python projects. |
36 | | - |
37 | | -#### Virtual Env Practice |
38 | | -Just to show the ease of virtualenv and virtualenvwrapper: |
39 | | -* `(DataVizProject) $ deactivate` You've deactivated your virtual environment. You will not have access to those packages we've downloaded until we reactivate the virtual environment again. |
40 | | -* `$ workon DataVizProject` The virtual environment now is reactivated. The packages you previously installed are now accessible. You should see (DataVizProject) before your prompt again. |
41 | | -* `(DataVizProject) $ pip freeze` This will show you the installed packages in this virtual environment. |
42 | | - |
43 | | -**Don't forget** to [deactivate](#virtual-env-practice) your virtual environment after you're all done! |
44 | | - |
45 | | -#### Full Source |
46 | | -Within your terminal: |
47 | | - |
48 | | -* `(DataVizProject) $ cd new-coder/dataviz/lib/full_source` |
49 | | -* `(DataVizProject) $ python dataviz.py --csvfile=<absolute path to csv file> --type=[Days, Type, Map] --delimiter=<csv file delimiter>` |
50 | | - |
51 | | - |
52 | | -#### Tutorial Parts |
53 | | -Within your terminal: |
54 | | -* `(DataVizProject) $ cd new-coder/dataviz/lib/tutorial_source` |
55 | | -* Open the desired file (parse.py, graph.py, or map.py) in a text editor |
56 | | -* Edit the `my_file` variable to the full path of your csv file |
57 | | -* Save and return to your terminal |
58 | | -* `(DataVizProject) $ python [parse.py | graph.py | map.py ]` |
59 | | - |
60 | | - |
| 6 | +Follow the complete tutorial [here](http://newcoder.io/dataviz) |
0 commit comments