Files
gesara-entity-viz/README.md

2.4 KiB

GESARA Named Entity Network Visualisation

This project generates an interactive visualisation of named entities in English-language posts archived in a database of Telegram channels that have posted about the GESARA conspiracy theory.

This visualisation was developed by Bellingcat based on an excellent Sigma.js demo, and uses react-sigma-v2 to interface sigma.js with React.

You can view the live visualisation here. With GitHub pages configured, after making changes to the main branch, you need to run the command npm run deploy for the latest changes to be reflected in the live visualisation.

Python Scripts

In the scripts/ subdirectory, you can run Python scripts that were used to generate the network and visualisation:

generate_network.py

Extracts the data from a PostgreSQL database, cleans the entity data, generates a NetworkX graph, prunes the edges using the Marginal Likelihood Filter, and exports the pruned graph.

generate_visualisation.py

After visualising the network using Gephi (using the Force Atlas 2 algorithm, with the "LinLog mode" and "Prevent Overlap" options enabled, and exporting as the file entity_network_layout.graphml), this script converts the node, edge, and cluster data into a format readable by this sigma.js project.

NPM Scripts

In the project directory, you can run:

npm start

Runs the app in the development mode.
Open http://localhost:5000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

npm test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

npm run build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.