Community Data Science Workshops (Fall 2014)/Day 3 projects/Matplotlib Session: Difference between revisions

From OpenHatch wiki
Content added Content deleted
imported>Ben zen
(Created this page from the Spring 2014 version, changed the link to match.)
 
imported>Mdg
(Wikibios.zip file linked doesn't have the referenced histograms.py file. Linking to the wikbios.zip from last Spring which appears to have the correct files)
Line 23: Line 23:
After installing matplotlib, and downloading and unpacking the Wikibios bundle, move into that directory with '''cd'''. You can test your installation by running '''python histograms.py'''. If matplotlib is install correcting, a chart file named '''histograms.pdf''' will appear in the current directory.
After installing matplotlib, and downloading and unpacking the Wikibios bundle, move into that directory with '''cd'''. You can test your installation by running '''python histograms.py'''. If matplotlib is install correcting, a chart file named '''histograms.pdf''' will appear in the current directory.


[http://mako.cc/teaching/2014/cdsw-autumn/wikibios.zip Wikibios bundle for all platforms]
[http://mako.cc/teaching/2014/cdsw/wikibios.zip Wikibios bundle for all platforms]

[http://mako.cc/teaching/2014/cdsw-autumn/wikibios.zip Mediawiki client test programs]


=== Example topics to cover in Lecture ===
=== Example topics to cover in Lecture ===

Revision as of 18:52, 22 November 2014

Visualizing data with Matplotlib and Wiki-bios

In this project, we will explore how to produce clear, informative charts, graphs, and plots with Matplotlib, the most popular toolkit for scientific data visualization in Python.

We'll be focusing on a dataset drawn from Wikipedia and DBpedia, containing the names, birth dates, genders, article creation dates, and number of edits, of over 180,000 Wikipedia biography articles.

Goals

  • Get set up to make graphs with Matplotlib
  • Learn the basics of the Matplotlib API and workflow
  • Practice reading the Matplotlib documentation
  • Build a plotting program step by step
  • Learn simple ways to distill the essence of a large data set
  • Explore the art of visualizing data
  • Exercise your creativity by making your own visualization

Download and test the Matplotlib-with-Wiki-bios project

(Estimated time: 10 minutes)

After installing matplotlib, and downloading and unpacking the Wikibios bundle, move into that directory with cd. You can test your installation by running python histograms.py. If matplotlib is install correcting, a chart file named histograms.pdf will appear in the current directory.

Wikibios bundle for all platforms

Mediawiki client test programs

Example topics to cover in Lecture

  • line charts
  • histograms
  • binning
  • scatter plots
  • heat maps
  • axis labeling
  • legends