% Day 12: Baby Names and Plotting % Raymond Yee % February 27, 2014 (http://is.gd/wwod1412)
- Get an overview on plotting options
- Look at Baby Names
Matplotlib (mpl) is fundamental: matplotlib: python plotting: Matplotlib 1.3.1 documentation. We're going to be using it throughout the course. I myself am not an expert in mpl -- so we're on a learning curve together.
Assignment for today is to have read Chapter 8 of PfDA
and make sure you can
run
nbviewer.ipython.org/github/rdhyee/working-open-data-2014/blob/master/notebooks/Day_11_B_Setting_Up_for_PfDA.ipynb.
There's a lot to mpl -- here's what I think are key things to learn:
- There are many backends for running mpl -- we will focus on how to get plots in the IPython Notebook.
- Read the Matplotlib 1.3.1 documentation, study examples in mpl gallery
- Note some fundamental conceptual aspects to mpl (as I outline in Day_12_A_Matplotlib_Intro.ipynb and try to make basic plots on your own (line plots, scatter plots, bar plots).
Consider Two libraries that focus on making matplotlib plots prettier by default:
- seaborn. See also seaborn: aesthetics.ipynb
- prettyplotlib
Other promising libraries:
- bokeh
- vincent, which ties together Python and vega, which sits on top of D3.js - Data-Driven Documents
-
Tomorrow: Getting Things Done with Pandas! "Getting Things Done with Pandas" (Feb 28, 2014 4-6pm)
-
You can sign up for a short class co-taught by Dav Clark and Raymond Yee (March 5): Javascript Visualization | D-Lab. We'll cover some of the same material in this class, but Dav is a great teacher.
Day_12_B_Baby_Names_Starter.ipynb#Names-that-are-both-M-and-F