SlideShare ist ein Scribd-Unternehmen logo
1 von 40
Downloaden Sie, um offline zu lesen
Visualizing your data
in JavaScript
Mandi Cai
BOSCC30 2018
16 November 2018
What are we talking about?
1. The power of data visualization
2. The chart
3. The libraries
4. Recap
What are we talking about?
1. The power of data visualization
A better way to learn & engage
Sources: The Upshot (NYT), Rhythm of Food (Google News Lab/Truth & Beauty), WaitButWhy
ID Unemployment
Rate (%)
1001 5.1
1003 4.9
1005 8.6
1007 6.2
1009 5.1
1011 7.1
1013 6.7
1015 6.1
1017 5
1019 5
1021 5.2
1023 7.9
1025 11.1
1027 5.9
1029 5.5
1031 5.6
1033 6.5
ID Unemployment
Rate (%)
1133 7
2013 1.9
2016 2.2
2020 5
2050 14.1
2060 5.6
2068 3.2
2070 8.1
2090 4.9
2100 5.9
2105 7.3
2110 3.6
2122 6.9
2130 4.4
2150 4.8
2158 21.7
2164 9.2
ID Unemployment
Rate (%)
5043 5.7
5045 3.7
5047 3.9
5049 3.9
5051 4
5053 3.2
5055 4
5057 3.7
5059 3.6
5061 3.4
5063 5
5065 5.3
5067 5.9
5069 5.9
5071 4.8
5073 6.2
5075 4.5
ID Unemployment
Rate (%)
5119 3.5
5121 4.6
5123 5
5125 3
5127 3.7
5129 4.3
5131 3.5
5133 4.8
5135 5.2
5137 4.8
5139 5.6
5141 6.4
5143 2.6
5145 4.8
5147 5.3
5149 4.4
6001 4.6
State
ID
Unemployment
Rate(%)
1001 5.1
1003 4.9
1005 8.6
1007 6.2
1009 5.1
1011 7.1
1013 6.7
1015 6.1
1017 5
1019 5
1021 5.2
1023 7.9
1025 11.1
1027 5.9
1029 5.5
1031 5.6
1033 6.5
State
ID
Unemployment
Rate(%)
1133 7
2013 1.9
2016 2.2
2020 5
2050 14.1
2060 5.6
2068 3.2
2070 8.1
2090 4.9
2100 5.9
2105 7.3
2110 3.6
2122 6.9
2130 4.4
2150 4.8
2158 21.7
2164 9.2
State
ID
Unemployment
Rate(%)
5043 5.7
5045 3.7
5047 3.9
5049 3.9
5051 4
5053 3.2
5055 4
5057 3.7
5059 3.6
5061 3.4
5063 5
5065 5.3
5067 5.9
5069 5.9
5071 4.8
5073 6.2
5075 4.5
State
ID
Unemployment
Rate(%)
5119 3.5
5121 4.6
5123 5
5125 3
5127 3.7
5129 4.3
5131 3.5
5133 4.8
5135 5.2
5137 4.8
5139 5.6
5141 6.4
5143 2.6
5145 4.8
5147 5.3
5149 4.4
6001 4.6
Source: Observable
What are we talking about?
1. The power of data visualization
2. The chart
Yay! You already have clean data!
What chart is compatible with my data?
Source: Venngage
ChangeCompare OrganizeInform Relationship
What chart is compatible with my data?
Movie Genre Production Budget (millions) Box Office (millions) ROI Rating IMDB
Avatar Action 237 2784 11.7 8
The Blind Side Drama 29 309 10.7 7.6
The Chronicles of Narnia: The Lion, the Witch and the Wardrobe Adventure 180 745 4.1 6.9
The Dark Knight Action 185 1005 5.4 9
ET: The Extra-Terrestrial Drama 11 793 75.5 7.9
Finding Nemo Adventure 94 940 10 8.1
Ghostbusters Comedy 144 229 1.6 7.8
The Hunger Games Thriller/Suspense 78 649 8.3 7.2
Iron Man 3 Action 178 1215 6.8 7.6
Jurassic Park Action 53 1030 19.4 8
King Kong Adventure 207 551 2.7 7.3
The Lion King Adventure 45 968 21.5 8.4
Monsters, Inc. Adventure 115 577 5 8
What chart is compatible with my data?
Source: Venngage
What are my independent variables and dependent variables?
ChangeCompare OrganizeInform Relationship
What chart is compatible with my data?
ChangeCompare OrganizeInform Relationship
Source: Venngage
What are my independent variables and dependent variables?
How many groups are being compared?
Designing the chart
Indicate directionality
Source: The Pudding
Source: The Pudding
Annotate important points
What are we talking about?
1. The power of data visualization
2. The chart
3. The libraries
Libraries
- D3.js
- Chart.js
- Dygraphs
- Google Charts
Anatomy
of a chart
We’ll dissect a
Dygraphs example.
1. Define a container for your chart.
2. Load your charting library.
3. Define or load your data.
4. Script your chart.
Libraries
- What’s the learning curve? (quality of documentation, code complexity)
- Is the library being actively supported?
- What types of data does this library take?
- How much can I customize my charts?
- What modes of interactivity are offered?
For large datasets: is it performant?
Learning curve?
D3.js Chart.jsDygraphs Google Charts
SmallSmall SmallSteep
Lines of code for a basic line chart?
10-158 10-15100-130
D3.js Chart.jsDygraphs Google Charts
Active development?
ActiveSporadic SporadicActive
D3.js Chart.jsDygraphs Google Charts
Types of data?
JSON, JavaScript
array
CSV, JavaScript
array, Google
DataTable
Google DataTable
CSV, JSON,
DSV, binary
file, image,
text, etc.
D3.js Chart.jsDygraphs Google Charts
Level of customization?
MediumLow MediumHigh
D3.js Chart.jsDygraphs Google Charts
Interactivity?
LowLow LowHigh
D3.js Chart.jsDygraphs Google Charts
Interactivity is important
Best used for?
Simple charts with
smooth initial
transitions
Time series from
CSVs
Creating a large
variety of charts
Any chart beyond a
simple chart, creating
custom interactivity
D3.js Chart.jsDygraphs Google Charts
Best used for?
Simple charts with
smooth initial
transitions
Time series from
CSVs
Creating a large
variety of charts
Any chart beyond a
simple chart, creating
custom interactivity
D3.js Chart.jsDygraphs Google Charts
D3.js Chart.jsDygraphs Google Charts
Best used for?
Simple charts with
smooth initial
transitions
Time series from
CSVs
Creating a large
variety of charts
Any chart beyond a
simple chart, creating
custom interactivity
The bottom line: invest time in D3 if you hit a wall with the other libraries.
Dygraphs, Chart.js, Google Charts are quick and useful for more simple charts.
What are we talking about?
1. The power of data visualization
2. The chart
3. The libraries
4. Recap
3 … 2 … 1 … Recap!
❏ Data visualization is powerful.
❏ Define the purpose of your chart. Think about the # of groups compared,
independent, and dependent variables.
❏ Pick a chart.
❏ Design the chart.
❏ Choose a library based on your needs.
❏ Script the chart.
❏ Communicate and iterate!
Thanks!
Twitter
E-mail
Website
@MandiCai
mandicai@gmail.com
www.mandilicai.com
Code for chart examples at github.com/mandicai

Weitere ähnliche Inhalte

Ähnlich wie Visualizing data in JavaScript with libraries like D3.js

From Data to Visualization, what happens in between?
From Data to Visualization, what happens in between?From Data to Visualization, what happens in between?
From Data to Visualization, what happens in between?Krist Wongsuphasawat
 
Measuring the Mobile Experience: The Analytics of Handheld UX
Measuring the Mobile Experience: The Analytics of Handheld UXMeasuring the Mobile Experience: The Analytics of Handheld UX
Measuring the Mobile Experience: The Analytics of Handheld UXKen Tabor
 
Big Trouble in Little Networks
Big Trouble in Little Networks Big Trouble in Little Networks
Big Trouble in Little Networks Stacy Devino
 
How Graph Databases used in Police Department?
How Graph Databases used in Police Department?How Graph Databases used in Police Department?
How Graph Databases used in Police Department?Samet KILICTAS
 
Apache Spark GraphX & GraphFrame Synthetic ID Fraud Use Case
Apache Spark GraphX & GraphFrame Synthetic ID Fraud Use CaseApache Spark GraphX & GraphFrame Synthetic ID Fraud Use Case
Apache Spark GraphX & GraphFrame Synthetic ID Fraud Use CaseMo Patel
 
LEAP into Data Science!
LEAP into Data Science!LEAP into Data Science!
LEAP into Data Science!Dev Gonzalez
 
Machine Learning - Challenges, Learnings & Opportunities
Machine Learning - Challenges, Learnings & OpportunitiesMachine Learning - Challenges, Learnings & Opportunities
Machine Learning - Challenges, Learnings & OpportunitiesCodePolitan
 
Playtika Bets on Big Data Analytics to Deliver Captivating Social Gaming Expe...
Playtika Bets on Big Data Analytics to Deliver Captivating Social Gaming Expe...Playtika Bets on Big Data Analytics to Deliver Captivating Social Gaming Expe...
Playtika Bets on Big Data Analytics to Deliver Captivating Social Gaming Expe...Dana Gardner
 
The Opportunity of Windows Norwich Indie Dev
The Opportunity of Windows    Norwich Indie DevThe Opportunity of Windows    Norwich Indie Dev
The Opportunity of Windows Norwich Indie DevLee Stott
 
Graph Database Use Cases - StampedeCon 2015
Graph Database Use Cases - StampedeCon 2015Graph Database Use Cases - StampedeCon 2015
Graph Database Use Cases - StampedeCon 2015StampedeCon
 
Graph database Use Cases
Graph database Use CasesGraph database Use Cases
Graph database Use CasesMax De Marzi
 
Real-Time Analytics and Visualization of Streaming Big Data with JReport & Sc...
Real-Time Analytics and Visualization of Streaming Big Data with JReport & Sc...Real-Time Analytics and Visualization of Streaming Big Data with JReport & Sc...
Real-Time Analytics and Visualization of Streaming Big Data with JReport & Sc...Mia Yuan Cao
 
