Skip to content
/ NaNet Public

Extraction and analysis of character networks from comics, bandes dessinées and such

Notifications You must be signed in to change notification settings

CompNet/NaNet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NaNet

Extraction and analysis of character networks from bandes dessinées, comics, mangas, and such

  • Copyright 2018-2023 Vincent Labatut

NaNet is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. For source availability and license information see licence.txt


If you use this source code or the associated dataset, please cite reference [L'22]:

@Article{Labatut2022,
  author        = {Labatut, Vincent},
  title         = {Complex Network Analysis of a Graphic Novel: The Case of the Bande Dessinée {Thorgal}},
  journal       = {Advances in Complex Systems},
  year          = {2022},
  volume        = {25},
  number        = {5\&6},
  pages         = {2240003},
  doi           = {10.1142/S0219525922400033},
}

Description

This set of R scripts aims at extracting and analyzing character networks extracted from graphic novels. It actually works on manually constituted CSV files, so in theory the work of fiction could be anything besides graphic novels, provided the input format is enforced.

The script does the following:

  1. Extracts various networks based on some tabular data containing individual and relational information.
  2. Computes a number of statistics and generates the corresponding plots.
  3. Performs additional analysis of the networks.

Data

The raw dataset was manually constituted based on bande dessinée Thorgal. The output files (graphs, plots, tables...) can be obtained by running the scripts, but they are also directly available on Zenodo.

ThorgalStaticNet

Organization

Here are the folders composing the project:

  • Folder data: contains the data used by the R scripts, as well as produced by them. Each subfolder corresponds to a different series, and has the same structure:
    • File characters.csv: list of characters, see example in folder Test.
    • File interactions.csv: list of scenes with the involved characters.
    • File pages.csv: list of pages with their number of panels.
    • File volumes.csv: list of volumes (issues) in the series.
    • Folder networks: all the networks extracted from the above tables, as Graphml files and plots.
    • Folder stats: CSV and plot files containing the statistics computed for the corpus and for these networks.
  • Folder log: logs produced when running the scripts.
  • Folder res: resources used by the R scripts.
  • Folder src: contains the R source code.

The various narrative units used in the scripts are as follows:

  • Panel: the smallest unit, a single panel from the comic. It belongs to a single page, and therefore a single volume, and therefore a single narrative arc.
  • Page: all the panels present on the same page. It contains panels, and belongs to a single volume, and therefore a single arc.
  • Scene: a sequence of panels, which can span several pages but not volumes. It contains panels, and belongs to a single volume, and therefore a single arc. Several scenes can take place in parallel, so a panel can belong to several scenes at once.
  • Volume: all the pages of a comic book issue. It contains panels, pages and scenes, and belongs to a single arc.
  • Arc: narrative arc constituting the whole story. It contains panels, pages, scenes and volumes.

We also initially defined the notion of series (subseries), which could be a sequence of volumes, but did not need it in the end, and therefore the implementation is not complete for this narrative unit.

In addition, for ASOIAF, we had to add another narrative unit to match the novels: chapters. A chapter is a part of a volume. It contains panels, pages and scenes (a scene cannot span several chapters, like for volumes), and belongs to a single volume and a single arc.

Installation

You first need to install R and the required packages:

  1. Install the R language
  2. Download this project from GitHub and unzip.
  3. Install the required packages:
    1. Open the R console.
    2. Set the unzipped directory as the working directory, using setwd("<my directory>").
    3. Run the install script src/_install.R (that may take a while).

A part of the analysis requires to compile some C code. The main instructions are in src/common/stats/pli/README.txt, then follow the instructions in the following files (look for the TODOs):

  1. src/common/stats/pli/zeta.R/: concerns the files in folder src/common/stats/pli/zeta-function.
  2. src/common/stats/pli/powerexp.R: concerns the files in folder src/common/stats/pli/exponential-integral.
  3. src/common/stats/pli/discpowerexp.R: concerns the file in folder \src/common/stats/pli/discpowerexp.

Use

In order to extract the networks from the raw data, compute the statistics, and generate the plots:

  1. Open the R console.
  2. Set the current directory as the working directory, using setwd("<my directory>").
  3. Run the main script src/dev_main.R.

The scripts will produce a number of files in the subfolders of folder nets. They are grouped in subsubfolders, each one corresponding to a specific topological measure (degree, closeness, etc.).

The script src/Labatut2022.R reproduces the computations described in article [L'22]. Please, use v1.0.2 of the source code in the Releases page. Be warned that this will take a while (possibly several days). You can directly retrieve the data resulting from this process on Zenodo.

Dependencies

Tested with R version 4.0.5, with the following packages:

To-do List

  • ...

References

About

Extraction and analysis of character networks from comics, bandes dessinées and such

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages