Anonymous user
Community Data Science Workshops (Fall 2014)/Day 3 projects/Matplotlib Session: Difference between revisions
Community Data Science Workshops (Fall 2014)/Day 3 projects/Matplotlib Session (view source)
Revision as of 22:05, 15 March 2015
, 9 years agono edit summary
imported>Ben zen (Created this page from the Spring 2014 version, changed the link to match.) |
imported>Mako No edit summary |
||
(8 intermediate revisions by 3 users not shown) | |||
Line 1:
{{CDSW Moved}}
[[File:Matplotlib-hist2d.png|right|500px]]
__NOTOC__
== Visualizing data with Matplotlib and Wiki-bios ==
In this
We'll be focusing on a dataset drawn from Wikipedia and
The dataset used here has been drawn from several sources. The list of biographies and the gender of the biography subjects comes from a datbase called [http://dbpedia.org DBpedia] that is a structured database built from Wikipedia. If determines if articles are biographies from the Wikipedia category system and it determines if the subjects are male or female primarily by looking at whether subject is referred to as ''he'' or ''she'' in the article. Birthdates for people are extracted from the data recorded in Wikipedia in the "infobox" sidebars common to many pages. Data on how people edit Wikipedia is merged onto this dataset from a separate collection of metadata of Wikipedia editing very similar to the one we built for Harry Potter articles the morning.
=== Goals ===
Line 23 ⟶ 27:
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.
=== References ===
* [http://matplotlib.org/api/pyplot_summary.html matplotlib API reference]
* [http://matplotlib.org/examples/index.html matplotlib Examples] (many, with source)
* Other plotting resources
** [http://blog.olgabotvinnik.com/prettyplotlib/ prettyplotlib]: hip-aesthetic matplotlib plots
** [http://web.stanford.edu/~mwaskom/software/seaborn/ Seaborn]: fancy matplotlib-based visualizations
** [http://ggplot.yhathq.com/ ggplot]: port of the R language's ggplot2 library to python
** [http://d3js.org/ D3.js]: interactive data visualization for the browser (javascript)
=== Example topics to cover in Lecture ===
|