Digital Humanities Crash-Course

April 19 — 26

Reminder: Course slides & materials

danilsko.github.io/DHelsinki

Warning

This presentation is Non-Linear

Use SPACE to go forward, SHIFT+SPACE to go back

Plan for today

  1. Continue working with Gephi
  2. Making our own networks with Ezlinavis
  3. Making dynamic networks in Gephi
  4. Trying directed networks in Gephi
  5. Stylometric networks: combining Stylo & Gephi!🙀
  6. *Extracting networks from Wikipedia with SPARQL and visualising them in Gephi(demo if we have time)

Reminder

We are working with networks (graphs)

Networks can be used to represent different things

Including human relations in reality...

...and in fiction

Gephi Reminder

To analyse and visualise networks we use Gephi

Download and install at gephi.org

Gephi is

  • an open source software for exploring and manipulating networks
  • "like Photoshop but for graph data" (gephi.org)
  • written in Java and runs on most OS's
  • extensible (plugins with additional features)
  • ...a bit buggy :)

Alternative: Cytoscape

cytoscape.org

Alternative two: Gephi Online

rollapp.com/app/gephi

Alternatives 4 coders:

  • NetworkX (Python)
  • iGraph (R/Python)
  • Pajek

Getting data into Gephi

Video instruction on importing data from Koblenz Repo to Gephi

youtu.be/VH-Hg1CR4NE

Getting data into Gephi

ok, Danya, but where do these CSV files come from?

and what does it mean if the two characters have an edge with weight 5

formalisation of interactions

formalisation of interactions

  • the most debated question in literary network analysis
  • main approaches
    • cooccurrence of characters (e.g. in a paragraph or in a 10/15/30-word window)
    • conversation between characters — harder to automate
    • formally defined interaction (may include perception/thought)
    • formally defined relation (kinship/friendship etc.)

Our approach to formalisation

  • network data = interactions between characters
  • "Two characters interact with one another if they perform a speech act within the same segment of a drama (usually a 'scene')." (following an idea of Solomon Marcus, "Poetica matematică", 1970)
  • keep in mind: the 'epistemic thing' of literary network analysis different from that of text analysis
  • We rely on TEI markup (that we first create semi-automatically)

    • TEI = Text Encoding Initiative
    • XML-based markup language 'for the humanities'
    • Starting in 1987!
      • Earlier than Internet and HTML!
      • But wait...it's even earlier than XML!
    • Website & guidelines: tei-c.org
    • In Russian: Скоринкин Д. А. Электронное представление текста с помощью стандарта разметки TEI // Вестник Московского университета. Серия 9: Филология. 2016. № 5

    EXTRACT FROM TEI-ENCODED PLAY

    (…)
    <text>
     <front>
      <docTitle>
       <titlePart type="main">Борис Годунов</titlePart>
      </docTitle>
      <div type="dedication">
       <p>Драгоценной для россиян памяти Николая Михайловича
         Карамзина сей труд, гением его вдохновенный, с
         благоговением и благодарностию посвящает</p>
       <p>Александр Пушкин</p>
      </div>
     </front>
     <body>
      <div type="scene">
       <head>КРЕМЛЕВСКИЕ ПАЛАТЫ</head>
       <stage>(1598 года, 20 февраля)</stage>
       <stage>Князья Шуйский и Воротынский. </stage>
       <sp who="#vorotynskij">
        <speaker>Воротынский</speaker>
        <l>Наряжены мы вместе город ведать,</l>
        <l>Но, кажется, нам не за кем смотреть:</l>
        <l>Москва пуста; вослед за патриархом</l>
        <l>К монастырю пошел и весь народ.</l>
        <l>Как думаешь, чем кончится тревога?</l>
       </sp>
       <sp who="#shujskij">
        <speaker>Шуйский</speaker>
        <l>Чем кончится? Узнать немудрено:</l>
        <l>Народ еще повоет да поплачет,</l>
        <l>Борис еще поморщится немного,</l>
        <l>Что пьяница пред чаркою вина,</l>
        <l>И наконец по милости своей</l>
        <l>Принять венец смиренно согласится,</l>
        <l>А там — а там он будет нами править</l>
        <l part="I">По-прежнему.</l>
       </sp>
    (…)
    

    For those interested in technical details

    go to github.com/dracor-org

    But what about novels?

    We'll come to it a bit later

    first...

    Making Our Own Networks

    Meet EzLinaVis

    ezlinavis.dracor.org

    live demo now

    Production Notes


    • open source program, can be installed on your own server/localhost
    • React.js for building the interface
    • preview graph in the right column is generated live, we used Sigma.js for this
    • CSV format is created live, based on the content entered (or copied-and-pasted) by the user in the left row
    • this 4-column CSV can be saved and imported directly into Gephi or other network visualisation software

    Couple of words about novels

    Dynamic Networks

    A linguistic Dynamic network from Ondrej Tichy

    HERE

    (or just go to the Data folder and find dynamic_cunning_collocations.gexf)

    Video instruction on making Dynamic Graph in Gephi

    youtu.be/ogmGcLMj7t4