SlideShare une entreprise Scribd logo
1  sur  21
Télécharger pour lire hors ligne
Data
Visualizations
with D3.js
Charlotte Front-End
Developers 

Thursday, July 27, 2017

6:30 PM to 8:30 PM

Brian Greig
Who am I
• Brian Greig

• Third Party Software Engineer
at BoA

• 13 years of web development
and data analysis

• Recent Charlotte transpant

• Requisite Social Media

@IgnoreIntuition

github.com/ignoreintuition/

linkedin.com/in/bgreig/
Data Visualization with D3.js
• Data Visualization concepts

• Accessing data via API

• Basic components

• Binding data

• Building visualizations

• Making your visuals interactive
Data Visualization
• What is Data Visualization?

• What makes a Data Visualization good or bad?
Subjective? Objective?

• Does your chart tell a story? Does it give insight into the
underlying data?

• Why D3?
Data Visualization
http://graphics.wsj.com/elections/2016/field-guide-red-blue-america/
https://tctechcrunch2011.files.wordpress.com/2014/02/power-map.png?w=738
Data Visualization
Dimension Determine how the data in your visualization is grouped
Measure Calculations used in visuzalitions.  Composed of aggregations.
Hierarchy
Data fields expanding into larger data sets and groups of data
sets, with each subsequently larger data set of a higher rank
than the set that came before it.
Detail Dimension Provides descriptive data about a dimension object 
Schema Organization of data (blueprint)
Subset Set of which all the elements are contained in another set.
Key Terms
Accessing Data Via API
• Spinning up an API Server

• Using public APIs

• Preprocessing data on your server and exposing it via
your own API.
Accessing Data Via API
• XMLHttpRequest

• jQuery

• d3.request - make an asynchronous request. 

• d3.queue - manage the concurrent evaluation of
asynchronous tasks.
Basic Components
Preparing your data for reporting

• Server-side vs client-side

• Pre-aggregation / real-time aggregation

• Obtaining your data

• Aggregating your data (d3.nest)

• Filtering your data (array.prototype.filter)

• Sorting your data (array.prototype.sort)
Basic Components
Structuring your application

• init: This is where you create your scales, ranges, domains, as well
as binding your data to the DOM element that is going to use it. 

• enter: This is the initial, static visualization.  here you will assign
attributes and values to the different components of your element. 

• update: Here you will update any of the dynamic attributes of your
graph if the user changes the context or scope of your data. 

• exit: Any cleanup.
Basic Components
Your basic D3 Starter Kit

• Define the dataset [1]

• Create a container [3-5]

• Bind your data [8]

• Append visual
components & set
attributes [11-18]

• Clean up [24]
Binding Data
• Access data via
API

• Load data
synchronously

• Await runs on
success
Binding Data
• Aggregate as much
as possible on the
server

• Use rollup to further
aggregate data on
the front-end

• Use array functions
(filter, sort) to create
subsets
The commonality between science and art is in trying to see profoundly
- to develop strategies of seeing and showing. - Edward Tufte
Build Visualizations
Build Visualizations
_init()

• set metric

• set scale

• scaleOrdinal

• scaleLinear

• set domains

• set axis

• bind data
Build Visualizations
_enter()

• append the
elements to the
SVG

• set attributes

• static 

• as a function
of the data

• draw axis
Build Visualizations
Giving your data context

• Titles: Always, ALWAYS, include titles. Just enough to give
proper context

• Tooltips. Allowing your users to highlight the components of
your graph reduces clutter

• Axis. Terse and explanatory

• Colors. Varied and considerate of ADA

• Legends. Only if they provide value
Making it Interactive
Leverage the DOM
API

• Event listeners

• Array prototype
functions
Making it Interactive
_update()

• runs when the
graph needs to be
redrawn

• transitions

• update attributes

• Attributes that
don’t need to be
recalculated should
be left alone
Questions
Appendix
• D3 API Reference: https://d3js.org/

