Lecture Topic Projects

Similar documents
Lecture Topic Projects 1 Intro, schedule, and logistics 2 Applications of visual analytics, data types 3 Data sources and preparation Project 1 out 4

Software. Full Stack Web Development Intensive, Fall Lecture Topics. Class Sessions. Grading

About the Tutorial. Audience. Prerequisites. Copyright and Disclaimer. D3.js

Designing the Home Page and Creating Additional Pages

The Benefits of CSS. Less work: Change look of the whole site with one edit

Scripting. Web Architecture and Information Management [./] Spring 2009 INFO (CCN 42509) Contents

Ministry of Higher Education and Scientific Research

Sections and Articles

The Structure of the Web. Jim and Matthew

JSN PowerAdmin Configuration Manual Introduction

Internet: An international network of connected computers. The purpose of connecting computers together, of course, is to share information.

Data Visualization (DSC 530/CIS )

IAT 355 : Lab 01. Web Basics

E-Business Systems 1 INTE2047 Lab Exercises. Lab 5 Valid HTML, Home Page & Editor Tables

WME MathEdit. An initial report on the WME tool for creating & editing mathematics. by K. Cem Karadeniz

The course also includes an overview of some of the most popular frameworks that you will most likely encounter in your real work environments.

TUTORIAL: D3 (1) Basics. Christoph Kralj Manfred Klaffenböck

Programming the World Wide Web by Robert W. Sebesta

WEB SITE DESIGN Summer in Prague, Prague, Czech Republic

JSN PageBuilder 3 Configuration Manual Introduction

Introduction to WEB PROGRAMMING

Web Development IB PRECISION EXAMS

D3 Introduction. Gracie Young and Vera Lin. Slides adapted from

Data Visualization (CIS 468)

When learning coding, be brave

Types of style sheets

Beginning HTML. The Nuts and Bolts of building Web pages.

Notes General. IS 651: Distributed Systems 1

Student Success Guide

Web Programming HTML CSS JavaScript Step by step Exercises Hans-Petter Halvorsen

Perfect Student Midterm Exam March 20, 2007 Student ID: 9999 Exam: 7434 CS-081/Vickery Page 1 of 5

20480C: Programming in HTML5 with JavaScript and CSS3. Course Code: 20480C; Duration: 5 days; Instructor-led. JavaScript code.

Data Visualization on the Web with D3

Content Visualization Issues

Web Programming and Design. MPT Junior Cycle Tutor: Tamara Demonstrators: Aaron, Marion, Hugh

HTML. Mohammed Alhessi M.Sc. Geomatics Engineering. Internet GIS Technologies كلية اآلداب - قسم الجغرافيا نظم المعلومات الجغرافية

HCDE 530: Computational Techniques for HCDE Data Visualization in Web, Part 2


Overview of the Adobe Dreamweaver CS5 workspace

Navigation. Websites need a formalized system of links to allow users to navigate the site

Data Visualization (DSC 530/CIS )

Comm 244 Week 3. Navigation. Navigation. Websites need a formalized system of links to allow users to navigate the site

Development of an e-library Web Application

How to lay out a web page with CSS

Basics of Web Technologies

Lecture : 3. Practical : 2. Course Credit. Tutorial : 0. Total : 5. Course Learning Outcomes

Index. alt, 38, 57 class, 86, 88, 101, 107 href, 24, 51, 57 id, 86 88, 98 overview, 37. src, 37, 57. backend, WordPress, 146, 148

Chapter 12 Creating Web Pages

Web Programming and Design. MPT Senior Cycle Tutor: Tamara Week 2

Make a Website. A complex guide to building a website through continuing the fundamentals of HTML & CSS. Created by Michael Parekh 1

Internet Programming 1 ITG 212 / A

Web development using PHP & MySQL with HTML5, CSS, JavaScript

September Development of favorite collections & visualizing user search queries in CERN Document Server (CDS)

Webomania Solutions Pvt. Ltd. 2017

D3js Tutorial. Tom Torsney-Weir Michael Trosin

Computer Science Department

1. Setup a root folder for the website 2. Create a wireframe 3. Add content 4. Create hyperlinks between pages and to external websites

Index LICENSED PRODUCT NOT FOR RESALE

Sam Weinig Safari and WebKit Engineer. Chris Marrin Safari and WebKit Engineer

Static Webpage Development


Web Site Development with HTML/JavaScrip

A Simple Course Management Website

CSS Design and Layout Basic Exercise instructions. Today's exercises. Part 1: Arrange Page into Sections. Part 1, details (screenshot below)

Perch Documentation. U of M - Department of Computer Science. Written as a COMP 3040 Assignment by Cameron McKay, Marko Kalic, Riley Draward

This course is designed for web developers that want to learn HTML5, CSS3, JavaScript and jquery.

Getting Started with Eric Meyer's CSS Sculptor 1.0

Mobile Site Development

Assignments (4) Assessment as per Schedule (2)

Data Visualization (DSC 530/CIS )

Standard 1 The student will author web pages using the HyperText Markup Language (HTML)

Attributes & Images 1 Create a new webpage

HTML + CSS. ScottyLabs WDW. Overview HTML Tags CSS Properties Resources

Revision for Grade 7 ASP in Unit :1&2 Design & Technology Subject

Web Programming and Design. MPT Junior Cycle Tutor: Tamara Demonstrators: Aaron, Marion, Hugh

Beginning Web Site Design

Create a Web Page with Spry Navigation Bar. March 30, 2010

Web Site Design and Development. CS 0134 Fall 2018 Tues and Thurs 1:00 2:15PM

How to lay out a web page with CSS

Web System and Technologies (Objective + Subjective)

How to lay out a web page with CSS

CREATING WEBSITES. What you need to build a website Part One The Basics. Chas Large. Welcome one and all

Fundamentals of Web Development. Web Development. Fundamentals of. Global edition. Global edition. Randy Connolly Ricardo Hoar

INFS 2150 Introduction to Web Development

INFS 2150 Introduction to Web Development

Creating and Building Websites

Data Visualization (CIS 468)

Web Programming and Design. MPT Junior Cycle Tutor: Tamara Demonstrators: Aaron, Marion, Hugh

AGENDA :: MULTIMEDIA TOOLS :: (1382) :: CLASS NOTES

DATABASE SYSTEMS. Database programming in a web environment. Database System Course, 2016

PELLISSIPPI STATE COMMUNITY COLLEGE MASTER SYLLABUS. INTRODUCTION TO INTERNET SOFTWARE DEVELOPMENT CSIT 2230 (formerly CSIT 2645)

Announcements. 1. Class webpage: Have you been reading the announcements? Lecture slides and coding examples will be posted

CSCI 1100L: Topics in Computing Spring 2018 Web Page Project 50 points

COURSE OUTLINE MOC 20480: PROGRAMMING IN HTML5 WITH JAVASCRIPT AND CSS3

Planning and Designing Your Site p. 109 Design Concepts p. 116 Summary p. 118 Defining Your Site p. 119 The Files Panel p. 119 Accessing Your Remote

PHP / MYSQL DURATION: 2 MONTHS

READSPEAKER ENTERPRISE HIGHLIGHTING 2.5

ThingLink User Guide. Andy Chen Eric Ouyang Giovanni Tenorio Ashton Yon

DIGIT.B4 Big Data PoC

CS 350 COMPUTER/HUMAN INTERACTION. Lecture 6

Transcription:

Lecture Topic Projects 1 Intro, schedule, and logistics 2 Applications of visual analytics, basic tasks, data types 3 Introduction to D3, basic vis techniques for non-spatial data Project #1 out 4 Visual perception and cognition 5 Visual design and aesthetics 6 Data types, notion of similarity and distance 7 Data preparation and reduction Project #1 due 8 Introduction to R, statistics foundations Project #2 out 9 Data mining techniques: clusters, text, patterns, classifiers 10 Data mining techniques: clusters, text, patterns, classifiers 11 Computer graphics and volume rendering 12 Techniques to visualize spatial (3D) data Project #2 due 13 Scientific and medical visualization Project #3 out 14 Scientific and medical visualization 15 Midterm #1 16 High-dimensional data, dimensionality reduction Project #3 due 17 Big data: data reduction, summarization 18 Correlation and causal modeling 19 Principles of interaction 20 Visual analytics and the visual sense making process Final project proposal due 21 Evaluation and user studies 22 Visualization of time-varying and time-series data 23 Visualization of streaming data 24 Visualization of graph data Final Project preliminary report due 25 Visualization of text data 26 Midterm #2 27 Data journalism Final project presentations Final Project slides and final report due

The material presented in these slides is derived from this book: Also available online

