Created
October 18, 2012 23:26
-
-
Save tel/3915375 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select | |
county, | |
population, | |
(population / ST_Area(wkb_geometry)) * 1000000 as popsqkm, | |
wkb_geometry, | |
replace(county, ' County', '') || E'\n' || | |
'pop. ' || population || E'\n' || | |
round((population / ST_Area(wkb_geometry))::numeric * 1000000, 1) || E' / km²\n' | |
as label | |
into merged | |
from population, tl_2010_17_county10 | |
where id = geoid10; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment