<jupyter_start><jupyter_text>[](05%20-%20Cliques%20and%20Communities.ipynb)   Time and Chronology<jupyter_code>from bookworm import *

%matplotlib inline
import matplotlib.pyplot as plt
plt.rcParams['figure.figsize'] = (15,12)

import pandas as pd
import numpy as np
import networkx as nx
graph_dict = chronological_network('data/raw/hp_philosophers_stone.txt', 
                                   n_sections=4,
                                   cumulative=False)

fig = plt.figure()
for i in range(1, 5):
    fig.add_subplot(2, 2, i)
    nx.draw(graph_dict[i-1], node_size=70)
graph_dict = chronological_network('data/raw/hp_philosophers_stone.txt', 
                                   n_sections=4,
                                   cumulative=True)

fig = plt.figure()
for i in range(1, 5):
    fig.add_subplot(2, 2, i)
    nx.draw(graph_dict[i-1], node_size=70)
graph_dict = chronological_network('data/raw/hp_philosophers_stone.txt', 
                                   n_sections=12,
                                   cumulative=True)

fig = plt.figure()
for i in range(1, 13):
    fig.add_subplot(3, 4, i)
    nx.draw(graph_dict[i-1], node_size=70)<jupyter_output>/home/harrisonpim/anaconda3/lib/python3.5/site-packages/networkx/drawing/nx_pylab.py:126: MatplotlibDeprecationWarning: pyplot.hold is deprecated.
    Future behavior will be consistent with the long-time default:
    plot commands add elements without first clearing the
    Axes and/or Figure.
  b = plt.ishold()
/home/harrisonpim/anaconda3/lib/python3.5/site-packages/networkx/drawing/nx_pylab.py:138: MatplotlibDeprecationWarning: pyplot.hold is deprecated.
    Future behavior will be consistent with the long-time default:
    plot commands add elements without first clearing the
    Axes and/or Figure.
  plt.hold(b)
/home/harrisonpim/anaconda3/lib/python3.5/site-packages/matplotlib/__init__.py:917: UserWarning: axes.hold is deprecated. Please remove it from your matplotlibrc and/or style files.
  warnings.warn(self.msg_depr_set % key)
/home/harrisonpim/anaconda3/lib/python3.5/site-packages/matplotlib/rcsetup.py:152: UserWarning: axes.hold is deprecated, will be removed in 3.0
  warnin[...]
{'fraction_non_alphanumeric': 0.10279944928866452, 'fraction_numerical': 0.030289123451124368, 'mean_word_length': 3.0823970037453186, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '302686', 'license': 'MIT', 'n_tokens_mistral': 781, 'n_tokens_neox': 730, 'n_words': 153, 'path': '04 - Time and Chronology.ipynb', 'repo_name': 'harrisonpim/bookworm', 'size': '2179'}