Skip to content

Instantly share code, notes, and snippets.

View gravitymonkey's full-sized avatar

gravitymonkey gravitymonkey

View GitHub Profile
@gravitymonkey
gravitymonkey / downloadAndExtractCensusTract.sh
Created October 11, 2011 17:05
download all the 2010 Census Tracts, extract from shapefiles to WKT
#requires ogr2ogr installed on local system
states=( 01 02 04 05 06 08 09 10 11 12 13 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 44 45 46 47 48 49 50 51 53 54 55 56 )
for state in ${states[@]}
do
#grab the file from the census server, use curlies cuz the underscores mess us up
curl http://www2.census.gov/geo/tiger/TIGER2010/TRACT/2010/tl_2010_${state}_tract10.zip > $state.zip
done