{"uid":"cap_LvEt_U0vU2a5JAarnqn0e","slug":"sampling-observations-secondary-measure-weighted-mean-date-by-4f60a476","name":"Sampling Observations — Secondary-Measure Weighted Mean + Date-by-Category Pivot","description":"Sampling observations — Secondary-measure weighted mean + Date by category pivot: Secondary-measure weighted mean + Date by category pivot for supplied sampling observations records (sample_value, sample_weight). Up to 200 rows; 2 independent reports using shared local analytical engines. No live lookup, prediction, professional assessment or external action. 0.01 USDC includes 2 supplied-data reports for up to 200 rows.","url":"https://market.datapackvibe.com/x402/assistant-ib26-analytics-15-185?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","required":["row_id","dataset_group","date","sample_value","sample_weight"],"properties":{"date":{"type":"string","default":"","pattern":"^\\d{4}-\\d{2}-\\d{2}$","maxLength":10},"row_id":{"type":"string","default":"","maxLength":80,"minLength":1},"sample_value":{"type":["number","null"],"maximum":1000000000000,"minimum":-1000000000000},"dataset_group":{"type":"string","default":"","maxLength":80},"sample_weight":{"type":["number","null"],"maximum":1000000000000,"minimum":-1000000000000}},"additionalProperties":false},"default":[{"date":"2026-10-01","row_id":"row-1","sample_value":10,"dataset_group":"group-a","sample_weight":1},{"date":"2026-10-02","row_id":"row-2","sample_value":20,"dataset_group":"group-b","sample_weight":2},{"date":"2026-10-03","row_id":"row-3","sample_value":15,"dataset_group":"group-a","sample_weight":3},{"date":"2026-10-04","row_id":"row-4","sample_value":30,"dataset_group":"group-b","sample_weight":4}],"maxItems":200,"minItems":1},"field":{"enum":["sample_value","sample_weight"],"type":"string","default":"sample_value"}}},"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_z_8ZR5yYlDrasFJrAa8cI","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 and a date-by-category pivot table from supplied sampling observation records in a single paid call.","exampleAgentPrompt":"I have up to 200 sampling observation rows with columns row_id, dataset_group, date, sample_value, and sample_weight — can you compute the weighted mean of sample_value and also give me a date-by-category pivot table for my groups?","exampleUseCases":[{"title":"Survey response weighted summary","prompt":"I have 150 survey response records with dates, group labels, response scores as sample_value, and respondent counts as sample_weight — can you calculate the weighted mean of the response scores and pivot the results by date and group?"},{"title":"A/B test sample aggregation","prompt":"I'm running an A/B test with two groups. I have up to 180 rows with dates, group-a and group-b labels, measurement values, and sample sizes as weights. Please give me both the weighted mean for sample_value and a date-by-category breakdown."},{"title":"Environmental sensor data pivot","prompt":"I've got daily sensor readings across multiple station groups — each row has a date, station group, a measured value as sample_value, and a confidence weight as sample_weight. Can you compute the weighted mean and pivot the data by date and station group?"}],"resultDescription":"Returns two analytical reports: (1) a secondary-measure weighted mean computed from the sample_value and sample_weight fields across the supplied rows, and (2) a date-by-category pivot table cross-tabulating the selected field by date and dataset_group. Both reports cover up to 200 input rows and are computed locally without external lookups.","failureModes":["More than 200 rows submitted — request rejected due to maxItems constraint","Missing required fields (row_id, dataset_group, date, sample_value, sample_weight) cause validation errors","Invalid date format (not YYYY-MM-DD) triggers pattern validation failure","All sample_weight values are null or zero — weighted mean may be undefined or return error","field enum value outside ['sample_value','sample_weight'] causes schema rejection","Payment of 0.01 USDC not provided or rejected — endpoint returns 402"],"whenToPreferThis":"Choose this endpoint when you need both a weighted mean and a date-by-category pivot in one call for up to 200 sampling observation records. It is ideal for offline/supplied-data analytics where no external lookup or prediction is needed, and cost efficiency matters (two reports per $0.01). Prefer alternatives if you need more than 200 rows, real-time data fetching, or different statistical operations such as correlation or histogram bucketing.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-24T00:54:36.304Z","isFirstParty":false,"canonicalSlug":"sampling-observations-secondary-measure-weighted-mean-date-by-4f60a476"}