<jupyter_start><jupyter_text>Read in data and create the network<jupyter_code>social = Social()<jupyter_output><empty_output><jupyter_text>Read in a list of projects from a tab separated file<jupyter_code>social.load_projects("input/datakey.xlsx", sheet_name="Projects")<jupyter_output><empty_output><jupyter_text>Read in a list of sources<jupyter_code>social.load_sources("input/datakey.xlsx", sheet_name="Sources")<jupyter_output><empty_output><jupyter_text>Now we need to load in the node and edge data for each ship, note that the project name here must match a name given when loading in the projects above.<jupyter_code>social.load_graph(project="Great Western", 
                  nodes_filepath="input/gw_nodes.xlsx", 
                  edges_filepath="input/gw_edges.xlsx")
social.load_graph(project="Great Britain", 
                  nodes_filepath="input/gb_nodes.xlsx", 
                  edges_filepath="input/gb_edges.xlsx")
social.load_graph(project="Great Eastern", 
                  nodes_filepath="input/ge_nodes.xlsx", 
                  edges_filepath="input/ge_edges.xlsx")<jupyter_output><empty_output><jupyter_text>Read in the biographies for entities in the network<jupyter_code>social.load_biographies("input/datakey.xlsx", sheet_name="Node Bio's")<jupyter_output><empty_output><jupyter_text>Now load the images....<jupyter_code>images = load_images("input/datakey.xlsx", sheet_name="Image Credits", 
                     social=social, image_dir="../src")<jupyter_output><empty_output><jupyter_text>Export to JSON We're now ready to export the data to file. The `export_all` function writes three files1. The social network itself - `socialNetwork.json`2. Source names for matching to image files of scanned documents - `entityImageFilenames.json`3. A list of entities for matching to image files of portraits - `sourceImageFilenames.json`This function will create timestamped backups of previous files if any are found.<jupyter_code>export_all(social, images)<jupyter_output><empty_output><jupyter_text>Copy your new social network To copy the files into the correct directory within the Javascript `src` folder the `copy_all` function is used. This will ask for confirmation of overwrite.<jupyter_code>copy_all()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09419014084507042, 'fraction_numerical': 0.0013204225352112676, 'mean_word_length': 5.3314763231197775, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '8', 'dir': 'jupyter-structured-clean-dedup', 'id': '27535', 'license': 'MIT', 'n_tokens_mistral': 712, 'n_tokens_neox': 689, 'n_words': 171, 'path': 'python/load_data.ipynb', 'repo_name': 'brunels-network/kiosk', 'size': '2272'}