{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Analyse the demographics of the workshop\n", "\n", "Who came, with what level, and how many stayed to the end. " ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": true }, "outputs": [], "source": [ "import pandas as pd\n", "import matplotlib.pyplot as plt" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Set some default parameters for the matplotlib figures. I want to use the [seaborn](http://seaborn.pydata.org/) style sheet with larger text, all figures to have the same size, and have a white (instead of transparent) background. Also use a higher DPI when saving figures for better quality images." ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": false }, "outputs": [], "source": [ "plt.style.use(['seaborn', 'seaborn-talk'])\n", "plt.rc('figure', facecolor='#ffffff')\n", "plt.rc('figure', figsize=(10, 5))\n", "plt.rc('figure', dpi=150)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Load the demographics data\n", "\n", "Data from the Google forms sign up. I exported the data (without names and emails) to the file `demographics.csv` in this repository. \n", "\n", "I'll use `pandas` library to load and manipulate the data." ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": true }, "outputs": [], "source": [ "data = pd.read_csv('demographics.csv')" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "
\n", " | os | \n", "experience | \n", "languages | \n", "position | \n", "field | \n", "
---|---|---|---|---|---|
0 | \n", "Mac (OSX) | \n", "Did a little bit of shell scripting | \n", "Python, Matlab/Octave | \n", "Graduate student | \n", "Geophysics | \n", "
1 | \n", "Mac (OSX) | \n", "Took a basic programming course, Self-taught w... | \n", "C/C++, Fortran, Matlab/Octave | \n", "Faculty | \n", "Plate Tectonics | \n", "
2 | \n", "Mac (OSX) | \n", "Took a basic programming course, Took intermed... | \n", "C/C++, Matlab/Octave, JAVA, VRML, MEL, UnrealS... | \n", "Graduate student | \n", "GG (Hydrology) | \n", "
3 | \n", "Windows | \n", "Took a basic programming course | \n", "Matlab/Octave | \n", "Staff | \n", "Geology and Geophysics | \n", "
4 | \n", "Mac (OSX) | \n", "Took a basic programming course | \n", "C/C++, Matlab/Octave | \n", "Graduate student | \n", "Geochemistry | \n", "
5 | \n", "Mac (OSX) | \n", "Took a basic programming course | \n", "Matlab/Octave, I use matlab from time to time ... | \n", "Graduate student | \n", "Coastal Geology & sea-level rise | \n", "
6 | \n", "Windows | \n", "Self-taught with moderate/advanced experience | \n", "Fortran, Matlab/Octave, R | \n", "Postdoc | \n", "Watershed hydrology | \n", "
7 | \n", "Windows | \n", "Did a little bit of shell scripting | \n", "Matlab/Octave | \n", "Graduate student | \n", "Mineral Physics | \n", "
8 | \n", "Mac (OSX) | \n", "Took a basic programming course, Took intermed... | \n", "Python, C/C++, Matlab/Octave | \n", "Faculty | \n", "Mineral Physics | \n", "
9 | \n", "Mac (OSX) | \n", "Took intermediate/advanced programming course | \n", "Matlab/Octave, R | \n", "Graduate student | \n", "geophysics | \n", "
10 | \n", "Windows | \n", "Self-taught with little experience | \n", "Python | \n", "Staff | \n", "Geomorphology | \n", "
11 | \n", "Mac (OSX) | \n", "Never programmed before | \n", "None (I told I've never programmed before) | \n", "Graduate student | \n", "Hydrology modeling | \n", "
12 | \n", "Mac (OSX) | \n", "Took intermediate/advanced programming course,... | \n", "C/C++, Matlab/Octave, R, Java | \n", "Faculty | \n", "Coastal Geology | \n", "
13 | \n", "Mac (OSX) | \n", "Never programmed before, Self-taught with litt... | \n", "Javascript | \n", "Undergraduate student | \n", "Geophysics | \n", "
14 | \n", "Windows | \n", "Took a basic programming course, Self-taught w... | \n", "Matlab/Octave, IDL, google engine | \n", "Graduate student | \n", "volcanology | \n", "
15 | \n", "Windows | \n", "Took a basic programming course, Self-taught w... | \n", "Matlab/Octave | \n", "Faculty | \n", "Volcanology | \n", "
16 | \n", "Mac (OSX) | \n", "Took a basic programming course | \n", "Python, Matlab/Octave | \n", "Graduate student | \n", "Coastal Hydrology | \n", "
17 | \n", "Windows | \n", "Never programmed before | \n", "None (I told I've never programmed before) | \n", "Graduate student | \n", "Hydrology | \n", "
18 | \n", "Mac (OSX) | \n", "Took a basic programming course, Self-taught w... | \n", "Python | \n", "Graduate student | \n", "Voclanology/Remote Sensing | \n", "
19 | \n", "Mac (OSX) | \n", "Took a basic programming course | \n", "javascript, html | \n", "Undergraduate student | \n", "Geology and Geophysics | \n", "
20 | \n", "Mac (OSX) | \n", "Self-taught with moderate/advanced experience | \n", "Matlab/Octave, R | \n", "Graduate student | \n", "Planetary sciences | \n", "
21 | \n", "Mac (OSX) | \n", "Never programmed before, Did a little bit of s... | \n", "Python | \n", "Undergraduate student | \n", "Conservation | \n", "
22 | \n", "Windows | \n", "Took a basic programming course, Self-taught w... | \n", "C/C++, R | \n", "Graduate student | \n", "Environmental science | \n", "
23 | \n", "Windows | \n", "Self-taught with little experience | \n", "Python, Matlab/Octave | \n", "Graduate student | \n", "Electrical Engineering | \n", "
24 | \n", "Windows | \n", "Took a basic programming course | \n", "Fortran, Matlab/Octave, R | \n", "Graduate student | \n", "natural resources and environmental management | \n", "
25 | \n", "GNU/Linux | \n", "Self-taught with moderate/advanced experience | \n", "Python, Matlab/Octave, R, Bash Shell(?) | \n", "Marine Geophysical Data Tech | \n", "Marine Geophysics | \n", "
26 | \n", "Windows | \n", "Self-taught with moderate/advanced experience | \n", "Python, Matlab/Octave, R | \n", "Graduate student | \n", "ecohydrology (in the Geography Department) | \n", "
27 | \n", "Mac (OSX) | \n", "Never programmed before | \n", "None (I told I've never programmed before) | \n", "Interested citizen | \n", "Film production and education | \n", "
28 | \n", "Mac (OSX) | \n", "Self-taught with little experience | \n", "Python | \n", "Graduate student | \n", "Geography | \n", "
29 | \n", "GNU/Linux | \n", "Took intermediate/advanced programming course | \n", "Python, C/C++, Fortran | \n", "Na Kupuna student | \n", "civil engineering | \n", "
30 | \n", "Mac (OSX) | \n", "Did a little bit of shell scripting, Took a ba... | \n", "Fortran, BASIC (yes, really) | \n", "Faculty | \n", "Geo Oceanography -- a lot of seafloor mapping | \n", "
31 | \n", "Windows | \n", "Never programmed before | \n", "None (I told I've never programmed before) | \n", "Graduate student | \n", "Geochemistry | \n", "
32 | \n", "Mac (OSX) | \n", "Took a basic programming course | \n", "Matlab/Octave | \n", "Graduate student | \n", "Mineral physics | \n", "
33 | \n", "Windows | \n", "Did a little bit of shell scripting | \n", "R, bit of awk/sed for GMT tasks | \n", "gov't researcher | \n", "marine geology | \n", "
34 | \n", "Mac (OSX) | \n", "Never programmed before | \n", "None (I told I've never programmed before) | \n", "Undergraduate student | \n", "Geology | \n", "