SlideShare a Scribd company logo
1 of 23
AN EXAMPLE GRAPH VISUALIZATION
WITH PROCESSING.JS
Max De Marzi
FOSDEM 2012
ABOUT ME
    Built the Neography Gem
    Ruby Rest bindings for Neo4j


 My Blog: http://maxdemarzi.com
 Find me on Twitter: @maxdemarzi

 Email me: maxdemarzi@gmail.com

 GitHub: http://github.com/maxdemarzi

 Slides: http://www.slideshare.net/maxdemarzi
WHAT INFORMATION DID I WANT TO
VISUALIZE?




                 getvouched.com
ABOUT PROCESSING
 Open source programming language and
  environment for creating images, animations, and
  interactions.
 Java “Like”

 Made by Ben Fry and Casey Reas in 2001

 Home page http://processing.org

 Checkout http://www.openprocessing.org for open
  source examples
 YouTube Processing 101 playlist:
  http://www.youtube.com/user/maxdemarzi/videos?v
  iew=pl
ABOUT PROCESSING.JS
 Sister Project to Processing
 Ported by John Resig (known for jQuery)

 Written in JavaScript, uses HTML5 Canvas element
  instead of Java Applets
 Home Page: http://processingjs.org

 Checkout http://sketchpad.cc for open source
  examples
PROCESSING ON CANVAS
HELLO WORLD IN PROCESSING
PROCESSING IS MOUSE-AWARE
IF YOU KEEP GOING…
… AND ADD LINKS BETWEEN NODES
INCLUDE A SIDE PANEL + SEARCH
NODE + RELATIONSHIPS IN JSON
USE CASE
   Good for:
     A dozen or two donut segments (relationship types)
     A hundred or so donut slices (50 looks great)
     Node to node traversals

   Not so good for:
     Supernodes (1000+ relationships)
     Whole graph navigation
HOW IS IT BUILT?
   Resource Class:
       Calls fetchData via AJAX
       Contains Attributes and Values
       Fills Donut Segments
       Fills Donut Slices
       Make up Donut
       Contains loading animation
       Calls Donut.draw once loading done
MORE ABOUT DONUT
   Donut
     Array of Donut Segments
     Sets Selected Slice
     Calls Donut Segment.draw

   Donut Segment
     Array of Donut Slices
     How much space should it take up
     Calls Slice.draw many times
     Has Tweens for expanding and contracting

   Donut Slice
     Draws itself
     Checks to see if it is selected
BEHIND THE SCENES
   Graph Class
     Array of Nodes
     Array of Edges

   Node Class
     Knows incoming and outgoing edges
     Delegates to Resource

   Edge Class
     From node and To node
     Users co-ordinates of nodes to position itself
THINGS YOU CAN TWEAK
 Color Palette
 Specific color for Relationships Types

 Color paths

 Add support for multiple paths

 Add properties

 Add actions

 Everything, it’s just Javascript.
SEE MORE VISUALIZATIONS ON MY BLOG




maxdemarzi.com


Thank you!

More Related Content

Similar to An example graph visualization with processing

Display Suite: A Themers Perspective
Display Suite: A Themers PerspectiveDisplay Suite: A Themers Perspective
Display Suite: A Themers Perspective
Mediacurrent
 
Starting Node
Starting NodeStarting Node
Starting Node
xtylerx
 
NodeJS for Novices - 28/Oct/13 - Winnipeg, MB
NodeJS for Novices - 28/Oct/13 - Winnipeg, MBNodeJS for Novices - 28/Oct/13 - Winnipeg, MB
NodeJS for Novices - 28/Oct/13 - Winnipeg, MB
David Wesst
 

Similar to An example graph visualization with processing (20)

Rich Media Advertising with SVG and JavaScript
Rich Media Advertising with SVG and JavaScriptRich Media Advertising with SVG and JavaScript
Rich Media Advertising with SVG and JavaScript
 
Web Development for UX Designers
Web Development for UX DesignersWeb Development for UX Designers
Web Development for UX Designers
 
Before Going Vector
Before Going VectorBefore Going Vector
Before Going Vector
 
Remix
RemixRemix
Remix
 
Display Suite: A Themers Perspective
Display Suite: A Themers PerspectiveDisplay Suite: A Themers Perspective
Display Suite: A Themers Perspective
 
