> For the complete documentation index, see [llms.txt](https://doc.moost.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.moost.io/technical-integration/cloud-to-cloud-integration/intelligence-service-integration/peer-comparison.md).

# Peer Comparison

The comparison endpoint enriches daily energy statistics with percentile rankings against a group of comparable buildings. This powers "How do I compare?" features in your Households Dashboard.

## A building’s energy data with daily readings, and comparison with comparable buildings

> Get energy related data of a building, aggregated on a daily basis and compare it with comparable buildings.\
> \<br/>\
> The comparison group has the following values:\
> \<ul>\
> \<li>Rank in comparison group. Rank 1 is the one with highest value.\</li>\
> \<li>Size of the comparison group.\</li>\
> \<li>Minimum value in the comparison group.\</li>\
> \<li>Maximum value in the comparison group.\</li>\
> \<li>25th percentile in the comparison group.\</li>\
> \<li>Median (50th percentile) in the comparison group.\</li>\
> \<li>75th percentile in the comparison group.\</li>\
> \</ul><br>

```json
{"openapi":"3.0.3","info":{"title":"MOOST Public API","version":"latest"},"servers":[{"url":"https://api.moost.io"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","name":"bearerAuth","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"DailyComparisonEnergyStatistics":{"type":"object","properties":{"day":{"type":"string"},"energyGeneration":{"$ref":"#/components/schemas/ComparisonGroup"},"energyConsumption":{"$ref":"#/components/schemas/ComparisonGroup"},"gridEnergyConsumption":{"$ref":"#/components/schemas/ComparisonGroup"}}},"ComparisonGroup":{"type":"object","properties":{"value":{"type":"number","format":"float"},"rank":{"type":"integer","format":"int32"},"size":{"type":"integer","format":"int32"},"min":{"type":"number","format":"float"},"max":{"type":"number","format":"float"},"p25":{"type":"number","format":"float"},"median":{"type":"number","format":"float"},"p75":{"type":"number","format":"float"}}}}},"paths":{"/buildings/{customerBuildingId}/energy-statistics/comparison/daily/v1":{"get":{"tags":["PublicAPI"],"summary":"A building’s energy data with daily readings, and comparison with comparable buildings","description":"Get energy related data of a building, aggregated on a daily basis and compare it with comparable buildings.\n<br/>\nThe comparison group has the following values:\n<ul>\n<li>Rank in comparison group. Rank 1 is the one with highest value.</li>\n<li>Size of the comparison group.</li>\n<li>Minimum value in the comparison group.</li>\n<li>Maximum value in the comparison group.</li>\n<li>25th percentile in the comparison group.</li>\n<li>Median (50th percentile) in the comparison group.</li>\n<li>75th percentile in the comparison group.</li>\n</ul>\n","operationId":"getDailyComparisonEnergyStatistics","parameters":[{"name":"customerBuildingId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-zA-Z0-9:._-]{1,100}$"}},{"name":"eventTypes","in":"query","description":"Comma-separated set of event types, which defines what data is to be aggregated.\n","required":true,"schema":{"type":"array","items":{"type":"string","enum":["ENERGY_GENERATION_YESTERDAY","ENERGY_CONSUMPTION_YESTERDAY","GRID_ENERGY_CONSUMPTION_YESTERDAY"]}}},{"name":"from","in":"query","description":"The starting date of the time window for selecting event data.\n<br/>\nRemark: The building's local time zone is taken into account.\n","required":true,"schema":{"type":"string","pattern":"[0-9]{4}-[0-9]{2}-[0-9]{2}"}},{"name":"to","in":"query","description":"The final date of the time window for selecting event data.\n<br/>\nRemark: the time window can be up to 1 year.\n","required":true,"schema":{"type":"string","pattern":"[0-9]{4}-[0-9]{2}-[0-9]{2}"}},{"name":"category","in":"query","description":"The profile comparison category that is to be used for the comparison.\n","required":true,"schema":{"type":"string","enum":["GRID_POWER_CONSUMPTION_CLUSTER","CONSUMPTION_CATEGORY","ELCOM","BEP"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DailyComparisonEnergyStatistics"}}}}}}}}}}
```

## Dashboard Usage

The peer comparison data is typically rendered in the Households Dashboard as a ranking indicator with a comparison trend chart. The MOOST admin frontend shows this in the Household Detail → Dashboard tab as a card displaying, for example, "Rank 2 of 2" with the category label (e.g. `VERY_HIGH`).

Percentile bars or box-plot-style visualisations work well for showing the building's position relative to `p25`, `median`, and `p75`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://doc.moost.io/technical-integration/cloud-to-cloud-integration/intelligence-service-integration/peer-comparison.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
