Reference and syntax guide
- Areas (fixed)
- Areas (relative)
- Authority
- Comparison
- Count of areas
- Equivalent
- Metadata
- Metric value
- Percent
- Rank
- Ranked area
- Ranked metric
- Summary value
Areas (fixed)
A set of tokens for the areas covered by the report and areas within which it falls, which can be used to return place names and GSS codes. These fixed areas do not work for reports intended to apply to both local authorities and natural neighbourhoods, so consider using relative areas instead.
Ward
- identifier: the ward's GSS code; {ward-identifier}.
- label: the ward's name; {ward-label}.
- short label: the ward's short name (if any); {ward-short-label}.
Unitary/District
- identifier: the unitary's/district's GSS code; {district-identifier}.
- label: the unitary's/district's name; {district-label}.
- short label: the unitary's/district's short name (if any); {district-short-label}.
Region
- identifier: the region's GSS code; {region-identifier}.
- label: the region's name; {region-label}.
- short label: the region's short name (if any); {region-short-label}.
Country
- identifier: the country's GSS code; {country-identifier}.
- label: the country's name; {country-label}.
- short label: the country's short name (if any); {country-short-label}.
Areas (relative)
A set of tokens for the areas covered by the report and areas within which it falls, which can be used to return place names, area types and GSS codes. Where possible, use these areas, which are relative to the parent area of the report, so reports work for both local authorities and natural neighbourhoods.
Child area
- identifier: a ward's or natural neighbourhood's GSS or Natural Neighbourhoods code; {child-area-identifier}.
- label: a ward's or natural neighbourhood's name; {child-area-label}.
- short label: a ward's or natural neighbourhood's short name (if any); {child-area-short-label}.
- type identifier: a ward's or natural neighbourhood's type; {child-area-type-identifier}.
- type label: a ward's or natural neighbourhood's report-friendly type; {child-area-type-label}.
- type short label: a ward's or natural neighbourhood's type short, report-friendly type; {child-area-type-short-label}.
Parent area
- identifier: the GSS code of the area covered by the report; {parent-area-identifier}.
- label: the name of the area covered by the report; {parent-area-label}.
- short label: the short name of the area covered by the report; {parent-area-short-label}.
- type identifier: the type of area covered by the report; {parent-area-type-identifier}.
- type label: the report-friendly type of area covered by the report; {parent-area-type-label}.
- type short label: the short, report-friendly type of area covered by the report; {parent-area-type-short-label}.
Ancestor 1 area
- identifier: the GSS code of the first ancestor (e.g. region, county) of the report's parent area; {ancestor-1-identifier}.
- label: the name of the first ancestor of the report's parent area; {ancestor-1-label}.
- short label: the short name of the first ancestor of the report's parent area; {ancestor-1-short-label}.
- type identifier: the first ancestor's area type in relation to the report's parent area; {ancestor-1-type-identifier}.
- type label: the first ancestor's area type name in relation to the report's parent area; {ancestor-1-type-label}.
- type short label: the first ancestor's area type short name in relation to the report's parent area; {ancestor-1-type-short-label}.
Ancestor 2 area
- identifier: the GSS code of the second ancestor (e.g. region, county, country) of the report's parent area; {ancestor-2-identifier}.
- label: the name of the second ancestor of the report's parent area; {ancestor-2-label}.
- short label: the short name of the second ancestor of the report's parent area; {ancestor-2-short-label}.
- type identifier: the second ancestor's area type in relation to the report's parent area; {ancestor-2-type-identifier}.
- type label: the second ancestor's area type name in relation to the report's parent area; {ancestor-2-type-label}.
- type short label: the second ancestor's area type short name in relation to the report's parent area; {ancestor-2-type-short-label}.
Authority
A set of tokens for the local authority described by the report.
Authority
- identifier: the name of the local authority covered by the report; {authority-identifier}.
- label: the full name of the local authority covered by the report; {authority-label}.
- short label: the short name of the local authority covered by the report; {authority-short-label}.
- area identifier: the GSS code of the local authority covered by the report; {authority-area-identifier}.
- area label: the name of the local authority covered by the report; {authority-area-label}.
- area short label: the short name of the local authority covered by the report; {authority-area-short-label}.
- area type identifier: the local authority's area type; {authority-area-type-identifier}.
- area type label: a report-friendly version of the local authority's area type; {authority-area-type-label}.
- area type short label: a short, report-friendly version of the local authority's area type; {authority-area-type-short-label}.
Text describing if one value is greater than, equal to or less than another. The text is user-defined meaning that synonyms can be used, e.g. higher, identical, lower, etc. Most useful for comparing means, medians, percentages, etc., rather than absolute values or totals, for example, the percentage of pensioners within a ward that live alone compared to those in the country.
SYNTAX
- ?metricType=: the ID number of the metric to check, e.g. 1803
- &area=: the identifier for the area to compare, e.g. {ward-identifier}. The area can be fixed or relative.
- &with=: the identifier for the area to compare against, e.g. {region-identifier}. Cannot compare relative area to fixed area, and vice versa. Use the source code to
- compare an area's mean value against the mean value for a comparison group.
- &period=: the period of the dataset to check, e.g. cal_2011. If this parameter is omitted, the latest values will be checked by default.
- &withPeriod=: the period of the same dataset to compare, e.g. cal_2010. Use this to compare values for different periods of one metric type.
- &greater=: user-defined text to display when area value is greater than comparison area value, e.g. higher.
- &equal=: user-defined text to display when area value is equal to comparison area value, e.g. the same as.
- &less=: user-defined text to display when area value is less than comparison area value, e.g. less than.
Count of areas
A count of the area types in a given bounding area. For example, the number of wards within an authority.
{=countAreas?area=*:*}
– ?area=: the area types to count within a bounding area, e.g. {country-identifier}:{child-area-type-identifier}. Bounding area precedes area type, separated by a colon.
Equivalent
The equivalent value in a chosen area of the predominant circumstance collection in the area covered by the report. For example, if the predominant gender in a lower-level area is male, this token can return the equivalent value for males in the region.
{=equivalent?metricDimension=[*][*][*]&area=*&period=*&rank=*&for=*}
- ?metricDimension=: the combination of dataset, dataset measure and circumstance collection from which to collect a value, e.g. [dataset][dataset_measure][circumstance collection].
- &area=: the area covered by the report whose predominant circumstance collection determines the chosen area's value, e.g. {ancestor-1-identifier}.
- &period=: the period for which the dataset covers, e.g. cen_2011.
- &rank=: the ranking of the circumstance collection for which to return an equivalent value, e.g. 1.
- &for=: the area for which the equivalent value should be returned, e.g. {child-area-identifier}.
Metadata
Details about a selected metric type. Returns the metric type's title (label) by default but can be configured to return a short title, data source, metric collection, a description of the metric type, its polarity rule or the data it was last updated.
Syntax
- ?metricType=: the ID number of the metric type to display metadata for, e.g. 2105.
- &returnValue=: the type of metadata to return. Options: shortLabel; source; collection; helpText; polarity; dataLastUpdated.
Metric value
Returns the value of a metric type for an area and period. Defaults to the latest figures for the ward.
Syntax
- ?metricType=: the ID number of the metric type from which to return a value, e.g. 92.
- &area=: the fixed or relative area identifier the value represents, e.g. {country-identifier}.
- &period=: the period for which to show data, e.g. cal_2011. Change the digits to specify a year.
- &returnValue=: options: valueWithUnits, displays the units alongside the raw values, e.g. 72%; and periodLabel, displays the date period the data was published.
Percent
The value of an area's metric displayed as a percentage of another area's value.
{=percent?metricType=*&area=*&with=*&period=*}
- ?metricType=: the ID number of the metric type from which to collect values, e.g. 1803.
- &area=: the fixed or relative area identifier for which to return a value (numerator), e.g. {region-identifier}.
- &with=: the fixed or relative area identifier that represents the total count (denominator), e.g. {country-identifier}.
- &period=: the period of the dataset to check, e.g. cen_2011.
Rank
The rank of an area within a bounding area for a specified metric type. Defaults to show child area's rank in parent area.
{=rank?metricType=*&period=*&within=*:*}
- ?metricType=: the ID number of the metric type from which to collect values, e.g. 212.
- &period=: the period of the dataset from which to collect values, e.g. cen_2011.
- &within=: the area type to rank within a bounding area, e.g. {country-identifier}:{child-area-type-identifier}. Bounding area precedes area type, separated by a colon.
Ranked area
The nth ranked area within a bounding area for a specified metric type. Defaults to show child area's rank in parent area.
{=rankedArea?metricType=*&period=*&rank=*&returnValue=*&area=*:*}
- ?metricType=: the ID number of the metric type from which to collect a value, e.g. 125
- &period=: the period of the dataset from which to collect a value, e.g. threeyp_2005_07.
- &rank=: the rank position to return, e.g. 3. Negative numbers can be used to return rank positions from the end of the list, i.e. -1 returns the last, -2 returns the penultimate, etc.
- &returnvalue=: the type of value to return. Defaults to label (name) of nth ranked area. Options: shortLabel; lowerCaseLabel; value; valueWithUnits; percent (of whole dimension).
- &within=: the nth ranked area type within a bounding area, e.g. {country-identifier}:{child-area-type-identifier}. Bounding area precedes area type, separated by a colon.
Ranked metric
The nth ranked label or value of a metric dimension for an area. Most useful for displaying predominant groups. It's easiest to build these tokens using the text token editor.
{=rankedMetricType?metricDimension=[*][*][*]&area=*&period=*&rank=*&returnValue=*}
- ?metricDimension=: the combination of dataset, dataset measure and circumstance collection from which to collect a value, e.g. [dataset][dataset_measure][circumstance collection].
- &area=: the area that the label or value represents, e.g. {ward-identifier}.
- &period=: the period of the dataset from which to collect a value, e.g. cen_2011.
- &rank=: the rank position to return, e.g. 4.
Summary value
The summary value of a metric type for an area type within a bounding area. For example, the mean number of houses in a ward within a chosen region.
{=summary?metricType=*&period=*&summaryType=[band][100][10]&area=*:*}}
- ?metricType=: the metric from which to collect a value, e.g. 2029.
- &period=: the period of the dataset from which to collect a value, e.g. cen_2011.
- &summaryType=: the type of value to return, e.g. median. Options: min; max; mean; median; percentiles can be returned using [band][*denominator*][*numerator*] – the syntax example above returns the tenth percentile.