Rank areas

Rank every area by a measure for one period: the most populous wards, the lowest emissions and so on. Tied areas share a rank, so you'll see 1, 1, 3.

get
/data/{measure-id}/rankings

Good to know

  • Highest values come first. Set order=asc to start from the lowest.
  • measure-idstringrequired

    A measure id from GET /v1/measures, such as population, or one of its aliases, such as house-prices. An alias is read as the id it names, and the response's Content-Location header gives the request it was read as. Case, spaces and punctuation are set aside, so House Prices is house-prices.

  • periodstringoptional

    The observation period as the partition publishes it. Left out, the partition's latest period is used and returned in defaults.

  • geographystringoptional

    The geography the publisher observed the values on, selecting one source partition with boundaryYear. It may be left out when an area named in the request is published on one geography of the measure, or when the measure is published on only one; geographies are never chosen between, so a measure published on several otherwise needs it. A selected geography is returned in defaults.

    One ofwardlocalAuthorityconstituencylsoamsoadataZonesuperOutputArea
  • boundaryYearintegeroptional

    The year of the boundaries the values are published on. Left out, the geography's newest partition is used and returned in defaults, unless two datasets share it, when datasetId must choose.

  • orderstringoptional

    Whether the highest or the lowest value ranks first.

    One ofascdesc
    Defaultdesc
  • limitinteger 1–500optional

    How many records to return, 1 to 500.

    Default100
  • cursorstringoptional

    The meta.nextCursor of the previous page. A cursor is opaque and belongs to the query that issued it.

Returns

Envelope

Cursor-paginated competition ranks for the source partition.

  • apiVersionv1required
  • atlasReleasestringrequired

    The immutable /atlas-release releaseId for the artifacts that produced this response.

  • metaobjectrequired
    Show1 child field
    • nextCursorstring | nullrequired

      Opaque cursor for the next page, or null at the end.

  • 400A query parameter is malformed or its cursor is not valid for this result set.
  • 404No resource matches that identity.
  • 422The requested conversion, aggregation or geometry release is not supported.
  • 503The referenced build artifact has not been built yet.

Every error has the same shape. See Errors for how to handle them.

Show the precise behaviour

Ranks only the observations published for one period, geography and code vintage. Omitting any of those selects the current published partition and latest period, recorded in defaults. Uses competition ranking: tied values share a rank and the following rank accounts for all preceding observations (1, 1, 3). It does not select a boundary release, convert values or aggregate them.