From: Michael Orlitzky Date: Fri, 29 Jan 2010 14:37:10 +0000 (-0500) Subject: Updated the queries in blocks2kml to use the new "blocks" table. X-Git-Url: http://gitweb.michael.orlitzky.com/?p=dead%2Fcensus-tools.git;a=commitdiff_plain;h=ab15720bbb1903a574aefdb6c7e9b635ea877e15 Updated the queries in blocks2kml to use the new "blocks" table. --- diff --git a/bin/blocks2kml b/bin/blocks2kml index 78420c9..7412991 100755 --- a/bin/blocks2kml +++ b/bin/blocks2kml @@ -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)