• JSON Placeholder: https://jsonplaceholder.typicode.com/

• Github Repo: https://github.com/ignoreintuition/
dataviz_boilerplate 

• 20 Years of Games: https://www.kaggle.com/egrinstein/
20-years-of-games

Contenu connexe

Tendances

What is Revit Structure - Dhyan Academy
What is Revit Structure - Dhyan AcademyWhat is Revit Structure - Dhyan Academy
What is Revit Structure - Dhyan Academydhyanacademyengineer
 
Interactive Visualization of Software Components with Virtual Reality Headsets
Interactive Visualization of Software Components with Virtual Reality HeadsetsInteractive Visualization of Software Components with Virtual Reality Headsets
Interactive Visualization of Software Components with Virtual Reality HeadsetsAndreas Schreiber
 
JoTechies -Azure Machine Learning
JoTechies -Azure Machine LearningJoTechies -Azure Machine Learning
JoTechies -Azure Machine LearningJoTechies
 
Aws community day pune 2020 v3
Aws community day pune 2020 v3Aws community day pune 2020 v3
Aws community day pune 2020 v3Sridevi Murugayen
 
A Big Data Analysis Framework for Model-Based Web User Behavior Analytics
A Big Data Analysis Framework for Model-Based Web User Behavior AnalyticsA Big Data Analysis Framework for Model-Based Web User Behavior Analytics
A Big Data Analysis Framework for Model-Based Web User Behavior AnalyticsAndrea Mauri
 
Pitkin Maps & More (Mary Lakner)
Pitkin Maps & More (Mary Lakner)Pitkin Maps & More (Mary Lakner)
Pitkin Maps & More (Mary Lakner)GIS Colorado
 
L21 sharing data using data synchronization
L21 sharing data using data synchronizationL21 sharing data using data synchronization
L21 sharing data using data synchronizationNaresh Kumar SAHU
 
DB Generator 2016
DB Generator 2016DB Generator 2016
DB Generator 2016Andy Hamer
 
Let's analyze how world reacts to road traffic by sentiment analysis final
Let's analyze how world reacts to road traffic by sentiment analysis finalLet's analyze how world reacts to road traffic by sentiment analysis final
Let's analyze how world reacts to road traffic by sentiment analysis finalSajeetharan
 
Mind the Gap - Data Science Meets Software Engineering
Mind the Gap - Data Science Meets Software EngineeringMind the Gap - Data Science Meets Software Engineering
Mind the Gap - Data Science Meets Software EngineeringBernhard Haslhofer
 
This Week in Neo4j - 24th November 2018
This Week in Neo4j - 24th November 2018This Week in Neo4j - 24th November 2018
This Week in Neo4j - 24th November 2018Neo4j
 
Network analysis on HR strategy
Network analysis on HR strategyNetwork analysis on HR strategy
Network analysis on HR strategyMin Luen Sun
 
Edge processing and High Level Visualization versus Cloud computing and Kibana
Edge processing and High Level Visualization versus Cloud computing and KibanaEdge processing and High Level Visualization versus Cloud computing and Kibana
Edge processing and High Level Visualization versus Cloud computing and KibanaStefano Milani
 
Data Visualization With Tableau | Edureka
Data Visualization With Tableau | EdurekaData Visualization With Tableau | Edureka
Data Visualization With Tableau | EdurekaEdureka!
 
Internship Presentation
Internship PresentationInternship Presentation
Internship PresentationJobayer Ahmmed
 
Introducing greenspaceLive and gTools
Introducing greenspaceLive and gToolsIntroducing greenspaceLive and gTools
Introducing greenspaceLive and gToolscalum_gsl
 
Relevant Search Leveraging Knowledge Graphs with Neo4j
Relevant Search Leveraging Knowledge Graphs with Neo4jRelevant Search Leveraging Knowledge Graphs with Neo4j
Relevant Search Leveraging Knowledge Graphs with Neo4jGraphAware
 
