Rank Finnish areas by a metric
rank_areasRank Finnish postal areas by any metric — highest or lowest income, population, unemployment, education, housing prices — nationally or within one municipality or region. Crime rate metrics (crime_total_rate and friends) rank municipalities instead, since crime is only published at that grain. For gender_balance_20_39 the useful question is usually which areas are closest to an even split, not which are most skewed: pass order="balance" for that, since both a high and a low ratio mean imbalance. Get valid metric codes from list_variables. Free callers receive at most 10 rows regardless of limit, reported in locked. near plus withinKm narrows the ranking to areas within a straight-line radius of another place. That is distance over the ground, never a travel or commute time. To screen areas on several metrics at once — "above-average family share and below-average housing prices" — rank by one metric and pass the rest as includeVariables; that is a single call. Do not call get_place_stats per area to collect a second metric.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| near | No | Keep only areas within `withinKm` of this place — a postal area or municipality, by name or code. Distance is centre to centre in a straight line. | |
| year | No | Year; defaults to the newest with data. | |
| limit | No | Rows to return (default 10). | |
| order | No | Highest first (default), lowest first, or — for a metric whose ideal value is a specific number rather than an extreme — closest to that value first. "balance" is currently valid only for gender_balance_20_39, whose target is an even 1.0; asking for it on any other metric is an error. | |
| scope | No | Limit to one municipality or region by name or code, e.g. "Espoo", "Uusimaa". | |
| withinKm | No | Radius in kilometres around `near`. Required with `near`, and only with it. | |
| variableCode | Yes | Metric code from list_variables, e.g. "hr_mtu", "unemployment_rate". | |
| includeVariables | No | Extra metric codes to report for each ranked area, as `additionalValues` on every row. Each metric's own year is given in `includedVariables`, since the sources run to different years. Not available for crime rankings. |