D3 = Data Driven Documents JavaScript library for manipulating documents based on data frequent tool to support data journalism (New York Times) D3 helps you bring data to life using HTML, SVG, and CSS great library to construct animated visualizations (D3 website) Runs in any modern web browser (Chrome, Firefox, IE) no need to download any software independent of OS (Linux, Windows Mac )

HTML Hypertext Markup Language CSS Cascading Style Sheets JS JavaScript DOM The Document Object Model tree structured organization of HTML objects SVG Scalable Vector Graphics

A text editor textmate, eclipse/aptana, sublime text 2, or your browser need an editor with syntax highlighting. else it s easy to get lost The d3 library from http://d3js.org Data files for your code A web server (recommended) if your visualization is reading data from files or a database (XMLHttpRequest) many options: EasyPHP (windows), Mac OS X Server, MAMP, Python else need to specify the data in the code A browser to run the code

Your folder structure should look like this: project-folder/ d3/ d3.v3.js // D3 library d3.v3.min.js (optional) // minified D3 library index.html

Your initial webpage (index.html) should look like this: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>d3 Page Template</title> <script type="text/javascript" src="d3/d3.v3.js"></script> </head> <body> <script type="text/javascript"> // Your beautiful D3 code will go here </script> </body> </html>

MAMP = My Apache, MySQL, PHP really only need Apache for now MS Windows = WampServer and XAMPP for Windows Mac = MAMP or XAMPP for Mac Procedure install package (Linux has it already installed) find webserver folder (only files residing there will be served) put project files there open browser and point to http://localhost/ or http://localhost:8888/ or http://localhost:8888/project-folder/

var dataset = [ 5, 10, 15, 20, 25 ];

Consider the following js code all methods are chained: d3.select("body").selectall("p").data(dataset).enter().append("p").text("new paragraph!"); which gives this output how did this happen?

Consider the following js code all methods are chained: d3.select("body").selectall("p") // selects all paragraphs in the DOM (none so far ).data(dataset) // counts and parses the data values.enter() // creates new, data-bound elements (placeholders) for the data values.append("p") // takes the empty placeholder and adds a p-element.text("new paragraph!"); // takes the p-element and inserts a text value which gives this output how did this happen?

Change the last line to: d3.select("body").selectall("p").data(dataset).enter().append("p").text(function(d) { return d; }); which gives this output how did this happen?

Change the last line to: d3.select("body").selectall("p").data(dataset).enter().append("p").text(function(d) { return d; }); // used the data to populate the contents of each paragraph of the data-driven document which gives this output how did this happen?

Change the last line to: d3.select("body").selectall("p").data(dataset).enter().append("p").text(function(d) { return "I can count up to " + d; }); which gives this output how did this happen?

Change the last line to: d3.select("body").selectall("p").data(dataset).enter().append("p").text(function(d) { return "I can count up to " + d; }).style("color", "red"); which gives this output how did this happen?

Replace the last line with: d3.select("body").selectall("p").data(dataset).enter().append("p").text(function(d) { return "I can count up to " + d; }).style("color", function(d) { if (d > 15) {return "red"; } else { return "black"; } }); which gives this output how did this happen?

Let s draw some bar charts For this, put this embedded style in the document head div.bar { display: inline-block; width: 20px; height: 75px; /* We'll override height later */ background-color: teal; }

Run this code: var dataset = [ 5, 10, 15, 20, 25 ]; d3.select("body").selectall("div").data(dataset).enter().append("div").attr("class", "bar"); which gives this output five bars with no space between them how did this happen?

Run this code: var dataset = [ 5, 10, 15, 20, 25 ]; d3.select("body").selectall("div").data(dataset).enter().append("div").attr("class", "bar").style("height", function(d) { return d + "px"; }); which gives this output how did this happen?

Run this code: var dataset = [ 5, 10, 15, 20, 25 ]; d3.select("body").selectall("div").data(dataset).enter().append("div").attr("class", "bar").style("height", function(d) { return d + "px"; }); // adds text px to specify that the units are pixels heights are 5px, 10px, 15px, 20px, and 25px which gives this output how did this happen?

Run this code: (also add margin-right: 2px; to the css style) var dataset = [ 5, 10, 15, 20, 25 ]; d3.select("body").selectall("div").data(dataset).enter().append("div").attr("class", "bar").style("height", function(d) { var barheight = d * 5; return barheight + "px"; }); which gives this output how did this happen?

