This is a quick-and-dirty example of an IPython Notebook. They are great for documenting projects as they are developed. Each code chunk can be executed as stand-alone code and markdown syntax can be used to narrate code functionality.
In this quick example I'm going to do something really basic: import and display some data on home values over time for Humboldt County, CA.
#first we need to import some libraries
import pylab
import pandas as pd
import pandas.io.data as web
import datetime
%matplotlib inline
import matplotlib.pyplot as plt
from matplotlib import style
import numpy as np
from Quandl import Quandl as quandl
style.use('ggplot')
Next, I'm going to bring data in from Quandl. The Quandl module for python makes this really easy. If you wanted to execute this on your own you would need to do 2 things:
Install the Quandl module for Python with your Python distribution. I am using the Anaconda distribution so this was pretty easy for me...I was able to do "conda install Quandl" from the terminal and get it done.
Sign up for an account at Quandl. When you do this they will give you an API key that you can use to pull data from thier databases
The Quandl data series I'm going to use is ZILL/C00399_MSP. This is one of the ~1.4 million Zillow data sets available through Quandl. It has the Zillow estimate of median home value of all homes in Humboldt County, CA. Data are available monthly from 1996.
df = quandl.get("ZILL/CO00399_MSP", authtoken="1i2uuiN7DQ-Ltizgjb_q")
print(df.head())
print(df.tail())
Finally, I'm going to plot these data using a really basic plot call
df.plot()
Let's try one more...I'm going to change the series to 'ZILL/C00822_MSP' (Zillow estimated median market value of median sale price within Eureka, CA).
df = quandl.get("ZILL/C00822_MSP", authtoken="1i2uuiN7DQ-Ltizgjb_q")
print(df.head())
print(df.tail())
df.plot()