SlideShare a Scribd company logo
1 of 22
Download to read offline
Data Visualization on the Web
(Advanced)
February 3, 2014
Angela Zoss
Data Visualization Coordinator
Data & GIS Services, Perkins 226
Workshop Feedback Form
To give feedback on this workshop:
http://library.duke.edu/data/feedback.html
D3 Resources
• Interactive DataVisualization for theWeb
http://chimera.labs.oreilly.com/books/123000000
0345
• Tutorial and Cheat Sheet, c. 2012
www.jeromecukier.net/blog/2012/10/15/d3-
tutorial-at-visweek-2012/
• D3Tips andTricks
https://leanpub.com/D3-Tips-and-Tricks/read
When to use D3
• Need for unusual, highly customized chart types
(http://bl.ocks.org/mbostock)
• Relatively low number of data points or visible
elements (SVG vs. HTML5 Canvas)
• Impress your friends
About D3
• JavaScript library
• Fairly low level; building with rectangles and circles
and lines, instead of pre-made chart structures*
• Basic functioning makes it easy to join HTML
elements with data points
*D3 Middleware
Basic line/area chart:
• xCharts ~10 lines?
http://tenxer.github.io/xcharts/
• Rickshaw (specifically for time series) ~16 lines
http://code.shutterstock.com/rickshaw/
• NVD3 ~31 lines
http://nvd3.org/
• Vega ~57 lines
http://trifacta.github.io/vega/
http://chimera.labs.oreilly.com/books/12300000003
45/ch02.html#_tools_built_with_d3
Developing with D3
• Text editors (Sublime,TextWrangler, etc.) and
browsers with developer tools (esp. Chrome)
• In-browser JavaScript prototyping
– Tributary (http://tributary.io/)
– Livecoding (http://livecoding.io/)
– JSFiddle (http://jsfiddle.net/)
– Plunker (http://plnkr.co/)
• GitHub Gist/bl.ocks.org
http://bl.ocks.org/
Basic Structure
• HTML
– Empty element to insert chart into
• JavaScript
– Load data, build chart
• CSS
– Add style based on tags, classes, IDs
Example: Gapminder Subset
http://bl.ocks.org/dukevis/8782982
To grab your own copy
Running a local web server
(optional for today)
http://chimera.labs.oreilly.com/books/1230000000345/ch04.html#_
setting_up_a_web_server
• Install git and run:
git clone https://gist.github.com/8782982.git
• Download zip archive of files, edit in text editor,
view in browser
https://gist.github.com/dukevis/8782982/download
Code Structure
<html>
<head>…</head>
<body>…</body>
</html>
Code Structure
<html>
<head>
<style>…</style>
</head>
<body>…</body>
</html>
Code Structure
<html>
<head>
<style>…</style>
</head>
<body>
<div id=“chart”></div>
<script>…</script>
</body>
</html>
Code Structure (often)
<script>
//Set up static and global elements
//Load data
//Draw the chart
</script>
JavaScript Syntax
• Declaring variables
var number1 = 1;
var number2 = 2;
• Defining functions
function sum(a, b) {return a+b;}
• Operations
sum(number1, number2);
• Method chaining
sum(number1, number2).toFixed(2);
D3 selections
In a nutshell, you use JavaScript selections (“selectAll”) to
create a holding pen to store data and/or visual elements,
which may or may not have been connected to each other yet.
http://bost.ocks.org/mike/selection/
Additional Example: Coordinated
Views
http://bl.ocks.org/dukevis/6768900
Handy D3 Techniques
• Transitions, to animate changes in state
http://bost.ocks.org/mike/transition/
• Dispatch, to coordinate multiple charts
http://bl.ocks.org/mbostock/5872848
• Crossfilter, for larger datasets
http://square.github.io/crossfilter/
• Using make files to simplify chart regeneration
http://bost.ocks.org/mike/make/
Data & GIS Services
• Data collections, LibGuides, etc.
http://library.duke.edu/data/
• Blog (tutorials, announcements, etc.)
http://blogs.library.duke.edu/data/
• Walk-in consultations
http://library.duke.edu/data/about/schedule.html
(or by appointment – askdata@duke.edu)
• Perkins 226 computing cluster
http://library.duke.edu/data/about/lab.html
(fast hardware, diverse software)
• Additional workshops
http://library.duke.edu/data/news/
(listserv – dgs-announce@duke.edu)
More on Data Visualization
What kinds of visualizations are out there?
How hard are they to reproduce?
See the Intro to DataVisualization LibGuide for general
examples and tools/tutorials.
http://guides.library.duke.edu/datavis/
AdditionalVisualization LibGuides:
http://guides.library.duke.edu/vis_types
http://guides.library.duke.edu/topten
http://guides.library.duke.edu/visualcomm
Reminder: to give feedback on this workshop:
http://library.duke.edu/data/feedback.html
Thank you!
QUESTIONS? SUGGESTIONS?
angela.zoss@duke.edu
http://twitter.com/duke_vis

More Related Content

What's hot

D3.js: Data Visualization for the Web
D3.js: Data Visualization for the Web D3.js: Data Visualization for the Web
D3.js: Data Visualization for the Web Outliers Collective
 
Mongo db first steps with csharp
Mongo db first steps with csharpMongo db first steps with csharp
Mongo db first steps with csharpSerdar Buyuktemiz
 
SP2013 WCM Bootcamp - DSN Designing for SharePoint 2013
SP2013 WCM Bootcamp - DSN Designing for SharePoint 2013SP2013 WCM Bootcamp - DSN Designing for SharePoint 2013
SP2013 WCM Bootcamp - DSN Designing for SharePoint 2013Mavention
 
Implementation of gui framework part2
Implementation of gui framework part2Implementation of gui framework part2
Implementation of gui framework part2masahiroookubo
 
Implementation of GUI Framework part3
Implementation of GUI Framework part3Implementation of GUI Framework part3
Implementation of GUI Framework part3masahiroookubo
 
SilverStripe Modules for a Better Life
SilverStripe Modules for a Better LifeSilverStripe Modules for a Better Life
SilverStripe Modules for a Better LifeColin Richardson
 
Client Side Performance for Back End Developers - Camb Expert Talks, Nov 2016
Client Side Performance for Back End Developers - Camb Expert Talks, Nov 2016Client Side Performance for Back End Developers - Camb Expert Talks, Nov 2016
Client Side Performance for Back End Developers - Camb Expert Talks, Nov 2016Bart Read
 
Introduction to Jquery
Introduction to JqueryIntroduction to Jquery
Introduction to JqueryGurpreet singh
 
Consuming Web Services in Android
Consuming Web Services in AndroidConsuming Web Services in Android
Consuming Web Services in AndroidDavid Truxall
 
A Quick and Dirty D3.js Tutorial
A Quick and Dirty D3.js TutorialA Quick and Dirty D3.js Tutorial
A Quick and Dirty D3.js TutorialYoung-Ho Kim
 
Remote Blob Storage in SharePoint 2010
Remote Blob Storage in SharePoint 2010Remote Blob Storage in SharePoint 2010
Remote Blob Storage in SharePoint 2010Nathan DeWitt
 
Speeding Up uPortal with ReactJS
Speeding Up uPortal with ReactJSSpeeding Up uPortal with ReactJS
Speeding Up uPortal with ReactJSbpowell29a
 
Polymer vs other libraries (Devfest Ukraine 2015)
Polymer vs other libraries (Devfest Ukraine 2015)Polymer vs other libraries (Devfest Ukraine 2015)
Polymer vs other libraries (Devfest Ukraine 2015)jskvara
 
Implementation of gui framework part1
Implementation of gui framework part1Implementation of gui framework part1
Implementation of gui framework part1masahiroookubo
 

What's hot (20)

Database basics
Database basicsDatabase basics
Database basics
 
D3.js: Data Visualization for the Web
D3.js: Data Visualization for the Web D3.js: Data Visualization for the Web
D3.js: Data Visualization for the Web
 
Mongo db
Mongo dbMongo db
Mongo db
 
Mongo db first steps with csharp
Mongo db first steps with csharpMongo db first steps with csharp
Mongo db first steps with csharp
 
SP2013 WCM Bootcamp - DSN Designing for SharePoint 2013
SP2013 WCM Bootcamp - DSN Designing for SharePoint 2013SP2013 WCM Bootcamp - DSN Designing for SharePoint 2013
SP2013 WCM Bootcamp - DSN Designing for SharePoint 2013
 
Paperclip
PaperclipPaperclip
Paperclip
 
Implementation of gui framework part2
Implementation of gui framework part2Implementation of gui framework part2
Implementation of gui framework part2
 
Implementation of GUI Framework part3
Implementation of GUI Framework part3Implementation of GUI Framework part3
Implementation of GUI Framework part3
 
SilverStripe Modules for a Better Life
SilverStripe Modules for a Better LifeSilverStripe Modules for a Better Life
SilverStripe Modules for a Better Life
 
Client Side Performance for Back End Developers - Camb Expert Talks, Nov 2016
Client Side Performance for Back End Developers - Camb Expert Talks, Nov 2016Client Side Performance for Back End Developers - Camb Expert Talks, Nov 2016
Client Side Performance for Back End Developers - Camb Expert Talks, Nov 2016
 
Introduction to Jquery
Introduction to JqueryIntroduction to Jquery
Introduction to Jquery
 
Consuming Web Services in Android
Consuming Web Services in AndroidConsuming Web Services in Android
Consuming Web Services in Android
 
A Quick and Dirty D3.js Tutorial
A Quick and Dirty D3.js TutorialA Quick and Dirty D3.js Tutorial
A Quick and Dirty D3.js Tutorial
 
Html5
Html5Html5
Html5
 
Remote Blob Storage in SharePoint 2010
Remote Blob Storage in SharePoint 2010Remote Blob Storage in SharePoint 2010
Remote Blob Storage in SharePoint 2010
 
Speeding Up uPortal with ReactJS
Speeding Up uPortal with ReactJSSpeeding Up uPortal with ReactJS
Speeding Up uPortal with ReactJS
 
#MongoDB indexes
#MongoDB indexes#MongoDB indexes
#MongoDB indexes
 
Polymer vs other libraries (Devfest Ukraine 2015)
Polymer vs other libraries (Devfest Ukraine 2015)Polymer vs other libraries (Devfest Ukraine 2015)
Polymer vs other libraries (Devfest Ukraine 2015)
 
Google Polymer Framework
Google Polymer FrameworkGoogle Polymer Framework
Google Polymer Framework
 
Implementation of gui framework part1
Implementation of gui framework part1Implementation of gui framework part1
Implementation of gui framework part1
 

Viewers also liked

Green Internet - Dated 2009
Green Internet - Dated 2009Green Internet - Dated 2009
Green Internet - Dated 2009CK Toh
 
Guía para la ordenación territorial en el marco del art. 12 de la directiva s...
Guía para la ordenación territorial en el marco del art. 12 de la directiva s...Guía para la ordenación territorial en el marco del art. 12 de la directiva s...
Guía para la ordenación territorial en el marco del art. 12 de la directiva s...Rodrigo Martin Ferrari
 
천안오피 optok3.com 오피톡 수원오피 충청오피 청주오피 진주오피
천안오피 optok3.com 오피톡 수원오피 충청오피 청주오피 진주오피천안오피 optok3.com 오피톡 수원오피 충청오피 청주오피 진주오피
천안오피 optok3.com 오피톡 수원오피 충청오피 청주오피 진주오피오피톡
 
Nueva+tecnologia+nueva+mentalidad / La transformación digital no es sólo una ...
Nueva+tecnologia+nueva+mentalidad / La transformación digital no es sólo una ...Nueva+tecnologia+nueva+mentalidad / La transformación digital no es sólo una ...
Nueva+tecnologia+nueva+mentalidad / La transformación digital no es sólo una ...Diego Alberto Tamayo
 
Identity matrix
Identity matrixIdentity matrix
Identity matrix豪 鱟灊
 
Ficha gerencia efectiva del tiempo para niños y jóvenes
Ficha gerencia efectiva del tiempo para niños y jóvenesFicha gerencia efectiva del tiempo para niños y jóvenes
Ficha gerencia efectiva del tiempo para niños y jóvenesAsociación Civil Haskalá
 
Apresentação Ecotrend 2015
Apresentação Ecotrend 2015    Apresentação Ecotrend 2015
Apresentação Ecotrend 2015 Ecotrend
 
Charles platt - Make: Electronics
Charles platt - Make: ElectronicsCharles platt - Make: Electronics
Charles platt - Make: ElectronicsLucas ML
 
Hoja de vida juan david salgado henao
Hoja de vida juan david salgado henaoHoja de vida juan david salgado henao
Hoja de vida juan david salgado henaojuan-david14
 
Viajando hacia tu Cultura y a mi Cultura.
Viajando hacia tu Cultura y a mi Cultura.Viajando hacia tu Cultura y a mi Cultura.
Viajando hacia tu Cultura y a mi Cultura.aacarte
 
Alergia alimentaria World Allergy Week 2013 wao - trad español s laai --1
Alergia alimentaria   World Allergy Week 2013 wao - trad español s laai --1Alergia alimentaria   World Allergy Week 2013 wao - trad español s laai --1
Alergia alimentaria World Allergy Week 2013 wao - trad español s laai --1Juan Carlos Ivancevich
 

Viewers also liked (20)

Estudio CICOM 2012
Estudio CICOM 2012Estudio CICOM 2012
Estudio CICOM 2012
 
Green Internet - Dated 2009
Green Internet - Dated 2009Green Internet - Dated 2009
Green Internet - Dated 2009
 
Guía para la ordenación territorial en el marco del art. 12 de la directiva s...
Guía para la ordenación territorial en el marco del art. 12 de la directiva s...Guía para la ordenación territorial en el marco del art. 12 de la directiva s...
Guía para la ordenación territorial en el marco del art. 12 de la directiva s...
 
천안오피 optok3.com 오피톡 수원오피 충청오피 청주오피 진주오피
천안오피 optok3.com 오피톡 수원오피 충청오피 청주오피 진주오피천안오피 optok3.com 오피톡 수원오피 충청오피 청주오피 진주오피
천안오피 optok3.com 오피톡 수원오피 충청오피 청주오피 진주오피
 
Nueva+tecnologia+nueva+mentalidad / La transformación digital no es sólo una ...
Nueva+tecnologia+nueva+mentalidad / La transformación digital no es sólo una ...Nueva+tecnologia+nueva+mentalidad / La transformación digital no es sólo una ...
Nueva+tecnologia+nueva+mentalidad / La transformación digital no es sólo una ...
 
Tcr Y Plasmodium
Tcr Y PlasmodiumTcr Y Plasmodium
Tcr Y Plasmodium
 
Identity matrix
Identity matrixIdentity matrix
Identity matrix
 
Alexandra caguana auditoriainformática_ii_bimestre
Alexandra caguana auditoriainformática_ii_bimestreAlexandra caguana auditoriainformática_ii_bimestre
Alexandra caguana auditoriainformática_ii_bimestre
 
Ficha gerencia efectiva del tiempo para niños y jóvenes
Ficha gerencia efectiva del tiempo para niños y jóvenesFicha gerencia efectiva del tiempo para niños y jóvenes
Ficha gerencia efectiva del tiempo para niños y jóvenes
 
Presentacion Cafu 27 Telefonia Movil
Presentacion Cafu 27 Telefonia MovilPresentacion Cafu 27 Telefonia Movil
Presentacion Cafu 27 Telefonia Movil
 
Hospitality & Social Media - Where is the money ?
Hospitality & Social Media - Where is the money ?Hospitality & Social Media - Where is the money ?
Hospitality & Social Media - Where is the money ?
 
Regresando a nuestro origen parte2
Regresando a nuestro origen parte2Regresando a nuestro origen parte2
Regresando a nuestro origen parte2
 
Apresentação Ecotrend 2015
Apresentação Ecotrend 2015    Apresentação Ecotrend 2015
Apresentação Ecotrend 2015
 
Charles platt - Make: Electronics
Charles platt - Make: ElectronicsCharles platt - Make: Electronics
Charles platt - Make: Electronics
 
TRANSBIO. Del laboratorio a la aplicación final.
TRANSBIO. Del laboratorio a la aplicación final.TRANSBIO. Del laboratorio a la aplicación final.
TRANSBIO. Del laboratorio a la aplicación final.
 
Redes adsl telefonica y viettel (listo 2015) v1
Redes adsl telefonica y viettel (listo 2015) v1Redes adsl telefonica y viettel (listo 2015) v1
Redes adsl telefonica y viettel (listo 2015) v1
 
Hoja de vida juan david salgado henao
Hoja de vida juan david salgado henaoHoja de vida juan david salgado henao
Hoja de vida juan david salgado henao
 
Viajando hacia tu Cultura y a mi Cultura.
Viajando hacia tu Cultura y a mi Cultura.Viajando hacia tu Cultura y a mi Cultura.
Viajando hacia tu Cultura y a mi Cultura.
 
Lms Selection Templates
Lms Selection TemplatesLms Selection Templates
Lms Selection Templates
 
Alergia alimentaria World Allergy Week 2013 wao - trad español s laai --1
Alergia alimentaria   World Allergy Week 2013 wao - trad español s laai --1Alergia alimentaria   World Allergy Week 2013 wao - trad español s laai --1
Alergia alimentaria World Allergy Week 2013 wao - trad español s laai --1
 

Similar to Data Visualization on the Web - Intro to D3

Html5 drupal7 with mandakini kumari(1)
Html5 drupal7 with mandakini kumari(1)Html5 drupal7 with mandakini kumari(1)
Html5 drupal7 with mandakini kumari(1)Mandakini Kumari
 
Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...
Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...
Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...Lucidworks
 
SQL to NoSQL: Top 6 Questions
SQL to NoSQL: Top 6 QuestionsSQL to NoSQL: Top 6 Questions
SQL to NoSQL: Top 6 QuestionsMike Broberg
 
Django Overview
Django OverviewDjango Overview
Django OverviewBrian Tol
 
Performance Optimization and JavaScript Best Practices
Performance Optimization and JavaScript Best PracticesPerformance Optimization and JavaScript Best Practices
Performance Optimization and JavaScript Best PracticesDoris Chen
 
Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Henry S
 
HTML5, just another presentation :)
HTML5, just another presentation :)HTML5, just another presentation :)
HTML5, just another presentation :)François Massart
 
The Fine Art of Schema Design in MongoDB: Dos and Don'ts
The Fine Art of Schema Design in MongoDB: Dos and Don'tsThe Fine Art of Schema Design in MongoDB: Dos and Don'ts
The Fine Art of Schema Design in MongoDB: Dos and Don'tsMatias Cascallares
 
Ajax Performance Tuning and Best Practices
Ajax Performance Tuning and Best PracticesAjax Performance Tuning and Best Practices
Ajax Performance Tuning and Best PracticesDoris Chen
 
SPTechCon 2014 How to develop and debug client side code in SharePoint
SPTechCon 2014 How to develop and debug client side code in SharePointSPTechCon 2014 How to develop and debug client side code in SharePoint
SPTechCon 2014 How to develop and debug client side code in SharePointMark Rackley
 
Introduction to real time big data with Apache Spark
Introduction to real time big data with Apache SparkIntroduction to real time big data with Apache Spark
Introduction to real time big data with Apache SparkTaras Matyashovsky
 
TechEvent 2019: Oracle to PostgreSQL - a Travel Guide from Practice; Roland S...
TechEvent 2019: Oracle to PostgreSQL - a Travel Guide from Practice; Roland S...TechEvent 2019: Oracle to PostgreSQL - a Travel Guide from Practice; Roland S...
TechEvent 2019: Oracle to PostgreSQL - a Travel Guide from Practice; Roland S...Trivadis
 
Perchè potresti aver bisogno di un database NoSQL anche se non sei Google o F...
Perchè potresti aver bisogno di un database NoSQL anche se non sei Google o F...Perchè potresti aver bisogno di un database NoSQL anche se non sei Google o F...
Perchè potresti aver bisogno di un database NoSQL anche se non sei Google o F...Codemotion
 
Massively scalable ETL in real world applications: the hard way
Massively scalable ETL in real world applications: the hard wayMassively scalable ETL in real world applications: the hard way
Massively scalable ETL in real world applications: the hard wayJ On The Beach
 
Does my DIV look big in this?
Does my DIV look big in this?Does my DIV look big in this?
Does my DIV look big in this?glen_a_smith
 
Offline strategies for HTML5 web applications - pfCongres2012
Offline strategies for HTML5 web applications - pfCongres2012Offline strategies for HTML5 web applications - pfCongres2012
Offline strategies for HTML5 web applications - pfCongres2012Stephan Hochdörfer
 
Untangling - fall2017 - week 9
Untangling - fall2017 - week 9Untangling - fall2017 - week 9
Untangling - fall2017 - week 9Derek Jacoby
 
Web Components v1
Web Components v1Web Components v1
Web Components v1Mike Wilcox
 
SPTechCon Boston 2015 - Utilizing jQuery in SharePoint
SPTechCon Boston 2015 - Utilizing jQuery in SharePointSPTechCon Boston 2015 - Utilizing jQuery in SharePoint
SPTechCon Boston 2015 - Utilizing jQuery in SharePointMark Rackley
 

Similar to Data Visualization on the Web - Intro to D3 (20)

Html5 drupal7 with mandakini kumari(1)
Html5 drupal7 with mandakini kumari(1)Html5 drupal7 with mandakini kumari(1)
Html5 drupal7 with mandakini kumari(1)
 
Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...
Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...
Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...
 
SQL to NoSQL: Top 6 Questions
SQL to NoSQL: Top 6 QuestionsSQL to NoSQL: Top 6 Questions
SQL to NoSQL: Top 6 Questions
 
Django Overview
Django OverviewDjango Overview
Django Overview
 
Performance Optimization and JavaScript Best Practices
Performance Optimization and JavaScript Best PracticesPerformance Optimization and JavaScript Best Practices
Performance Optimization and JavaScript Best Practices
 
Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1
 
HTML5, just another presentation :)
HTML5, just another presentation :)HTML5, just another presentation :)
HTML5, just another presentation :)
 
The Fine Art of Schema Design in MongoDB: Dos and Don'ts
The Fine Art of Schema Design in MongoDB: Dos and Don'tsThe Fine Art of Schema Design in MongoDB: Dos and Don'ts
The Fine Art of Schema Design in MongoDB: Dos and Don'ts
 
Ajax Performance Tuning and Best Practices
Ajax Performance Tuning and Best PracticesAjax Performance Tuning and Best Practices
Ajax Performance Tuning and Best Practices
 
SPTechCon 2014 How to develop and debug client side code in SharePoint
SPTechCon 2014 How to develop and debug client side code in SharePointSPTechCon 2014 How to develop and debug client side code in SharePoint
SPTechCon 2014 How to develop and debug client side code in SharePoint
 
Introduction to real time big data with Apache Spark
Introduction to real time big data with Apache SparkIntroduction to real time big data with Apache Spark
Introduction to real time big data with Apache Spark
 
TechEvent 2019: Oracle to PostgreSQL - a Travel Guide from Practice; Roland S...
TechEvent 2019: Oracle to PostgreSQL - a Travel Guide from Practice; Roland S...TechEvent 2019: Oracle to PostgreSQL - a Travel Guide from Practice; Roland S...
TechEvent 2019: Oracle to PostgreSQL - a Travel Guide from Practice; Roland S...
 
Perchè potresti aver bisogno di un database NoSQL anche se non sei Google o F...
Perchè potresti aver bisogno di un database NoSQL anche se non sei Google o F...Perchè potresti aver bisogno di un database NoSQL anche se non sei Google o F...
Perchè potresti aver bisogno di un database NoSQL anche se non sei Google o F...
 
Droidcon Paris 2015
Droidcon Paris 2015Droidcon Paris 2015
Droidcon Paris 2015
 
Massively scalable ETL in real world applications: the hard way
Massively scalable ETL in real world applications: the hard wayMassively scalable ETL in real world applications: the hard way
Massively scalable ETL in real world applications: the hard way
 
Does my DIV look big in this?
Does my DIV look big in this?Does my DIV look big in this?
Does my DIV look big in this?
 
Offline strategies for HTML5 web applications - pfCongres2012
Offline strategies for HTML5 web applications - pfCongres2012Offline strategies for HTML5 web applications - pfCongres2012
Offline strategies for HTML5 web applications - pfCongres2012
 
Untangling - fall2017 - week 9
Untangling - fall2017 - week 9Untangling - fall2017 - week 9
Untangling - fall2017 - week 9
 
Web Components v1
Web Components v1Web Components v1
Web Components v1
 
SPTechCon Boston 2015 - Utilizing jQuery in SharePoint
SPTechCon Boston 2015 - Utilizing jQuery in SharePointSPTechCon Boston 2015 - Utilizing jQuery in SharePoint
SPTechCon Boston 2015 - Utilizing jQuery in SharePoint
 

More from Angela Zoss

Visualization For Data Science
Visualization For Data ScienceVisualization For Data Science
Visualization For Data ScienceAngela Zoss
 
Duke Data and Visualization Services
Duke Data and Visualization ServicesDuke Data and Visualization Services
Duke Data and Visualization ServicesAngela Zoss
 
Design and Support Recommendations from Data Visualization Research
Design and Support Recommendations from Data Visualization ResearchDesign and Support Recommendations from Data Visualization Research
Design and Support Recommendations from Data Visualization ResearchAngela Zoss
 
Practical Data Visualization
Practical Data VisualizationPractical Data Visualization
Practical Data VisualizationAngela Zoss
 
Data & GIS Services, Duke University
Data & GIS Services, Duke UniversityData & GIS Services, Duke University
Data & GIS Services, Duke UniversityAngela Zoss
 
Data Visualization for Drought & Cross Border Crisis
Data Visualization for Drought & Cross Border CrisisData Visualization for Drought & Cross Border Crisis
Data Visualization for Drought & Cross Border CrisisAngela Zoss
 
Creating and Processing Digital Humanities Data
Creating and Processing Digital Humanities DataCreating and Processing Digital Humanities Data
Creating and Processing Digital Humanities DataAngela Zoss
 

More from Angela Zoss (7)

