h517 visualization design analysis evaluation
play

H517 Visualization Design, Analysis, & Evaluation Week 2: - PowerPoint PPT Presentation

H517 Visualization Design, Analysis, & Evaluation Week 2: Intro to HTML, JavaScript, and D3 Khairi Reda | redak@iu.edu School of Informa5cs & Compu5ng, IUPUI Last week Why use vision to analyze information? 1 . Vision is the highest


  1. H517 Visualization Design, Analysis, & Evaluation Week 2: Intro to HTML, JavaScript, and D3 Khairi Reda | redak@iu.edu School of Informa5cs & Compu5ng, IUPUI

  2. Last week…

  3. Why use vision to analyze information? 1 . Vision is the highest bandwidth channel into our brain 2 . Cogni5on is limited. Percep5on beats cogni5on 3 . Working memory is limited; external representa5ons expand our memory 4 . Visuals are an integral part of our culture

  4. Charles Menard. Napoleon’s 1812 campaign to Moscow

  5. Miles"per"gallon" 30" 25" 20" 15" 10" 5" 0" 1978" 1979" 1980" 1981" 1982" 1983" 1984" 1985"

  6. Based on reporting by the Guardian (https://www.theguardian.com/technology/blog/2008/jan/21/liesdamnliesandstevejobs) Via Miriah Meyer

  7. US smart phone marketshare Slide by Miriah Meyer

  8. Last week Principles of Visual Integrity Use detailed and clear labeling to defeat graphical distor5ons “The representa5on of numbers, as physically measured on the surface of the graphic itself, should be directly propor5onal to the numerical quan55es represented” Maximize data-ink ra5o Avoid chartjunk* * Visual embellishment can in some cases improve memorability and engagement with the visualization

  9. This week Intro to HTML, JavaScript, and D3

  10. D3: Data-Driven Documents

  11. The D3 stack D3 JavaScript HTML SVG Scalable Hypertext markup language Vector graphics

  12. HTML example

  13. SVG X (200,100) Y

  14. SVG

  15. SVG: a bar chart

  16. Chrome Web Server 1) Download extension from: 2) Create folder (e.g., on Desktop) https://tinyurl.com/y9k9hc44 3) Choose folder from extension 4) Open URL

  17. Exercise: Create a bar chart in SVG to visualize the following dataset: Pets animals from a neighborhood survey: cats 45 dogs 21 iguanas 102 Use the following SVG elements: <rect x=“” y=“” width=“” height=“”/> <line x1=“” x2=“” y1=“” y2=“” /> <text x=“” y=“”>Label here</text>

  18. Exercise 2: Repeat the previous exercise. Instead of “hardcoding” the a_ributes of SVG elements, adjust them programma5cally using JavaScript Pets dataset as an array For loop to iterate through dataset Get a reference to a “rect” element Adjust “height” attribute

  19. Exercise 3: Repeat the previous exercise. Instead of using pure JavaScript, use D3 selec5ons selection and data binding selection and data binding

  20. Exercise 4: Loading a CSV file and visualizing the data http://vis.ninja/teaching/2018/H517/d3-excercises/

Recommend


More recommend