D3 Practicum CS 4460 – Information Visualization Megha Sandesh Prepared under advisement by Dr.Fames Foley.

Slides:



Advertisements
Similar presentations
HTML5 Overview HOANGPT2. 1. General 2. New Elements List 3.
Advertisements

JavaScript FaaDoOEngineers.com FaaDoOEngineers.com.
An Introduction to D3.js By Robert Dillon.
JavaScript Part 6. Calling JavaScript functions on an event JavaScript doesn’t have a main function like other programming languages but we can imitate.
Introduction to HTML5 Programming donghao. HTML5 is the New HTML Standard New Elements, Attributes. Full CSS3 Support Video and Audio 2D/3D Graphics Local.
1 Lesson 5 Introduction to Cascading Style Sheets HTML and JavaScript BASICS, 4 th Edition Barksdale / Turner.
Chapter 8 Creating Style Sheets.
XML XML What XML is and what it means to me as a Computer Scientist By: Derek Edwards CS 376 March 10, 2003.
COMPSCI 345 / SOFTENG 350 TUTORIAL WEEK 8 | SAM KAVANAGH.
Development of mobile applications using PhoneGap and HTML 5
Philly.NET Hands-On jQuery + Plug-ins Bill Wolff, Rob Keiser.
About me I attend the Edina chapter of TechMasters Been a programmer since age 13, sparked by playing video games Currently employed at GMAC as an independent.
E0262 – MIS – Multimedia Storage Techniques SMIL – Synchronized Multimedia Integration Language.
Director of Computer Center, DaYeh University Ku-Yaw Chang.
Mr C Johnston ICT Teacher BTEC IT Unit 06 - Lesson 02 Types of Programming Language.
Building a UI with Zen Pat McGibbon –Sales Engineer.
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
A really fairly simple guide to: mobile browser-based application development (part 4, JQuery & DOM) Chris Greenhalgh G54UBI / Chris Greenhalgh.
CNIT 133 Interactive Web Pags – JavaScript and AJAX JavaScript Environment.
Interacting with a Web Page using JavaScript Mat Kelly GTAI Presentation January 10, 2014.
HTML5 – The Power of HTML5 – The Power of Thomas Lewis HTML5 Principal Technical Evangelist Microsoft | asimplepixel.tumblr.com.
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
Session 1 SESSION 1 Working with Dreamweaver 8.0.
Javascript II DOM & JSON. In an effort to create increasingly interactive experiences on the web, programmers wanted access to the functionality of browsers.
JavaScript Frameworks Presented by Kyle Goins Also see:
C#.NETASP.NETJavaPHPJavaScript PerlPythonOthersLiverpool FCMotorsports.
1 Scalable Vector Graphics (SVG). 2 SVG SVG is an application language of XML. “SVG is a language for describing two- dimensional graphics in XML. SVG.
SVG & INKSCAPE Student Talk: Erica Weiss DIG 4104c Spring 2014.
A Quick Introduction to d3.js & Reusable Charts Adam Pere Olin College, November 11 th 2014
Introduction to Programming the WWW I CMSC Winter 2003 Lecture 10.
JavaScript Library. What is jQuery jQuery is a lightweight JavaScript library. The purpose is to make it easier to use JavaScript code on your website.
LAB 03: VISUALIZATION WITH D3 September 30, 2015 SDS 235 Visual Analytics.
TOPIC II Dynamic HTML Prepared by: Nimcan Cabd Cali.
Data-Driven Document BY SIMA MEHRI. Voronoi Diagram
Intro to jQuery. What is jQuery? A JavaScript library Lightweight (about 31KB for the minified version) Simplifies HTML document traversing (DOM), event.
JavaScript Defined DOM (Document Object Model) General Syntax Body vs. Head Variables Math & Logic Selection Functions & Events Loops Animation Getting.
ANIMATION FOR THE WEB. WHAT ARE WEB ANIMATIONS? Web animations are often saved as GIF, CSS, SVG, WebGL or video Ranges from simple animations (hover effects)
Web Programming Overview. Introduction HTML is limited - it cannot manipulate data How Web pages are extended (include): –Java: an object-oriented programming.
CS130 Visual Basic Project 4 Lecture Fall New topics in project 4 Database, file (table), records, fields. Application that contains menus, submenus,
Visualization Programming: “Libraries” and “Toolkits” Class visualization resources CSCI 6361.
Please thank our sponsors?. SharePoint Data Visualization Using D3, SVG, jQuery and REST.
HTML Introduction HTML Editors HTML Basic HTML Elements HTML Attributes HTML Headings HTML Paragraphs HTML Formatting HTML Links HTML Head HTML CSS HTML.
1 Using jQuery JavaScript & jQuery the missing manual (Second Edition)
Part – 3 : HTML 5 SVG Tag. † SVG stands for Scalable Vector Graphics. † SVG is used to define vector-based graphics for the Web. † SVG defines the graphics.
CSCI 3100 Tutorial 5 JavaScript & Ajax Jichuan Zeng Department of Computer Science and Engineering The Chinese University of Hong.
JQuery is a fast, small, and feature-rich javascript library. It makes things like HTML document traversal and manipulation, event handling, animation,
Web Technologies Computing Science Thompson Rivers University
Lab 03: Visualization with d3
XML Related Technologies
Chapter 4: Scalable Vector Graphics (SVG)
Animation for the Web.
Intro to JavaScript CS 1150 Spring 2017.
Revision.
Prepared for Md. Zakir Hossain Lecturer, CSE, DUET Prepared by Miton Chandra Datta
Introduction to Internet Programming
Introduction to D3.js and Bar Chart in D3.js
DHTML Javascript Internet Technology.
jQuery The Easy JavaScript Nikolay Chochev Technical Trainer
JQuery with ASP.NET.
DHTML Javascript Internet Technology.
Introduction to Programming the WWW I
D3.js Tutorial (Hands on Session)
Providing Access to Statistics Through the Internet
Thank you Sponsors.
Which graph should I use?
D3.js Tutorial (Hands on Session)
Web Technologies Computing Science Thompson Rivers University
Web Programming and Design
Week 5: Recap and Portfolio Site
Web Programming and Design
Presentation transcript:

D3 Practicum CS 4460 – Information Visualization Megha Sandesh Prepared under advisement by Dr.Fames Foley

Agenda Background D3 and SVG Hello D3 Animation Bind Data and Create a Simple Bar Chart Syncing Between Views Loading data from External Source Summary 2 CS 4460

Background D3 – Data Driven Documents Developed by Mike Bostock, creator of Protovis Free Javascript library Bind data to DOM, apply transformations 3 CS 4460

Background Uses method chaining model to simplify operations on data d3.select().append().attr()…. Statements like the above are perfectly legal in d3. Compact, clean code – minimum looping Animations can be chained to create complex visualizations 4 CS 4460

D3 and SVG D3 does not have a graphical renderer Uses SVG to visually present data transformation Leverages HTML5, CSS3 and SVG to create powerful visualizations CS

SVG - Scalable Vector Graphics SVG is a language for describing two-dimensional vector graphics in XML. Unlike raster/bitmap graphics (.JPEG,.PNG,.GIF etc.), does not lose quality upon zooming in more than 100% Can scale to any size dynamically; amenable to indexing and compression SVG files can be created in any text editor – SVG is an open standard. CS

Hello D3 – First program CS Root element – d3 select() append() Structure and aesthetic – attr() and style() Method chaining Animation Anonymous methods

Animation Animation achieved by binding event listeners to specific actions – mouse hover, click etc. Event listener can be inline or written as a separate method E.g. - on("mouseover",animate) CS

Animation chaining Ability to add more than one transition to an SVG object. Achieved by the “each” function in d3 each("end",animatenext) Animations can be chained with other event listeners as well CS 44609

Binding Data – A Simple Bar Chart Data bound to code by using the “data” method  var dataset = [1,2,3,4,5];  d3.select(this).data(dataset); The statement above binds data to the selection, creating an internal loop CS

Linking Sync 2 visualizations – pie chart and bar graph Method : Trigger a redraw of one view when an event occurs in the other visualization. Hover over individual pie slices to highlight corresponding bars CS

Loading External Data Loading data from external files – CSV Inbuilt routine – csv() d3.csv(filename, action/method) Method describes how to handle and store the data CS

Some Pointers D3 is not the be-all, end-all of visualization. Consider these as well – jquery, backbone.js and any javascript library which adds to the convenience and power of d3 (don’t reinvent the wheel!) Aim for compact code. Programs will be much more maintainable and extensible – d3 will almost force you to do this. Avoid loops and inline data as much as possible – cleaner code, leaner HTML. Go for JSON, CSV and even MYSQL databases. CS

Further Learning - d3 library, documentation and lots of exampleshttp://mbostock.github.com/d3/ – video tutorialhttp:// using-d3-with-a-mysql-database/ - d3 and MySQLhttp:// using-d3-with-a-mysql-database/ CS