v4

latestOpenAPI 3.1.02026-07-3196251302.5 KB
analytics

Lorenz curve + Gini + top-X%-own-Y% headlines for one metric in a scope

post/v1/analytics.getInequality

Request body

$schemastring uri

A URL to the JSON Schema for this object.

domainstring required

Analytics domain ID. See analytics.listMetrics.

metricstring required

Metric ID within the domain.

scopestring required

Scope ID within the domain.

scope_valuestring

Country name/code or region name. Required for non-global scopes.

Example request

{
  "$schema": "https://api.steamsets.com/schemas/AnalyticsGetInequalityRequestBody.json",
  "scope_value": "DE"
}

Response

OK

$schemastring uri

A URL to the JSON Schema for this object.

countinteger required

Number of non-zero contributors.

gininumber double required

Gini coefficient. 0 = perfect equality, 1 = maximum inequality.

top10PercentSharenumber double required

Fraction of the metric owned by the top 10% (0–1).

top1PercentSharenumber double required

Fraction of the metric owned by the top 1% of contributors (0–1).

top50PercentSharenumber double required

Fraction of the metric owned by the top 50% (0–1).

totalValuenumber double required

Sum of the metric across all non-zero contributors.

Example response

{
  "$schema": "https://api.steamsets.com/schemas/AnalyticsInequality.json"
}