GIS As-Builts - How & Why
GIS As-Builts - How & WhyGIS As-Builts - How & Why
GIS As-Builts - How & WhyGIS Colorado
 

Tendances (20)

What is Revit Structure - Dhyan Academy
What is Revit Structure - Dhyan AcademyWhat is Revit Structure - Dhyan Academy
What is Revit Structure - Dhyan Academy
 
Interactive Visualization of Software Components with Virtual Reality Headsets
Interactive Visualization of Software Components with Virtual Reality HeadsetsInteractive Visualization of Software Components with Virtual Reality Headsets
Interactive Visualization of Software Components with Virtual Reality Headsets
 
JoTechies -Azure Machine Learning
JoTechies -Azure Machine LearningJoTechies -Azure Machine Learning
JoTechies -Azure Machine Learning
 
Aws community day pune 2020 v3
Aws community day pune 2020 v3Aws community day pune 2020 v3
Aws community day pune 2020 v3
 
A Big Data Analysis Framework for Model-Based Web User Behavior Analytics
A Big Data Analysis Framework for Model-Based Web User Behavior AnalyticsA Big Data Analysis Framework for Model-Based Web User Behavior Analytics
A Big Data Analysis Framework for Model-Based Web User Behavior Analytics
 
Pitkin Maps & More (Mary Lakner)
Pitkin Maps & More (Mary Lakner)Pitkin Maps & More (Mary Lakner)
Pitkin Maps & More (Mary Lakner)
 
RackBuilder Plus
RackBuilder PlusRackBuilder Plus
RackBuilder Plus
 
L21 sharing data using data synchronization
L21 sharing data using data synchronizationL21 sharing data using data synchronization
L21 sharing data using data synchronization
 
DB Generator 2016
DB Generator 2016DB Generator 2016
DB Generator 2016
 
Let's analyze how world reacts to road traffic by sentiment analysis final
Let's analyze how world reacts to road traffic by sentiment analysis finalLet's analyze how world reacts to road traffic by sentiment analysis final
Let's analyze how world reacts to road traffic by sentiment analysis final
 
Mind the Gap - Data Science Meets Software Engineering
Mind the Gap - Data Science Meets Software EngineeringMind the Gap - Data Science Meets Software Engineering
Mind the Gap - Data Science Meets Software Engineering
 
This Week in Neo4j - 24th November 2018
This Week in Neo4j - 24th November 2018This Week in Neo4j - 24th November 2018
This Week in Neo4j - 24th November 2018
 
Network analysis on HR strategy
Network analysis on HR strategyNetwork analysis on HR strategy
Network analysis on HR strategy
 
Edge processing and High Level Visualization versus Cloud computing and Kibana
Edge processing and High Level Visualization versus Cloud computing and KibanaEdge processing and High Level Visualization versus Cloud computing and Kibana
Edge processing and High Level Visualization versus Cloud computing and Kibana
 
Data Visualization With Tableau | Edureka
Data Visualization With Tableau | EdurekaData Visualization With Tableau | Edureka
Data Visualization With Tableau | Edureka
 
Internship Presentation
Internship PresentationInternship Presentation
Internship Presentation
 
Introducing greenspaceLive and gTools
Introducing greenspaceLive and gToolsIntroducing greenspaceLive and gTools
Introducing greenspaceLive and gTools
 
Relevant Search Leveraging Knowledge Graphs with Neo4j
Relevant Search Leveraging Knowledge Graphs with Neo4jRelevant Search Leveraging Knowledge Graphs with Neo4j
Relevant Search Leveraging Knowledge Graphs with Neo4j
 
GIS As-Builts - How & Why
GIS As-Builts - How & WhyGIS As-Builts - How & Why
GIS As-Builts - How & Why
 
business intelligence
business intelligencebusiness intelligence
business intelligence
 

Similaire à Data Visualizations with D3.js

Data Collection and Consumption
Data Collection and ConsumptionData Collection and Consumption
Data Collection and ConsumptionBrian Greig
 
20180701 - 1st Meeting - Data Science Orientation
20180701 - 1st Meeting - Data Science Orientation20180701 - 1st Meeting - Data Science Orientation
20180701 - 1st Meeting - Data Science OrientationDuc Lai Trung Minh
 
Power BI vs Tableau vs Cognos: A Data Analytics Research
Power BI vs Tableau vs Cognos: A Data Analytics ResearchPower BI vs Tableau vs Cognos: A Data Analytics Research
Power BI vs Tableau vs Cognos: A Data Analytics ResearchLuciano Vilas Boas
 
Data visualization in a Nutshell
Data visualization in a NutshellData visualization in a Nutshell
Data visualization in a NutshellWingChan46
 
Interactive Data Visualization Tools
Interactive Data Visualization ToolsInteractive Data Visualization Tools
Interactive Data Visualization ToolsJasmine Peniel
 
chapter 6 data visualization ppt.pptx
chapter 6 data visualization ppt.pptxchapter 6 data visualization ppt.pptx
chapter 6 data visualization ppt.pptxsayalisonavane3
 
[Seminar] 200605 seunghyeong choe
[Seminar] 200605 seunghyeong choe[Seminar] 200605 seunghyeong choe
[Seminar] 200605 seunghyeong choeivaderivader
 
Extending Power BI with your own custom visual
Extending Power BI with your own custom visualExtending Power BI with your own custom visual
Extending Power BI with your own custom visualJan Pieter Posthuma
 
CI/CD for a Data Platform
CI/CD for a Data PlatformCI/CD for a Data Platform
CI/CD for a Data PlatformCodit
 
Graph all the things - PRathle
Graph all the things - PRathleGraph all the things - PRathle
Graph all the things - PRathleNeo4j
 
Visualising montioring and evaluation data
Visualising montioring and evaluation dataVisualising montioring and evaluation data
Visualising montioring and evaluation dataRob Worthington
 
Introduction to Advanced Analytics with SharePoint Composites
Introduction to Advanced Analytics with SharePoint CompositesIntroduction to Advanced Analytics with SharePoint Composites
Introduction to Advanced Analytics with SharePoint CompositesMark Tabladillo
 
SPS Vancouver 2018 - What is CDM and CDS
SPS Vancouver 2018 - What is CDM and CDSSPS Vancouver 2018 - What is CDM and CDS
SPS Vancouver 2018 - What is CDM and CDSNicolas Georgeault
 
Introduction to Advanced Analytics with SharePoint Composites
Introduction to Advanced Analytics with SharePoint CompositesIntroduction to Advanced Analytics with SharePoint Composites
Introduction to Advanced Analytics with SharePoint CompositesMark Tabladillo
 
Denodo DataFest 2016: Comparing and Contrasting Data Virtualization With Data...
Denodo DataFest 2016: Comparing and Contrasting Data Virtualization With Data...Denodo DataFest 2016: Comparing and Contrasting Data Virtualization With Data...
Denodo DataFest 2016: Comparing and Contrasting Data Virtualization With Data...Denodo
 
How Celtra Optimizes its Advertising Platform with Databricks
How Celtra Optimizes its Advertising Platformwith DatabricksHow Celtra Optimizes its Advertising Platformwith Databricks
How Celtra Optimizes its Advertising Platform with DatabricksGrega Kespret
 
What does an event mean? Manage the meaning of your data! | Andreas Wombacher...
What does an event mean? Manage the meaning of your data! | Andreas Wombacher...What does an event mean? Manage the meaning of your data! | Andreas Wombacher...
What does an event mean? Manage the meaning of your data! | Andreas Wombacher...HostedbyConfluent
 

