WebGL Graph Visualization

Recently, David Piegza generously gave me permission to adapt his WebGL graph visualization into Dex.  It was pretty easy actually, but there is a long way to go.  However, the results so far are pretty exciting so I wanted to share the results with you.

Currently, I lack labels, so you can really only visualize the structure and overall relationship of things.  Click any of the images to go to a live version of the visual.  Of course, this assumes that you have a WebGL enabled browser.

Visualizing A Plane

First, I gave Dex a perfectly square plane.  It lays out beautifully.

image

Random Clusters

Next, I fed it some randomly generated data:

Random r = new Random()
header = [ "SRC", "DEST" ]
(1..500).each
{
  x ->
  data << [ x, r.nextInt(10) ]
}

image

Changing it slightly:

image

Random r = new Random()
header = [ "SRC", "DEST" ]
(1..1000).each
{
  x ->
  data << [ r.nextInt(1000), r.nextInt(1000) ]
}

image

Some Datasets

Presidents

Of course, I couldn’t resist feeding it my normal presidents dataset for a litmus test.

image

Garbage Collection Data

And then I wondered what the structure of Java garbage collection would look like:

image

Crime Data

Lastly, I fed it a bunch of crime data I had downloaded from somewhere.

image

Mathematical Data

Connecting –100 through +100 like so:

header = [ "SRC", "DEST" ]
(-99..100).each
{
  x ->
  data << [ x-1, x ]
}

Produces an axis, which, unsurprisingly, looks like a string:

image

Then mapping x^3 to this axis, like so:

image

And x^2, or a parabola, we can see the dual mapping as –x*-x = x * x.

image

Conclusion

It’s not quite useful yet, but it sure is fun to play around with!

Advertisements

About patmartin

I am a coder and Data Visualization/Machine Learning enthusiast.
This entry was posted in General. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s