SlideShare ist ein Scribd-Unternehmen logo
1 von 12
Downloaden Sie, um offline zu lesen
Elasticsearch
(not just for text search)
Aleck Landgraf
@aleck_landgraf
buildingenergy.com
Buildings use a LOT of energy
• Buildings use more energy than any other sector in the US!
• 23% wasted energy*
• $1.2 Trillion wasted
• 40% of GHG wasted(1.1 gigatons annually)**
• What’s the miles per gallon of your office building?
• So how are buildings like mine performing?
• How are my peers’ buildings performing?
*McKinsey & Co: “Unlocking energy efficiency in the US economy”
**equivalent to the entire US fleet of passenger vehicles and lights trucks
The Buildings Performance
Database
• With the US DOE, LBNL, we make one of the largest
datasets of building data available (by statistical methods)
• Developer API which enables people to build their own
visualizations and develop fully customized applications
• Expose the DOE Building Energy Performance Taxonomy
through “filters”, the standard for describing buildings
• Provide a decision support tool
• 755k buildings +
A Histogram Illustration
/analyze/peers/
Why Elasticseach?
• We were choking on data with our previous solution
• It’s not just for text search
• Fast access to a denormalized set of data
• django-haystack integration into our Django stack
• It’s built to scale!
• Aggs!
Elasticsearch Aggregations
• stats aggregation
• percentile aggregation
• histogram aggregation
• facet counts
stats aggregation
• min, max, std dev, determines bin width
{
"aggs" : {
"eui_stats" : { "stats" : { "field" : "eui" } }
}
}
{
...
!
"aggregations": {
"eui_stats": {
"count": 2194,
"min": 0,
"max": 120,
"avg": 55.8,
"sum": 122425.2
}
}
}
percentile aggregation
• quartiles, median (the 0th and 100th quartiles from stats)
{
"aggs" : {
"eui_quartiles" : {
"percentiles" : {
"field" : "eui",
"percents" : [25, 50, 75]
}
}
}
}
{
...
!
"aggregations": {
"eui_quartiles": {
"values" : {
"25.0": 40,
"50.0": 60,
"75.0": 85
}
}
}
}
histogram aggregation
• EUI histogram
{
"aggs" : {
“eui_histogram" : {
"histogram" : {
"field" : "eui",
"interval" : 10
}
}
}
}
{
"aggregations": {
“eui_histogram" : {
"buckets": [
{
"key": 0,
"doc_count": 57
},
{
"key": 10,
"doc_count": 93
},
...
Elasticsearch Aggregations
• stats aggregation (min, max, std dev, determines bin width)
• percentile aggregation (quartiles, median)
• histogram aggregation (counts per EUI range)
Learning curve
• Custom ES backend for django-haystack to add the new ES
features, hope these make it to haystack someday
• Three queries per search to get stats, percentiles, and
histogram. Room for improvement/ES scripts
• Easy to set up in dev and prod, django-haystack keeps ES
and postgres in sync.
• An order of magnitude speed improvement :-)
Thanks!
buildingenergy.com
Questions/Comments?
@aleck_landgraf

Weitere ähnliche Inhalte

Andere mochten auch

Kts c3-he to hop
Kts c3-he to hopKts c3-he to hop
Kts c3-he to hopWang Ruan
 
46/2015/NĐ-CP về quản lý chất lượng công trình xây dựng
46/2015/NĐ-CP về quản lý chất lượng công trình xây dựng46/2015/NĐ-CP về quản lý chất lượng công trình xây dựng
46/2015/NĐ-CP về quản lý chất lượng công trình xây dựngMèo Hoang
 
Kts c1-he thong so
Kts c1-he thong soKts c1-he thong so
Kts c1-he thong soWang Ruan
 
Intertextuality
IntertextualityIntertextuality
Intertextualitytyoxall23
 
Better Goals for Better Outcomes: Best Practices for Writing Measurable, Effe...
Better Goals for Better Outcomes: Best Practices for Writing Measurable, Effe...Better Goals for Better Outcomes: Best Practices for Writing Measurable, Effe...
Better Goals for Better Outcomes: Best Practices for Writing Measurable, Effe...Accelify
 
Het leven samenvouwen (Vastenwerking 2015)
Het leven samenvouwen (Vastenwerking 2015)Het leven samenvouwen (Vastenwerking 2015)
Het leven samenvouwen (Vastenwerking 2015)Biesbrouck Peter
 
抄,是最好的獲利模式(全)
抄,是最好的獲利模式(全)抄,是最好的獲利模式(全)
抄,是最好的獲利模式(全)Chris Chang
 
Indian Economy: The Curious Case of Household Savings-Investment Gap
Indian Economy: The Curious Case of Household Savings-Investment GapIndian Economy: The Curious Case of Household Savings-Investment Gap
Indian Economy: The Curious Case of Household Savings-Investment GapAshutosh Bhargava
 
ADME And Toxicity Optimization Services
ADME And Toxicity Optimization ServicesADME And Toxicity Optimization Services
ADME And Toxicity Optimization Servicesthomas shaw
 
Omnibus database machine
Omnibus database machineOmnibus database machine
Omnibus database machineAleck Landgraf
 
ESSA Overview
ESSA OverviewESSA Overview
ESSA OverviewAccelify
 
Operation Theatre LED Light
Operation Theatre  LED LightOperation Theatre  LED Light
Operation Theatre LED LightTECHNOMED INDIA
 

Andere mochten auch (13)

Kts c3-he to hop
Kts c3-he to hopKts c3-he to hop
Kts c3-he to hop
 
46/2015/NĐ-CP về quản lý chất lượng công trình xây dựng
46/2015/NĐ-CP về quản lý chất lượng công trình xây dựng46/2015/NĐ-CP về quản lý chất lượng công trình xây dựng
46/2015/NĐ-CP về quản lý chất lượng công trình xây dựng
 
trabajo de ingenieria
trabajo de ingenieriatrabajo de ingenieria
trabajo de ingenieria
 
Kts c1-he thong so
Kts c1-he thong soKts c1-he thong so
Kts c1-he thong so
 
Intertextuality
IntertextualityIntertextuality
Intertextuality
 
Better Goals for Better Outcomes: Best Practices for Writing Measurable, Effe...
Better Goals for Better Outcomes: Best Practices for Writing Measurable, Effe...Better Goals for Better Outcomes: Best Practices for Writing Measurable, Effe...
Better Goals for Better Outcomes: Best Practices for Writing Measurable, Effe...
 
Het leven samenvouwen (Vastenwerking 2015)
Het leven samenvouwen (Vastenwerking 2015)Het leven samenvouwen (Vastenwerking 2015)
Het leven samenvouwen (Vastenwerking 2015)
 
抄,是最好的獲利模式(全)
抄,是最好的獲利模式(全)抄,是最好的獲利模式(全)
抄,是最好的獲利模式(全)
 
Indian Economy: The Curious Case of Household Savings-Investment Gap
Indian Economy: The Curious Case of Household Savings-Investment GapIndian Economy: The Curious Case of Household Savings-Investment Gap
Indian Economy: The Curious Case of Household Savings-Investment Gap
 
ADME And Toxicity Optimization Services
ADME And Toxicity Optimization ServicesADME And Toxicity Optimization Services
ADME And Toxicity Optimization Services
 
Omnibus database machine
Omnibus database machineOmnibus database machine
Omnibus database machine
 
ESSA Overview
ESSA OverviewESSA Overview
ESSA Overview
 
Operation Theatre LED Light
Operation Theatre  LED LightOperation Theatre  LED Light
Operation Theatre LED Light
 

Kürzlich hochgeladen

Harnessing the Power of GenAI for BI and Reporting.pptx
Harnessing the Power of GenAI for BI and Reporting.pptxHarnessing the Power of GenAI for BI and Reporting.pptx
Harnessing the Power of GenAI for BI and Reporting.pptxParas Gupta
 
怎样办理纽约州立大学宾汉姆顿分校毕业证(SUNY-Bin毕业证书)成绩单学校原版复制
怎样办理纽约州立大学宾汉姆顿分校毕业证(SUNY-Bin毕业证书)成绩单学校原版复制怎样办理纽约州立大学宾汉姆顿分校毕业证(SUNY-Bin毕业证书)成绩单学校原版复制
怎样办理纽约州立大学宾汉姆顿分校毕业证(SUNY-Bin毕业证书)成绩单学校原版复制vexqp
 
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...nirzagarg
 
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...nirzagarg
 
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...nirzagarg
 
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With OrangePredicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With OrangeThinkInnovation
 
Data Analyst Tasks to do the internship.pdf
Data Analyst Tasks to do the internship.pdfData Analyst Tasks to do the internship.pdf
Data Analyst Tasks to do the internship.pdftheeltifs
 
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...Bertram Ludäscher
 
The-boAt-Story-Navigating-the-Waves-of-Innovation.pptx
The-boAt-Story-Navigating-the-Waves-of-Innovation.pptxThe-boAt-Story-Navigating-the-Waves-of-Innovation.pptx
The-boAt-Story-Navigating-the-Waves-of-Innovation.pptxVivek487417
 
Jual Cytotec Asli Obat Aborsi No. 1 Paling Manjur
Jual Cytotec Asli Obat Aborsi No. 1 Paling ManjurJual Cytotec Asli Obat Aborsi No. 1 Paling Manjur
Jual Cytotec Asli Obat Aborsi No. 1 Paling Manjurptikerjasaptiker
 
Aspirational Block Program Block Syaldey District - Almora
Aspirational Block Program Block Syaldey District - AlmoraAspirational Block Program Block Syaldey District - Almora
Aspirational Block Program Block Syaldey District - AlmoraGovindSinghDasila
 
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...Elaine Werffeli
 
Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...gajnagarg
 
Vadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book now
Vadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book nowVadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book now
Vadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book nowgargpaaro
 
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...gajnagarg
 
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...gajnagarg
 
7. Epi of Chronic respiratory diseases.ppt
7. Epi of Chronic respiratory diseases.ppt7. Epi of Chronic respiratory diseases.ppt
7. Epi of Chronic respiratory diseases.pptibrahimabdi22
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 

Kürzlich hochgeladen (20)

Harnessing the Power of GenAI for BI and Reporting.pptx
Harnessing the Power of GenAI for BI and Reporting.pptxHarnessing the Power of GenAI for BI and Reporting.pptx
Harnessing the Power of GenAI for BI and Reporting.pptx
 
怎样办理纽约州立大学宾汉姆顿分校毕业证(SUNY-Bin毕业证书)成绩单学校原版复制
怎样办理纽约州立大学宾汉姆顿分校毕业证(SUNY-Bin毕业证书)成绩单学校原版复制怎样办理纽约州立大学宾汉姆顿分校毕业证(SUNY-Bin毕业证书)成绩单学校原版复制
怎样办理纽约州立大学宾汉姆顿分校毕业证(SUNY-Bin毕业证书)成绩单学校原版复制
 
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
 
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
 
Sequential and reinforcement learning for demand side management by Margaux B...
Sequential and reinforcement learning for demand side management by Margaux B...Sequential and reinforcement learning for demand side management by Margaux B...
Sequential and reinforcement learning for demand side management by Margaux B...
 
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
 
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With OrangePredicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
 
Data Analyst Tasks to do the internship.pdf
Data Analyst Tasks to do the internship.pdfData Analyst Tasks to do the internship.pdf
Data Analyst Tasks to do the internship.pdf
 
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
 
The-boAt-Story-Navigating-the-Waves-of-Innovation.pptx
The-boAt-Story-Navigating-the-Waves-of-Innovation.pptxThe-boAt-Story-Navigating-the-Waves-of-Innovation.pptx
The-boAt-Story-Navigating-the-Waves-of-Innovation.pptx
 
Jual Cytotec Asli Obat Aborsi No. 1 Paling Manjur
Jual Cytotec Asli Obat Aborsi No. 1 Paling ManjurJual Cytotec Asli Obat Aborsi No. 1 Paling Manjur
Jual Cytotec Asli Obat Aborsi No. 1 Paling Manjur
 
Aspirational Block Program Block Syaldey District - Almora
Aspirational Block Program Block Syaldey District - AlmoraAspirational Block Program Block Syaldey District - Almora
Aspirational Block Program Block Syaldey District - Almora
 
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
 
Cytotec in Jeddah+966572737505) get unwanted pregnancy kit Riyadh
Cytotec in Jeddah+966572737505) get unwanted pregnancy kit RiyadhCytotec in Jeddah+966572737505) get unwanted pregnancy kit Riyadh
Cytotec in Jeddah+966572737505) get unwanted pregnancy kit Riyadh
 
Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...
 
Vadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book now
Vadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book nowVadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book now
Vadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book now
 
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
 
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
 
7. Epi of Chronic respiratory diseases.ppt
7. Epi of Chronic respiratory diseases.ppt7. Epi of Chronic respiratory diseases.ppt
7. Epi of Chronic respiratory diseases.ppt
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 

Elasticsearch (not just for text search)

  • 1. Elasticsearch (not just for text search) Aleck Landgraf @aleck_landgraf buildingenergy.com
  • 2. Buildings use a LOT of energy • Buildings use more energy than any other sector in the US! • 23% wasted energy* • $1.2 Trillion wasted • 40% of GHG wasted(1.1 gigatons annually)** • What’s the miles per gallon of your office building? • So how are buildings like mine performing? • How are my peers’ buildings performing? *McKinsey & Co: “Unlocking energy efficiency in the US economy” **equivalent to the entire US fleet of passenger vehicles and lights trucks
  • 3. The Buildings Performance Database • With the US DOE, LBNL, we make one of the largest datasets of building data available (by statistical methods) • Developer API which enables people to build their own visualizations and develop fully customized applications • Expose the DOE Building Energy Performance Taxonomy through “filters”, the standard for describing buildings • Provide a decision support tool • 755k buildings +
  • 5. Why Elasticseach? • We were choking on data with our previous solution • It’s not just for text search • Fast access to a denormalized set of data • django-haystack integration into our Django stack • It’s built to scale! • Aggs!
  • 6. Elasticsearch Aggregations • stats aggregation • percentile aggregation • histogram aggregation • facet counts
  • 7. stats aggregation • min, max, std dev, determines bin width { "aggs" : { "eui_stats" : { "stats" : { "field" : "eui" } } } } { ... ! "aggregations": { "eui_stats": { "count": 2194, "min": 0, "max": 120, "avg": 55.8, "sum": 122425.2 } } }
  • 8. percentile aggregation • quartiles, median (the 0th and 100th quartiles from stats) { "aggs" : { "eui_quartiles" : { "percentiles" : { "field" : "eui", "percents" : [25, 50, 75] } } } } { ... ! "aggregations": { "eui_quartiles": { "values" : { "25.0": 40, "50.0": 60, "75.0": 85 } } } }
  • 9. histogram aggregation • EUI histogram { "aggs" : { “eui_histogram" : { "histogram" : { "field" : "eui", "interval" : 10 } } } } { "aggregations": { “eui_histogram" : { "buckets": [ { "key": 0, "doc_count": 57 }, { "key": 10, "doc_count": 93 }, ...
  • 10. Elasticsearch Aggregations • stats aggregation (min, max, std dev, determines bin width) • percentile aggregation (quartiles, median) • histogram aggregation (counts per EUI range)
  • 11. Learning curve • Custom ES backend for django-haystack to add the new ES features, hope these make it to haystack someday • Three queries per search to get stats, percentiles, and histogram. Room for improvement/ES scripts • Easy to set up in dev and prod, django-haystack keeps ES and postgres in sync. • An order of magnitude speed improvement :-)