Similaire à Data Visualizations with D3.js (20)

Data Collection and Consumption
Data Collection and ConsumptionData Collection and Consumption
Data Collection and Consumption
 
20180701 - 1st Meeting - Data Science Orientation
20180701 - 1st Meeting - Data Science Orientation20180701 - 1st Meeting - Data Science Orientation
20180701 - 1st Meeting - Data Science Orientation
 
Power BI vs Tableau vs Cognos: A Data Analytics Research
Power BI vs Tableau vs Cognos: A Data Analytics ResearchPower BI vs Tableau vs Cognos: A Data Analytics Research
Power BI vs Tableau vs Cognos: A Data Analytics Research
 
Data visualization in a Nutshell
Data visualization in a NutshellData visualization in a Nutshell
Data visualization in a Nutshell
 
Interactive Data Visualization Tools
Interactive Data Visualization ToolsInteractive Data Visualization Tools
Interactive Data Visualization Tools
 
chapter 6 data visualization ppt.pptx
chapter 6 data visualization ppt.pptxchapter 6 data visualization ppt.pptx
chapter 6 data visualization ppt.pptx
 
Visualize PeopleSoft Data with Pivot Grids
Visualize PeopleSoft Data with Pivot GridsVisualize PeopleSoft Data with Pivot Grids
Visualize PeopleSoft Data with Pivot Grids
 
[Seminar] 200605 seunghyeong choe
[Seminar] 200605 seunghyeong choe[Seminar] 200605 seunghyeong choe
[Seminar] 200605 seunghyeong choe
 
Extending Power BI with your own custom visual
Extending Power BI with your own custom visualExtending Power BI with your own custom visual
Extending Power BI with your own custom visual
 
CI/CD for a Data Platform
CI/CD for a Data PlatformCI/CD for a Data Platform
CI/CD for a Data Platform
 
Graph all the things - PRathle
Graph all the things - PRathleGraph all the things - PRathle
Graph all the things - PRathle
 
Visualising montioring and evaluation data
Visualising montioring and evaluation dataVisualising montioring and evaluation data
Visualising montioring and evaluation data
 
Introduction to Advanced Analytics with SharePoint Composites
Introduction to Advanced Analytics with SharePoint CompositesIntroduction to Advanced Analytics with SharePoint Composites
Introduction to Advanced Analytics with SharePoint Composites
 
SPS Vancouver 2018 - What is CDM and CDS
SPS Vancouver 2018 - What is CDM and CDSSPS Vancouver 2018 - What is CDM and CDS
SPS Vancouver 2018 - What is CDM and CDS
 
Introduction to Advanced Analytics with SharePoint Composites
Introduction to Advanced Analytics with SharePoint CompositesIntroduction to Advanced Analytics with SharePoint Composites
Introduction to Advanced Analytics with SharePoint Composites
 
Big query
Big queryBig query
Big query
 
Data visualization-tools
Data visualization-toolsData visualization-tools
Data visualization-tools
 
Denodo DataFest 2016: Comparing and Contrasting Data Virtualization With Data...
Denodo DataFest 2016: Comparing and Contrasting Data Virtualization With Data...Denodo DataFest 2016: Comparing and Contrasting Data Virtualization With Data...
Denodo DataFest 2016: Comparing and Contrasting Data Virtualization With Data...
 
How Celtra Optimizes its Advertising Platform with Databricks
How Celtra Optimizes its Advertising Platformwith DatabricksHow Celtra Optimizes its Advertising Platformwith Databricks
How Celtra Optimizes its Advertising Platform with Databricks
 
What does an event mean? Manage the meaning of your data! | Andreas Wombacher...
What does an event mean? Manage the meaning of your data! | Andreas Wombacher...What does an event mean? Manage the meaning of your data! | Andreas Wombacher...
What does an event mean? Manage the meaning of your data! | Andreas Wombacher...
 

Dernier

BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024Janet Corral
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 

Dernier (20)

BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 

Data Visualizations with D3.js

  • 1. Data Visualizations with D3.js Charlotte Front-End Developers Thursday, July 27, 2017 6:30 PM to 8:30 PM Brian Greig
  • 2. Who am I • Brian Greig • Third Party Software Engineer at BoA • 13 years of web development and data analysis • Recent Charlotte transpant • Requisite Social Media
 @IgnoreIntuition
 github.com/ignoreintuition/
 linkedin.com/in/bgreig/
  • 3. Data Visualization with D3.js • Data Visualization concepts • Accessing data via API • Basic components • Binding data • Building visualizations • Making your visuals interactive
  • 4. Data Visualization • What is Data Visualization? • What makes a Data Visualization good or bad? Subjective? Objective? • Does your chart tell a story? Does it give insight into the underlying data? • Why D3?
  • 6. Data Visualization Dimension Determine how the data in your visualization is grouped Measure Calculations used in visuzalitions.  Composed of aggregations. Hierarchy Data fields expanding into larger data sets and groups of data sets, with each subsequently larger data set of a higher rank than the set that came before it. Detail Dimension Provides descriptive data about a dimension object  Schema Organization of data (blueprint) Subset Set of which all the elements are contained in another set. Key Terms
  • 7. Accessing Data Via API • Spinning up an API Server • Using public APIs • Preprocessing data on your server and exposing it via your own API.
  • 8. Accessing Data Via API • XMLHttpRequest • jQuery • d3.request - make an asynchronous request. • d3.queue - manage the concurrent evaluation of asynchronous tasks.
  • 9. Basic Components Preparing your data for reporting • Server-side vs client-side • Pre-aggregation / real-time aggregation • Obtaining your data • Aggregating your data (d3.nest) • Filtering your data (array.prototype.filter) • Sorting your data (array.prototype.sort)
  • 10. Basic Components Structuring your application • init: This is where you create your scales, ranges, domains, as well as binding your data to the DOM element that is going to use it. • enter: This is the initial, static visualization.  here you will assign attributes and values to the different components of your element. • update: Here you will update any of the dynamic attributes of your graph if the user changes the context or scope of your data. • exit: Any cleanup.
  • 11. Basic Components Your basic D3 Starter Kit • Define the dataset [1] • Create a container [3-5] • Bind your data [8] • Append visual components & set attributes [11-18] • Clean up [24]
  • 12. Binding Data • Access data via API • Load data synchronously • Await runs on success
  • 13. Binding Data • Aggregate as much as possible on the server • Use rollup to further aggregate data on the front-end • Use array functions (filter, sort) to create subsets
  • 14. The commonality between science and art is in trying to see profoundly - to develop strategies of seeing and showing. - Edward Tufte Build Visualizations
  • 15. Build Visualizations _init() • set metric • set scale • scaleOrdinal • scaleLinear • set domains • set axis • bind data
  • 16. Build Visualizations _enter() • append the elements to the SVG • set attributes • static • as a function of the data • draw axis
  • 17. Build Visualizations Giving your data context • Titles: Always, ALWAYS, include titles. Just enough to give proper context • Tooltips. Allowing your users to highlight the components of your graph reduces clutter • Axis. Terse and explanatory • Colors. Varied and considerate of ADA • Legends. Only if they provide value
  • 18. Making it Interactive Leverage the DOM API • Event listeners • Array prototype functions
  • 19. Making it Interactive _update() • runs when the graph needs to be redrawn • transitions • update attributes • Attributes that don’t need to be recalculated should be left alone
  • 21. Appendix • D3 API Reference: https://d3js.org/ • JSON Placeholder: https://jsonplaceholder.typicode.com/ • Github Repo: https://github.com/ignoreintuition/ dataviz_boilerplate • 20 Years of Games: https://www.kaggle.com/egrinstein/ 20-years-of-games