{"uid":"cap_0vFZX_3BSq3XxxUcg7zOi","slug":"energy-readings-secondary-measure-weighted-mean-e45accd3","name":"Energy Readings Secondary-Measure Weighted Mean","description":"Energy readings - Secondary-measure weighted mean: Secondary-measure weighted mean for Energy readings. Up to 200 supplied typed records. Local numeric and data-quality processing; no external enrichment or forecasting. One of 25 profiles or calculations across 20 shared operations in this sector. 0.01 USDC includes one bounded secondary-measure weighted mean deliverable.","url":"https://market.datapackvibe.com/x402/assistant-sector-analytics-energy-readings-weighted-average?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","required":["row_id","meter","date","kwh","cost"],"properties":{"kwh":{"type":["number","null"],"maximum":1000000000000,"minimum":-1000000000000},"cost":{"type":["number","null"],"maximum":1000000000000,"minimum":-1000000000000},"date":{"type":"string","default":"","pattern":"^\\d{4}-\\d{2}-\\d{2}$","maxLength":10},"meter":{"type":"string","default":"","maxLength":80},"row_id":{"type":"string","default":"","maxLength":80,"minLength":1}},"additionalProperties":false},"default":[{"kwh":10,"cost":1,"date":"2026-10-01","meter":"group-a","row_id":"row-1"},{"kwh":20,"cost":2,"date":"2026-10-02","meter":"group-b","row_id":"row-2"},{"kwh":15,"cost":3,"date":"2026-10-03","meter":"group-a","row_id":"row-3"},{"kwh":30,"cost":4,"date":"2026-10-04","meter":"group-b","row_id":"row-4"}],"maxItems":200,"minItems":1},"field":{"enum":["kwh","cost"],"type":"string","default":"kwh"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_02qNU8olKPhNM0gbnNVao","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes a secondary-measure weighted mean (e.g. cost-weighted kWh or kWh-weighted cost) across up to 200 energy meter readings, returning a single weighted average value.","exampleAgentPrompt":"Calculate the cost-weighted mean kWh for these energy readings — I have meter records for group-a and group-b from October 2026, with kWh and cost values per day, and I want the secondary-measure weighted average using 'cost' as the weight field.","exampleUseCases":[{"title":"Cost-weighted average consumption across meters","prompt":"I have daily kWh and cost records for two meter groups across October — can you compute the cost-weighted mean kWh so I can see which days drove the most consumption relative to spend?"},{"title":"kWh-weighted average cost per unit","prompt":"Using my energy meter data for the past month, calculate the kWh-weighted mean of the cost field so I can see the true average price per unit weighted by how much electricity was actually used."},{"title":"Multi-meter energy analytics rollup","prompt":"I've got 150 rows of energy readings across several meters with dates, kWh, and cost columns — compute the secondary-measure weighted average for the kWh field so I can roll it up into a single representative figure."}],"resultDescription":"A single weighted mean value computed from the submitted energy readings, where one numeric field (kWh or cost) is averaged using the other as weights — returned as a bounded numeric deliverable with local data-quality processing applied.","failureModes":["Missing required fields (row_id, meter, date, kwh, cost) causes validation error","Exceeding 200 row limit returns rejection","Invalid date format (not YYYY-MM-DD) causes schema error","Null values in both the value and weight fields may produce undefined or null result","Invalid field enum value (not 'kwh' or 'cost') causes validation failure","Payment not included or insufficient USDC causes x402 payment-required response"],"whenToPreferThis":"Choose this endpoint when you need a statistically correct secondary-measure weighted mean for energy meter data — specifically when averaging one energy metric (kWh or cost) weighted by the other, across up to 200 typed records, with local numeric and data-quality processing and no external dependencies. Prefer it over simple arithmetic averages when the weight of each reading matters, and over general analytics APIs when working specifically with date-keyed, meter-grouped energy consumption records.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-19T19:16:19.914Z","isFirstParty":false,"canonicalSlug":"energy-readings-secondary-measure-weighted-mean-e45accd3"}