Coder Social home page Coder Social logo

Comments (6)

DGaffney avatar DGaffney commented on May 13, 2024 1

Heyo, here's my stab at doing this:

https://gist.github.com/DGaffney/1c2f1c3c6a9501320e94

and some sample data to get you going on transforming your mysql data into the proper format for JSON parsing - this obviously doesn't rescue against lots of different issues (color, position not specified) but its mostly done.

https://gist.github.com/DGaffney/c98d2430b5052630e9a6/raw/5c02bb3198132b1e0ee528141208b4cdc58a6b29/data.json

from sigma.js.

faddison avatar faddison commented on May 13, 2024

someone wrote one. Cant remember where it was from. But i'm using it to populate my graph from rss feeds. Example at www.fraseraddison.com

File can be found on my repo under js folder. https://github.com/faddison/Eportfolio

from sigma.js.

computermacgyver avatar computermacgyver commented on May 13, 2024

Know this is an old issue, but since it's open and being referenced / seen. The sigma.parseJson.js file in the plugins folder will load a json file. There is also a gexf2Json.py file in the same folder to convert a gexf file to the required json format. I'm not sure how this compares with mysql converted to json but it looks similar to DGaffney's example data.

from sigma.js.

DGaffney avatar DGaffney commented on May 13, 2024

@computermacgyver it really depends on whatever spec is put on the incoming data - mine was relatively arbitrary and was just mostly a close-ish analog to a GEXF file. For reference, the inspiration for that particular output spec is https://gist.github.com/DGaffney/25d879da9982d8273113 - for a working example of getting ruby data piped through to an output gexf file using that class, you basically just call on the individual functions with your raw data which is basically the same format as that JS file. If you want, I can write up a demo some time in the next few days...

from sigma.js.

computermacgyver avatar computermacgyver commented on May 13, 2024

@DGaffney No need for a working example from my end. I also had tried to do something close to the gexf / how sigma internally represented the graph already. I think we arrived at very similar (perhaps the same) result. I think this probably doesn't need any more attention given its age. I wanted to tack on the information about the plugin simply for future readers' reference. Cheers!

from sigma.js.

jacomyal avatar jacomyal commented on May 13, 2024

The new version of sigma provides a better GEXF parser and a simple method to read a graph from an object (which makes using JSON dead simple).

from sigma.js.

Related Issues (20)

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.