Starting Node
Starting NodeStarting Node
Starting Node
 
JavaScript is everywhere
JavaScript is everywhereJavaScript is everywhere
JavaScript is everywhere
 
Style Guides Are The New Photoshop (Fronteers 2012)
Style Guides Are The New Photoshop (Fronteers 2012)Style Guides Are The New Photoshop (Fronteers 2012)
Style Guides Are The New Photoshop (Fronteers 2012)
 
Javaone2008 Bof 5102 Groovybuilders
Javaone2008 Bof 5102 GroovybuildersJavaone2008 Bof 5102 Groovybuilders
Javaone2008 Bof 5102 Groovybuilders
 
Death of a Themer - Frontend United - 14 April 2013
Death of a Themer - Frontend United - 14 April 2013Death of a Themer - Frontend United - 14 April 2013
Death of a Themer - Frontend United - 14 April 2013
 
Style Guides Are The New Photoshop (Smashing Conference 2012)
Style Guides Are The New Photoshop (Smashing Conference 2012)Style Guides Are The New Photoshop (Smashing Conference 2012)
Style Guides Are The New Photoshop (Smashing Conference 2012)
 
Building 3D apps with Javascript
Building 3D apps with JavascriptBuilding 3D apps with Javascript
Building 3D apps with Javascript
 
Advanced Web Graphics with Canvas
Advanced Web Graphics with CanvasAdvanced Web Graphics with Canvas
Advanced Web Graphics with Canvas
 
The Art of Wireframing
The Art of WireframingThe Art of Wireframing
The Art of Wireframing
 
3stages Wdn08 V3
3stages Wdn08 V33stages Wdn08 V3
3stages Wdn08 V3
 
HTML5 - A Whirlwind tour
HTML5 - A Whirlwind tourHTML5 - A Whirlwind tour
HTML5 - A Whirlwind tour
 
Panels rocks!
Panels rocks!Panels rocks!
Panels rocks!
 
P5js syracuse dev meetup 20181218
P5js syracuse dev meetup 20181218P5js syracuse dev meetup 20181218
P5js syracuse dev meetup 20181218
 
NodeJS for Novices - 28/Oct/13 - Winnipeg, MB
NodeJS for Novices - 28/Oct/13 - Winnipeg, MBNodeJS for Novices - 28/Oct/13 - Winnipeg, MB
NodeJS for Novices - 28/Oct/13 - Winnipeg, MB
 
Online tools to promote pupil autonomy in MFL
Online tools to promote pupil autonomy in MFL Online tools to promote pupil autonomy in MFL
Online tools to promote pupil autonomy in MFL
 

More from Max De Marzi

More from Max De Marzi (20)

DataDay 2023 Presentation
DataDay 2023 PresentationDataDay 2023 Presentation
DataDay 2023 Presentation
 
DataDay 2023 Presentation - Notes
DataDay 2023 Presentation - NotesDataDay 2023 Presentation - Notes
DataDay 2023 Presentation - Notes
 
Developer Intro Deck-PowerPoint - Download for Speaker Notes
Developer Intro Deck-PowerPoint - Download for Speaker NotesDeveloper Intro Deck-PowerPoint - Download for Speaker Notes
Developer Intro Deck-PowerPoint - Download for Speaker Notes
 
Outrageous Ideas for Graph Databases
Outrageous Ideas for Graph DatabasesOutrageous Ideas for Graph Databases
Outrageous Ideas for Graph Databases
 
Neo4j Training Cypher
Neo4j Training CypherNeo4j Training Cypher
Neo4j Training Cypher
 
Neo4j Training Modeling
Neo4j Training ModelingNeo4j Training Modeling
Neo4j Training Modeling
 
Neo4j Training Introduction
Neo4j Training IntroductionNeo4j Training Introduction
Neo4j Training Introduction
 
Detenga el fraude complejo con Neo4j
Detenga el fraude complejo con Neo4jDetenga el fraude complejo con Neo4j
Detenga el fraude complejo con Neo4j
 
Data Modeling Tricks for Neo4j
Data Modeling Tricks for Neo4jData Modeling Tricks for Neo4j
Data Modeling Tricks for Neo4j
 
Fraud Detection and Neo4j
Fraud Detection and Neo4j Fraud Detection and Neo4j
Fraud Detection and Neo4j
 
