In [1]:
import twothirds 
import random
%matplotlib inline

In [2]:
activity = twothirds.Activity('main.csv')

First game

Winning guess:


In [3]:
activity.games[0].find_winner()[-1]


Out[3]:
22

Winner:


In [4]:
activity.games[0].find_winner()[:-1]


Out[4]:
('Ben S',)

Second game

Winning guess:


In [5]:
activity.games[1].find_winner()[-1]


Out[5]:
4

Winner:


In [6]:
activity.games[1].find_winner()[:-1]


Out[6]:
('Keira',)

Plots


In [7]:
%matplotlib inline
activity.analyse();
activity.distplot();
activity.pairplot();


<matplotlib.figure.Figure at 0x7ff47caea150>

Summary


In [8]:
activity


Out[8]:
=====================
Game 0
---------------------
2/3rds of the average: 22.12
Winning guess: 22
Winner(s): ('Ben S',)
=====================
Game 1
---------------------
2/3rds of the average: 4.26
Winning guess: 4
Winner(s): ('Keira',)

All results


In [9]:
activity = twothirds.Activity('data.csv')
activity.analyse();
activity.distplot();
activity.pairplot();
activity


Out[9]:
=====================
Game 0
---------------------
2/3rds of the average: 23.67
Winning guess: 24
Winner(s): ('Anonymous',)
=====================
Game 1
---------------------
2/3rds of the average: 11.95
Winning guess: 12
Winner(s): ('Anonymous',)
<matplotlib.figure.Figure at 0x7ff47a3eae50>

Namibia 2016


In [10]:
activity = twothirds.Activity('data/namibia_2016.csv')
activity.analyse();
activity.distplot();
activity.pairplot();
activity


Out[10]:
=====================
Game 0
---------------------
2/3rds of the average: 27.85
Winning guess: 26
Winner(s): ('Anonymous',)
=====================
Game 1
---------------------
2/3rds of the average: 20.16
Winning guess: 20
Winner(s): ('Anonymous',)
<matplotlib.figure.Figure at 0x7ff47a227290>

In [ ]: