In [1]:
%matplotlib inline

In [2]:
import networkx as nx
import pandas as pd
# import projx as px fails in python3
import matplotlib.pyplot as plt
import matplotlib.cm as cm
import matplotlib.colors as clrs
import seaborn as sns

In [3]:
plt.rcParams['figure.figsize'] = (12, 7)

In [4]:
def prob_dist(itrbl):
    count = {}
    for i in itrbl:
        count.setdefault(i, 0)
        count[i] += 1
    sr = pd.Series(count)
    prob = sr.apply(lambda x: float(x) / len(itrbl))
    return prob


def basic_graph_stats(g):
    stats = {
        "num_nodes": len(g),
        "num_edges": len(g.edges()),
        "density": nx.density(g),
        "diameter": nx.diameter(g),
        "avg_short_path": nx.average_shortest_path_length(g),
        "avg_clust": nx.average_clustering(g),
        "transitivity": nx.transitivity(g)
    }
    return pd.Series(stats)

In [5]:
graph = nx.read_gexf("projections/fifty_percent_cut.gexf")

In [6]:
min(graph.degree().values())


Out[6]:
2

In [7]:
subgraphs = list(nx.connected_component_subgraphs(graph))
print([len(sub) for sub in subgraphs])


[236]

In [8]:
g = subgraphs[0]

In [9]:
nx.write_gexf(g, "projections/subgraph_fifty_cut.gexf")

In [10]:
basic_graph_stats(g)


Out[10]:
avg_clust            0.803597
avg_short_path       2.809701
density              0.044464
diameter             6.000000
num_edges         1233.000000
num_nodes          236.000000
transitivity         0.329093
dtype: float64

Centrality


In [11]:
bc = nx.betweenness_centrality(g, weight="weight")
ec = nx.eigenvector_centrality(g, weight="weight", max_iter=500)
cc = nx.closeness_centrality(g)
deg = nx.degree(g)
pr = nx.pagerank(g, max_iter=500, weight="weight")

In [12]:
cent_10_df = pd.DataFrame({
    "bc": [(k, g.node[k]["label"], bc[k]) for k in sorted(bc, key=bc.get, reverse=True)[0:10]],
    "ec": [(k, g.node[k]["label"], ec[k]) for k in sorted(ec, key=ec.get, reverse=True)[0:10]],
    "cc": [(k, g.node[k]["label"], cc[k]) for k in sorted(cc, key=cc.get, reverse=True)[0:10]],
    "dc": [(k, g.node[k]["label"], deg[k]) for k in sorted(deg, key=deg.get, reverse=True)[0:10]],
    "pr": [(k, g.node[k]["label"], pr[k]) for k in sorted(pr, key=pr.get, reverse=True)[0:10]]
})

In [13]:
print(cent_10_df)


                                                  bc  \
0   (440, Felix Lope de Vega Carpio, 0.197106716329)   
1  (184, Pedro Fernandez de Castro, Conde de Lemo...   
2                (437, Alonso Perez, 0.141436668139)   
3      (153, Sebastian de Cormellas, 0.128245367804)   
4                 (70, Mateo Aleman, 0.102287983172)   
5              (3, Bernardo Grassa, 0.0998645172895)   
6  (208, Miguel de Cervantes Saavedra, 0.09597349...   
7            (207, Jorge Rodriguez, 0.0809602103162)   
8            (267, Juan de Bonilla, 0.0580469176214)   
9  (215, Francisco Murcia de la Llana, 0.05423760...   

                                                  cc  \
0    (440, Felix Lope de Vega Carpio, 0.54524361949)   
1  (215, Francisco Murcia de la Llana, 0.51762114...   
2  (100, Gutierre de Cetina, Vicario General, 0.4...   
3  (208, Miguel de Cervantes Saavedra, 0.47667342...   
4          (209, Ruy Pirez da Veiga, 0.473790322581)   
5      (153, Sebastian de Cormellas, 0.470941883768)   
6             (352, Marcos Teixiera, 0.469061876248)   
7       (147, Tomas Gracian Dantisco, 0.46442687747)   
8                (437, Alonso Perez, 0.461689587426)   
9                (207, Jorge Rodriguez, 0.458984375)   

                                                  dc  \
0               (440, Felix Lope de Vega Carpio, 88)   
1            (215, Francisco Murcia de la Llana, 63)   
2  (184, Pedro Fernandez de Castro, Conde de Lemo...   
3            (208, Miguel de Cervantes Saavedra, 55)   
4     (100, Gutierre de Cetina, Vicario General, 47)   
5                       (212, Juan de la Cuesta, 36)   
6                             (70, Mateo Aleman, 36)   
7                     (331, Jose de Valdivielso, 34)   
8                          (257, Jorge de Tovar, 32)   
9                      (209, Ruy Pirez da Veiga, 32)   

                                                  ec  \
0  (215, Francisco Murcia de la Llana, 0.43885770...   
1   (440, Felix Lope de Vega Carpio, 0.321814008236)   
2  (208, Miguel de Cervantes Saavedra, 0.31870776...   
3  (100, Gutierre de Cetina, Vicario General, 0.2...   
4           (212, Juan de la Cuesta, 0.261972128741)   
5  (184, Pedro Fernandez de Castro, Conde de Lemo...   
6          (331, Jose de Valdivielso, 0.18776568372)   
7         (214, Hernando de Vallejo, 0.144271507257)   
8              (257, Jorge de Tovar, 0.144003233588)   
9    (259, Miguel de Ondarza Zabala, 0.143252046672)   

                                                  pr  
0   (440, Felix Lope de Vega Carpio, 0.044227642188)  
1  (215, Francisco Murcia de la Llana, 0.03293063...  
2  (208, Miguel de Cervantes Saavedra, 0.02790403...  
3  (184, Pedro Fernandez de Castro, Conde de Lemo...  
4  (100, Gutierre de Cetina, Vicario General, 0.0...  
5                (70, Mateo Aleman, 0.0160517314959)  
6           (433, Alonso de Barros, 0.0146365198798)  
7        (331, Jose de Valdivielso, 0.0143919231841)  
8          (212, Juan de la Cuesta, 0.0143389550352)  
9          (209, Ruy Pirez da Veiga, 0.014244069222)  

In [14]:
pd.Series(list(deg.values())).hist()


Out[14]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f10fd722190>

In [15]:
deg_prob = prob_dist(list(deg.values()))
plt.scatter(deg_prob.index, deg_prob)


Out[15]:
<matplotlib.collections.PathCollection at 0x7f10fd6b2710>

In [16]:
pd.Series(list(bc.values())).hist()


Out[16]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f10fd5fae10>

In [17]:
pd.Series(list(cc.values())).hist()


Out[17]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f10fd612450>

In [18]:
pd.Series(list(ec.values())).hist()


Out[18]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f10fd109b90>

In [19]:
pd.Series(list(pr.values())).hist()


Out[19]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f10fd072e50>

Assortativity

Degree


In [20]:
nx.degree_assortativity_coefficient(g)


Out[20]:
-0.13397654720434693

In [21]:
r = nx.degree_assortativity_coefficient(g)
print("%3.1f"%r)


-0.1

In [22]:
nodes_by_deg = sorted(deg, key=deg.get, reverse=True)
mtrx = nx.to_numpy_matrix(g, nodelist=nodes_by_deg)

In [23]:
weight_sr = pd.Series([attrs["weight"] for s, t, attrs in g.edges(data=True)])
weight_sr.describe()


Out[23]:
count    1233.000000
mean        0.281060
std         0.233581
min         0.142857
25%         0.166667
50%         0.200000
75%         0.309524
max         2.602381
dtype: float64

In [24]:
quant = weight_sr.quantile(.75)

In [25]:
plt.rcParams['figure.figsize'] = (12, 7)
mtrx


Out[25]:
matrix([[ 0.        ,  1.67604428,  0.        , ...,  0.17763158,
          0.        ,  0.        ],
        [ 1.67604428,  0.        ,  0.77738095, ...,  0.17763158,
          0.        ,  0.19444444],
        [ 0.        ,  0.77738095,  0.        , ...,  0.        ,
          0.        ,  0.        ],
        ..., 
        [ 0.17763158,  0.17763158,  0.        , ...,  0.        ,
          0.        ,  0.        ],
        [ 0.        ,  0.        ,  0.        , ...,  0.        ,
          0.        ,  0.        ],
        [ 0.        ,  0.19444444,  0.        , ...,  0.        ,
          0.        ,  0.        ]])

In [26]:
#colors = [('purple')] + [(cm.jet(i)) for i in xrange(1,256)]
#new_map = clrs.LinearSegmentedColormap.from_list('new_map', colors, N=256)
# heatmap = plt.imshow(mtrx, interpolation='nearest')
# heatmap.set_clim(0.0, quant)
# plt.colorbar()
# sns.heatmap(mtrx)
# plt.savefig("img/cutlines_deg_assort.png")

In [27]:
stripmtrx = mtrx[:100, :50]

In [28]:
# heatmap = plt.imshow(stripmtrx)
# heatmap.set_clim(0.0, quant)
# plt.colorbar()
# sns.heatmap(stripmtrx)

In [29]:
zoommtrx = nx.to_numpy_matrix(g, nodelist=nodes_by_deg)[:50, :10]

In [30]:
zoomquant = pd.Series(zoommtrx.flatten().tolist()[0]).quantile(0.9)

In [31]:
# heatmap = plt.imshow(zoommtrx)
# heatmap.set_clim(0.0, zoomquant)
# plt.colorbar()
sns.heatmap(zoommtrx)


Out[31]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f10fce0d490>

Attribute


In [32]:
place = nx.attribute_assortativity_coefficient(g, "top_place")

In [33]:
genre = nx.attribute_assortativity_coefficient(g, "top_genre")

In [34]:
role = nx.attribute_assortativity_coefficient(g, "role")

In [35]:
assort_df = pd.Series({
    "deg": r,
    "role": role,
    "place": place,
    "genre": genre
})
assort_df


Out[35]:
deg     -0.133977
genre    0.455555
place    0.251043
role    -0.121747
dtype: float64

Remove author/patron


In [36]:
no_auth_patron = g.copy()
# g.nodes(data=True)

In [37]:
no_auth_patron = g.copy()
for node, attrs in g.nodes(data=True):
    if attrs.get("role", "") == "author" or attrs.get("role", "") == "patron" or not attrs.get("top_place"):
        no_auth_patron.remove_node(node)

In [38]:
len(no_auth_patron.nodes())
place = nx.attribute_assortativity_coefficient(no_auth_patron, "top_place")
place


Out[38]:
0.6271698019463778

In [39]:
comps = list(nx.connected_component_subgraphs(no_auth_patron))
for x in comps:
    print(len(x.nodes()))


105
5
22
9
4
5
2
4
1
1

In [40]:
def group_by_top_place(g):
    places = {}
    current = 1
    for n, attrs in g.nodes(data=True):
        tp = attrs["top_place"]
        if tp not in places:
            places[tp] = int(current)
            group = int(current)
            current += 1
        else:
            group = places[tp]
        g.node[n]["group"] = group
    return g

In [41]:
no_auth_patron = group_by_top_place(no_auth_patron)
no_auth_patron.nodes(data=True)


Out[41]:
[('214',
  {'avg_date': u'1616',
   'doc_type': u"{u'Tasa': 8, u'Privilegio/Licencia': 2}",
   'fecha': u"{'1614-11-17': 1, '1615-10-21': 1, '1616-09-12': 1, '1618-06-25': 1, '1618-01-29': 1, '1617-11-07': 1, '1617-08-18': 1, '1613-08-12': 1, '1618-03-06': 1, '1618-04-09': 1}",
   'genero': u"{'Teatro': 1, 'Ficcion': 5, 'Poesia': 3}",
   'group': 1,
   'inst': u"{u'Consejo de Castilla': 1}",
   'label': 'Hernando de Vallejo',
   'lugar': u"{u'Madrid': 10}",
   'notas': u"{'Escribano de Camara': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'Poesia',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Madrid',
   'type': u'Persona'}),
 ('215',
  {'avg_date': u'1612',
   'doc_type': u"{u'Privilegio/Licencia': 1, u'Fe de erratas': 33}",
   'fecha': u"{'': 8, '1612-02-08': 1, '1614-05-15': 1, '1604-12-20': 1, '1618-03-13': 1, '1611-04-09': 1, '1615-10-21': 1, '1614-09-20': 1, '1616-12-15': 1, '1613-08-07': 1, '1612-11-02': 1, '1618-06-23': 1, '1614-11-10': 1, '1607-03-07': 1, '1609-03-28': 1, '1617-09-24': 1, '1607-10-16': 1, '1609-11-18': 1, '1618-03-04': 1, '1615-03-20': 1, '1609-02-04': 1, '1612-12-04': 1, '1615-10-13': 1, '1618-04-04': 1, '1615-05-03': 1, '1608-06-25': 1, '1605-04-01': 1}",
   'genero': u"{'': 1, 'Teatro': 4, 'Ficcion': 18, 'Poesia': 14}",
   'group': 1,
   'inst': u"{u'Colegio de la Madre de Dios de los Teologos': 1}",
   'label': 'Francisco Murcia de la Llana',
   'lugar': u"{u'Alcala': 3, '': 8, u'Bruselas': 1, u'Madrid': 22}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'Poesia',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Madrid',
   'type': u'Persona'}),
 ('212',
  {'avg_date': u'1612',
   'doc_type': u"{u'Privilegio/Licencia': 1, u'Impresion': 15, u'Otro documento': 1}",
   'fecha': u"{'': 1, '1607-07-17': 1, '1612-02-09': 1, '1609-02-10': 1, '1605-02-09': 1, '1618-01-01': 1, '1605-01-01': 1, '1615-11-05': 1, '1612-11-06': 1, '1617-08-18': 1, '1618-06-25': 1, '1617-09-24': 1, '1613-08-12': 1, '1617-01-01': 1, '1617-06-25': 1, '1608-06-25': 1, '1605-04-01': 1}",
   'genero': u"{'': 1, 'Teatro': 1, 'Ficcion': 11, 'Poesia': 2}",
   'group': 1,
   'label': 'Juan de la Cuesta',
   'lugar': u"{'': 1, u'Madrid': 16}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'Poesia',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Madrid',
   'type': u'Persona'}),
 ('219',
  {'avg_date': u'1607',
   'doc_type': u"{u'Impresion': 1}",
   'fecha': u"{'1607-02-23': 1}",
   'genero': u"{'Poesia': 1}",
   'group': 2,
   'label': 'Jaime Cendrat',
   'lugar': u"{u'Barcelona': 1}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Poesia',
   'top_place': u'Barcelona',
   'type': u'Persona'}),
 ('133',
  {'avg_date': u'1617',
   'doc_type': u"{u'Aprobacion': 1}",
   'fecha': u"{'1617-09-12': 1}",
   'genero': u"{'Ficcion': 1}",
   'group': 3,
   'inst': u"{u'Consejo de Navarra': 1, u'Convento de San Agustin': 1}",
   'label': 'Geronimo de Parada, Fray',
   'lugar': u"{u'Pamplona': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Pamplona',
   'type': u'Persona'}),
 ('132',
  {'avg_date': u'1615',
   'doc_type': u"{u'Privilegio/Licencia': 2, u'Impresion': 4}",
   'fecha': u"{'1614-01-11': 2, '1617-09-17': 1, '1617-11-17': 1, '1615-01-01': 1, '1617-01-01': 1}",
   'genero': u"{'Ficcion': 4}",
   'group': 3,
   'label': 'Nicolas de Assiayn',
   'lugar': u"{u'Pamplona': 6}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Pamplona',
   'type': u'Persona'}),
 ('131',
  {'avg_date': u'1615',
   'doc_type': u"{u'Privilegio/Licencia': 2}",
   'fecha': u"{'1617-09-17': 1, '1614-01-11': 1}",
   'genero': u"{'Ficcion': 4}",
   'group': 3,
   'inst': u"{u'Consejo de Navarra': 1}",
   'label': 'Pedro de Zunzarren',
   'lugar': u"{u'Pamplona': 2}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Pamplona',
   'type': u'Persona'}),
 ('130',
  {'avg_date': u'1605',
   'doc_type': u"{u'Tasa': 3}",
   'fecha': u"{'1609-07-24': 1, '1602-11-30': 1, '1604-02-27': 1}",
   'genero': u"{'Teatro': 1, 'Ficcion': 1, 'Poesia': 1}",
   'group': 4,
   'inst': u"{u'Consejo de Castilla': 1}",
   'label': 'Francisco Martinez',
   'lugar': u"{u'Madrid': 1, u'Valladolid': 2}",
   'notas': u"{'Escribano de Camara': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'Ficcion',
   'second_place': u'Madrid',
   'top_genre': u'Teatro',
   'top_place': u'Valladolid',
   'type': u'Persona'}),
 ('137',
  {'avg_date': u'1610',
   'doc_type': u"{u'Tasa': 4}",
   'fecha': u"{'1609-04-01': 1, '1604-12-04': 1, '1614-09-24': 1, '1613-06-12': 1}",
   'genero': u"{'Teatro': 1, 'Ficcion': 3, 'Poesia': 2}",
   'group': 1,
   'inst': u"{u'Consejo de Castilla': 1}",
   'label': 'Juan Gallo de Andrada',
   'lugar': u"{u'Madrid': 3, u'Valladolid': 1}",
   'notas': u"{'Escribano de la Camara': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'Poesia',
   'second_place': u'Valladolid',
   'top_genre': u'Ficcion',
   'top_place': u'Madrid',
   'type': u'Persona'}),
 ('134',
  {'avg_date': u'1617',
   'doc_type': u"{u'Aprobacion': 1}",
   'fecha': u"{'1617-11-17': 1}",
   'genero': u"{'Ficcion': 1}",
   'group': 3,
   'inst': u"{u'Convento de San Francisco de Pamplona': 1, u'Orden de San Francisco': 1, u'Consejo de Navarra': 1}",
   'label': 'Leon de San Pedro, Fray',
   'lugar': u"{u'Pamplona': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Pamplona',
   'type': u'Persona'}),
 ('225',
  {'avg_date': u'1617',
   'doc_type': u"{u'Impresion': 2}",
   'fecha': u"{'1617-06-04': 1, '1617-01-01': 1}",
   'genero': u"{'Ficcion': 2}",
   'group': 2,
   'label': 'Bautista Sorita',
   'lugar': u"{u'Barcelona': 2}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Barcelona',
   'type': u'Persona'}),
 ('20',
  {'avg_date': u'1605',
   'doc_type': u"{u'Privilegio/Licencia': 2}",
   'fecha': u"{'1605-03-27': 1, '1605-03-25': 1}",
   'genero': u"{'Historia': 1, 'Ficcion': 1}",
   'group': 5,
   'inst': u"{u'Consejo de Inquisicion': 1}",
   'label': 'Costa',
   'lugar': u"{u'Lisboa': 2}",
   'notas': u"{'Nombre que aparece en publicaciones de Lisboa': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'Ficcion',
   'second_place': u'',
   'top_genre': u'Historia',
   'top_place': u'Lisboa',
   'type': u'Persona'}),
 ('223',
  {'avg_date': u'1617',
   'doc_type': u"{u'Privilegio/Licencia': 1}",
   'fecha': u"{'1617-08-18': 1}",
   'genero': u"{'Ficcion': 1}",
   'group': 6,
   'label': 'T. Berti',
   'lugar': u"{u'Bruselas': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Bruselas',
   'type': u'Persona'}),
 ('29',
  {'avg_date': u'1618',
   'doc_type': u"{u'Impresion': 1}",
   'fecha': u"{'1618-01-01': 1}",
   'genero': u"{'Poesia': 1}",
   'group': 2,
   'label': 'Esteban Liberos',
   'lugar': u"{u'Barcelona': 1}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Poesia',
   'top_place': u'Barcelona',
   'type': u'Persona'}),
 ('407',
  {'avg_date': u'1599',
   'doc_type': u"{u'Aprobacion': 1}",
   'fecha': u"{'1599-01-10': 1}",
   'genero': u"{'Poesia': 1}",
   'group': 1,
   'label': 'Antonio de Herrera',
   'lugar': u"{u'Madrid': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Poesia',
   'top_place': u'Madrid',
   'type': u'Persona'}),
 ('403',
  {'avg_date': u'1613',
   'doc_type': u"{u'Aprobacion': 4}",
   'fecha': u"{'': 2, '1617-11-16': 1, '1610-05-23': 1}",
   'genero': u"{'Ficcion': 1, 'Poesia': 3}",
   'group': 1,
   'inst': u"{u'Convento de la Santisima Trinidad': 1}",
   'label': 'Hortensio Felix Paravicino, Fray',
   'lugar': u"{'': 1, u'Madrid': 3}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'Ficcion',
   'second_place': u'',
   'top_genre': u'Poesia',
   'top_place': u'Madrid',
   'type': u'Persona'}),
 ('402',
  {'avg_date': u'1618',
   'doc_type': u"{u'Aprobacion': 1}",
   'fecha': u"{'1618-01-12': 1}",
   'genero': u"{'Ficcion': 1}",
   'group': 2,
   'inst': u"{u'Compania de Jesus': 1}",
   'label': 'Luis Pujol',
   'lugar': u"{u'Barcelona': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Barcelona',
   'type': u'Persona'}),
 ('8',
  {'avg_date': u'1617',
   'doc_type': u"{u'Aprobacion': 1}",
   'fecha': u"{'1617-01-27': 1}",
   'genero': u"{'Ficcion': 1}",
   'group': 7,
   'inst': u"{u'Archidiocesis de Valencia': 1}",
   'label': 'Domingo Abbad y Huerta',
   'lugar': u"{u'Valencia': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Valencia',
   'type': u'Persona'}),
 ('282',
  {'avg_date': u'1604',
   'doc_type': u"{u'Privilegio/Licencia': 1}",
   'fecha': u"{'1604-12-04': 1}",
   'genero': u"{'Ficcion': 1}",
   'group': 5,
   'label': 'Sebastiao Pereira',
   'lugar': u"{u'Lisboa': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Lisboa',
   'type': u'Persona'}),
 ('285',
  {'avg_date': u'1605',
   'doc_type': u"{u'Privilegio/Licencia': 1}",
   'fecha': u"{'1605-02-21': 1}",
   'genero': u"{'Historia': 1}",
   'group': 5,
   'label': 'Sousa',
   'lugar': u"{u'Lisboa': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Historia',
   'top_place': u'Lisboa',
   'type': u'Persona'}),
 ('7',
  {'avg_date': u'1616',
   'doc_type': u"{u'Privilegio/Licencia': 1}",
   'fecha': u"{'1616-05-27': 1}",
   'genero': u"{'Ficcion': 1}",
   'group': 7,
   'inst': u"{u'Archidiocesis de Valencia': 1}",
   'label': 'Juan Jusepe Martinez Rubio',
   'lugar': u"{u'Valencia': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Valencia',
   'type': u'Persona'}),
 ('120',
  {'avg_date': u'1614',
   'doc_type': u"{u'Privilegio/Licencia': 3}",
   'fecha': u"{'1616-08-22': 1, '1616-10-26': 1, '1612-01-27': 1}",
   'genero': u"{'Teatro': 1, 'Ficcion': 2}",
   'group': 5,
   'inst': u"{u'Consejo de Portugal': 1}",
   'label': 'Antonio Diaz Cardoso',
   'lugar': u"{u'Lisboa': 2, '': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'Teatro',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Lisboa',
   'type': u'Persona'}),
 ('262',
  {'avg_date': u'1603',
   'doc_type': u"{u'Privilegio/Licencia': 1}",
   'fecha': u"{'1603-09-24': 1}",
   'genero': u"{'Ficcion': 1}",
   'group': 4,
   'inst': u"{u'Condado de Villalonga': 1}",
   'label': 'Pedro Franqueza, Conde de Villalonga',
   'lugar': u"{u'Valladolid': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Valladolid',
   'type': u'Persona'}),
 ('123',
  {'avg_date': u'1600',
   'doc_type': u"{u'Impresion': 1}",
   'fecha': u"{'1600-01-18': 1}",
   'genero': u"{'Ficcion': 1}",
   'group': 5,
   'label': 'Luis Perez',
   'lugar': u"{u'Lisboa': 1}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Lisboa',
   'type': u'Persona'}),
 ('124',
  {'avg_date': u'1600',
   'doc_type': u"{u'Aprobacion': 1}",
   'fecha': u"{'1600-01-07': 1}",
   'genero': u"{'Ficcion': 1}",
   'group': 5,
   'label': 'Antonio Tarrique, Fray',
   'lugar': u"{u'Lisboa': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Lisboa',
   'type': u'Persona'}),
 ('266',
  {'avg_date': u'1617',
   'doc_type': u"{u'Aprobacion': 1}",
   'fecha': u"{'1617-04-13': 1}",
   'genero': u"{'Historia': 1}",
   'group': 8,
   'label': 'Diego de la Huerta',
   'lugar': u"{u'Zaragoza': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Historia',
   'top_place': u'Zaragoza',
   'type': u'Persona'}),
 ('126',
  {'avg_date': u'1601',
   'doc_type': u"{u'Impresion': 1}",
   'fecha': u"{'1601-01-01': 1}",
   'genero': u"{'Ficcion': 1}",
   'group': 1,
   'label': 'Juan Martinez',
   'lugar': u"{u'Madrid': 1}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Madrid',
   'type': u'Persona'}),
 ('176',
  {'avg_date': u'1602',
   'doc_type': u"{u'Privilegio/Licencia': 1}",
   'fecha': u"{'1602-11-12': 1}",
   'genero': u"{'Ficcion': 1}",
   'group': 8,
   'inst': u"{u'Virreinato de Aragon': 1}",
   'label': 'Ascario Colonna, Cardenal, Virrey de Aragon',
   'lugar': u"{u'Zaragoza': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Zaragoza',
   'type': u'Persona'}),
 ('55',
  {'avg_date': u'1610',
   'doc_type': u"{u'Privilegio/Licencia': 2}",
   'fecha': u"{'1614-05-10': 1, '1607-11-07': 1}",
   'genero': u"{'Ficcion': 2}",
   'group': 6,
   'inst': u"{u'Consejo de Flandes': 1}",
   'label': 'P. Piermans',
   'lugar': u"{u'Bruselas': 2}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Bruselas',
   'type': u'Persona'}),
 ('362',
  {'avg_date': u'1614',
   'doc_type': u"{u'Privilegio/Licencia': 4, u'Impresion': 6}",
   'fecha': u"{'1614-01-01': 1, '1618-01-01': 1, '1610-11-07': 1, '1617-08-18': 1, '1611-01-01': 1, '1614-05-10': 2, '1617-01-01': 1, '1616-02-04': 2}",
   'genero': u"{'Teatro': 1, 'Ficcion': 5}",
   'group': 6,
   'label': 'Huberto Antonio',
   'lugar': u"{u'Bruselas': 10}",
   'notas': u"{'Impresor de sus Altezas': 1}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'Teatro',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Bruselas',
   'type': u'Persona'}),
 ('53',
  {'avg_date': u'1613',
   'doc_type': u"{u'Aprobacion': 1}",
   'fecha': u"{'1613-09-29': 1}",
   'genero': u"{'Ficcion': 3}",
   'group': 3,
   'inst': u"{u'Consejo de Navarra': 1}",
   'label': 'Pedro de Olivares, Fray',
   'lugar': u"{u'Pamplona': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Pamplona',
   'type': u'Persona'}),
 ('415',
  {'avg_date': u'',
   'doc_type': u"{u'Privilegio/Licencia': 3}",
   'fecha': u"{'': 3}",
   'genero': u"{'Ficcion': 3}",
   'group': 2,
   'label': 'De Vall',
   'lugar': u"{u'Barcelona': 3}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Barcelona',
   'type': u'Persona'}),
 ('416',
  {'avg_date': u'',
   'doc_type': u"{u'Privilegio/Licencia': 3}",
   'fecha': u"{'': 3}",
   'genero': u"{'Ficcion': 3}",
   'group': 2,
   'label': 'De Salba',
   'lugar': u"{u'Barcelona': 3}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Barcelona',
   'type': u'Persona'}),
 ('410',
  {'avg_date': u'1605',
   'doc_type': u"{u'Privilegio/Licencia': 1, u'Impresion': 2}",
   'fecha': u"{'1607-01-01': 1, '1605-01-01': 1, '1604-09-20': 1}",
   'genero': u"{'Teatro': 1, 'Ficcion': 1}",
   'group': 9,
   'label': 'Martin Nucio',
   'lugar': u"{u'Amberes': 1, u'Bruselas': 1, u'Anvers': 1}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'Ficcion',
   'second_place': u'Bruselas',
   'top_genre': u'Teatro',
   'top_place': u'Amberes',
   'type': u'Persona'}),
 ('371',
  {'avg_date': u'1601',
   'doc_type': u"{u'Impresion': 3}",
   'fecha': u"{'1602-11-30': 1, '1603-01-01': 1, '1599-03-17': 1}",
   'genero': u"{'Poesia': 3}",
   'group': 1,
   'label': 'Pedro Madrigal',
   'lugar': u"{u'Madrid': 3}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Poesia',
   'top_place': u'Madrid',
   'type': u'Persona'}),
 ('370',
  {'avg_date': u'1617',
   'doc_type': u"{u'Aprobacion': 2}",
   'fecha': u"{'1618-04-19': 1, '1616-08-01': 1}",
   'genero': u"{'Ficcion': 1, 'Poesia': 1}",
   'group': 2,
   'inst': u"{u'Convento de Santa Caterina': 1, u'Orden de los predicadores': 1, u'Diocesis de Barcelona': 1}",
   'label': 'Onofre de Requesens',
   'lugar': u"{u'Barcelona': 2}",
   'notas': u"{'Prior del Convento de Santa Caterina': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'Poesia',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Barcelona',
   'type': u'Persona'}),
 ('375',
  {'avg_date': u'1615',
   'doc_type': u"{u'Tasa': 2, u'Privilegio/Licencia': 1}",
   'fecha': u"{'1615-06-05': 1, '1615-10-19': 1, '1615-06-13': 1}",
   'genero': u"{'Teatro': 2, 'Poesia': 2}",
   'group': 1,
   'inst': u"{u'Consejo de Castilla': 1}",
   'label': 'Juan de Jerez',
   'lugar': u"{u'Madrid': 2, u'Valladolid': 1}",
   'notas': u"{'Escribano de Camara': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'Poesia',
   'second_place': u'Valladolid',
   'top_genre': u'Teatro',
   'top_place': u'Madrid',
   'type': u'Persona'}),
 ('290',
  {'avg_date': u'1614',
   'doc_type': u"{u'Impresion': 2}",
   'fecha': u"{'1613-01-01': 1, '1615-01-01': 1}",
   'genero': u"{'Historia': 1, 'Poesia': 1}",
   'group': 10,
   'label': 'Matias Clavijo',
   'lugar': u"{u'Sevilla': 2}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'Poesia',
   'second_place': u'',
   'top_genre': u'Historia',
   'top_place': u'Sevilla',
   'type': u'Persona'}),
 ('201',
  {'avg_date': u'1604',
   'doc_type': u"{u'Impresion': 2}",
   'fecha': u"{'1604-01-01': 1, '1604-02-27': 1}",
   'genero': u"{'Ficcion': 1, 'Poesia': 1}",
   'group': 10,
   'label': 'Clemente Hidalgo',
   'lugar': u"{u'Sevilla': 2}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'Poesia',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Sevilla',
   'type': u'Persona'}),
 ('319',
  {'avg_date': u'1617',
   'doc_type': u"{u'Impresion': 1}",
   'fecha': u"{'1617-01-01': 1}",
   'genero': u"{'Ficcion': 1}",
   'group': 11,
   'label': 'Pedro Bellero',
   'lugar': u"{u'Anvers': 1}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Anvers',
   'type': u'Persona'}),
 ('199',
  {'avg_date': u'1616',
   'doc_type': u"{u'Aprobacion': 1}",
   'fecha': u"{'1616-06-06': 1}",
   'genero': u"{'Poesia': 1}",
   'group': 12,
   'inst': u"{u'Diocesis de Lerida': 1}",
   'label': 'Doctor Galipienzo',
   'lugar': u"{u'Lerida': 1}",
   'notas': u"{'Catedratico de prima de Lerida': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Poesia',
   'top_place': u'Lerida',
   'type': u'Persona'}),
 ('66',
  {'avg_date': u'1598',
   'doc_type': u"{u'Aprobacion': 1}",
   'fecha': u"{'1598-01-13': 1}",
   'genero': u"{'': 1, 'Ficcion': 2}",
   'group': 1,
   'inst': u"{u'Consejo de Castilla': 1}",
   'label': 'Diego Davilo, Fray',
   'lugar': u"{u'Madrid': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Madrid',
   'type': u'Persona'}),
 ('147',
  {'avg_date': u'1603',
   'doc_type': u"{u'Aprobacion': 4, u'Privilegio/Licencia': 1}",
   'fecha': u"{'1604-08-04': 1, '1603-05-15': 1, '1603-11-25': 1, '1604-08-02': 1, '1603-12-11': 1}",
   'genero': u"{'': 1, 'Ficcion': 8}",
   'group': 4,
   'label': 'Tomas Gracian Dantisco',
   'lugar': u"{u'Valladolid': 5}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Valladolid',
   'type': u'Persona'}),
 ('311',
  {'avg_date': u'1602',
   'doc_type': u"{u'Impresion': 1}",
   'fecha': u"{'1602-08': 1}",
   'genero': u"{'Ficcion': 1}",
   'group': 2,
   'label': 'Juan Amello',
   'lugar': u"{u'Barcelona': 1}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Barcelona',
   'type': u'Persona'}),
 ('203',
  {'avg_date': u'1617',
   'doc_type': u"{u'Aprobacion': 1}",
   'fecha': u"{'1617-07-05': 1}",
   'genero': u"{'Ficcion': 1}",
   'group': 6,
   'label': 'Henry Smeyers',
   'lugar': u"{u'Bruselas': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Bruselas',
   'type': u'Persona'}),
 ('391',
  {'avg_date': u'1612',
   'doc_type': u"{u'Privilegio/Licencia': 5}",
   'fecha': u"{'1616-08-22': 1, '1609-12-16': 1, '1609-09-23': 1, '1612-01-27': 1, '1618-07-24': 1}",
   'genero': u"{'Teatro': 1, 'Ficcion': 1, 'Poesia': 2}",
   'group': 5,
   'inst': u"{u'Consejo de Inquisicion': 1, u'Consejo de Portugal': 1}",
   'label': 'Bertolameu da Fonseca',
   'lugar': u"{u'Lisboa': 5}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'Teatro',
   'second_place': u'',
   'top_genre': u'Poesia',
   'top_place': u'Lisboa',
   'type': u'Persona'}),
 ('271',
  {'avg_date': u'1611',
   'doc_type': u"{u'Aprobacion': 1}",
   'fecha': u"{'1611-01-04': 1}",
   'genero': u"{'Ficcion': 2}",
   'group': 12,
   'inst': u"{u'Diocesis de Lerida': 1}",
   'label': 'Antonio Castro, Vicario General de Lerida',
   'lugar': u"{u'Lerida': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Lerida',
   'type': u'Persona'}),
 ('397',
  {'avg_date': u'1611',
   'doc_type': u"{u'Privilegio/Licencia': 2}",
   'fecha': u"{'1614-06-30': 1, '1609-03-15': 1}",
   'genero': u"{'Poesia': 2}",
   'group': 1,
   'label': 'Jorge de Tovar Berrio',
   'lugar': u"{u'Madrid': 2}",
   'notas': u"{'Mayordomo del santisimo sacramento de la parroquial de Toledo': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Poesia',
   'top_place': u'Madrid',
   'type': u'Persona'}),
 ('395',
  {'avg_date': u'1609',
   'doc_type': u"{u'Privilegio/Licencia': 1}",
   'fecha': u"{'1609-03-15': 1}",
   'genero': u"{'Poesia': 1}",
   'group': 1,
   'label': 'Alonso Ordonez de San Pedro',
   'lugar': u"{u'Madrid': 1}",
   'notas': u"{'Mayordomo del santisimo sacramento de la parroquial de Toledo': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Poesia',
   'top_place': u'Madrid',
   'type': u'Persona'}),
 ('394',
  {'avg_date': u'1616',
   'doc_type': u"{u'Privilegio/Licencia': 1}",
   'fecha': u"{'1616-02-04': 1}",
   'genero': u"{'Ficcion': 1}",
   'group': 6,
   'label': 'DeVitte',
   'lugar': u"{u'Bruselas': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Bruselas',
   'type': u'Persona'}),
 ('205',
  {'avg_date': u'1613',
   'doc_type': u"{u'Privilegio/Licencia': 2}",
   'fecha': u"{'1613-08-09': 1, '1613-08-23': 1}",
   'genero': u"{'Ficcion': 2, 'Poesia': 1}",
   'group': 1,
   'inst': u"{u'San Lorenzo el Real de El Escorial': 1}",
   'label': 'Francisco Gassoi',
   'lugar': u"{u'Madrid': 2}",
   'notas': u"{'\xc2\xbfGasol?': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'Poesia',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Madrid',
   'type': u'Persona'}),
 ('86',
  {'avg_date': u'1604',
   'doc_type': u"{u'Fe de erratas': 1}",
   'fecha': u"{'1604-07-07': 1}",
   'genero': u"{'Teatro': 2}",
   'group': 4,
   'label': 'Alonso Vaca de Santiago',
   'lugar': u"{u'Valladolid': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Teatro',
   'top_place': u'Valladolid',
   'type': u'Persona'}),
 ('84',
  {'avg_date': u'1604',
   'doc_type': u"{u'Privilegio/Licencia': 1}",
   'fecha': u"{'1604-07-29': 1}",
   'genero': u"{'Ficcion': 1}",
   'group': 2,
   'label': 'Francisco Pous',
   'lugar': u"{u'Barcelona': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Barcelona',
   'type': u'Persona'}),
 ('207',
  {'avg_date': u'1608',
   'doc_type': u"{u'Impresion': 6}",
   'fecha': u"{'1605-03-01': 1, '1603-02-26': 1, '1605-01-01': 1, '1618-07-24': 1, '1617-01-17': 1, '1600-01-18': 1}",
   'genero': u"{'Teatro': 1, 'Ficcion': 4, 'Poesia': 1}",
   'group': 5,
   'label': 'Jorge Rodriguez',
   'lugar': u"{u'Lisboa': 6}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'Teatro',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Lisboa',
   'type': u'Persona'}),
 ('206',
  {'avg_date': u'1605',
   'doc_type': u"{u'Aprobacion': 5}",
   'fecha': u"{'1605-03-27': 1, '1609-12-15': 1, '1605-02-26': 1, '1604-09-07': 1, '1604-08-26': 1}",
   'genero': u"{'Teatro': 1, 'Ficcion': 3, 'Poesia': 1}",
   'group': 5,
   'inst': u"{u'Consejo de Inquisicion': 1}",
   'label': 'Antonio Freire, Fray',
   'lugar': u"{u'Lisboa': 5}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'Teatro',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Lisboa',
   'type': u'Persona'}),
 ('4',
  {'avg_date': u'1603',
   'doc_type': u"{u'Privilegio/Licencia': 1}",
   'fecha': u"{'1603-12-11': 1}",
   'genero': u"{'Teatro': 1}",
   'group': 8,
   'inst': u"{u'Archidiocesis de Zaragoza': 1}",
   'label': 'Pedro de Moya, vicario general',
   'lugar': u"{u'Zaragoza': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Teatro',
   'top_place': u'Zaragoza',
   'type': u'Persona'}),
 ('226',
  {'avg_date': u'1617',
   'doc_type': u"{u'Impresion': 2}",
   'fecha': u"{'1617-01-27': 1, '1617-06-04': 1}",
   'genero': u"{'Ficcion': 2}",
   'group': 2,
   'label': 'Joan Simon',
   'lugar': u"{u'Barcelona': 2}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Barcelona',
   'type': u'Persona'}),
 ('369',
  {'avg_date': u'1607',
   'doc_type': u"{u'Aprobacion': 1}",
   'fecha': u"{'1607-02-20': 1}",
   'genero': u"{'Poesia': 1}",
   'group': 2,
   'inst': u"{u'Convento de Santa Caterina': 1}",
   'label': 'Tomas de Olivon',
   'lugar': u"{u'Barcelona': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Poesia',
   'top_place': u'Barcelona',
   'type': u'Persona'}),
 ('366',
  {'avg_date': u'1613',
   'doc_type': u"{u'Privilegio/Licencia': 1}",
   'fecha': u"{'1613-03-06': 1}",
   'genero': u"{'Historia': 1}",
   'group': 13,
   'inst': u"{u'Diocesis de Cordoba': 1}",
   'label': 'Diego de Mardones, Obispo de Cordoba',
   'lugar': u"{u'Cordoba': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Historia',
   'top_place': u'Cordoba',
   'type': u'Persona'}),
 ('367',
  {'avg_date': u'1617',
   'doc_type': u"{u'Impresion': 1}",
   'fecha': u"{'1617-01-01': 1}",
   'genero': u"{'Historia': 1}",
   'group': 13,
   'label': 'Barrera',
   'lugar': u"{u'Cordoba': 1}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Historia',
   'top_place': u'Cordoba',
   'type': u'Persona'}),
 ('422',
  {'avg_date': u'1600',
   'doc_type': u"{u'Impresion': 1}",
   'fecha': u"{'1600-01-04': 1}",
   'genero': u"{'Ficcion': 1}",
   'group': 14,
   'label': 'Diogo Gomez Loureiro',
   'lugar': u"{u'Coimbra': 1}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Coimbra',
   'type': u'Persona'}),
 ('425',
  {'avg_date': u'1605',
   'doc_type': u"{u'Impresion': 1}",
   'fecha': u"{'1605-07-18': 1}",
   'genero': u"{'Ficcion': 1}",
   'group': 7,
   'label': 'Pedro Patricio Mey',
   'lugar': u"{u'Valencia': 1}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Valencia',
   'type': u'Persona'}),
 ('424',
  {'avg_date': u'1605',
   'doc_type': u"{u'Impresion': 1}",
   'fecha': u"{'1605-07-18': 1}",
   'genero': u"{'Ficcion': 1}",
   'group': 7,
   'label': 'Jusepe Ferrer',
   'lugar': u"{u'Valencia': 1}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Valencia',
   'type': u'Persona'}),
 ('426',
  {'avg_date': u'1605',
   'doc_type': u"{u'Aprobacion': 1}",
   'fecha': u"{'1605-07-18': 1}",
   'genero': u"{'Ficcion': 2}",
   'group': 7,
   'label': 'Luis Pellicer, Fray',
   'lugar': u"{u'Valencia': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Valencia',
   'type': u'Persona'}),
 ('309',
  {'avg_date': u'1618',
   'doc_type': u"{u'Privilegio/Licencia': 1, u'Impresion': 1}",
   'fecha': u"{'1618-03-06': 1, '1618-01-29': 1}",
   'genero': u"{'Ficcion': 1}",
   'group': 1,
   'label': 'Domingo Gonzalez',
   'lugar': u"{u'Madrid': 2}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Madrid',
   'type': u'Persona'}),
 ('303',
  {'avg_date': u'1615',
   'doc_type': u"{u'Privilegio/Licencia': 2}",
   'fecha': u"{'1613-12-23': 1, '1617-11-07': 1}",
   'genero': u"{'Teatro': 1, 'Ficcion': 1}",
   'group': 1,
   'inst': u"{u'Consejo de Castilla': 1}",
   'label': 'Jorge Olaal de Vergara',
   'lugar': u"{u'Madrid': 2}",
   'notas': u"{'Chanciller mayor': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'Ficcion',
   'second_place': u'',
   'top_genre': u'Teatro',
   'top_place': u'Madrid',
   'type': u'Persona'}),
 ('247',
  {'avg_date': u'1612',
   'doc_type': u"{u'Aprobacion': 1}",
   'fecha': u"{'1612-02-18': 1}",
   'genero': u"{'Poesia': 1}",
   'group': 1,
   'label': 'Alfonso Remon, Fray',
   'lugar': u"{u'Madrid': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Poesia',
   'top_place': u'Madrid',
   'type': u'Persona'}),
 ('246',
  {'avg_date': u'1598',
   'doc_type': u"{u'Aprobacion': 2}",
   'fecha': u"{'1598-08-06': 1, '1599-01-22': 1}",
   'genero': u"{'Ficcion': 6, 'Poesia': 3}",
   'group': 1,
   'inst': u"{u'Convento de nuestra senora del Carmen': 1, u'Orden de los carmelitas': 1}",
   'label': 'Pedro de Padilla, Fray',
   'lugar': u"{u'Madrid': 2}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'Poesia',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Madrid',
   'type': u'Persona'}),
 ('102',
  {'avg_date': u'1614',
   'doc_type': u"{u'Aprobacion': 3}",
   'fecha': u"{'1613-05-05': 1, '1614-01-06': 1, '1617-06-10': 1}",
   'genero': u"{'Historia': 2, 'Ficcion': 1}",
   'group': 1,
   'inst': u"{u'Consejo de Castilla': 1}",
   'label': 'Pedro de Valencia',
   'lugar': u"{u'Madrid': 3}",
   'notas': u"{'Coronista del Rey': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'Ficcion',
   'second_place': u'',
   'top_genre': u'Historia',
   'top_place': u'Madrid',
   'type': u'Persona'}),
 ('103',
  {'avg_date': u'1602',
   'doc_type': u"{u'Privilegio/Licencia': 1}",
   'fecha': u"{'1602-08-20': 1}",
   'genero': u"{'Ficcion': 1}",
   'group': 7,
   'label': 'Francisco Paulus Alreus',
   'lugar': u"{u'Valencia': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Valencia',
   'type': u'Persona'}),
 ('100',
  {'avg_date': u'1614',
   'doc_type': u"{u'Aprobacion': 13}",
   'fecha': u"{'': 1, '1611-03-29': 1, '1614-12-11': 1, '1614-09-16': 1, '1617-07-24': 1, '1615-11-05': 1, '1616-12-19': 1, '1612-12-30': 1, '1614-10-03': 1, '1617-09-24': 1, '1609-08-01': 1, '1612-07-09': 1, '1617-05-16': 1}",
   'genero': u"{'Teatro': 8, 'Ficcion': 14, 'Poesia': 3}",
   'group': 1,
   'inst': u"{u'Consejo de Castilla': 1}",
   'label': 'Gutierre de Cetina, Vicario General',
   'lugar': u"{'': 1, u'Madrid': 12}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'Teatro',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Madrid',
   'type': u'Persona'}),
 ('101',
  {'avg_date': u'1616',
   'doc_type': u"{u'Privilegio/Licencia': 8}",
   'fecha': u"{'1615-11-21': 1, '1615-03-30': 1, '1616-09-24': 1, '1617-08-09': 1, '1617-06-25': 1, '1615-01-24': 1, '1617-11-26': 1, '1617-01-19': 1}",
   'genero': u"{'Ficcion': 7, 'Poesia': 2}",
   'group': 1,
   'inst': u"{u'Consejo de Castilla': 1}",
   'label': 'Pedro de Contreras',
   'lugar': u"{u'Madrid': 7, u'Arganda del Rey': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'Poesia',
   'second_place': u'Arganda del Rey',
   'top_genre': u'Ficcion',
   'top_place': u'Madrid',
   'type': u'Persona'}),
 ('106',
  {'avg_date': u'1617',
   'doc_type': u"{u'Privilegio/Licencia': 1}",
   'fecha': u"{'1617-08-15': 1}",
   'genero': u"{'Historia': 1}",
   'group': 8,
   'inst': u"{u'Archidiocesis de Zaragoza': 1}",
   'label': 'Pedro de Molina, Vicario General de Zaragoza',
   'lugar': u"{u'Zaragoza': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Historia',
   'top_place': u'Zaragoza',
   'type': u'Persona'}),
 ('107',
  {'avg_date': u'',
   'doc_type': u"{u'Privilegio/Licencia': 1}",
   'fecha': u"{'': 1}",
   'genero': u"{'Ficcion': 1}",
   'group': 2,
   'inst': u"{u'Diocesis de Barcelona': 1}",
   'label': 'Cellers',
   'lugar': u"{u'Barcelona': 1}",
   'notas': u"{'Vicario General de diocesis de Barcelona': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Barcelona',
   'type': u'Persona'}),
 ('104',
  {'avg_date': u'1617',
   'doc_type': u"{u'Privilegio/Licencia': 1}",
   'fecha': u"{'1617-04-18': 1}",
   'genero': u"{'Historia': 1}",
   'group': 8,
   'inst': u"{u'Marquesado de Gelves': 1, u'Condado de Priego': 1, u'Virreinato de Aragon': 1, u'Consejo de Aragon': 1}",
   'label': 'Diego Carrillo de Mendoza y Pimentel, Virrey de Aragon',
   'lugar': u"{u'Zaragoza': 1}",
   'notas': u"{'Marques de Gelbes': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Historia',
   'top_place': u'Zaragoza',
   'type': u'Persona'}),
 ('105',
  {'avg_date': u'1617',
   'doc_type': u"{u'Aprobacion': 1}",
   'fecha': u"{'1617-04-16': 1}",
   'genero': u"{'Historia': 1}",
   'group': 8,
   'label': 'Agustin de Morlanes',
   'lugar': u"{u'Zaragoza': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Historia',
   'top_place': u'Zaragoza',
   'type': u'Persona'}),
 ('39',
  {'avg_date': u'1607',
   'doc_type': u"{u'Impresion': 5}",
   'fecha': u"{'1612-01-30': 1, '1605-03-08': 1, '1604-12-04': 1, '1605-03-29': 1, '1609-09-02': 1}",
   'genero': u"{'Historia': 2, 'Teatro': 1, 'Ficcion': 2}",
   'group': 5,
   'label': 'Pedro Crasbeeck',
   'lugar': u"{u'Lisboa': 5}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'Ficcion',
   'second_place': u'',
   'top_genre': u'Historia',
   'top_place': u'Lisboa',
   'type': u'Persona'}),
 ('108',
  {'avg_date': u'1602',
   'doc_type': u"{u'Aprobacion': 1}",
   'fecha': u"{'1602-08-08': 1}",
   'genero': u"{'Ficcion': 1}",
   'group': 7,
   'label': 'Pedro Juan Asensio',
   'lugar': u"{u'Valencia': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Valencia',
   'type': u'Persona'}),
 ('177',
  {'avg_date': u'1603',
   'doc_type': u"{u'Privilegio/Licencia': 2, u'Impresion': 1}",
   'fecha': u"{'1602-11-12': 1, '1603-10-15': 1, '1604-01-01': 1}",
   'genero': u"{'Teatro': 1, 'Ficcion': 1}",
   'group': 8,
   'label': 'Angelo Tavanno',
   'lugar': u"{u'Zaragoza': 3}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'Ficcion',
   'second_place': u'',
   'top_genre': u'Teatro',
   'top_place': u'Zaragoza',
   'type': u'Persona'}),
 ('109',
  {'avg_date': u'1612',
   'doc_type': u"{u'Aprobacion': 2}",
   'fecha': u"{'1612-05-10': 1, '1612-07-09': 1}",
   'genero': u"{'Ficcion': 4, 'Poesia': 1}",
   'group': 1,
   'inst': u"{u'Convento de la Santisima Trinidad': 1}",
   'label': 'Juan Bautista',
   'lugar': u"{u'Madrid': 2}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'Poesia',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Madrid',
   'type': u'Persona'}),
 ('439',
  {'avg_date': u'1609',
   'doc_type': u"{u'Impresion': 6}",
   'fecha': u"{'1611-01-01': 1, '1609-04-01': 1, '1611-04-14': 1, '1609-01-01': 1, '1609-11-18': 1, '1608-01-01': 1}",
   'genero': u"{'Teatro': 1, 'Ficcion': 2, 'Poesia': 3}",
   'group': 1,
   'label': 'Alonso Martin',
   'lugar': u"{'': 2, u'Madrid': 4}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'Ficcion',
   'second_place': u'',
   'top_genre': u'Poesia',
   'top_place': u'Madrid',
   'type': u'Persona'}),
 ('436',
  {'avg_date': u'1602',
   'doc_type': u"{u'Tasa': 2, u'Privilegio/Licencia': 2}",
   'fecha': u"{'1599-04-26': 1, '1604-08-11': 1, '1607-08-11': 1, '1599-02-16': 1}",
   'genero': u"{'Ficcion': 1, 'Poesia': 3}",
   'group': 1,
   'inst': u"{u'Consejo de Castilla': 1}",
   'label': 'Alonso de Vallejo',
   'lugar': u"{u'Madrid': 2, u'Valladolid': 1, u'Oliva': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'Ficcion',
   'second_place': u'Valladolid',
   'top_genre': u'Poesia',
   'top_place': u'Madrid',
   'type': u'Persona'}),
 ('437',
  {'avg_date': u'1610',
   'doc_type': u"{u'Privilegio/Licencia': 2, u'Impresion': 7}",
   'fecha': u"{'1614-09-24': 1, '1615-10-19': 1, '1604-02-20': 1, '1609-08-11': 1, '1611-01-01': 1, '1611-04-14': 1, '1609-01-01': 1, '1609-11-18': 1, '1608-01-01': 1}",
   'genero': u"{'Teatro': 3, 'Ficcion': 3, 'Poesia': 4}",
   'group': 1,
   'label': 'Alonso Perez',
   'lugar': u"{'': 2, u'Madrid': 6, u'Valladolid': 1}",
   'notas': u"{'Mercader de libros': 1}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'Teatro',
   'second_place': u'',
   'top_genre': u'Poesia',
   'top_place': u'Madrid',
   'type': u'Persona'}),
 ('339',
  {'avg_date': u'1610',
   'doc_type': u"{u'Privilegio/Licencia': 3}",
   'fecha': u"{'1612-01-27': 1, '1610-11-24': 1, '1609-09-02': 1}",
   'genero': u"{'Historia': 1, 'Teatro': 1, 'Poesia': 1}",
   'group': 5,
   'inst': u"{u'Consejo de Inquisicion': 1}",
   'label': 'Sarayua',
   'lugar': u"{'': 1, u'Lisboa': 2}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'Teatro',
   'second_place': u'',
   'top_genre': u'Historia',
   'top_place': u'Lisboa',
   'type': u'Persona'}),
 ('338',
  {'avg_date': u'1608',
   'doc_type': u"{u'Aprobacion': 2, u'Privilegio/Licencia': 1}",
   'fecha': u"{'1616-08-22': 1, '1604-11-26': 1, '1604-11-16': 1}",
   'genero': u"{'Historia': 2, 'Ficcion': 1}",
   'group': 5,
   'inst': u"{u'Consejo de Inquisicion': 1, u'Convento de Sao Francisco': 1}",
   'label': 'Luis dos Anjos',
   'lugar': u"{u'Lisboa': 3}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'Ficcion',
   'second_place': u'',
   'top_genre': u'Historia',
   'top_place': u'Lisboa',
   'type': u'Persona'}),
 ('334',
  {'avg_date': u'1607',
   'doc_type': u"{u'Impresion': 1}",
   'fecha': u"{'1607-01-01': 1}",
   'genero': u"{'Poesia': 1}",
   'group': 15,
   'label': 'Juan Gracian',
   'lugar': u"{u'Alcala': 1}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Poesia',
   'top_place': u'Alcala',
   'type': u'Persona'}),
 ('337',
  {'avg_date': u'1605',
   'doc_type': u"{u'Privilegio/Licencia': 3}",
   'fecha': u"{'1605-03-27': 1, '1605-03-25': 1, '1605-02-21': 1}",
   'genero': u"{'Historia': 2, 'Ficcion': 1}",
   'group': 5,
   'inst': u"{u'Consejo de Inquisicion': 1}",
   'label': "Damiao d'Aguiar",
   'lugar': u"{u'Lisboa': 3}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'Ficcion',
   'second_place': u'',
   'top_genre': u'Historia',
   'top_place': u'Lisboa',
   'type': u'Persona'}),
 ('330',
  {'avg_date': u'1617',
   'doc_type': u"{u'Impresion': 1}",
   'fecha': u"{'1617-01-01': 1}",
   'genero': u"{'Ficcion': 1}",
   'group': 1,
   'label': 'Juan de Villaroel',
   'lugar': u"{u'Madrid': 1}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Madrid',
   'type': u'Persona'}),
 ('259',
  {'avg_date': u'1608',
   'doc_type': u"{u'Tasa': 10, u'Privilegio/Licencia': 5}",
   'fecha': u"{'1613-02-28': 1, '1610-11-10': 1, '1609-02-10': 1, '1612-12-16': 1, '1604-02-20': 1, '1609-08-11': 1, '1599-03-17': 1, '1612-02-09': 1, '1611-04-14': 1, '1605-07-14': 1, '1609-10-04': 1, '1612-10-11': 1, '1604-07-28': 1, '1611-06-22': 1, '1609-11-18': 1}",
   'genero': u"{'Teatro': 6, 'Ficcion': 1, 'Poesia': 5}",
   'group': 1,
   'inst': u"{u'Consejo de Castilla': 1}",
   'label': 'Miguel de Ondarza Zabala',
   'lugar': u"{'': 1, u'Madrid': 11, u'Valladolid': 3}",
   'notas': u"{'Escribano de Camara': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'Poesia',
   'second_place': u'Valladolid',
   'top_genre': u'Teatro',
   'top_place': u'Madrid',
   'type': u'Persona'}),
 ('65',
  {'avg_date': u'1599',
   'doc_type': u"{u'Tasa': 1}",
   'fecha': u"{'1599-03-04': 1}",
   'genero': u"{'': 1, 'Ficcion': 1}",
   'group': 1,
   'inst': u"{u'Consejo de Castilla': 1}",
   'label': 'Gonzalo de la Vega',
   'lugar': u"{u'Madrid': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'Ficcion',
   'second_place': u'',
   'top_genre': u'',
   'top_place': u'Madrid',
   'type': u'Persona'}),
 ('69',
  {'avg_date': u'1599',
   'doc_type': u"{u'Privilegio/Licencia': 1, u'Impresion': 2}",
   'fecha': u"{'1599-03-04': 1, '1598-02-16': 1, '1600-01-01': 1}",
   'genero': u"{'': 1, 'Ficcion': 2}",
   'group': 1,
   'label': 'Varez de Castro',
   'lugar': u"{u'Madrid': 3}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Madrid',
   'type': u'Persona'}),
 ('250',
  {'avg_date': u'1618',
   'doc_type': u"{u'Aprobacion': 1}",
   'fecha': u"{'1618-07-19': 1}",
   'genero': u"{'Poesia': 1}",
   'group': 5,
   'inst': u"{u'Consejo de Inquisicion': 1}",
   'label': 'Antonio dos Anjos',
   'lugar': u"{u'Lisboa': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Poesia',
   'top_place': u'Lisboa',
   'type': u'Persona'}),
 ('256',
  {'avg_date': u'1613',
   'doc_type': u"{u'Aprobacion': 1}",
   'fecha': u"{'1613-01-26': 1}",
   'genero': u"{'Historia': 1}",
   'group': 13,
   'inst': u"{u'Compania de Jesus': 1}",
   'label': 'Francisco de Castro',
   'lugar': u"{u'Cordoba': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Historia',
   'top_place': u'Cordoba',
   'type': u'Persona'}),
 ('257',
  {'avg_date': u'1612',
   'doc_type': u"{u'Privilegio/Licencia': 11}",
   'fecha': u"{'1614-11-15': 1, '1613-05-18': 1, '1609-03-15': 1, '1612-11-22': 1, '1609-02-08': 1, '1611-12-02': 1, '1614-01-21': 1, '1614-06-30': 1, '1614-10-18': 1, '1611-04-30': 1, '1612-06-03': 1}",
   'genero': u"{'Historia': 2, 'Teatro': 1, 'Ficcion': 3, 'Poesia': 6}",
   'group': 1,
   'inst': u"{u'Consejo de Castilla': 1}",
   'label': 'Jorge de Tovar',
   'lugar': u"{u'Madrid': 10, u'Aranjuez': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'Ficcion',
   'second_place': u'Aranjuez',
   'top_genre': u'Poesia',
   'top_place': u'Madrid',
   'type': u'Persona'}),
 ('344',
  {'avg_date': u'1599',
   'doc_type': u"{u'Impresion': 1}",
   'fecha': u"{'1599-04-30': 1}",
   'genero': u"{'Ficcion': 1}",
   'group': 2,
   'label': 'Giraldo Dotil',
   'lugar': u"{u'Barcelona': 1}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Barcelona',
   'type': u'Persona'}),
 ('288',
  {'avg_date': u'1604',
   'doc_type': u"{u'Impresion': 1}",
   'fecha': u"{'1604-01-01': 1}",
   'genero': u"{'Poesia': 1}",
   'group': 2,
   'label': 'Miguel Menescal',
   'lugar': u"{u'Barcelona': 1}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Poesia',
   'top_place': u'Barcelona',
   'type': u'Persona'}),
 ('88',
  {'avg_date': u'1603',
   'doc_type': u"{u'Privilegio/Licencia': 1}",
   'fecha': u"{'1603-10-15': 1}",
   'genero': u"{'Teatro': 1}",
   'group': 8,
   'label': 'Joannis Laurenti Descartin',
   'lugar': u"{u'Zaragoza': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Teatro',
   'top_place': u'Zaragoza',
   'type': u'Persona'}),
 ('182',
  {'avg_date': u'1599',
   'doc_type': u"{u'Privilegio/Licencia': 1}",
   'fecha': u"{'1599-04-30': 1}",
   'genero': u"{'Ficcion': 3}",
   'group': 2,
   'label': 'Julius Cordelles, Vicario General',
   'lugar': u"{u'Barcelona': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Barcelona',
   'type': u'Persona'}),
 ('180',
  {'avg_date': u'1602',
   'doc_type': u"{u'Aprobacion': 2}",
   'fecha': u"{'1602-11-08': 1, '1603-04-11': 1}",
   'genero': u"{'Teatro': 1, 'Ficcion': 1}",
   'group': 8,
   'label': 'Juan Briz Martinez',
   'lugar': u"{u'Zaragoza': 2}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'Ficcion',
   'second_place': u'',
   'top_genre': u'Teatro',
   'top_place': u'Zaragoza',
   'type': u'Persona'}),
 ('167',
  {'avg_date': u'1603',
   'doc_type': u"{u'Impresion': 2}",
   'fecha': u"{'1603-08-26': 2}",
   'genero': u"{'Ficcion': 2}",
   'group': 16,
   'label': 'Pedromartir Locarno',
   'lugar': u"{u'Milan': 2}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Milan',
   'type': u'Persona'}),
 ('187',
  {'avg_date': u'1607',
   'doc_type': u"{u'Privilegio/Licencia': 1}",
   'fecha': u"{'1607-11-07': 1}",
   'genero': u"{'Ficcion': 1}",
   'group': 6,
   'inst': u"{u'Consejo de Flandes': 1}",
   'label': 'Grimaldy',
   'lugar': u"{u'Bruselas': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Bruselas',
   'type': u'Persona'}),
 ('185',
  {'avg_date': u'1604',
   'doc_type': u"{u'Privilegio/Licencia': 1}",
   'fecha': u"{'1604-09-26': 1}",
   'genero': u"{'': 1}",
   'group': 4,
   'label': 'Antonio Rodriguez',
   'lugar': u"{u'Valladolid': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'',
   'top_place': u'Valladolid',
   'type': u'Persona'}),
 ('188',
  {'avg_date': u'1607',
   'doc_type': u"{u'Privilegio/Licencia': 1, u'Impresion': 1}",
   'fecha': u"{'1607-11-07': 1, '1608-01-01': 1}",
   'genero': u"{'Ficcion': 1}",
   'group': 6,
   'label': 'Olivero Brunello',
   'lugar': u"{u'Bruselas': 2}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Bruselas',
   'type': u'Persona'}),
 ('341',
  {'avg_date': u'1608',
   'doc_type': u"{u'Aprobacion': 1, u'Privilegio/Licencia': 1}",
   'fecha': u"{'1604-11-10': 1, '1613-08-23': 1}",
   'genero': u"{'Teatro': 1, 'Poesia': 1}",
   'group': 7,
   'label': 'Roig',
   'lugar': u"{u'Valencia': 1, u'Madrid': 1}",
   'notas': u"{'Vicecanciller encargado general de tesorero': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'Poesia',
   'second_place': u'Madrid',
   'top_genre': u'Teatro',
   'top_place': u'Valencia',
   'type': u'Persona'}),
 ('196',
  {'avg_date': u'1616',
   'doc_type': u"{u'Aprobacion': 1}",
   'fecha': u"{'1616-12-23': 1}",
   'genero': u"{'Ficcion': 2}",
   'group': 1,
   'label': 'Geronimo Alarcon',
   'lugar': u"{u'Madrid': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Madrid',
   'type': u'Persona'}),
 ('221',
  {'avg_date': u'1615',
   'doc_type': u"{u'Aprobacion': 1}",
   'fecha': u"{'1615-07-18': 1}",
   'genero': u"{'Poesia': 2}",
   'group': 17,
   'label': 'Tomas Tomayo de Vargas',
   'lugar': u"{u'Toledo': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Poesia',
   'top_place': u'Toledo',
   'type': u'Persona'}),
 ('6',
  {'avg_date': u'1603',
   'doc_type': u"{u'Privilegio/Licencia': 1}",
   'fecha': u"{'1603-12-11': 1}",
   'genero': u"{'Teatro': 1}",
   'group': 8,
   'label': 'Jeronimo de Iturralde',
   'lugar': u"{u'Zaragoza': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Teatro',
   'top_place': u'Zaragoza',
   'type': u'Persona'}),
 ('98',
  {'avg_date': u'1617',
   'doc_type': u"{u'Aprobacion': 1}",
   'fecha': u"{'1617-08-10': 1}",
   'genero': u"{'Ficcion': 2}",
   'group': 1,
   'inst': u"{u'Orden de San Agustin': 2, u'Consejo de Inquisicion': 1}",
   'label': 'Juan de Camargo',
   'lugar': u"{u'Madrid': 1}",
   'notas': u"{'Rector del colegio de donna Maria de Aragon, de la orden de San Agustin y calificador de la general inquisicion': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Madrid',
   'type': u'Persona'}),
 ('280',
  {'avg_date': u'1599',
   'doc_type': u"{u'Privilegio/Licencia': 1}",
   'fecha': u"{'1599-06-21': 1}",
   'genero': u"{'Ficcion': 1}",
   'group': 8,
   'label': 'Mateo de Canseco, vicario general',
   'lugar': u"{u'Zaragoza': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Zaragoza',
   'type': u'Persona'}),
 ('93',
  {'avg_date': u'1605',
   'doc_type': u"{u'Impresion': 1}",
   'fecha': u"{'1605-01-01': 1}",
   'genero': u"{'Teatro': 1}",
   'group': 7,
   'label': 'Gaspar Leget',
   'lugar': u"{u'Valencia': 1}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Teatro',
   'top_place': u'Valencia',
   'type': u'Persona'}),
 ('224',
  {'avg_date': u'1617',
   'doc_type': u"{u'Impresion': 1}",
   'fecha': u"{'1617-01-01': 1}",
   'genero': u"{'Ficcion': 1}",
   'group': 2,
   'label': 'Raphael Vives',
   'lugar': u"{u'Barcelona': 1}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Barcelona',
   'type': u'Persona'}),
 ('95',
  {'avg_date': u'1607',
   'doc_type': u"{u'Impresion': 3}",
   'fecha': u"{'1609-07-24': 2, '1605-07-14': 1}",
   'genero': u"{'Teatro': 2}",
   'group': 4,
   'label': 'Juan de Bostillo',
   'lugar': u"{u'Valladolid': 3}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Teatro',
   'top_place': u'Valladolid',
   'type': u'Persona'}),
 ('94',
  {'avg_date': u'1604',
   'doc_type': u"{u'Aprobacion': 1}",
   'fecha': u"{'1604-11-10': 1}",
   'genero': u"{'Teatro': 1}",
   'group': 7,
   'inst': u"{u'Archidiocesis de Valencia': 1}",
   'label': 'Petrus Joannes Assensius',
   'lugar': u"{u'Valencia': 1}",
   'notas': u"{'Nombre latinizado. Pedro Juan \xc2\xbfAssensius?': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Teatro',
   'top_place': u'Valencia',
   'type': u'Persona'}),
 ('97',
  {'avg_date': u'1608',
   'doc_type': u"{u'Impresion': 6}",
   'fecha': u"{'1616-09-12': 1, '1615-03-23': 1, '1598-11-27': 1, '1599-04-26': 1, '1617-11-16': 1, '1604-07-28': 1}",
   'genero': u"{'Teatro': 1, 'Ficcion': 3, 'Poesia': 2}",
   'group': 1,
   'label': 'Luis Sanchez',
   'lugar': u"{u'Madrid': 5, u'Valladolid': 1}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'Poesia',
   'second_place': u'Valladolid',
   'top_genre': u'Ficcion',
   'top_place': u'Madrid',
   'type': u'Persona'}),
 ('163',
  {'avg_date': u'1605',
   'doc_type': u"{u'Impresion': 3}",
   'fecha': u"{'1611-01-01': 1, '1603-08-26': 2}",
   'genero': u"{'Ficcion': 2, 'Poesia': 1}",
   'group': 16,
   'label': 'Jeronimo Bordon',
   'lugar': u"{u'Milan': 3}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'Poesia',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Milan',
   'type': u'Persona'}),
 ('11',
  {'avg_date': u'1616',
   'doc_type': u"{u'Privilegio/Licencia': 2, u'Impresion': 3}",
   'fecha': u"{'1618-01-01': 1, '1613-12-23': 1, '1617-11-07': 1, '1614-05-17': 1, '1618-06-25': 1}",
   'genero': u"{'Teatro': 1, 'Ficcion': 2}",
   'group': 1,
   'label': 'Miguel Martinez',
   'lugar': u"{u'Madrid': 5}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'Teatro',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Madrid',
   'type': u'Persona'}),
 ('270',
  {'avg_date': u'1611',
   'doc_type': u"{u'Aprobacion': 1}",
   'fecha': u"{'1611-01-04': 1}",
   'genero': u"{'Ficcion': 2}",
   'group': 12,
   'label': 'Agustin Osorio, Fray',
   'lugar': u"{u'Lerida': 1}",
   'notas': u"{'Prior de San Agustin de Lerida': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Lerida',
   'type': u'Persona'}),
 ('15',
  {'avg_date': u'1617',
   'doc_type': u"{u'Tasa': 1}",
   'fecha': u"{'1617-12-12': 1}",
   'genero': u"{'Ficcion': 2}",
   'group': 1,
   'inst': u"{u'Consejo de Castilla': 1}",
   'label': 'Diego Gonzalo de Villarroel',
   'lugar': u"{u'Madrid': 1}",
   'notas': u"{'Escribano de Camara': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Madrid',
   'type': u'Persona'}),
 ('17',
  {'avg_date': u'1605',
   'doc_type': u"{u'Privilegio/Licencia': 4}",
   'fecha': u"{'1607-03-07': 1, '1604-09-20': 1, '1604-01-15': 1, '1607-10-08': 1}",
   'genero': u"{'Ficcion': 4}",
   'group': 6,
   'inst': u"{u'Consejo de Flandes': 1}",
   'label': 'J. de Buschere',
   'lugar': u"{u'Bruselas': 4}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Bruselas',
   'type': u'Persona'}),
 ('18',
  {'avg_date': u'1608',
   'doc_type': u"{u'Privilegio/Licencia': 5, u'Impresion': 8}",
   'fecha': u"{'1610-01-01': 1, '1614-01-01': 1, '1610-11-07': 1, '1607-03-07': 2, '1611-01-01': 1, '1614-05-10': 2, '1604-01-15': 2, '1607-10-08': 1, '1600-05-15': 1, '1608-01-01': 1}",
   'genero': u"{'Teatro': 1, 'Ficcion': 7}",
   'group': 6,
   'label': 'Roger Velpius',
   'lugar': u"{u'Bruselas': 13}",
   'notas': u"{'Impresor de sus Altezas, en el aguila de oro cerca del palacio': 1}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'Teatro',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Bruselas',
   'type': u'Persona'}),
 ('272',
  {'avg_date': u'1604',
   'doc_type': u"{u'Impresion': 1}",
   'fecha': u"{'1604': 1}",
   'genero': u"{'Poesia': 1}",
   'group': 18,
   'label': 'Melchior Ocharte',
   'lugar': u"{u'Mexico': 1}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Poesia',
   'top_place': u'Mexico',
   'type': u'Persona'}),
 ('354',
  {'avg_date': u'1613',
   'doc_type': u"{u'Impresion': 4}",
   'fecha': u"{'1611-02-04': 1, '1612-01-01': 1, '1616-06-06': 1, '1615-01-01': 1}",
   'genero': u"{'Ficcion': 3, 'Poesia': 1}",
   'group': 12,
   'label': 'Luis Menescal',
   'lugar': u"{u'Lerida': 4}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'Poesia',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Lerida',
   'type': u'Persona'}),
 ('116',
  {'avg_date': u'1613',
   'doc_type': u"{u'Tasa': 2, u'Privilegio/Licencia': 4}",
   'fecha': u"{'1616-09-10': 1, '1617-01-21': 1, '1610-11-19': 1, '1612-01-30': 1, '1617-01-17': 1, '1611-01-14': 1}",
   'genero': u"{'Teatro': 1, 'Ficcion': 2, 'Poesia': 1}",
   'group': 5,
   'label': 'Luis Machado de Bouvea',
   'lugar': u"{u'Lisboa': 5, '': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'Teatro',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Lisboa',
   'type': u'Persona'}),
 ('274',
  {'avg_date': u'1603',
   'doc_type': u"{u'Impresion': 1}",
   'fecha': u"{'1603-01-01': 1}",
   'genero': u"{'Ficcion': 1}",
   'group': 19,
   'label': 'Hieronymo Martin',
   'lugar': u"{u'Tarragona': 1}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Tarragona',
   'type': u'Persona'}),
 ('151',
  {'avg_date': u'1611',
   'doc_type': u"{u'Impresion': 1}",
   'fecha': u"{'1611-01-01': 1}",
   'genero': u"{'Teatro': 1}",
   'group': 9,
   'label': 'Viuda de Pedro Bellero',
   'lugar': u"{u'Amberes': 1}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Teatro',
   'top_place': u'Amberes',
   'type': u'Persona'}),
 ('153',
  {'avg_date': u'1610',
   'doc_type': u"{u'Impresion': 8}",
   'fecha': u"{'1618-01-12': 1, '1618-01-01': 1, '1605-01-01': 1, '1616-01-01': 1, '1611-01-01': 1, '1602-01-01': 1, '1600-01-01': 1, '1616-08-01': 1}",
   'genero': u"{'Teatro': 2, 'Ficcion': 5, 'Poesia': 1}",
   'group': 2,
   'label': 'Sebastian de Cormellas',
   'lugar': u"{u'Madrid': 1, u'Barcelona': 8}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'Teatro',
   'second_place': u'Madrid',
   'top_genre': u'Ficcion',
   'top_place': u'Barcelona',
   'type': u'Persona'}),
 ('113',
  {'avg_date': u'1605',
   'doc_type': u"{u'Privilegio/Licencia': 1}",
   'fecha': u"{'1605-02-09': 1}",
   'genero': u"{'Ficcion': 2}",
   'group': 4,
   'label': 'Antonio Campello',
   'lugar': u"{u'Valladolid': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Valladolid',
   'type': u'Persona'}),
 ('159',
  {'avg_date': u'1611',
   'doc_type': u"{u'Privilegio/Licencia': 3}",
   'fecha': u"{'1610-11-19': 1, '1611-01-14': 1, '1612-01-30': 1}",
   'genero': u"{'Teatro': 1, 'Poesia': 1}",
   'group': 5,
   'label': 'Magalhanes',
   'lugar': u"{u'Lisboa': 3}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'Poesia',
   'second_place': u'',
   'top_genre': u'Teatro',
   'top_place': u'Lisboa',
   'type': u'Persona'}),
 ('277',
  {'avg_date': u'1615',
   'doc_type': u"{u'Impresion': 1}",
   'fecha': u"{'1615-06-05': 1}",
   'genero': u"{'Teatro': 2}",
   'group': 15,
   'label': 'Antonio Sanchez',
   'lugar': u"{u'Alcala': 1}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Teatro',
   'top_place': u'Alcala',
   'type': u'Persona'}),
 ('90',
  {'avg_date': u'1605',
   'doc_type': u"{u'Impresion': 1}",
   'fecha': u"{'1605-01-01': 1}",
   'genero': u"{'Teatro': 1}",
   'group': 7,
   'label': 'Francisco Miguel',
   'lugar': u"{u'Valencia': 1}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Teatro',
   'top_place': u'Valencia',
   'type': u'Persona'}),
 ('238',
  {'avg_date': u'1609',
   'doc_type': u"{u'Aprobacion': 1}",
   'fecha': u"{'1609-07-30': 1}",
   'genero': u"{'Teatro': 5}",
   'group': 1,
   'label': 'Alonso Gomez de encinas, Fray',
   'lugar': u"{u'Madrid': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Teatro',
   'top_place': u'Madrid',
   'type': u'Persona'}),
 ('35',
  {'avg_date': u'1599',
   'doc_type': u"{u'Impresion': 1}",
   'fecha': u"{'1599-06-22': 1}",
   'genero': u"{'Ficcion': 1}",
   'group': 8,
   'label': 'Juan Perez de Valdivielso',
   'lugar': u"{u'Zaragoza': 1}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Zaragoza',
   'type': u'Persona'}),
 ('230',
  {'avg_date': u'1604',
   'doc_type': u"{u'Aprobacion': 1}",
   'fecha': u"{'1604-02-15': 1}",
   'genero': u"{'Poesia': 2}",
   'group': 2,
   'inst': u"{u'Convento de Santa Caterina': 1, u'Orden de los predicadores': 1}",
   'label': 'Jaime Rebullosa',
   'lugar': u"{u'Barcelona': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Poesia',
   'top_place': u'Barcelona',
   'type': u'Persona'}),
 ('276',
  {'avg_date': u'1603',
   'doc_type': u"{u'Impresion': 1}",
   'fecha': u"{'1603-01-01': 1}",
   'genero': u"{'Ficcion': 1}",
   'group': 19,
   'label': 'Roberto',
   'lugar': u"{u'Tarragona': 1}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Tarragona',
   'type': u'Persona'}),
 ('48',
  {'avg_date': u'1599',
   'doc_type': u"{u'Aprobacion': 1}",
   'fecha': u"{'1599-4-27': 1}",
   'genero': u"{'Ficcion': 4}",
   'group': 2,
   'label': 'Juan Vicente, Fray',
   'lugar': u"{u'Barcelona': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Barcelona',
   'type': u'Persona'}),
 ('49',
  {'avg_date': u'1610',
   'doc_type': u"{u'Fe de erratas': 2}",
   'fecha': u"{'1611-06-09': 1, '1609-04-20': 1}",
   'genero': u"{'Teatro': 2}",
   'group': 4,
   'label': 'Augustin de Vergara',
   'lugar': u"{u'Valladolid': 2}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Teatro',
   'top_place': u'Valladolid',
   'type': u'Persona'}),
 ('47',
  {'avg_date': u'1599',
   'doc_type': u"{u'Impresion': 1}",
   'fecha': u"{'1599-04-30': 1}",
   'genero': u"{'Ficcion': 1}",
   'group': 2,
   'label': 'Jeronimo Genoves',
   'lugar': u"{u'Barcelona': 1}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Barcelona',
   'type': u'Persona'}),
 ('112',
  {'avg_date': u'1604',
   'doc_type': u"{u'Aprobacion': 1}",
   'fecha': u"{'1604-02-17': 1}",
   'genero': u"{'Teatro': 4}",
   'group': 4,
   'label': 'Juan Gracian Dantisco',
   'lugar': u"{u'Valladolid': 1}",
   'notas': u"{'Secretario. Me parece que hay 2 Juan Gracian en la base de datos, uno que es impresor y el otro que firma las aprobaciones de las Comedias de Valladolid. Tal vez sea Juan Gracian Dantisco hermano de Tomas Gracian Dantisco, persona que firma otras aprobaciones durante esta epoca': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Teatro',
   'top_place': u'Valladolid',
   'type': u'Persona'}),
 ('87',
  {'avg_date': u'1605',
   'doc_type': u"{u'Impresion': 1}",
   'fecha': u"{'1605-01-01': 1}",
   'genero': u"{'Teatro': 1}",
   'group': 5,
   'label': 'Estevao Lopez',
   'lugar': u"{u'Lisboa': 1}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Teatro',
   'top_place': u'Lisboa',
   'type': u'Persona'}),
 ('323',
  {'avg_date': u'1614',
   'doc_type': u"{u'Aprobacion': 1}",
   'fecha': u"{'1614-12-26': 1}",
   'genero': u"{'Ficcion': 2}",
   'group': 1,
   'inst': u"{u'Santo Tomas de Madrid': 1}",
   'label': 'Tomas Daoiz',
   'lugar': u"{u'Madrid': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Madrid',
   'type': u'Persona'}),
 ('321',
  {'avg_date': u'1617',
   'doc_type': u"{u'Impresion': 1}",
   'fecha': u"{'1617-01-01': 1}",
   'genero': u"{'Ficcion': 1}",
   'group': 11,
   'label': 'Juan Bellero',
   'lugar': u"{u'Anvers': 1}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Anvers',
   'type': u'Persona'}),
 ('327',
  {'avg_date': u'1611',
   'doc_type': u"{u'Aprobacion': 2, u'Privilegio/Licencia': 2}",
   'fecha': u"{'1610-01-01': 1, '1601-10-31': 1, '1617-11-29': 1, '1617-06-04': 1}",
   'genero': u"{'Teatro': 1, 'Ficcion': 3, 'Poesia': 1}",
   'group': 2,
   'inst': u"{u'Convento de Santa Caterina': 1}",
   'label': 'Tomas Roca, Fray',
   'lugar': u"{u'Barcelona': 4}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'Teatro',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Barcelona',
   'type': u'Persona'}),
 ('325',
  {'avg_date': u'1614',
   'doc_type': u"{u'Tasa': 4, u'Privilegio/Licencia': 1}",
   'fecha': u"{'1612-11-06': 1, '1612-05-19': 1, '1617-11-16': 1, '1615-03-23': 1, '1616-12-23': 1}",
   'genero': u"{'Ficcion': 4, 'Poesia': 1}",
   'group': 1,
   'inst': u"{u'Consejo de Castilla': 1}",
   'label': 'Geronimo Nunez de Leon',
   'lugar': u"{u'Madrid': 4, u'Aranjuez': 1}",
   'notas': u"{'Escribano de Camara': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'Poesia',
   'second_place': u'Aranjuez',
   'top_genre': u'Ficcion',
   'top_place': u'Madrid',
   'type': u'Persona'}),
 ('9',
  {'avg_date': u'1617',
   'doc_type': u"{u'Impresion': 1}",
   'fecha': u"{'1617-01-27': 1}",
   'genero': u"{'Ficcion': 1}",
   'group': 2,
   'label': 'Sebastian Matevat',
   'lugar': u"{u'Barcelona': 1}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Barcelona',
   'type': u'Persona'}),
 ('146',
  {'avg_date': u'1603',
   'doc_type': u"{u'Tasa': 5, u'Privilegio/Licencia': 1}",
   'fecha': u"{'1607-07-17': 1, '1598-11-27': 1, '1603-10-22': 1, '1618-03-13': 1, '1598-08-15': 1, '1599-11-27': 1}",
   'genero': u"{'': 1, 'Ficcion': 5}",
   'group': 1,
   'inst': u"{u'Consejo de Castilla': 1, u'San Lorenzo el Real de El Escorial': 1}",
   'label': 'Pedro Zapata del Marmol',
   'lugar': u"{u'Madrid': 5, u'Valladolid': 1}",
   'notas': u"{'Escribano de la Camara. Tambien aparece como Pedro Montemayor del Marmol.': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'Valladolid',
   'top_genre': u'Ficcion',
   'top_place': u'Madrid',
   'type': u'Persona'}),
 ('144',
  {'avg_date': u'1599',
   'doc_type': u"{u'Impresion': 1}",
   'fecha': u"{'1599-04-30': 1}",
   'genero': u"{'Ficcion': 1}",
   'group': 2,
   'label': 'Gabriel Graells',
   'lugar': u"{u'Barcelona': 1}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Barcelona',
   'type': u'Persona'}),
 ('145',
  {'avg_date': u'1603',
   'doc_type': u"{u'Privilegio/Licencia': 4}",
   'fecha': u"{'1603-01-31': 1, '1604-09-26': 2, '1603-06-16': 1}",
   'genero': u"{'': 1, 'Ficcion': 6}",
   'group': 4,
   'inst': u"{u'Consejo de Castilla': 1}",
   'label': 'Juan de Amezqueta',
   'lugar': u"{u'Valladolid': 3, u'San Juan de Ortega': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'San Juan de Ortega',
   'top_genre': u'Ficcion',
   'top_place': u'Valladolid',
   'type': u'Persona'}),
 ('142',
  {'avg_date': u'1617',
   'doc_type': u"{u'Impresion': 1}",
   'fecha': u"{'1617-04-18': 1}",
   'genero': u"{'Historia': 1}",
   'group': 8,
   'label': 'Juan de Larombe',
   'lugar': u"{u'Zaragoza': 1}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Historia',
   'top_place': u'Zaragoza',
   'type': u'Persona'}),
 ('209',
  {'avg_date': u'1604',
   'doc_type': u"{u'Privilegio/Licencia': 11}",
   'fecha': u"{'1604-12-04': 1, '1604-09-09': 1, '1605-03-01': 1, '1605-03-29': 1, '1603-02-26': 1, '1604-08-31': 1, '1609-12-16': 1, '1600-01-04': 1, '1612-01-27': 1, '1600-01-18': 1, '1604-11-23': 1}",
   'genero': u"{'Historia': 2, 'Teatro': 2, 'Ficcion': 6, 'Poesia': 1}",
   'group': 5,
   'inst': u"{u'Consejo de Portugal': 1}",
   'label': 'Ruy Pirez da Veiga',
   'lugar': u"{u'Lisboa': 11}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'Historia',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Lisboa',
   'type': u'Persona'}),
 ('160',
  {'avg_date': u'1611',
   'doc_type': u"{u'Privilegio/Licencia': 3}",
   'fecha': u"{'1610-11-19': 1, '1611-01-14': 1, '1612-01-30': 1}",
   'genero': u"{'Teatro': 1, 'Poesia': 1}",
   'group': 5,
   'label': 'Barbosa',
   'lugar': u"{u'Lisboa': 3}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'Poesia',
   'second_place': u'',
   'top_genre': u'Teatro',
   'top_place': u'Lisboa',
   'type': u'Persona'}),
 ('267',
  {'avg_date': u'1611',
   'doc_type': u"{u'Privilegio/Licencia': 1, u'Impresion': 2}",
   'fecha': u"{'1599-06-22': 1, '1617-04-18': 2}",
   'genero': u"{'Historia': 1, 'Ficcion': 1}",
   'group': 8,
   'label': 'Juan de Bonilla',
   'lugar': u"{u'Zaragoza': 3}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'Ficcion',
   'second_place': u'',
   'top_genre': u'Historia',
   'top_place': u'Zaragoza',
   'type': u'Persona'}),
 ('73',
  {'avg_date': u'1599',
   'doc_type': u"{u'Privilegio/Licencia': 1}",
   'fecha': u"{'1599-06-22': 1}",
   'genero': u"{'Ficcion': 1}",
   'group': 8,
   'label': 'Galvan',
   'lugar': u"{u'Zaragoza': 1}",
   'notas': u"{'Asesor': 1}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Zaragoza',
   'type': u'Persona'}),
 ('263',
  {'avg_date': u'1615',
   'doc_type': u"{u'Impresion': 6}",
   'fecha': u"{'1614-11-17': 1, '1614-09-24': 1, '1615-10-19': 1, '1616-01-01': 1, '1614-05-17': 1, '1618-03-06': 1}",
   'genero': u"{'Ficcion': 2, 'Poesia': 4}",
   'group': 1,
   'label': 'Viuda de Alonso Martin',
   'lugar': u"{u'Madrid': 6}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'Ficcion',
   'second_place': u'',
   'top_genre': u'Poesia',
   'top_place': u'Madrid',
   'type': u'Persona'}),
 ('355',
  {'avg_date': u'1611',
   'doc_type': u"{u'Impresion': 4}",
   'fecha': u"{'1618-04-19': 1, '1607-02-23': 1, '1612-01-01': 1, '1609-01-01': 1}",
   'genero': u"{'Ficcion': 3, 'Poesia': 1}",
   'group': 2,
   'label': 'Geronimo Margarit',
   'lugar': u"{u'Lerida': 1, u'Barcelona': 3}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'Poesia',
   'second_place': u'Lerida',
   'top_genre': u'Ficcion',
   'top_place': u'Barcelona',
   'type': u'Persona'}),
 ('260',
  {'avg_date': u'1602',
   'doc_type': u"{u'Impresion': 1}",
   'fecha': u"{'1602-08': 1}",
   'genero': u"{'Ficcion': 1}",
   'group': 2,
   'label': 'Antich Ribera',
   'lugar': u"{u'Barcelona': 1}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Barcelona',
   'type': u'Persona'}),
 ('353',
  {'avg_date': u'1604',
   'doc_type': u"{u'Impresion': 1}",
   'fecha': u"{'1604-01-01': 1}",
   'genero': u"{'Poesia': 1}",
   'group': 18,
   'label': 'Diego Lopez Davalos',
   'lugar': u"{u'Mexico': 1}",
   'real': u"{'True': 1}",
   'role': u'printer/editor',
   'second_genre': u'',
   'second_place': u'',
   'top_genre': u'Poesia',
   'top_place': u'Mexico',
   'type': u'Persona'}),
 ('352',
  {'avg_date': u'1603',
   'doc_type': u"{u'Privilegio/Licencia': 10}",
   'fecha': u"{'1604-12-04': 1, '1604-09-09': 1, '1605-03-01': 1, '1609-09-23': 1, '1603-02-26': 1, '1604-08-31': 1, '1600-01-04': 1, '1605-03-29': 1, '1600-01-18': 1, '1604-11-23': 1}",
   'genero': u"{'Historia': 2, 'Teatro': 1, 'Ficcion': 6, 'Poesia': 1}",
   'group': 5,
   'inst': u"{u'Consejo de Portugal': 1}",
   'label': 'Marcos Teixiera',
   'lugar': u"{u'Lisboa': 10}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'Historia',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Lisboa',
   'type': u'Persona'}),
 ('392',
  {'avg_date': u'1612',
   'doc_type': u"{u'Tasa': 1, u'Privilegio/Licencia': 2}",
   'fecha': u"{'1610-11-19': 1, '1611-01-14': 1, '1617-01-17': 1}",
   'genero': u"{'Ficcion': 1, 'Poesia': 1}",
   'group': 5,
   'label': 'Pinto',
   'lugar': u"{u'Lisboa': 3}",
   'real': u"{'True': 1}",
   'role': u'signatory',
   'second_genre': u'Poesia',
   'second_place': u'',
   'top_genre': u'Ficcion',
   'top_place': u'Lisboa',
   'type': u'Persona'})]

In [42]:
nx.write_gexf(no_auth_patron, "projections/no_auth_patron.gexf")

Betweenness


In [43]:
b = nx.betweenness_centrality(g)

In [44]:
d = {"author": [], "signatory": [], "patron": [], "printer/editor": []}
for k, v in b.items():
    role = g.node[k].get("role", "")
    if role:
        d[role].append(v)

In [45]:
import numpy as np
sns.boxplot([d["author"],  d["patron"], d["printer/editor"], d["signatory"]], names=["author", "patron", "printer", "signatory"])
plt.ylim(0.0, 0.08)


Out[45]:
(0.0, 0.08)

In [46]:
plt.hist(d["author"])


Out[46]:
(array([ 17.,   1.,   1.,   0.,   1.,   0.,   0.,   0.,   0.,   1.]),
 array([ 0.        ,  0.03039818,  0.06079637,  0.09119455,  0.12159274,
         0.15199092,  0.18238911,  0.21278729,  0.24318548,  0.27358366,
         0.30398184]),
 <a list of 10 Patch objects>)

In [ ]:


In [ ]:

Clustering


In [47]:
nx.average_clustering(g)


Out[47]:
0.8035973273010204

In [48]:
pd.Series(list(nx.clustering(g).values())).hist()


Out[48]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f10fc14a590>

In [49]:
nx.transitivity(g)


Out[49]:
0.3290931989924433

Paths


In [50]:
nx.diameter(g)


Out[50]:
6

In [51]:
nx.average_shortest_path_length(g)


Out[51]:
2.809700685178507

Modularity


In [52]:
mod_df = pd.read_csv("data/communities/modularity.csv", encoding="utf-8")
mod_map = {3: 1, 2: 2, 5: 3, 9: 4, 4: 5, 8: 6, 0: 7, 1: 8, 7: 9, 6: 10}
mod_df["Modularity Class"] = mod_df["Modularity Class"].apply(lambda x: mod_map[x])

In [53]:
mod = mod_df.groupby("Modularity Class").size()

In [54]:
mod.plot(kind="bar")


Out[54]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f10fc0f56d0>

In [55]:
mod_places = mod_df.groupby(["Modularity Class", "top_place"]).size()

In [56]:
one = mod_places[1]
one.sort()
one.plot(kind="bar")
# Core group Castile -> Aragon


Out[56]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f10f6f1a590>

In [57]:
two = mod_places[2]
two.sort()
two.plot(kind="bar")
# Core madrid


Out[57]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f10f6e8c050>

In [58]:
three = mod_places[3]
three.sort()
three.plot(kind="bar")
# Core Zaragoza in between Madrid and Barcelona


Out[58]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f10f6dd0890>

In [59]:
four = mod_places[4]
four.sort()
four.plot(kind="bar")
# Aragon


---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-59-6c45d5458cc4> in <module>()
      1 four = mod_places[4]
      2 four.sort()
----> 3 four.plot(kind="bar")
      4 # Aragon

AttributeError: 'numpy.int64' object has no attribute 'plot'

In [60]:
five = mod_places[5]
five.sort()
five.plot(kind="bar")
# Lisbon


Out[60]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f10f6d72810>

In [61]:
six = mod_places[6]
six.sort()
six.plot(kind="bar")


---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-61-d650e606e2c3> in <module>()
      1 six = mod_places[6]
      2 six.sort()
----> 3 six.plot(kind="bar")

AttributeError: 'numpy.int64' object has no attribute 'plot'

In [62]:
seven = mod_places[7]
seven.sort()
seven.plot(kind="bar")


Out[62]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f10fcc69ed0>

In [63]:
eight = mod_places[8]
eight.sort()
eight.plot(kind="bar")


Out[63]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f10f6c2bd90>

In [64]:
nine = mod_places[9]
nine.sort()
nine.plot(kind="bar")


Out[64]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f10fccbc2d0>

In [65]:
ten = mod_places[10]
ten.sort()
ten.plot(kind="bar")


Out[65]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f10f6a4c490>

In [ ]:


In [ ]:


In [ ]:


In [66]:
mod_places = mod_df.groupby(["role", "Modularity Class"]).size()
mod_places


Out[66]:
role            Modularity Class
author          1                    7
                2                    1
                3                    2
                5                    1
                7                    3
                8                    1
                9                    4
                10                   2
patron          1                    5
                2                    1
                3                    4
                5                    2
                7                    8
                8                    2
                9                    4
                10                   4
printer/editor  1                    9
                2                    1
                3                    4
                5                    2
                7                   14
                8                    8
                9                    7
                10                  14
signatory       1                   26
                2                    2
                3                   23
                5                    3
                7                   24
                8                   12
                9                   17
                10                  16
dtype: int64

In [67]:
df = pd.DataFrame({
        "author": mod_places["author"],
        "patron": mod_places["patron"],
        "printer/editor": mod_places["printer/editor"],
        "signatory": mod_places["signatory"]})

In [68]:
df.plot(kind="bar", stacked=True)


Out[68]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f10f6a36490>

In [69]:
mod_df.groupby([


  File "<ipython-input-69-bbfed09d89c7>", line 1
    mod_df.groupby([
                    ^
SyntaxError: unexpected EOF while parsing

In [70]:
mod_places = mod_df.groupby(["Modularity Class", "role"]).size()

In [71]:
mod_places = mod_places.reset_index()

In [72]:
mod_places = mod_df.groupby(["Modularity Class", "role"]).size()

In [73]:
grouped = mod_places.groupby(level=0)

In [74]:
grouped.sum()


Out[74]:
Modularity Class
1                   47
2                    5
3                   33
5                    8
7                   49
8                   23
9                   32
10                  36
dtype: int64

In [75]:
divided = mod_places.divide(grouped.sum())
# divided = divided.reset_index()
divided = divided.unstack(level=0).fillna(0)
trans = divided.transpose()
trans.plot(kind="bar", stacked=True)
# trans


Out[75]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f10f68cdf10>

In [76]:
trans


Out[76]:
role author patron printer/editor signatory
Modularity Class
1 0.148936 0.106383 0.191489 0.553191
2 0.200000 0.200000 0.200000 0.400000
3 0.060606 0.121212 0.121212 0.696970
5 0.125000 0.250000 0.250000 0.375000
7 0.061224 0.163265 0.285714 0.489796
8 0.043478 0.086957 0.347826 0.521739
9 0.125000 0.125000 0.218750 0.531250
10 0.055556 0.111111 0.388889 0.444444

In [77]:
regroup = divided.groupby(["role", "Modularity Class", ])


---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-77-6e75f0e98a9a> in <module>()
----> 1 regroup = divided.groupby(["role", "Modularity Class", ])

/home/davebshow/.virtualenvs/scientific/local/lib/python2.7/site-packages/pandas/core/generic.pyc in groupby(self, by, axis, level, as_index, sort, group_keys, squeeze)
   2771         axis = self._get_axis_number(axis)
   2772         return groupby(self, by, axis=axis, level=level, as_index=as_index,
-> 2773                        sort=sort, group_keys=group_keys, squeeze=squeeze)
   2774 
   2775     def asfreq(self, freq, method=None, how=None, normalize=False):

/home/davebshow/.virtualenvs/scientific/local/lib/python2.7/site-packages/pandas/core/groupby.pyc in groupby(obj, by, **kwds)
   1140         raise TypeError('invalid type: %s' % type(obj))
   1141 
-> 1142     return klass(obj, by, **kwds)
   1143 
   1144 

/home/davebshow/.virtualenvs/scientific/local/lib/python2.7/site-packages/pandas/core/groupby.pyc in __init__(self, obj, keys, axis, level, grouper, exclusions, selection, as_index, sort, group_keys, squeeze)
    386         if grouper is None:
    387             grouper, exclusions, obj = _get_grouper(obj, keys, axis=axis,
--> 388                                                     level=level, sort=sort)
    389 
    390         self.obj = obj

/home/davebshow/.virtualenvs/scientific/local/lib/python2.7/site-packages/pandas/core/groupby.pyc in _get_grouper(obj, key, axis, level, sort)
   2039             exclusions.append(gpr)
   2040             name = gpr
-> 2041             gpr = obj[gpr]
   2042 
   2043         if isinstance(gpr, Categorical) and len(gpr) != len(obj):

/home/davebshow/.virtualenvs/scientific/local/lib/python2.7/site-packages/pandas/core/frame.pyc in __getitem__(self, key)
   1676             return self._getitem_multilevel(key)
   1677         else:
-> 1678             return self._getitem_column(key)
   1679 
   1680     def _getitem_column(self, key):

/home/davebshow/.virtualenvs/scientific/local/lib/python2.7/site-packages/pandas/core/frame.pyc in _getitem_column(self, key)
   1683         # get column
   1684         if self.columns.is_unique:
-> 1685             return self._get_item_cache(key)
   1686 
   1687         # duplicate columns & possible reduce dimensionaility

/home/davebshow/.virtualenvs/scientific/local/lib/python2.7/site-packages/pandas/core/generic.pyc in _get_item_cache(self, item)
   1050         res = cache.get(item)
   1051         if res is None:
-> 1052             values = self._data.get(item)
   1053             res = self._box_item_values(item, values)
   1054             cache[item] = res

/home/davebshow/.virtualenvs/scientific/local/lib/python2.7/site-packages/pandas/core/internals.pyc in get(self, item, fastpath)
   2563 
   2564             if not isnull(item):
-> 2565                 loc = self.items.get_loc(item)
   2566             else:
   2567                 indexer = np.arange(len(self.items))[isnull(self.items)]

/home/davebshow/.virtualenvs/scientific/local/lib/python2.7/site-packages/pandas/core/index.pyc in get_loc(self, key)
   1179         loc : int if unique index, possibly slice or mask if not
   1180         """
-> 1181         return self._engine.get_loc(_values_from_object(key))
   1182 
   1183     def get_value(self, series, key):

index.pyx in pandas.index.IndexEngine.get_loc (pandas/index.c:3354)()

index.pyx in pandas.index.IndexEngine.get_loc (pandas/index.c:3289)()

KeyError: 'role'

In [78]:
len(g.edges())


Out[78]:
1233

Interactions


In [79]:
def edge_types(g):
    tps = {}
    for s, t, attrs in g.edges(data=True):
        srole = g.node[s].get("role", "")
        trole = g.node[t].get("role", "")
        if srole and trole:
            if srole == 'patron' and trole == 'printer/editor':
                srole = 'printer/editor'
                trole = 'patron'
            if srole == 'author' and trole == 'patron':
                srole = 'patron'
                trole = 'author'
            if srole == 'author' and trole == 'printer/editor':
                srole = 'printer/editor'
                trole = 'author'
            if srole == 'signatory' and trole == 'patron':
                srole = 'patron'
                trole = 'signatory'
            if srole == 'signatory' and trole == 'printer/editor':
                srole = 'printer/editor'
                trole = 'signatory'
            if srole == 'author' and trole == 'signatory':
                srole = 'signatory'
                trole = 'author'
            if (trole, srole) in tps:
                tps[(trole, srole)].append(attrs["weight"])
            else:
                tps.setdefault((srole, trole), [])
                tps[(srole, trole)].append(attrs.get("weight", 0.0))
    return tps

def edge_aggs(tps, e=1233.0):
    aggs = {}
    for k, v in tps.items():
        aggs[k] = (len(v) / e, sum(v) / len(v))
    return aggs

In [80]:
g = nx.read_gexf('js_viz/graphs/cutlines_gc_from_gephi.gephi')
etps = edge_types(g)
aggs = edge_aggs(etps)
whole = pd.DataFrame(aggs).ix[0]

In [81]:
g1 = nx.read_gexf('js_viz/graphs/mod0_from_gephi.gexf')
etps = edge_types(g1)
aggs = edge_aggs(etps, e=len(g1.edges()))
mod0 = pd.DataFrame(aggs).ix[0]
mod0s = pd.DataFrame(aggs).ix[1]

In [82]:
g2 = nx.read_gexf('js_viz/graphs/mod3_from_gephi.gexf')
etps = edge_types(g2)
aggs = edge_aggs(etps, e=len(g2.edges()))
mod3 = pd.DataFrame(aggs).ix[0]
mod3s = pd.DataFrame(aggs).ix[1]

In [83]:
g3 = nx.read_gexf('js_viz/graphs/mod1_from_gephi.gexf')
etps = edge_types(g3)
aggs = edge_aggs(etps, e=len(g3.edges()))
mod1 = pd.DataFrame(aggs).ix[0]
mod1s = pd.DataFrame(aggs).ix[1]

In [84]:
g4 = nx.read_gexf('js_viz/graphs/mod5_from_gephi.gexf')
etps = edge_types(g4)
aggs = edge_aggs(etps, e=len(g4.edges()))
mod5 = pd.DataFrame(aggs).ix[0]
mod5s = pd.DataFrame(aggs).ix[1]

In [85]:
g5 = nx.read_gexf('js_viz/graphs/mod6_from_gephi.gexf')
etps = edge_types(g5)
aggs = edge_aggs(etps, e=len(g5.edges()))
mod6 = pd.DataFrame(aggs).ix[0]
mod6s = pd.DataFrame(aggs).ix[1]

In [86]:
g6 = nx.read_gexf('js_viz/graphs/mod7_from_gephi.gexf')
etps = edge_types(g6)
aggs = edge_aggs(etps, e=len(g6.edges()))
mod7 = pd.DataFrame(aggs).ix[0]
mod7s = pd.DataFrame(aggs).ix[1]

In [87]:
g7 = nx.read_gexf('js_viz/graphs/mod4_from_gephi.gexf')
etps = edge_types(g7)
aggs = edge_aggs(etps, e=len(g7.edges()))
mod4 = pd.DataFrame(aggs).ix[0]
mod4s = pd.DataFrame(aggs).ix[1]

In [88]:
g8 = nx.read_gexf('js_viz/graphs/mod2_from_gephi.gexf')
etps = edge_types(g8)
aggs = edge_aggs(etps, e=len(g8.edges()))
mod2 = pd.DataFrame(aggs).ix[0]
mod2s = pd.DataFrame(aggs).ix[1]

In [89]:
df = pd.concat([mod0, mod3, mod6, mod5, mod7, mod1, mod4, mod2], axis=1).fillna(0)
df.columns = ['subgroup0', 'subgroup3', 'subgroup6', 'subgroup5', 'subgroup7', 'subgroup1', 'subgroup4', 'subgroup2']
t = df.T
filtered = t[[('patron', 'author'), ('patron', 'signatory'),('printer/editor', 'author'),
              ('printer/editor', 'patron'), ('printer/editor', 'signatory'), ('signatory', 'author'),
              ('printer/editor', 'printer/editor'), ('signatory', 'signatory')]]
filtered
df = filtered.T
df


Out[89]:
subgroup0 subgroup3 subgroup6 subgroup5 subgroup7 subgroup1 subgroup4 subgroup2
patron author 0 0 0 0 0 0 0 0
signatory 0 0 0 0 0 0 0 0
printer/editor author 0 0 0 0 0 0 0 0
patron 0 0 0 0 0 0 0 0
signatory 0 0 0 0 0 0 0 0
signatory author 0 0 0 0 0 0 0 0
printer/editor printer/editor 0 0 0 0 0 0 0 0
signatory signatory 0 0 0 0 0 0 0 0

In [90]:
desc = {"patron/author": df.ix['patron'].ix['author'],
        "patron/signatory": df.ix['patron'].ix['signatory'],
        "printer/author": df.ix['printer/editor'].ix['author'],
        "printer/patron": df.ix['printer/editor'].ix['patron'],
        "printer/signatory": df.ix['printer/editor'].ix['signatory'],
        "signatory/author": df.ix['signatory'].ix['author'],
        "printer/printer": df.ix['printer/editor'].ix['printer/editor'],
        "signatory/signatory": df.ix['signatory'].ix['signatory']}
edges_df = pd.DataFrame(desc)

In [91]:
g = nx.read_gexf('js_viz/graphs/cutlines_gc_from_gephi.gephi')
etps = edge_types(g)
aggs = edge_aggs(etps)
whole = pd.DataFrame(aggs).ix[0]
t = whole.T
filtered = t[[('patron', 'author'), ('patron', 'signatory'),('printer/editor', 'author'),
              ('printer/editor', 'patron'), ('printer/editor', 'signatory'), ('signatory', 'author'),
              ('printer/editor', 'printer/editor'), ('signatory', 'signatory')]]

whole = filtered.T
# whole.colums=["patron/author", "patron/signatory","printer/author", "printer/patron", "printer/signatory",
#           "signatory/author","printer/printer", "signatory/signatory" ]

whole = whole.reset_index()
whole


Out[91]:
level_0 level_1 0
0 patron author 0.033252
1 patron signatory 0.133820
2 printer/editor author 0.085969
3 printer/editor patron 0.078670
4 printer/editor signatory 0.231955
5 signatory author 0.166261
6 printer/editor printer/editor 0.024331
7 signatory signatory 0.205191

In [92]:
sr = whole[0]
sr.index = ["patron/author", "patron/signatory","printer/author", "printer/patron", "printer/signatory",
          "signatory/author","printer/printer", "signatory/signatory" ]

In [93]:
# fig = plt.figure()
# ax1 = fig.add_subplot(111)
ax1 = sns.boxplot([
    edges_df["patron/author"],
    edges_df["patron/signatory"],
    edges_df["printer/author"],
    edges_df["printer/patron"],
    edges_df["printer/signatory"],
    edges_df["signatory/author"],
    edges_df["printer/printer"],
    edges_df["signatory/signatory"]
], names=["patron/author", "patron/signatory","printer/author", "printer/patron", "printer/signatory",
          "signatory/author","printer/printer", "signatory/signatory" ])
# ax2 = ax1.twinx()
# ax1.plot(ax1.get_xticks(), sr)
# plt.ylim(0, 0.4)



In [94]:
df2 = pd.concat([mod0s, mod3s, mod6s, mod5s, mod7s, mod1s, mod4s, mod2s], axis=1).fillna(0)
df2.columns = ['subgroup0', 'subgroup3', 'subgroup6', 'subgroup5', 'subgroup7', 'subgroup1', 'subgroup4', 'subgroup2']
t = df2.T
filtered = t[[('patron', 'author'), ('patron', 'signatory'),('printer/editor', 'author'),
              ('printer/editor', 'patron'), ('printer/editor', 'signatory'), ('signatory', 'author'),
              ('printer/editor', 'printer/editor'), ('signatory', 'signatory')]]

df2 = filtered.T
df2


Out[94]:
subgroup0 subgroup3 subgroup6 subgroup5 subgroup7 subgroup1 subgroup4 subgroup2
patron author 0.464841 0.463265 0.654365 0.196429 0.396429 2.167857 0.309524 0.2
signatory 0.332603 0.240787 0.354101 0.157143 0.186835 0.337897 0.309524 0.2
printer/editor author 0.444921 0.238716 0.179444 0.239286 0.227381 0.436756 0.154762 0.2
patron 0.201323 0.204762 0.208854 0.164286 0.181151 0.317641 0.154762 0.2
signatory 0.204777 0.309086 0.191008 0.318398 0.240179 0.235197 0.154762 0.2
signatory author 0.439229 0.325832 0.364921 0.231429 0.297059 0.337897 0.309524 0.2
printer/editor printer/editor 0.399206 0.210317 0.181633 0.142857 0.169841 0.189881 0.000000 0.0
signatory signatory 0.290189 0.374504 0.267857 0.249496 0.215675 0.245346 0.309524 0.2

In [95]:
desc2 = {"patron/author": df2.ix['patron'].ix['author'],
        "patron/signatory": df2.ix['patron'].ix['signatory'],
        "printer/author": df2.ix['printer/editor'].ix['author'],
        "printer/patron": df2.ix['printer/editor'].ix['patron'],
        "printer/signatory": df2.ix['printer/editor'].ix['signatory'],
        "signatory/author": df2.ix['signatory'].ix['author'],
        "printer/printer": df2.ix['printer/editor'].ix['printer/editor'],
        "signatory/signatory": df2.ix['signatory'].ix['signatory']}
strength_df = pd.DataFrame(desc2)

In [96]:
ax1 = sns.boxplot([
    edges_df["patron/author"],
    edges_df["patron/signatory"],
    edges_df["printer/author"],
    edges_df["printer/patron"],
    edges_df["printer/signatory"],
    edges_df["signatory/author"],
    edges_df["printer/printer"],
    edges_df["signatory/signatory"]
], names=["patron/author", "patron/signatory","printer/author", "printer/patron", "printer/signatory",
          "signatory/author","printer/printer", "signatory/signatory" ])
plt.ylim(0, 0.4)
plt.savefig("img/percent_edges_box.png")



In [97]:
ax1 = sns.boxplot([
    strength_df["patron/author"],
    strength_df["patron/signatory"],
    strength_df["printer/author"],
    strength_df["printer/patron"],
    strength_df["printer/signatory"],
    strength_df["signatory/author"],
    strength_df["printer/printer"],
    strength_df["signatory/signatory"]
], names=["patron/author", "patron/signatory","printer/author", "printer/patron", "printer/signatory",
          "signatory/author","printer/printer", "signatory/signatory" ])
plt.ylim(0, 0.75)
plt.savefig("img/percent_edgestrength_box.png")



In [98]:
strength_df


Out[98]:
patron/author patron/signatory printer/author printer/patron printer/printer printer/signatory signatory/author signatory/signatory
subgroup0 0.464841 0.332603 0.444921 0.201323 0.399206 0.204777 0.439229 0.290189
subgroup3 0.463265 0.240787 0.238716 0.204762 0.210317 0.309086 0.325832 0.374504
subgroup6 0.654365 0.354101 0.179444 0.208854 0.181633 0.191008 0.364921 0.267857
subgroup5 0.196429 0.157143 0.239286 0.164286 0.142857 0.318398 0.231429 0.249496
subgroup7 0.396429 0.186835 0.227381 0.181151 0.169841 0.240179 0.297059 0.215675
subgroup1 2.167857 0.337897 0.436756 0.317641 0.189881 0.235197 0.337897 0.245346
subgroup4 0.309524 0.309524 0.154762 0.154762 0.000000 0.154762 0.309524 0.309524
subgroup2 0.200000 0.200000 0.200000 0.200000 0.000000 0.200000 0.200000 0.200000

In [99]:
strength_df.mean()


Out[99]:
patron/author          0.606589
patron/signatory       0.264861
printer/author         0.265158
printer/patron         0.204097
printer/printer        0.161717
printer/signatory      0.231676
signatory/author       0.313236
signatory/signatory    0.269074
dtype: float64

In [100]:
edges_df.mean()


Out[100]:
patron/author          0
patron/signatory       0
printer/author         0
printer/patron         0
printer/printer        0
printer/signatory      0
signatory/author       0
signatory/signatory    0
dtype: float64

In [101]:
edf = pd.concat([strength_df.mean(), edges_df.mean()], axis=1)

In [102]:
edf.columns = ["weight", "freq"]

In [103]:
edf


Out[103]:
weight freq
patron/author 0.606589 0
patron/signatory 0.264861 0
printer/author 0.265158 0
printer/patron 0.204097 0
printer/printer 0.161717 0
printer/signatory 0.231676 0
signatory/author 0.313236 0
signatory/signatory 0.269074 0

In [104]:
sns.lmplot(x="weight", y="freq", data=edf)
plt.xlim(0.0, 0.7)


Out[104]:
(0.0, 0.7)

In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [105]:
tips = sns.load_dataset("tips")

In [106]:
tips


Out[106]:
total_bill tip sex smoker day time size
0 16.99 1.01 Female No Sun Dinner 2
1 10.34 1.66 Male No Sun Dinner 3
2 21.01 3.50 Male No Sun Dinner 3
3 23.68 3.31 Male No Sun Dinner 2
4 24.59 3.61 Female No Sun Dinner 4
5 25.29 4.71 Male No Sun Dinner 4
6 8.77 2.00 Male No Sun Dinner 2
7 26.88 3.12 Male No Sun Dinner 4
8 15.04 1.96 Male No Sun Dinner 2
9 14.78 3.23 Male No Sun Dinner 2
10 10.27 1.71 Male No Sun Dinner 2
11 35.26 5.00 Female No Sun Dinner 4
12 15.42 1.57 Male No Sun Dinner 2
13 18.43 3.00 Male No Sun Dinner 4
14 14.83 3.02 Female No Sun Dinner 2
15 21.58 3.92 Male No Sun Dinner 2
16 10.33 1.67 Female No Sun Dinner 3
17 16.29 3.71 Male No Sun Dinner 3
18 16.97 3.50 Female No Sun Dinner 3
19 20.65 3.35 Male No Sat Dinner 3
20 17.92 4.08 Male No Sat Dinner 2
21 20.29 2.75 Female No Sat Dinner 2
22 15.77 2.23 Female No Sat Dinner 2
23 39.42 7.58 Male No Sat Dinner 4
24 19.82 3.18 Male No Sat Dinner 2
25 17.81 2.34 Male No Sat Dinner 4
26 13.37 2.00 Male No Sat Dinner 2
27 12.69 2.00 Male No Sat Dinner 2
28 21.70 4.30 Male No Sat Dinner 2
29 19.65 3.00 Female No Sat Dinner 2
... ... ... ... ... ... ... ...
214 28.17 6.50 Female Yes Sat Dinner 3
215 12.90 1.10 Female Yes Sat Dinner 2
216 28.15 3.00 Male Yes Sat Dinner 5
217 11.59 1.50 Male Yes Sat Dinner 2
218 7.74 1.44 Male Yes Sat Dinner 2
219 30.14 3.09 Female Yes Sat Dinner 4
220 12.16 2.20 Male Yes Fri Lunch 2
221 13.42 3.48 Female Yes Fri Lunch 2
222 8.58 1.92 Male Yes Fri Lunch 1
223 15.98 3.00 Female No Fri Lunch 3
224 13.42 1.58 Male Yes Fri Lunch 2
225 16.27 2.50 Female Yes Fri Lunch 2
226 10.09 2.00 Female Yes Fri Lunch 2
227 20.45 3.00 Male No Sat Dinner 4
228 13.28 2.72 Male No Sat Dinner 2
229 22.12 2.88 Female Yes Sat Dinner 2
230 24.01 2.00 Male Yes Sat Dinner 4
231 15.69 3.00 Male Yes Sat Dinner 3
232 11.61 3.39 Male No Sat Dinner 2
233 10.77 1.47 Male No Sat Dinner 2
234 15.53 3.00 Male Yes Sat Dinner 2
235 10.07 1.25 Male No Sat Dinner 2
236 12.60 1.00 Male Yes Sat Dinner 2
237 32.83 1.17 Male Yes Sat Dinner 2
238 35.83 4.67 Female No Sat Dinner 3
239 29.03 5.92 Male No Sat Dinner 3
240 27.18 2.00 Female Yes Sat Dinner 2
241 22.67 2.00 Male Yes Sat Dinner 2
242 17.82 1.75 Male No Sat Dinner 2
243 18.78 3.00 Female No Thur Dinner 2

244 rows × 7 columns


In [ ]:


In [ ]:


In [107]:
chisquare(df.whole.values, df.mod0.values)


---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-107-74a3de4be89b> in <module>()
----> 1 chisquare(df.whole.values, df.mod0.values)

NameError: name 'chisquare' is not defined

In [108]:
whole


Out[108]:
level_0 level_1 0
0 patron author 0.033252
1 patron signatory 0.133820
2 printer/editor author 0.085969
3 printer/editor patron 0.078670
4 printer/editor signatory 0.231955
5 signatory author 0.166261
6 printer/editor printer/editor 0.024331
7 signatory signatory 0.205191

In [109]:
whole


Out[109]:
level_0 level_1 0
0 patron author 0.033252
1 patron signatory 0.133820
2 printer/editor author 0.085969
3 printer/editor patron 0.078670
4 printer/editor signatory 0.231955
5 signatory author 0.166261
6 printer/editor printer/editor 0.024331
7 signatory signatory 0.205191

In [110]:
mod0


Out[110]:
author          author            0
patron          author            0
                signatory         0
printer/editor  author            0
                patron            0
                printer/editor    0
                signatory         0
signatory       author            0
                signatory         0
Name: 0, dtype: float64

In [111]:
mod0['printer/editor']['patron'] = 0.0

In [112]:
mod0


Out[112]:
author          author            0
patron          author            0
                signatory         0
printer/editor  author            0
                patron            0
                printer/editor    0
                signatory         0
signatory       author            0
                signatory         0
Name: 0, dtype: float64

In [ ]:


In [ ]:


In [119]:
from matplotlib import rcParams
rcParams.update({'figure.autolayout': True})

In [113]:
def count_roles(g):
    d = {}
    for n, a, in g.nodes(data=True):
        role = a.get("role")
        if role:
            d.setdefault(role, 0)
            d[role] += 1
    return d

In [120]:
pd.Series(count_roles(g)).plot(kind="bar")
plt.ylabel('# individuals', size=18)
plt.xlabel('role', size=18)
plt.xticks(rotation=50)
plt.savefig("img/article/figure15.eps", format='eps', dpi=1000)
# plt.savefig("img/role_dist.png")


/home/davebshow/.virtualenvs/scientific/local/lib/python2.7/site-packages/matplotlib/figure.py:1644: UserWarning: This figure includes Axes that are not compatible with tight_layout, so its results might be incorrect.
  warnings.warn("This figure includes Axes that are not "

In [ ]:


In [ ]:


In [ ]:


In [ ]: