]> gitweb.michael.orlitzky.com - dead/census-tools.git/commitdiff
Updated the queries in blocks2kml to use the new "blocks" table.
authorMichael Orlitzky <michael@orlitzky.com>
Fri, 29 Jan 2010 14:37:10 +0000 (09:37 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Fri, 29 Jan 2010 14:37:10 +0000 (09:37 -0500)
bin/blocks2kml

index 78420c959c64bd3da2e99308fb0934c81e5b0aba..741299197999c7d162931bec1b031656087f63f7 100755 (executable)
@@ -78,7 +78,7 @@ cursor = conn.cursor()
 
 avg_avg_pop_query = """
 SELECT AVG(population_density)
-FROM sf1_blocks
+FROM blocks
 WHERE population_density > 0.005;
 """
 
@@ -88,7 +88,7 @@ avg_avg_population = float(rows[0][0])
 
 stddev_avg_pop_query = """
 SELECT stddev_samp(population_density)
-FROM sf1_blocks
+FROM blocks
 WHERE population_density > 0.005;
 """
 
@@ -111,9 +111,8 @@ for style in red_styles:
 
 
 query = """
-SELECT tiger_blocks.blkidfp00, population_density, AsKML(the_geom) as geom
-       FROM (sf1_blocks INNER JOIN tiger_blocks
-             ON sf1_blocks.blkidfp00 = tiger_blocks.blkidfp00);
+SELECT blkidfp00, population_density, AsKML(the_geom) as geom
+       FROM blocks;
 """
 
 cursor.execute(query)