TheyWorkForYou API
getGeometry function

https://www.theyworkforyou.com/api/getGeometry

Returns geometry information for constituencies.

This currently includes, for Great Britain, the latitude and longitude of the centre point of the bounding box of the constituency, its area in square metres, the bounding box itself and the number of parts in the polygon that makes up the constituency. For Northern Ireland, as we don't have any better data, it only returns an approximate (estimated by eye) latitude and longitude for the constituency's centroid.

Arguments

name
Name of the constituency.

Example Response

<twfy>
    <centre_lat>52.204105461821</centre_lat>
    <centre_lon>0.12659823548615</centre_lon>
    <area>28775860</area>
    <min_lat>52.171543612943</min_lat>
    <max_lat>52.236635567414</max_lat>
    <min_lon>0.066543287124126</min_lon>
    <max_lon>0.18674084465674</max_lon>
    <parts>1</parts>
</twfy>

Explorer

Try out this function without writing any code!

name:
Output: