SlideShare una empresa de Scribd logo
1 de 40
Descargar para leer sin conexión
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

Más contenido relacionado

Similar a Visualizing your data in JavaScript

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
 

Similar a Visualizing your data in JavaScript (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
 

Último

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
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
 
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
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
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
 
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
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 

Último (20)

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
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
 
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
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
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
 
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
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 

Visualizing your data in JavaScript

  • 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.