SlideShare a Scribd company logo
1 of 21
Download to read offline
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 (JSON 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 Server: https://github.com/typicode/json-server 

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

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

More Related Content

What's hot

Creating Data Visualisations for the Web
Creating Data Visualisations for the WebCreating Data Visualisations for the Web
Creating Data Visualisations for the WebEmpathyBroker
 
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
 
Pitkin Maps & More (Mary Lakner)
Pitkin Maps & More (Mary Lakner)Pitkin Maps & More (Mary Lakner)
Pitkin Maps & More (Mary Lakner)GIS Colorado
 
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
 
Aws community day pune 2020 v3
Aws community day pune 2020 v3Aws community day pune 2020 v3
Aws community day pune 2020 v3Sridevi Murugayen
 
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
 
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
 
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
 
Network analysis on HR strategy
Network analysis on HR strategyNetwork analysis on HR strategy
Network analysis on HR strategyMin Luen Sun
 
Data Visualization With Tableau | Edureka
Data Visualization With Tableau | EdurekaData Visualization With Tableau | Edureka
Data Visualization With Tableau | EdurekaEdureka!
 
GIS As-Builts - How & Why
GIS As-Builts - How & WhyGIS As-Builts - How & Why
GIS As-Builts - How & WhyGIS Colorado
 
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
 
Introducing greenspaceLive and gTools
Introducing greenspaceLive and gToolsIntroducing greenspaceLive and gTools
Introducing greenspaceLive and gToolscalum_gsl
 
Open Data in Agriculture - AGH20013 Hands-on session
Open Data in Agriculture - AGH20013 Hands-on sessionOpen Data in Agriculture - AGH20013 Hands-on session
Open Data in Agriculture - AGH20013 Hands-on sessionCarlos V.
 
Internship Presentation
Internship PresentationInternship Presentation
Internship PresentationJobayer Ahmmed
 
Visualising Lidar Data in ArcGIS Pro - Training - Esri UK Annual Conference 2017
Visualising Lidar Data in ArcGIS Pro - Training - Esri UK Annual Conference 2017Visualising Lidar Data in ArcGIS Pro - Training - Esri UK Annual Conference 2017
Visualising Lidar Data in ArcGIS Pro - Training - Esri UK Annual Conference 2017Esri UK
 

What's hot (20)

Creating Data Visualisations for the Web
Creating Data Visualisations for the WebCreating Data Visualisations for the Web
Creating Data Visualisations for the Web
 
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
 
Pitkin Maps & More (Mary Lakner)
Pitkin Maps & More (Mary Lakner)Pitkin Maps & More (Mary Lakner)
Pitkin Maps & More (Mary Lakner)
 
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
 
Aws community day pune 2020 v3
Aws community day pune 2020 v3Aws community day pune 2020 v3
Aws community day pune 2020 v3
 
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
 
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
 
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
 
Network analysis on HR strategy
Network analysis on HR strategyNetwork analysis on HR strategy
Network analysis on HR strategy
 
Data Visualization With Tableau | Edureka
Data Visualization With Tableau | EdurekaData Visualization With Tableau | Edureka
Data Visualization With Tableau | Edureka
 
GIS As-Builts - How & Why
GIS As-Builts - How & WhyGIS As-Builts - How & Why
GIS As-Builts - How & Why
 
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
 
Introducing greenspaceLive and gTools
Introducing greenspaceLive and gToolsIntroducing greenspaceLive and gTools
Introducing greenspaceLive and gTools
 
Open Data in Agriculture - AGH20013 Hands-on session
Open Data in Agriculture - AGH20013 Hands-on sessionOpen Data in Agriculture - AGH20013 Hands-on session
Open Data in Agriculture - AGH20013 Hands-on session
 
Internship Presentation
Internship PresentationInternship Presentation
Internship Presentation
 
business intelligence
business intelligencebusiness intelligence
business intelligence
 
Visualising Lidar Data in ArcGIS Pro - Training - Esri UK Annual Conference 2017
Visualising Lidar Data in ArcGIS Pro - Training - Esri UK Annual Conference 2017Visualising Lidar Data in ArcGIS Pro - Training - Esri UK Annual Conference 2017
Visualising Lidar Data in ArcGIS Pro - Training - Esri UK Annual Conference 2017
 

Similar to D3.js Data Visualization with Charlotte Front-End Developers

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
 
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
 
[Seminar] 200605 seunghyeong choe
[Seminar] 200605 seunghyeong choe[Seminar] 200605 seunghyeong choe
[Seminar] 200605 seunghyeong choeivaderivader
 
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
 
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
 
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
 
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
 
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
 

Similar to D3.js Data Visualization with Charlotte Front-End Developers (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
 
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
 
[Seminar] 200605 seunghyeong choe
[Seminar] 200605 seunghyeong choe[Seminar] 200605 seunghyeong choe
[Seminar] 200605 seunghyeong choe
 
Visualize PeopleSoft Data with Pivot Grids
Visualize PeopleSoft Data with Pivot GridsVisualize PeopleSoft Data with Pivot Grids
Visualize PeopleSoft Data with Pivot Grids
 
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
 
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
 
Big query
Big queryBig query
Big query
 
Data visualization-tools
Data visualization-toolsData visualization-tools
Data visualization-tools
 
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
 
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...
 
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...
 

Recently uploaded

Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
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
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 

Recently uploaded (20)

Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
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
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 

D3.js Data Visualization with Charlotte Front-End Developers

  • 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 (JSON 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 Server: https://github.com/typicode/json-server • Github Repo: https://github.com/ignoreintuition/ dataviz_boilerplate • 20 Years of Games: https://www.kaggle.com/egrinstein/ 20-years-of-games