More on customary proximity
And a follow-up to my last post: the population density and customary proximity APIs are now available in Gaze. The additional APIs are:
- get_population_density
-
Parameters:
- lat
- WGS84 latitude, in decimal degrees
- lon
- WGS84 longitude, in decimal degrees
Return an estimate of the population density at (lat, lon), in persons per square kilometer, as a decimal number followed by a line feed.
- get_radius_containing_population
-
Parameters:
- lat
- WGS84 latitude, in decimal degrees
- lon
- WGS84 longitude, in decimal degrees
- number
- number of persons
- maximum
- largest radius returned, in kilometers; optional; default 150
Return an estimate of the smallest radius around (lat, lon) containing at least number persons, or maximum, if that value is smaller, as a decimal number followed by a line feed.
For instance,
- http://gaze.mysociety.org/gaze-rest?f=get_population_density;lat=51.53;lon=-0.1020 gives the population density of Islington in London (about 8,000 persons/km2)
- http://gaze.mysociety.org/gaze-rest?f=get_radius_containing_population;lat=51.53;lon=-0.1020;number=200000 returns the radius of a circle around that point containing 200,000 people (about 2.7km)
- http://gaze.mysociety.org/gaze-rest?f=get_radius_containing_population;lat=43.09;lon=-95.54;number=200000 the same, for a point near Cylinder, Iowa, USA (about 74km)
Enjoy! Questions and comments to chris@mysociety.org, please.