Visualization For Data Science
Visualization For Data ScienceVisualization For Data Science
Visualization For Data Science
 
Duke Data and Visualization Services
Duke Data and Visualization ServicesDuke Data and Visualization Services
Duke Data and Visualization Services
 
Design and Support Recommendations from Data Visualization Research
Design and Support Recommendations from Data Visualization ResearchDesign and Support Recommendations from Data Visualization Research
Design and Support Recommendations from Data Visualization Research
 
Practical Data Visualization
Practical Data VisualizationPractical Data Visualization
Practical Data Visualization
 
Data & GIS Services, Duke University
Data & GIS Services, Duke UniversityData & GIS Services, Duke University
Data & GIS Services, Duke University
 
Data Visualization for Drought & Cross Border Crisis
Data Visualization for Drought & Cross Border CrisisData Visualization for Drought & Cross Border Crisis
Data Visualization for Drought & Cross Border Crisis
 
Creating and Processing Digital Humanities Data
Creating and Processing Digital Humanities DataCreating and Processing Digital Humanities Data
Creating and Processing Digital Humanities Data
 

Recently uploaded

(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Call Girls In Mahipalpur O9654467111 Escorts Service
Call Girls In Mahipalpur O9654467111  Escorts ServiceCall Girls In Mahipalpur O9654467111  Escorts Service
Call Girls In Mahipalpur O9654467111 Escorts ServiceSapana Sha
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfSocial Samosa
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...dajasot375
 
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...Pooja Nehwal
 
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...Suhani Kapoor
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...Suhani Kapoor
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfRachmat Ramadhan H
 
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...Suhani Kapoor
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfLars Albertsson
 
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改atducpo
 
RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998YohFuh
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptxthyngster
 
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiLow Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiSuhani Kapoor
 

Recently uploaded (20)

(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
 
Call Girls In Mahipalpur O9654467111 Escorts Service
Call Girls In Mahipalpur O9654467111  Escorts ServiceCall Girls In Mahipalpur O9654467111  Escorts Service
Call Girls In Mahipalpur O9654467111 Escorts Service
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
 
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
 
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
 
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
 
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdf
 
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
 
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
 
RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
 
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in  KishangarhDelhi 99530 vip 56974 Genuine Escort Service Call Girls in  Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
 
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
 
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiLow Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
 
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
 

Data Visualization on the Web - Intro to D3

  • 1. Data Visualization on the Web (Advanced) February 3, 2014 Angela Zoss Data Visualization Coordinator Data & GIS Services, Perkins 226
  • 2. Workshop Feedback Form To give feedback on this workshop: http://library.duke.edu/data/feedback.html
  • 3. D3 Resources • Interactive DataVisualization for theWeb http://chimera.labs.oreilly.com/books/123000000 0345 • Tutorial and Cheat Sheet, c. 2012 www.jeromecukier.net/blog/2012/10/15/d3- tutorial-at-visweek-2012/ • D3Tips andTricks https://leanpub.com/D3-Tips-and-Tricks/read
  • 4. When to use D3 • Need for unusual, highly customized chart types (http://bl.ocks.org/mbostock) • Relatively low number of data points or visible elements (SVG vs. HTML5 Canvas) • Impress your friends
  • 5. About D3 • JavaScript library • Fairly low level; building with rectangles and circles and lines, instead of pre-made chart structures* • Basic functioning makes it easy to join HTML elements with data points
  • 6. *D3 Middleware Basic line/area chart: • xCharts ~10 lines? http://tenxer.github.io/xcharts/ • Rickshaw (specifically for time series) ~16 lines http://code.shutterstock.com/rickshaw/ • NVD3 ~31 lines http://nvd3.org/ • Vega ~57 lines http://trifacta.github.io/vega/ http://chimera.labs.oreilly.com/books/12300000003 45/ch02.html#_tools_built_with_d3
  • 7. Developing with D3 • Text editors (Sublime,TextWrangler, etc.) and browsers with developer tools (esp. Chrome) • In-browser JavaScript prototyping – Tributary (http://tributary.io/) – Livecoding (http://livecoding.io/) – JSFiddle (http://jsfiddle.net/) – Plunker (http://plnkr.co/) • GitHub Gist/bl.ocks.org http://bl.ocks.org/
  • 8. Basic Structure • HTML – Empty element to insert chart into • JavaScript – Load data, build chart • CSS – Add style based on tags, classes, IDs
  • 10. To grab your own copy Running a local web server (optional for today) http://chimera.labs.oreilly.com/books/1230000000345/ch04.html#_ setting_up_a_web_server • Install git and run: git clone https://gist.github.com/8782982.git • Download zip archive of files, edit in text editor, view in browser https://gist.github.com/dukevis/8782982/download
  • 14. Code Structure (often) <script> //Set up static and global elements //Load data //Draw the chart </script>
  • 15. JavaScript Syntax • Declaring variables var number1 = 1; var number2 = 2; • Defining functions function sum(a, b) {return a+b;} • Operations sum(number1, number2); • Method chaining sum(number1, number2).toFixed(2);
  • 16. D3 selections In a nutshell, you use JavaScript selections (“selectAll”) to create a holding pen to store data and/or visual elements, which may or may not have been connected to each other yet. http://bost.ocks.org/mike/selection/
  • 18. Handy D3 Techniques • Transitions, to animate changes in state http://bost.ocks.org/mike/transition/ • Dispatch, to coordinate multiple charts http://bl.ocks.org/mbostock/5872848 • Crossfilter, for larger datasets http://square.github.io/crossfilter/ • Using make files to simplify chart regeneration http://bost.ocks.org/mike/make/
  • 19. Data & GIS Services • Data collections, LibGuides, etc. http://library.duke.edu/data/ • Blog (tutorials, announcements, etc.) http://blogs.library.duke.edu/data/ • Walk-in consultations http://library.duke.edu/data/about/schedule.html (or by appointment – askdata@duke.edu) • Perkins 226 computing cluster http://library.duke.edu/data/about/lab.html (fast hardware, diverse software) • Additional workshops http://library.duke.edu/data/news/ (listserv – dgs-announce@duke.edu)
  • 20. More on Data Visualization What kinds of visualizations are out there? How hard are they to reproduce? See the Intro to DataVisualization LibGuide for general examples and tools/tutorials. http://guides.library.duke.edu/datavis/ AdditionalVisualization LibGuides: http://guides.library.duke.edu/vis_types http://guides.library.duke.edu/topten http://guides.library.duke.edu/visualcomm
  • 21. Reminder: to give feedback on this workshop: http://library.duke.edu/data/feedback.html Thank you!