Tuesday, June 25, 2024

On the Shoulders of Cloud Giants: dataviz with JavaScript in Observable

Extrait de diagramme d'accord 

My project On the Shoulders of Cloud Giants which attempts to describe citation practices in tabletop role-playing publications is a bit dormant at the moment. I am testing a new technique which consists of creating automatic citation indexes but it takes time.

Here it is : https://observablehq.com/@pascaliensis/on-the-shoulders-of-cloud-giants

  • The code queries Wikidata and returns the data in a structured manner in the form of (mainly) a series of pairs between a citing tabletop role-playing game and a cited TTRPG.
    • The data exists in Wikidata thanks to property P2860 (cites work).
    • The code is in the appendix (at the very bottom of the Observable page) in the variable query=
    • Other data is repatriated along the way: date of publication, “movement” to which the role-playing game belongs (The Forge, OSR, etc.), publishing house and game mechanics.
  • This data in the form of a table is encoded in JSON format. This is important because as we are going to do JavaScript visualizations, we need to structure the data in this format so that it is absorbed correctly by the JavaScript visualization libraries.
  • Then this JSON table is transformed into a JSON hierarchy, this is an organization of information specifically designed for network/relationship visualizations.
    • Basically, the structure of this JSON hierarchy is divided into two parts: a part describing each game independently (nodes part) and a part listing each relationship (edges part).
    • The transformation was done by a function named table2hierarchy
    • The variable containing this file is located in data_citingCited
  • From there, most of the work is done because the JavaScript libraries do all the rest of the work. You just have to modify them a little each time to have the desired effect (like filtering the data or coloring it). Several visualizations are thus made:
    •         Undirected graphs
    •         Chord diagrams
    •         Classic bar charts, etc.


https://observablehq.com/@pascaliensis/on-the-shoulders-of-cloud-giants

No comments:

Post a Comment