SlideShare a Scribd company logo
1 of 26
Download to read offline
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/

More Related Content

Similar to 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
 

Similar to 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
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
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
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
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
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 

Crossfilter MadJS