Optionally define some variable beforehand, e.g.: // width and height var w = 500; var h = 50; Define the svg object: var svg = d3.select("body").append("svg").attr("width", w).attr("height", h);

Define the circles as variables for ease of reference: var circles = svg.selectall("circle").data(dataset).enter().append("circle"); But could so this just as well: svg.selectall("circle").data(dataset).enter().append("circle"); // now circles are appended to the end of the SVG element

Run this code (still using var dataset = [ 5, 10, 15, 20, 25 ];) circles.attr("cx", function(d, i) {return (i * 50) + 25;}).attr("cy", h/2).attr("r", function(d) {return d;}); or append it to the.append("circle") method This gives this output how did this happen?

Run this code (still using var dataset = [ 5, 10, 15, 20, 25 ];) circles.attr("cx", function(d, i) {return (i * 50) + 25;}) // i increments by 1 each time, starting at 0.attr("cy", h/2).attr("r", function(d) {return d;}); or append it to the.append("circle") method This gives this output how did this happen?

Run this code (still using var dataset = [ 5, 10, 15, 20, 25 ];) circles.attr("cx", function(d, i) {return (i * 50) + 25;}).attr("cy", h/2).attr("r", function(d) {return d;}.attr("fill", "yellow").attr("stroke", "orange").attr("stroke-width", function(d) {return d/2;}); This gives this output how did this happen?

Code

This will update the bar chart on a mouse click: d3.select("p").on("click", function() { }); //New values for dataset dataset = [ 11, 12, 15, 20, 18, 17, 16, 18, 23, 25, 5, 10, 13, 19, 21, 25, 22, 18, 15, 13 ]; //Update all rects svg.selectall("rect").data(dataset).attr("y", function(d) { return h - yscale(d); }).attr("height", function(d) { return yscale(d); });

Smooth animations are desirable: svg.selectall("rect").data(dataset).transition().attr("y", function(d) { return h - yscale(d); }).attr("height", function(d) { return yscale(d); }).attr("fill", function(d) { return "rgb(0, 0, " + (d * 10) + ")"; });

Now run this code: svg.selectall("rect").data(dataset).transition().duration(1000) // <-- Now this is new!.attr("y", function(d) { return h - yscale(d); }).attr("height", function(d) { return yscale(d); }).attr("fill", function(d) { return "rgb(0, 0, " + (d * 10) + ")"; });

Facilitated by event handlers (listeners), e.g.: d3.select("p").on("click", function() { //Do something on click }); others react on mouse hovering mouse over mouse out and others Example

Assume you selected a certain item by mouseover.on("mouseover", function() { }); //Do something on mouseover of any bar Keyword this maps the action to the selected item.on("mouseover", function() { d3.select(this).attr("fill", "orange"); });

D3 layouts take data that you provide remap or otherwise transform it and so generating new data that is more convenient for a specific visual task The supported layouts are: Bundle and Chord Cluster Force Histogram Pack, Partition, and Pie Stack Tree and Treemap

Demo

Get some CSV-based data from here or here or elsewhere if the data is too big you can down-sample it Your D3-based visual interface should be able to (all 10 pts): 1. pick a variable and bin it into a fixed range (equi-width) of your choice 2. create a bar chart of the variable you picked in 1. 3. using a menu, allow users to select a new variable and update chart 4. only on mouse-over display the value of the bar on top of the bar 5. on mouse-over make the bar wider and higher to focus on it 6. on mouse-click transform the bar chart into a pie chart (and back) 7. mouse moves left (right) should decrease (increase) bin width/size An additional 10 pts for elegant implementation/function Submission on SBU HotCRP (see email) Due Tuesday, Feb. 14, 2016 Extra credit (10 pts): on mouse-click create a force-directed layout using a chosen distance

You need to upload the following by the due date 2-3 page report with illustrated description of your program s capabilities and implementation detail add code snippets to show how you did things mpeg or avi video file that shows all features of your software in action important: do not reveal your identity on the submission itself (to enable double-blind peer feedback) Grading TA will pick students at random for thorough code review sessions you better know your code!!! so, please do not just copy code beyond the D3 templates or even worse, videotape someone else s program

Aka, cheating Discussion with your class mates (but not others) is OK Cut and paste from any source is not OK any suspected activity of this kind will result in zero points also for the person providing the original two-strikes and out rule is in effect (including an academic misconduct report) this includes any feeble attempt to cover the tracks somehow Stay honest and resist the temptation!