In this course you will work with Python as the language to work with, since it allows for fast prototyping and is supported by a great variety of scientific (and, specifically, data related) libraries.
There are many ways to install Python. One way is the free Anaconda Scientific Python distribution, which you can download from https://store.continuum.io/cshop/anaconda/. This Python distribution contains most of the packages that we will be using throughout the course. It also includes an easy-to-use but powerful packagin system, conda. For compabitility reasons, we will be using Python 2.7, so make sure to download the correct version of Anaconda.
IPython has become the standard for interactive computing in Python. After installing Anaconda, you can access IPython (and the Notebooks) either through the Anaconda Launcher or the Anaconda command prompt.
To run the IPython Notebook server from the command line, type ipython notebook
from the terminal. Your web browser will open and load the environment.
In the notebook, you can type and run code:
print "hi!"
hi!
Go to: http://nbviewer.ipython.org/url/ + url where the ipython notebook is located
Anaconda also installs a package manager, that makes it easy to install and update Python packages. To call it, you need to type conda
in the Anaconda command prompt. You can read a brief FAQ for conda
here.
# Code for setting the style of the notebook
from IPython.core.display import HTML
def css_styling():
styles = open("theme/custom.css", "r").read()
return HTML(styles)
css_styling()