Skip to content

Instantly share code, notes, and snippets.

@cjdd3b
Last active August 31, 2016 11:52
Show Gist options
  • Save cjdd3b/5c5aa56153b7ca79b5d23f2fa38ae234 to your computer and use it in GitHub Desktop.
Save cjdd3b/5c5aa56153b7ca79b5d23f2fa38ae234 to your computer and use it in GitHub Desktop.
Software installation guide for Mizzou's Advanced Data Journalism course, Fall 2016.

Advanced Data Journalism (J4432) software requirements

Below is a list of the key software you'll need for class, along with some resources offering tips about how to get it installed.

Text editor

A good programming text editor will help you organize your code, catch typos and generally make your life a lot easier. We recommend Sublime Text 2, which you can easily download and install from their website.

Terminal client

We'll be doing most of our work from the command line, which means you'll need access to a terminal client. On a Mac, you can either type the word "Terminal" into your Spotlight Search to access the default client:

screen shot 2016-08-29 at 8 26 30 am

Or you can download iTerm2 (recommended). Either way, you might want to add the tool to your Dock for easy access.

If you use Windows, this setup is going to be a bit more complicated. We'll have someone help set you up.

Python

The main programming language we'll be using is Python. If you're using a Mac, you should already have it installed. If you're using a PC, you can install it using this self-installer.

Be sure you install Python 2.6 or 2.7, NOT Python 3.0

To test whether it works, go to your terminal and type the word python. You should see something that looks like this:

screen shot 2016-08-29 at 8 45 16 am

easy_install and pip

To make our lives easier, Python comes with two package management tools, which allow us to install new packages that extend Python's core functionality. You'll probably need some help getting these up and running, but here are some basic instructions:

On Windows: http://stackoverflow.com/questions/4750806/how-to-install-pip-on-windows

On OSX: easy_install should already be included. To install pip, simply type sudo easy_install pip and enter your administrative password.

Virtualenv and virtualenvwrapper

These are Python tools that make it easier to install external packages and libraries. They're standard tools in most newsrooms for reasons we'll discuss in class.

We can install them both by following a slightly modified version of the virtualenvwrapper installation instructions:

sudo pip install virtualenvwrapper
echo 'export WORKON_HOME=$HOME/.virtualenvs; source /usr/local/bin/virtualenvwrapper.sh' >> ~/.bash_profile
source ~/.bash_profile

To see if it works, try creating a new virtual environment like so:

mkvirtualenv dataj

That will create a new virtual environment, which will be reflected in your command line setup like so (notice the "dataj" piece at the left of the prompt):

screen shot 2016-08-29 at 8 46 06 am

Subsequently you will be able to access that environment by typing workon dataj into your terminal. You can exit the environment by typing deactivate.

Various Python packages

Once your virtual environments are set up, you'll easily be able to install the various Python packages we'll use in class using the command pip install LIBRARY-NAME. You'll want to install these within your virtual environment (we'll talk about this), but you can get started with that like so:

workon dataj
pip install bs4
pip install requests
pip install mechanize
pip install jupyter

There will be others as well, which we'll get to later this semester.

Homebrew (OSX only)

Homebrew is a package manager, like pip, but designed to install command-line utilities rather than Python packages. We'll use it to install git (and possibly some other things later):

Install it by copying and pasting this line into the terminal:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Git and Github

Git is the version control system of choice for modern development teams. It allows you to continually save and back up your code to the web, via Github.

First you're going to need to install git itself, which (if you installed Homebrew above) should be as simple as:

brew install git

On Windows, you can install it by following the directions here.

Second, you'll need to set up a Github account, which you can do by following these instructions.

Contact information

E-mail is the best way of getting in touch with me. Unless things are crazy or I'm out of town, I'll usually respond within a day: chase.davis@nytimes.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment