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

Contenu connexe

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

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

Dernier

Dernier (20)

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
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
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
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
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)
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
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
 
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
 
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
 
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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 

Crossfilter MadJS