Monday, 2 October 2017

demography - Algorithm for finding population for a given center point and radius in US


Here is what I have



  1. The population data aggregated by zip code given by US Census.


Here is what I am doing right now:



  1. Reverse geo code the center point to find the zip code of the center point.

  2. Associate a lat-long to each zip-code(by reverse geocoding, I know this will be error prone).


  3. Find the lat-longs(zip-codes) which are inside the circle, using Geokit-Rails plugin.

  4. Finding the sum of the data for those zip-codes(zip-code=zipcode of the center point or distance(between lat-long of the zip code and center point) < radius) and showing.


Am I doing this right? Is there methods efficient than this to find the population? Is there any algorithm already available?


I am using geokit-rails plugin for reverse geocoding and for finding the zip-codes(with associated lat-longs) within the circle.


The problem with this setup is that the zipcodes cannot be actually represented by the lat-long,it is an area.So, I am not sure the lat-long pair given by Google Map API is actually lies in the center of the zip code or something like that. Also,for radius 0 to almost 2.4 miles radius,the population remains same with this setup. That is, even for a radius of 0.1 miles, it will show the whole population of the zip code.I am looking for a way to approximate this.


I have asked same question in SO. Please have a look at this question also.




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...