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,

Enjoy! Questions and comments to chris@mysociety.org, please.

5 Comments

  1. CIESIN (more here); in many ways the Landscan data would be better (because they have better resolution in places where GPW’s is poor), but I believe that the licence terms for Landscan would prohibit our using it (I’ve asked ORNL whether this interpretation is correct, but haven’t yet received a response).

  2. are there any libraries for accessing the API. would you like us to write one?

    many thanks for this great service

  3. There aren’t any libraries, but you’re welcome to write one if you think it’ll help. Gaze only uses very simple URL based queries, which most languages these days support out the box, so it only needs something very light for an API. One function call would probably do.

  4. can i get nearby locations like schools, restaurants, hospitals etc from this web services ? and how ?
    Actually i have tried “find_places” function but its not give result.