Forces and Threats in a Data Warehouse (and why metadata and architecture is ...
Forces and Threats in a Data Warehouse (and why metadata and architecture is ...Forces and Threats in a Data Warehouse (and why metadata and architecture is ...
Forces and Threats in a Data Warehouse (and why metadata and architecture is ...Stefan Urbanek
 
Rand Fishkin - The State of SEO & How to Survive Google’s Trojan Horsing of t...
Rand Fishkin - The State of SEO & How to Survive Google’s Trojan Horsing of t...Rand Fishkin - The State of SEO & How to Survive Google’s Trojan Horsing of t...
Rand Fishkin - The State of SEO & How to Survive Google’s Trojan Horsing of t...Turing Fest
 
Visualising Data with Code
Visualising Data with CodeVisualising Data with Code
Visualising Data with CodeRi Liu
 
Machine learning
Machine learningMachine learning
Machine learningAshok Masti
 
Explore Data: Data Science + Visualization
Explore Data: Data Science + VisualizationExplore Data: Data Science + Visualization
Explore Data: Data Science + VisualizationRoelof Pieters
 

Ähnlich wie Visualizing data in JavaScript with libraries like D3.js (20)

From Data to Visualization, what happens in between?
From Data to Visualization, what happens in between?From Data to Visualization, what happens in between?
From Data to Visualization, what happens in between?
 
Measuring the Mobile Experience: The Analytics of Handheld UX
Measuring the Mobile Experience: The Analytics of Handheld UXMeasuring the Mobile Experience: The Analytics of Handheld UX
Measuring the Mobile Experience: The Analytics of Handheld UX
 
Big Trouble in Little Networks
Big Trouble in Little Networks Big Trouble in Little Networks
Big Trouble in Little Networks
 
How Graph Databases used in Police Department?
How Graph Databases used in Police Department?How Graph Databases used in Police Department?
How Graph Databases used in Police Department?
 
Piano rubyslava final
Piano rubyslava finalPiano rubyslava final
Piano rubyslava final
 
Apache Spark GraphX & GraphFrame Synthetic ID Fraud Use Case
Apache Spark GraphX & GraphFrame Synthetic ID Fraud Use CaseApache Spark GraphX & GraphFrame Synthetic ID Fraud Use Case
Apache Spark GraphX & GraphFrame Synthetic ID Fraud Use Case
 
Leap into data science!
Leap into data science!Leap into data science!
Leap into data science!
 
LEAP into Data Science!
LEAP into Data Science!LEAP into Data Science!
LEAP into Data Science!
 
Machine Learning - Challenges, Learnings & Opportunities
Machine Learning - Challenges, Learnings & OpportunitiesMachine Learning - Challenges, Learnings & Opportunities
Machine Learning - Challenges, Learnings & Opportunities
 
Playtika Bets on Big Data Analytics to Deliver Captivating Social Gaming Expe...
Playtika Bets on Big Data Analytics to Deliver Captivating Social Gaming Expe...Playtika Bets on Big Data Analytics to Deliver Captivating Social Gaming Expe...
Playtika Bets on Big Data Analytics to Deliver Captivating Social Gaming Expe...
 
The Opportunity of Windows Norwich Indie Dev
The Opportunity of Windows    Norwich Indie DevThe Opportunity of Windows    Norwich Indie Dev
The Opportunity of Windows Norwich Indie Dev
 
Graph Database Use Cases - StampedeCon 2015
Graph Database Use Cases - StampedeCon 2015Graph Database Use Cases - StampedeCon 2015
Graph Database Use Cases - StampedeCon 2015
 
Graph database Use Cases
Graph database Use CasesGraph database Use Cases
Graph database Use Cases
 
Real-Time Analytics and Visualization of Streaming Big Data with JReport & Sc...
Real-Time Analytics and Visualization of Streaming Big Data with JReport & Sc...Real-Time Analytics and Visualization of Streaming Big Data with JReport & Sc...
Real-Time Analytics and Visualization of Streaming Big Data with JReport & Sc...
 
Forces and Threats in a Data Warehouse (and why metadata and architecture is ...
Forces and Threats in a Data Warehouse (and why metadata and architecture is ...Forces and Threats in a Data Warehouse (and why metadata and architecture is ...
Forces and Threats in a Data Warehouse (and why metadata and architecture is ...
 
Rand Fishkin - The State of SEO & How to Survive Google’s Trojan Horsing of t...
Rand Fishkin - The State of SEO & How to Survive Google’s Trojan Horsing of t...Rand Fishkin - The State of SEO & How to Survive Google’s Trojan Horsing of t...
Rand Fishkin - The State of SEO & How to Survive Google’s Trojan Horsing of t...
 
Who? What? Why we better care?
Who? What? Why we better care?Who? What? Why we better care?
Who? What? Why we better care?
 
Visualising Data with Code
Visualising Data with CodeVisualising Data with Code
Visualising Data with Code
 
Machine learning
Machine learningMachine learning
Machine learning
 
Explore Data: Data Science + Visualization
Explore Data: Data Science + VisualizationExplore Data: Data Science + Visualization
Explore Data: Data Science + Visualization
 

Kürzlich hochgeladen

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 2024Rafal Los
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 

Kürzlich hochgeladen (20)

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
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 

Visualizing data in JavaScript with libraries like D3.js

  • 1. Visualizing your data in JavaScript Mandi Cai BOSCC30 2018 16 November 2018
  • 2. What are we talking about? 1. The power of data visualization 2. The chart 3. The libraries 4. Recap
  • 3. What are we talking about? 1. The power of data visualization
  • 4. A better way to learn & engage Sources: The Upshot (NYT), Rhythm of Food (Google News Lab/Truth & Beauty), WaitButWhy
  • 5.
  • 6. ID Unemployment Rate (%) 1001 5.1 1003 4.9 1005 8.6 1007 6.2 1009 5.1 1011 7.1 1013 6.7 1015 6.1 1017 5 1019 5 1021 5.2 1023 7.9 1025 11.1 1027 5.9 1029 5.5 1031 5.6 1033 6.5 ID Unemployment Rate (%) 1133 7 2013 1.9 2016 2.2 2020 5 2050 14.1 2060 5.6 2068 3.2 2070 8.1 2090 4.9 2100 5.9 2105 7.3 2110 3.6 2122 6.9 2130 4.4 2150 4.8 2158 21.7 2164 9.2 ID Unemployment Rate (%) 5043 5.7 5045 3.7 5047 3.9 5049 3.9 5051 4 5053 3.2 5055 4 5057 3.7 5059 3.6 5061 3.4 5063 5 5065 5.3 5067 5.9 5069 5.9 5071 4.8 5073 6.2 5075 4.5 ID Unemployment Rate (%) 5119 3.5 5121 4.6 5123 5 5125 3 5127 3.7 5129 4.3 5131 3.5 5133 4.8 5135 5.2 5137 4.8 5139 5.6 5141 6.4 5143 2.6 5145 4.8 5147 5.3 5149 4.4 6001 4.6
  • 7. State ID Unemployment Rate(%) 1001 5.1 1003 4.9 1005 8.6 1007 6.2 1009 5.1 1011 7.1 1013 6.7 1015 6.1 1017 5 1019 5 1021 5.2 1023 7.9 1025 11.1 1027 5.9 1029 5.5 1031 5.6 1033 6.5 State ID Unemployment Rate(%) 1133 7 2013 1.9 2016 2.2 2020 5 2050 14.1 2060 5.6 2068 3.2 2070 8.1 2090 4.9 2100 5.9 2105 7.3 2110 3.6 2122 6.9 2130 4.4 2150 4.8 2158 21.7 2164 9.2 State ID Unemployment Rate(%) 5043 5.7 5045 3.7 5047 3.9 5049 3.9 5051 4 5053 3.2 5055 4 5057 3.7 5059 3.6 5061 3.4 5063 5 5065 5.3 5067 5.9 5069 5.9 5071 4.8 5073 6.2 5075 4.5 State ID Unemployment Rate(%) 5119 3.5 5121 4.6 5123 5 5125 3 5127 3.7 5129 4.3 5131 3.5 5133 4.8 5135 5.2 5137 4.8 5139 5.6 5141 6.4 5143 2.6 5145 4.8 5147 5.3 5149 4.4 6001 4.6 Source: Observable
  • 8. What are we talking about? 1. The power of data visualization 2. The chart
  • 9. Yay! You already have clean data!
  • 10. What chart is compatible with my data? Source: Venngage ChangeCompare OrganizeInform Relationship
  • 11. What chart is compatible with my data? Movie Genre Production Budget (millions) Box Office (millions) ROI Rating IMDB Avatar Action 237 2784 11.7 8 The Blind Side Drama 29 309 10.7 7.6 The Chronicles of Narnia: The Lion, the Witch and the Wardrobe Adventure 180 745 4.1 6.9 The Dark Knight Action 185 1005 5.4 9 ET: The Extra-Terrestrial Drama 11 793 75.5 7.9 Finding Nemo Adventure 94 940 10 8.1 Ghostbusters Comedy 144 229 1.6 7.8 The Hunger Games Thriller/Suspense 78 649 8.3 7.2 Iron Man 3 Action 178 1215 6.8 7.6 Jurassic Park Action 53 1030 19.4 8 King Kong Adventure 207 551 2.7 7.3 The Lion King Adventure 45 968 21.5 8.4 Monsters, Inc. Adventure 115 577 5 8
  • 12. What chart is compatible with my data? Source: Venngage What are my independent variables and dependent variables? ChangeCompare OrganizeInform Relationship
  • 13. What chart is compatible with my data? ChangeCompare OrganizeInform Relationship Source: Venngage What are my independent variables and dependent variables? How many groups are being compared?
  • 16. Source: The Pudding Annotate important points
  • 17. What are we talking about? 1. The power of data visualization 2. The chart 3. The libraries
  • 18. Libraries - D3.js - Chart.js - Dygraphs - Google Charts
  • 19. Anatomy of a chart We’ll dissect a Dygraphs example.
  • 20. 1. Define a container for your chart.
  • 21. 2. Load your charting library.
  • 22. 3. Define or load your data.
  • 23. 4. Script your chart.
  • 24.
  • 25. Libraries - What’s the learning curve? (quality of documentation, code complexity) - Is the library being actively supported? - What types of data does this library take? - How much can I customize my charts? - What modes of interactivity are offered? For large datasets: is it performant?
  • 26. Learning curve? D3.js Chart.jsDygraphs Google Charts SmallSmall SmallSteep
  • 27.
  • 28. Lines of code for a basic line chart? 10-158 10-15100-130 D3.js Chart.jsDygraphs Google Charts
  • 30. Types of data? JSON, JavaScript array CSV, JavaScript array, Google DataTable Google DataTable CSV, JSON, DSV, binary file, image, text, etc. D3.js Chart.jsDygraphs Google Charts
  • 31. Level of customization? MediumLow MediumHigh D3.js Chart.jsDygraphs Google Charts
  • 34. Best used for? Simple charts with smooth initial transitions Time series from CSVs Creating a large variety of charts Any chart beyond a simple chart, creating custom interactivity D3.js Chart.jsDygraphs Google Charts
  • 35. Best used for? Simple charts with smooth initial transitions Time series from CSVs Creating a large variety of charts Any chart beyond a simple chart, creating custom interactivity D3.js Chart.jsDygraphs Google Charts
  • 36. D3.js Chart.jsDygraphs Google Charts Best used for? Simple charts with smooth initial transitions Time series from CSVs Creating a large variety of charts Any chart beyond a simple chart, creating custom interactivity The bottom line: invest time in D3 if you hit a wall with the other libraries. Dygraphs, Chart.js, Google Charts are quick and useful for more simple charts.
  • 37. What are we talking about? 1. The power of data visualization 2. The chart 3. The libraries 4. Recap
  • 38. 3 … 2 … 1 … Recap! ❏ Data visualization is powerful. ❏ Define the purpose of your chart. Think about the # of groups compared, independent, and dependent variables. ❏ Pick a chart. ❏ Design the chart. ❏ Choose a library based on your needs. ❏ Script the chart. ❏ Communicate and iterate!
  • 39.