SlideShare une entreprise Scribd logo
1  sur  40
Télécharger pour lire hors ligne
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

Contenu connexe

Similaire à 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
 

Similaire à 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
 

Dernier

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
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
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 Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
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
 
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
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
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
 
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
 

Dernier (20)

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...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
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 Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
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?
 
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
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
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
 
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
 

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.