Skip to content

tcibinan/data2graph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

from_flaxo with_♥ Docker Cloud Build Status Data2Graph

data2graph

data2graph is a Kotlin-JS web application that helps visualize graphs in a force-directed manner. It is a data2viz port of the original d3.js force-directed graph.

Demo

Demo shows graph of an anonymized plagiarism report that was collected for an actual university programming course.

plagiarism graph

Controls

Tool has four configurable preferences:

  • Plagiarism weight threshold.
  • Graph links absolute shift.
  • Graph links relative scale.
  • Plagiarism weight normalization strategy which has 3 available values:
    • disabled normalization which basically means that weights are just scaled by 100,
    • max normalization which means that weights are scaled by the maximum weight,
    • collapsing normalization that normalizes weights as a binary function: all weights that are above the set threshold are scaled to 1 and 0 otherwise.

Visualize your data

Data2Viz can be used to visualize any graph json which satisfies the following requirements:

  1. Graph json should be formatted according to this demo graph json.
  2. Graph json should be accessible by some endpoint.
  3. Graph json endpoint should allow https://tcibinan.github.io origin. See CORS configuration.
  4. Graph json endpoint should be encoded. See URL encoding.

To show your graph json just add graph_url with your endpoint to data2graph url

https://tcibinan.github.io/data2graph/latest/?graph_url=http%3A%2F%2Fyourendpoint.com%2Fdata.json

Local deployment

You can also start your own instance of data2graph locally

docker run --rm --name data2graph -d -p 8080:80 flaxo/data2graph:0.4

To show a custom graph with your encoded graph json url

http://localhost:8088/?graph_url=http%3A%2F%2Fyourendpoint.com%2Fdata.json

Or you can copy your graph.json to the data2graph container

docker cp graph.json data2graph:/opt/data2graph/graph.json

And show your graph using relative url

http://localhost:8088/?graph_url=graph.json

Contribution

To start the development server run the command and open the browser at http://localhost:8088/

./gradlew run

To stop the development server run the following command

./gradlew stop