SlideShare ist ein Scribd-Unternehmen logo
Crossfilter
Fast Multidimensional Filtering for Coordinated Views
Data management and visualization consultant
!

Project to develop a general purpose
collaborative data management, transformation,
and visualization platform
(GPCDMTVP for short).
!

You can find me at
http://esjewett.com or @esjewett”
We’ve got problems
More
specifically
We’ve got data
and filters
and aggregations
and speed
Demo
Moritz Stefaner’s “Elastic Lists” experiment
Demo review
•

We control the data

•

Many different simultaneous filters

•

Aggregation: count

•

Data in the browser … in Flash
What would a generalpurpose approach to this
problem look like?
Let’s just call it … say … Crossfilter
Javascript
(am I at the right meetup?)
Data is encapsulated
!

var
!!
!!
!!
!!

data = [ { date: ‘2014-01-01’,!
! ! ! ! ! value: 10,!
! ! ! ! ! color: ‘orange’ },!
! !
! { … },!
! ! ! !
… ];!

!

var transactions = crossfilter(data);!
and dimensional
!

var dateDim = transactions.dimension( !
function (d) {!
return “” + d.date;!!
}!
);!
Filter on dimensions
!

dateDim.filter(“2014-01-01”);!
!
!
!
!
!
!
!
Filter on dimensions
!

dateDim.filter(“2014-01-01”);!
dateDim.filter([“2013-01-01”,”2014-01-01”]);!
!
!
!
!
!
!
Filter on dimensions
!

dateDim.filter(“2014-01-01”);!
dateDim.filter([“2013-01-01”,”2014-01-01”]);!
dateDim.filter( !
function (d) {!
return d === “2013-06-01”;!
}!
);!
!
Filter on dimensions
!

dateDim.filter(“2014-01-01”);!
dateDim.filter([“2013-01-01”,”2014-01-01”]);!
dateDim.filter( !
function (d) {!
return d === “2013-06-01”;!
}!
);!
dateDim.filterAll();!
Aggregate on dimensions

!

// Count transactions per day!
var dateGroup = dateDim.group();!
Aggregate on dimensions
!

// Count transactions per month!
var monthGroup = dateDim.group(!
function (d) {!
return d.substr(1,7);!
}!
);!
Aggregate on dimensions
!

// Sum by value over groups of days!
dateGroup.reduceSum(!
function (d) {!
// “d” is the complete record!
return d.value;!
}!
);!
“Queries”
!
// Month with most activity under current filter!
monthGroup.top(1);!
// { key: “2013-06”, value: 435 }!

!
// Day with highest value under current filter!
dateGroup.top(1);!
// { key: “2013-12-24”, value: 143700 }!

!
// Get all the months values under current filter!
monthGroup.all();!
// [ { key: “2013-06”, value: 435 },!
//
{ key: “2013-12”, value: 315 },!
//
{ key: “2013-02”, value: 250 }, … ]!
So what about speed?
Demo
Some notes
•

Dimension accessors must return naturally ordered
values. Cast before returning!

•

reduce(add, remove, initial)

•

order(ordering)

•

groupAll()
Ethan Jewett!
esjewett.com / coredatra.com
@esjewett
https://github.com/esjewett
Links
•

Crossfilter - http://square.github.io/crossfilter/

•

Crossfilter API - https://github.com/square/
crossfilter/wiki/API-Reference

•

Moritz Stefaner’s Elastic Lists - http://
moritz.stefaner.eu/projects/elastic-lists/

Weitere ähnliche Inhalte

Ähnlich wie Crossfilter MadJS

5 Essential Practices of the Data Driven Organization
5 Essential Practices of the Data Driven Organization5 Essential Practices of the Data Driven Organization
5 Essential Practices of the Data Driven Organization
Vivastream
 
Map Reduce amrp presentation
Map Reduce amrp presentationMap Reduce amrp presentation
Map Reduce amrp presentation
renjan131
 

Ähnlich wie Crossfilter MadJS (20)

IWMW 2008 Mashup Workshop
IWMW 2008 Mashup WorkshopIWMW 2008 Mashup Workshop
IWMW 2008 Mashup Workshop
 
Data Driven Design - Frontend Conference Zurich
Data Driven Design - Frontend Conference ZurichData Driven Design - Frontend Conference Zurich
Data Driven Design - Frontend Conference Zurich
 
5 Essential Practices of the Data Driven Organization
5 Essential Practices of the Data Driven Organization5 Essential Practices of the Data Driven Organization
5 Essential Practices of the Data Driven Organization
 
DataEngConf SF16 - Multi-temporal Data Structures
DataEngConf SF16 - Multi-temporal Data StructuresDataEngConf SF16 - Multi-temporal Data Structures
DataEngConf SF16 - Multi-temporal Data Structures
 
Ia Summit08 Wa Slides
Ia Summit08 Wa SlidesIa Summit08 Wa Slides
Ia Summit08 Wa Slides
 
accessTufts_Leveraging_DesignThinking_EnterpriseArchitecture_NERCOMP_3-23-201...
accessTufts_Leveraging_DesignThinking_EnterpriseArchitecture_NERCOMP_3-23-201...accessTufts_Leveraging_DesignThinking_EnterpriseArchitecture_NERCOMP_3-23-201...
accessTufts_Leveraging_DesignThinking_EnterpriseArchitecture_NERCOMP_3-23-201...
 
Introduccion a HTML5
Introduccion a HTML5Introduccion a HTML5
Introduccion a HTML5
 
html5
html5html5
html5
 
Access tufts leveraging_designthinking_enterprisearchitecture_nercomp_3-23-2016
Access tufts leveraging_designthinking_enterprisearchitecture_nercomp_3-23-2016Access tufts leveraging_designthinking_enterprisearchitecture_nercomp_3-23-2016
Access tufts leveraging_designthinking_enterprisearchitecture_nercomp_3-23-2016
 
Map Reduce amrp presentation
Map Reduce amrp presentationMap Reduce amrp presentation
Map Reduce amrp presentation
 
The Iceberg Approach - Power from what lies beneath in SEO for a mobile-first...
The Iceberg Approach - Power from what lies beneath in SEO for a mobile-first...The Iceberg Approach - Power from what lies beneath in SEO for a mobile-first...
The Iceberg Approach - Power from what lies beneath in SEO for a mobile-first...
 
2020 Chrome Dev Summit: Web Performance 101
2020 Chrome Dev Summit: Web Performance 1012020 Chrome Dev Summit: Web Performance 101
2020 Chrome Dev Summit: Web Performance 101
 
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
 
5thingsyourspreadsheetcantdo eng
5thingsyourspreadsheetcantdo eng5thingsyourspreadsheetcantdo eng
5thingsyourspreadsheetcantdo eng
 
How well are you delivering your experience?
How well are you delivering your experience?How well are you delivering your experience?
How well are you delivering your experience?
 
The road to professional web development
The road to professional web developmentThe road to professional web development
The road to professional web development
 
How to get inside the search engine crawler head - Marketing Festival
How to get inside the search engine crawler head - Marketing FestivalHow to get inside the search engine crawler head - Marketing Festival
How to get inside the search engine crawler head - Marketing Festival
 
Search Analytics at Enterprise Search Summit Fall 2011
Search Analytics at Enterprise Search Summit Fall 2011Search Analytics at Enterprise Search Summit Fall 2011
Search Analytics at Enterprise Search Summit Fall 2011
 
SharePoint and the User Interface with JavaScript
SharePoint and the User Interface with JavaScriptSharePoint and the User Interface with JavaScript
SharePoint and the User Interface with JavaScript
 

Kürzlich hochgeladen

Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Peter Udo Diehl
 

Kürzlich hochgeladen (20)

IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
Introduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationIntroduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG Evaluation
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
Designing for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastDesigning for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at Comcast
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
Strategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering TeamsStrategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering Teams
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří Karpíšek
 

Crossfilter MadJS