In [14]:
import numpy as np
from matplotlib import pyplot as plt
import cPickle
import pandas as pd
import os
%matplotlib inline

In [6]:
os.listdir("../data/")


Out[6]:
['chineseTree.json',
 'chinese_training_{0}.cpickle',
 'myTree.json',
 'chineseTuples.json',
 'myTree2.json',
 'htmlTest',
 'path_selection.txt',
 'chinese_training_01.cpickle']

In [7]:
tagStats = cPickle.load(open("../data/chinese_training_01.cpickle","r"))

In [25]:
pd.DataFrame(tagStats["B"]["parent"]).plot()


Out[25]:
<matplotlib.axes._subplots.AxesSubplot at 0x7fbd292c9e50>

In [24]:
pd.DataFrame(tagStats["D"]["parent"]).plot()


Out[24]:
<matplotlib.axes._subplots.AxesSubplot at 0x7fbd294330d0>

In [23]:
pd.DataFrame(tagStats["E"]["parent"]).plot()


Out[23]:
<matplotlib.axes._subplots.AxesSubplot at 0x7fbd2988a2d0>

In [30]:
for l in tagStats.keys():
    print set(tagStats[l]["level"])


set([0, 1])
set([0, 1])
set([0, 1])
set([0, 1])
set([0, 1])

In [ ]: