Coder Social home page Coder Social logo

jabbath / graph-creator Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 2.46 MB

A tool to easily create graphs from images.

License: MIT License

JavaScript 99.96% HTML 0.04%
graph input visual adjacency-lists adjacency-matrix graph-theory digraph edges vertex vertices

graph-creator's Introduction

Graph Creator

Graph creator is a tool designed to help graph theorists input graphs from pre-existing images. An example use case for Graph Creator is transcribing a board game such as Scotland Yard into graph form. Inputting an adjacency matrix or list by hand for a large game like Scotland Yard could take hours. Graph Creator provides a point and click way to create such graphs, drastically cutting down on input time.

Supported Functionality

Multiline Adjacency Lists

Graph Creator can output a user made graph as a multi-line adjacency list, as used by NetworkX.

Adjacency Matrices

Graphs entered into graph creator can be output as a adjacency matrix represented by a 2D list.

Vertex Position List

Graph Creator can output a JSON file with (x, y) coordinates of each user added vertex.

Graph Input Options

Graph Creator allows point and click vertex addition and edge addition. Labels can be added to vertices by hovering the mouse over them and typing. Weights can be added to edges in the same fashion. Both parallel edges, self loops, and digraphs are supported. In addition, point and click vertex removal is supported.

Usage

To create a graph from an image, open the image as a background from the menu bar, or start a new graph. Then, use the toggle buttons to change entry modes (add vertices, remove vertices, ..., etc), and create your graph . Existing graphs can also be opened and overlayed. ctrl + mousewheel can be used to zoom in and out as you work on the graph.

Binaries

See releases for the latest binaries.

Installation From Source

To install Graph creator first git clone this repo:

git clone https://github.com/Jabbath/Graph-Creator

Now, cd to the Graph-Creator directory and run npm install to install the dependencies:

cd Graph-Creator
npm install

Then, download the latest version of NW.js (node-webkit), and simply drag and drop the files from the repo into the base directory of NW.js. To run the application, run nw.

Contribution

If you have a useful feature to contribute, feel free to make a pull request. Contributions are welcome! For a list of planned features that need implementation, check the issues tab.

License

Licensed under the MIT license. See license.txt.

graph-creator's People

Contributors

jabbath avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

graph-creator's Issues

TODO: Bug Fixes and Features

1. Fix multiline adjacency lists on windows.
2. Add a menu bar with and implement opening new background images.
3. Migrate existing save options to the menu bar.
4. Implement output as adjacency matrices.
5. Add visualization for self loops.
6. Add weighting.
7. Add a zoom functionality.
8. Add digraph support.
9. Implement LaTeX output for graphs in TikZ format.
10. Enable opening graphs.
11. Merge graph analysis tools to allow calculating hyperbolicity, centrality, clique number, etc...
12. Add editable nametags for nodes.
13. Rewrite rendering in cytoscape.js. Will make 6, 8, 10, and 12 easy.
14. Streamline opening graphs and add safeties.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.