Detecion de Fraude con Neo4j
Detecion de Fraude con Neo4jDetecion de Fraude con Neo4j
Detecion de Fraude con Neo4j
 
Neo4j Data Science Presentation
Neo4j Data Science PresentationNeo4j Data Science Presentation
Neo4j Data Science Presentation
 
Neo4j Stored Procedure Training Part 2
Neo4j Stored Procedure Training Part 2Neo4j Stored Procedure Training Part 2
Neo4j Stored Procedure Training Part 2
 
Neo4j Stored Procedure Training Part 1
Neo4j Stored Procedure Training Part 1Neo4j Stored Procedure Training Part 1
Neo4j Stored Procedure Training Part 1
 
Decision Trees in Neo4j
Decision Trees in Neo4jDecision Trees in Neo4j
Decision Trees in Neo4j
 
Neo4j y Fraude Spanish
Neo4j y Fraude SpanishNeo4j y Fraude Spanish
Neo4j y Fraude Spanish
 
Data modeling with neo4j tutorial
Data modeling with neo4j tutorialData modeling with neo4j tutorial
Data modeling with neo4j tutorial
 
Neo4j Fundamentals
Neo4j FundamentalsNeo4j Fundamentals
Neo4j Fundamentals
 
Neo4j Presentation
Neo4j PresentationNeo4j Presentation
Neo4j Presentation
 
Fraud Detection Class Slides
Fraud Detection Class SlidesFraud Detection Class Slides
Fraud Detection Class Slides
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

An example graph visualization with processing

  • 1. AN EXAMPLE GRAPH VISUALIZATION WITH PROCESSING.JS Max De Marzi FOSDEM 2012
  • 2. ABOUT ME Built the Neography Gem Ruby Rest bindings for Neo4j  My Blog: http://maxdemarzi.com  Find me on Twitter: @maxdemarzi  Email me: maxdemarzi@gmail.com  GitHub: http://github.com/maxdemarzi  Slides: http://www.slideshare.net/maxdemarzi
  • 3. WHAT INFORMATION DID I WANT TO VISUALIZE? getvouched.com
  • 4. ABOUT PROCESSING  Open source programming language and environment for creating images, animations, and interactions.  Java “Like”  Made by Ben Fry and Casey Reas in 2001  Home page http://processing.org  Checkout http://www.openprocessing.org for open source examples  YouTube Processing 101 playlist: http://www.youtube.com/user/maxdemarzi/videos?v iew=pl
  • 5. ABOUT PROCESSING.JS  Sister Project to Processing  Ported by John Resig (known for jQuery)  Written in JavaScript, uses HTML5 Canvas element instead of Java Applets  Home Page: http://processingjs.org  Checkout http://sketchpad.cc for open source examples
  • 7. HELLO WORLD IN PROCESSING
  • 8.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14. IF YOU KEEP GOING…
  • 15. … AND ADD LINKS BETWEEN NODES
  • 16. INCLUDE A SIDE PANEL + SEARCH
  • 18. USE CASE  Good for:  A dozen or two donut segments (relationship types)  A hundred or so donut slices (50 looks great)  Node to node traversals  Not so good for:  Supernodes (1000+ relationships)  Whole graph navigation
  • 19. HOW IS IT BUILT?  Resource Class:  Calls fetchData via AJAX  Contains Attributes and Values  Fills Donut Segments  Fills Donut Slices  Make up Donut  Contains loading animation  Calls Donut.draw once loading done
  • 20. MORE ABOUT DONUT  Donut  Array of Donut Segments  Sets Selected Slice  Calls Donut Segment.draw  Donut Segment  Array of Donut Slices  How much space should it take up  Calls Slice.draw many times  Has Tweens for expanding and contracting  Donut Slice  Draws itself  Checks to see if it is selected
  • 21. BEHIND THE SCENES  Graph Class  Array of Nodes  Array of Edges  Node Class  Knows incoming and outgoing edges  Delegates to Resource  Edge Class  From node and To node  Users co-ordinates of nodes to position itself
  • 22. THINGS YOU CAN TWEAK  Color Palette  Specific color for Relationships Types  Color paths  Add support for multiple paths  Add properties  Add actions  Everything, it’s just Javascript.
  • 23. SEE MORE VISUALIZATIONS ON MY BLOG maxdemarzi.com Thank you!