├── .gitignore ├── DEC_10_PL_GCTPL2.ST05 ├── DEC_10_PL_GCTPL2.ST05.csv ├── DEC_10_PL_GCTPL2.ST05.txt └── aff_download_readme.txt ├── README ├── census-demo ├── index.html ├── logo.png ├── map.js └── style.css ├── csvcut ├── merge.sql ├── merged ├── merged.dbf ├── merged.prj ├── merged.shp └── merged.shx ├── population.csv ├── render ├── render_tiles.py ├── requirements.txt ├── setup ├── style ├── tilemill ├── census_demo.mml ├── census_demo.xml └── style.mss └── tl_2010_17_county10 ├── tl_2010_17_county10.dbf ├── tl_2010_17_county10.prj ├── tl_2010_17_county10.shp ├── tl_2010_17_county10.shp.xml └── tl_2010_17_county10.shx /.gitignore: -------------------------------------------------------------------------------- 1 | .tiles -------------------------------------------------------------------------------- /DEC_10_PL_GCTPL2.ST05/DEC_10_PL_GCTPL2.ST05.csv: -------------------------------------------------------------------------------- 1 | ,,,,,HD01,SUBHD0201,SUBHD0202,SUBHD0203 2 | GEO.id,GEO.display-label,GCT_STUB.target-geo-id,GCT_STUB.display-label,GCT_STUB.display-label,Total population,Housing units,Housing units,Housing units 3 | Id,GEO,Target Geo Id,Geographic area,Geographic area,,Total,Occupied,Vacant 4 | 0400000US17,Illinois,0400000US17,Illinois,Illinois,12830632,5296715,4836972,459743 5 | 0400000US17,Illinois,0500000US17001,Illinois - Adams County,Adams County,67103,29842,27375,2467 6 | 0400000US17,Illinois,0500000US17003,Illinois - Alexander County,Alexander County,8238,4006,3329,677 7 | 0400000US17,Illinois,0500000US17005,Illinois - Bond County,Bond County,17768,7089,6427,662 8 | 0400000US17,Illinois,0500000US17007,Illinois - Boone County,Boone County,54165,19970,18505,1465 9 | 0400000US17,Illinois,0500000US17009,Illinois - Brown County,Brown County,6937,2462,2099,363 10 | 0400000US17,Illinois,0500000US17011,Illinois - Bureau County,Bureau County,34978,15720,14262,1458 11 | 0400000US17,Illinois,0500000US17013,Illinois - Calhoun County,Calhoun County,5089,2835,2085,750 12 | 0400000US17,Illinois,0500000US17015,Illinois - Carroll County,Carroll County,15387,8437,6622,1815 13 | 0400000US17,Illinois,0500000US17017,Illinois - Cass County,Cass County,13642,5836,5270,566 14 | 0400000US17,Illinois,0500000US17019,Illinois - Champaign County,Champaign County,201081,87569,80665,6904 15 | 0400000US17,Illinois,0500000US17021,Illinois - Christian County,Christian County,34800,15563,14055,1508 16 | 0400000US17,Illinois,0500000US17023,Illinois - Clark County,Clark County,16335,7772,6782,990 17 | 0400000US17,Illinois,0500000US17025,Illinois - Clay County,Clay County,13815,6404,5697,707 18 | 0400000US17,Illinois,0500000US17027,Illinois - Clinton County,Clinton County,37762,15311,14005,1306 19 | 0400000US17,Illinois,0500000US17029,Illinois - Coles County,Coles County,53873,23425,21463,1962 20 | 0400000US17,Illinois,0500000US17031,Illinois - Cook County,Cook County,5194675,2180359,1966356,214003 21 | 0400000US17,Illinois,0500000US17033,Illinois - Crawford County,Crawford County,19817,8661,7763,898 22 | 0400000US17,Illinois,0500000US17035,Illinois - Cumberland County,Cumberland County,11048,4874,4377,497 23 | 0400000US17,Illinois,0500000US17037,Illinois - DeKalb County,DeKalb County,105160,41079,38484,2595 24 | 0400000US17,Illinois,0500000US17039,Illinois - De Witt County,De Witt County,16561,7521,6811,710 25 | 0400000US17,Illinois,0500000US17041,Illinois - Douglas County,Douglas County,19980,8390,7720,670 26 | 0400000US17,Illinois,0500000US17043,Illinois - DuPage County,DuPage County,916924,356179,337132,19047 27 | 0400000US17,Illinois,0500000US17045,Illinois - Edgar County,Edgar County,18576,8803,7839,964 28 | 0400000US17,Illinois,0500000US17047,Illinois - Edwards County,Edwards County,6721,3187,2840,347 29 | 0400000US17,Illinois,0500000US17049,Illinois - Effingham County,Effingham County,34242,14570,13515,1055 30 | 0400000US17,Illinois,0500000US17051,Illinois - Fayette County,Fayette County,22140,9302,8311,991 31 | 0400000US17,Illinois,0500000US17053,Illinois - Ford County,Ford County,14081,6282,5676,606 32 | 0400000US17,Illinois,0500000US17055,Illinois - Franklin County,Franklin County,39561,18525,16617,1908 33 | 0400000US17,Illinois,0500000US17057,Illinois - Fulton County,Fulton County,37069,16195,14536,1659 34 | 0400000US17,Illinois,0500000US17059,Illinois - Gallatin County,Gallatin County,5589,2746,2403,343 35 | 0400000US17,Illinois,0500000US17061,Illinois - Greene County,Greene County,13886,6389,5570,819 36 | 0400000US17,Illinois,0500000US17063,Illinois - Grundy County,Grundy County,50063,19996,18546,1450 37 | 0400000US17,Illinois,0500000US17065,Illinois - Hamilton County,Hamilton County,8457,4104,3489,615 38 | 0400000US17,Illinois,0500000US17067,Illinois - Hancock County,Hancock County,19104,9274,8040,1234 39 | 0400000US17,Illinois,0500000US17069,Illinois - Hardin County,Hardin County,4320,2488,1915,573 40 | 0400000US17,Illinois,0500000US17071,Illinois - Henderson County,Henderson County,7331,3827,3149,678 41 | 0400000US17,Illinois,0500000US17073,Illinois - Henry County,Henry County,50486,22161,20373,1788 42 | 0400000US17,Illinois,0500000US17075,Illinois - Iroquois County,Iroquois County,29718,13452,11956,1496 43 | 0400000US17,Illinois,0500000US17077,Illinois - Jackson County,Jackson County,60218,28578,25538,3040 44 | 0400000US17,Illinois,0500000US17079,Illinois - Jasper County,Jasper County,9698,4345,3940,405 45 | 0400000US17,Illinois,0500000US17081,Illinois - Jefferson County,Jefferson County,38827,16954,15365,1589 46 | 0400000US17,Illinois,0500000US17083,Illinois - Jersey County,Jersey County,22985,9848,8828,1020 47 | 0400000US17,Illinois,0500000US17085,Illinois - Jo Daviess County,Jo Daviess County,22678,13574,9753,3821 48 | 0400000US17,Illinois,0500000US17087,Illinois - Johnson County,Johnson County,12582,5598,4584,1014 49 | 0400000US17,Illinois,0500000US17089,Illinois - Kane County,Kane County,515269,182047,170479,11568 50 | 0400000US17,Illinois,0500000US17091,Illinois - Kankakee County,Kankakee County,113449,45246,41511,3735 51 | 0400000US17,Illinois,0500000US17093,Illinois - Kendall County,Kendall County,114736,40321,38022,2299 52 | 0400000US17,Illinois,0500000US17095,Illinois - Knox County,Knox County,52919,24077,21535,2542 53 | 0400000US17,Illinois,0500000US17097,Illinois - Lake County,Lake County,703462,260310,241712,18598 54 | 0400000US17,Illinois,0500000US17099,Illinois - LaSalle County,LaSalle County,113924,49978,45347,4631 55 | 0400000US17,Illinois,0500000US17101,Illinois - Lawrence County,Lawrence County,16833,6936,6130,806 56 | 0400000US17,Illinois,0500000US17103,Illinois - Lee County,Lee County,36031,15049,13758,1291 57 | 0400000US17,Illinois,0500000US17105,Illinois - Livingston County,Livingston County,38950,15895,14613,1282 58 | 0400000US17,Illinois,0500000US17107,Illinois - Logan County,Logan County,30305,12107,11070,1037 59 | 0400000US17,Illinois,0500000US17109,Illinois - McDonough County,McDonough County,32612,14419,13057,1362 60 | 0400000US17,Illinois,0500000US17111,Illinois - McHenry County,McHenry County,308760,116040,109199,6841 61 | 0400000US17,Illinois,0500000US17113,Illinois - McLean County,McLean County,169572,69656,65104,4552 62 | 0400000US17,Illinois,0500000US17115,Illinois - Macon County,Macon County,110768,50475,45855,4620 63 | 0400000US17,Illinois,0500000US17117,Illinois - Macoupin County,Macoupin County,47765,21584,19381,2203 64 | 0400000US17,Illinois,0500000US17119,Illinois - Madison County,Madison County,269282,117106,108094,9012 65 | 0400000US17,Illinois,0500000US17121,Illinois - Marion County,Marion County,39437,18296,16148,2148 66 | 0400000US17,Illinois,0500000US17123,Illinois - Marshall County,Marshall County,12640,5914,5161,753 67 | 0400000US17,Illinois,0500000US17125,Illinois - Mason County,Mason County,14666,7077,6079,998 68 | 0400000US17,Illinois,0500000US17127,Illinois - Massac County,Massac County,15429,7113,6362,751 69 | 0400000US17,Illinois,0500000US17129,Illinois - Menard County,Menard County,12705,5654,5140,514 70 | 0400000US17,Illinois,0500000US17131,Illinois - Mercer County,Mercer County,16434,7358,6734,624 71 | 0400000US17,Illinois,0500000US17133,Illinois - Monroe County,Monroe County,32957,13392,12589,803 72 | 0400000US17,Illinois,0500000US17135,Illinois - Montgomery County,Montgomery County,30104,13080,11652,1428 73 | 0400000US17,Illinois,0500000US17137,Illinois - Morgan County,Morgan County,35547,15515,14104,1411 74 | 0400000US17,Illinois,0500000US17139,Illinois - Moultrie County,Moultrie County,14846,6260,5758,502 75 | 0400000US17,Illinois,0500000US17141,Illinois - Ogle County,Ogle County,53497,22561,20856,1705 76 | 0400000US17,Illinois,0500000US17143,Illinois - Peoria County,Peoria County,186494,83034,75793,7241 77 | 0400000US17,Illinois,0500000US17145,Illinois - Perry County,Perry County,22350,9426,8335,1091 78 | 0400000US17,Illinois,0500000US17147,Illinois - Piatt County,Piatt County,16729,7269,6782,487 79 | 0400000US17,Illinois,0500000US17149,Illinois - Pike County,Pike County,16430,7951,6639,1312 80 | 0400000US17,Illinois,0500000US17151,Illinois - Pope County,Pope County,4470,2491,1829,662 81 | 0400000US17,Illinois,0500000US17153,Illinois - Pulaski County,Pulaski County,6161,3155,2642,513 82 | 0400000US17,Illinois,0500000US17155,Illinois - Putnam County,Putnam County,6006,3074,2509,565 83 | 0400000US17,Illinois,0500000US17157,Illinois - Randolph County,Randolph County,33476,13707,12314,1393 84 | 0400000US17,Illinois,0500000US17159,Illinois - Richland County,Richland County,16233,7513,6726,787 85 | 0400000US17,Illinois,0500000US17161,Illinois - Rock Island County,Rock Island County,147546,65756,61303,4453 86 | 0400000US17,Illinois,0500000US17163,Illinois - St. Clair County,St. Clair County,270056,116249,105045,11204 87 | 0400000US17,Illinois,0500000US17165,Illinois - Saline County,Saline County,24913,11697,10379,1318 88 | 0400000US17,Illinois,0500000US17167,Illinois - Sangamon County,Sangamon County,197465,89901,82986,6915 89 | 0400000US17,Illinois,0500000US17169,Illinois - Schuyler County,Schuyler County,7544,3459,3040,419 90 | 0400000US17,Illinois,0500000US17171,Illinois - Scott County,Scott County,5355,2459,2214,245 91 | 0400000US17,Illinois,0500000US17173,Illinois - Shelby County,Shelby County,22363,10396,9216,1180 92 | 0400000US17,Illinois,0500000US17175,Illinois - Stark County,Stark County,5994,2674,2425,249 93 | 0400000US17,Illinois,0500000US17177,Illinois - Stephenson County,Stephenson County,47711,22081,19845,2236 94 | 0400000US17,Illinois,0500000US17179,Illinois - Tazewell County,Tazewell County,135394,57516,54146,3370 95 | 0400000US17,Illinois,0500000US17181,Illinois - Union County,Union County,17808,7924,7167,757 96 | 0400000US17,Illinois,0500000US17183,Illinois - Vermilion County,Vermilion County,81625,36318,32655,3663 97 | 0400000US17,Illinois,0500000US17185,Illinois - Wabash County,Wabash County,11947,5585,5012,573 98 | 0400000US17,Illinois,0500000US17187,Illinois - Warren County,Warren County,17707,7682,6918,764 99 | 0400000US17,Illinois,0500000US17189,Illinois - Washington County,Washington County,14716,6534,5926,608 100 | 0400000US17,Illinois,0500000US17191,Illinois - Wayne County,Wayne County,16760,7975,7102,873 101 | 0400000US17,Illinois,0500000US17193,Illinois - White County,White County,14665,7181,6313,868 102 | 0400000US17,Illinois,0500000US17195,Illinois - Whiteside County,Whiteside County,58498,25770,23740,2030 103 | 0400000US17,Illinois,0500000US17197,Illinois - Will County,Will County,677560,237501,225256,12245 104 | 0400000US17,Illinois,0500000US17199,Illinois - Williamson County,Williamson County,66357,30359,27421,2938 105 | 0400000US17,Illinois,0500000US17201,Illinois - Winnebago County,Winnebago County,295266,125965,115501,10464 106 | 0400000US17,Illinois,0500000US17203,Illinois - Woodford County,Woodford County,38664,15145,14276,869 107 | -------------------------------------------------------------------------------- /DEC_10_PL_GCTPL2.ST05/DEC_10_PL_GCTPL2.ST05.txt: -------------------------------------------------------------------------------- 1 | 2 | NOTE: For information on confidentiality protection, nonsampling error, and definitions, see http://www.census.gov/prod/cen2010/pl94-171.pdf 3 | Source: U.S. Census Bureau, 2010 Census. 4 | 2010 Census Redistricting Data (Public Law 94-171) Summary File, Tables P1 and H1 5 | -------------------------------------------------------------------------------- /DEC_10_PL_GCTPL2.ST05/aff_download_readme.txt: -------------------------------------------------------------------------------- 1 | This zip file contains a number of zip documents containing materials related to the table which you have downloaded. 2 | 3 | Table Zip file: The table file name is based on the Table Id and/or Table ID and Stub 4 | for Geographic Comparison Table (GCT) and Geographic Ranking Tables (GRT). 5 | This Zip file contains the following files: 6 | 7 | Data file: 8 | file name: 9 | Includes the tabular data for the table. 10 | 11 | Annotation file: 12 | file name: _ann 13 | This file contains cell annotations, which could be simple jam values or code of more complex cell annotations 14 | for the values in the data file. 15 | This file has a parallel structure to the data file, but it includes only those lines that correspond to the lines 16 | from the data file that have annotations. If there are no lines to be included in the annotation file, then the 17 | whole annotation file is omitted. 18 | A simple jamming cell annotation starts with '$', and the string that follows the '$' char is the jamming string. 19 | For example, '$1000+' is a simple cell annotation that would replace the content of the cell with the string '1000+'. 20 | A cell annotation that does not start with '$' is a code that is described in the notes file (see below). 21 | 22 | Notes file: 23 | file name: .txt 24 | This file contains the head notes, footnotes and the description of the cell annotations occurring in the data file 25 | (simple jamming cell annotations are excluded). 26 | 27 | 28 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | This code accompanies a five-part blog series on our recent explorations making choropleth maps using PostGIS, TileMill, Mapnik and Google Maps. On completion of the tutorial you'll have made something like this: 2 | http://media.apps.chicagotribune.com/census-2010/census-demo/index.html 3 | 4 | To work through the tutorial go here: 5 | http://blog.apps.chicagotribune.com/2011/03/07/making-maps-1/ 6 | 7 | If you're impatient, install the requirements... 8 | 9 | PostgreSQL, PostGIS, GDAL, etc. geo stack: 10 | http://blog.apps.chicagotribune.com/2010/02/17/quick-install-pythonpostgis-geo-stack-on-snow-leopard/ 11 | 12 | PostGIS spatial database template: 13 | http://docs.djangoproject.com/en/dev/ref/contrib/gis/install/#spatialdb-template 14 | 15 | Mapnik and TileMill: 16 | https://github.com/mapbox/tilemill 17 | 18 | pip, virtualenv and virtualenvwrapper: 19 | http://pypi.python.org/pypi/pip 20 | http://pypi.python.org/pypi/virtualenv 21 | http://www.doughellmann.com/projects/virtualenvwrapper/ 22 | 23 | And install the required Python libraries to a virtualenv: 24 | mkvirtualenv making-maps-demo 25 | pip install -r requirements.txt 26 | 27 | ...and fire up your tiles. 28 | 29 | ./setup 30 | ./style 31 | ./render -------------------------------------------------------------------------------- /census-demo/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Census Map Demo 4 | 5 | 6 | 7 |
8 |
Chicago Tribune
9 |
10 | 11 |

Illinois population 2010

12 |

Mapped by county

13 | 14 |

Counties are colored by the number of people per square kilometer.

15 | 16 |
17 | Fewer than 5
18 | 5 or more
19 | 10 or more
20 | 25 or more
21 | 50 or more
22 | 100 or more
23 | 500 or more
24 |
25 | 26 |

Zoom in or search to see population of each county.

27 | 28 | 34 |
35 |

Made by Brian Boyer

36 |

Data from the U.S. Census Bureau's American FactFinder

37 |
38 |
39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /census-demo/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsapps/making-maps-demo/12e6808108a0dca057ce480b840d6aa5076a9ae9/census-demo/logo.png -------------------------------------------------------------------------------- /census-demo/map.js: -------------------------------------------------------------------------------- 1 | var map = null; 2 | var center = new google.maps.LatLng(39.8, -89.2); 3 | 4 | function fetch_tile(coord, zoom) { 5 | return "./.tiles/" + zoom + "/" + coord.x + "/" + coord.y + ".png"; 6 | } 7 | 8 | // --- begin geocoding stuff -- 9 | var geocoder = new google.maps.Geocoder(); 10 | var southwest_limit = new google.maps.LatLng(41.6, -88); 11 | var northeast_limit = new google.maps.LatLng(42.05, -87.5); 12 | var bounding_box = new google.maps.LatLngBounds(southwest_limit, northeast_limit); 13 | var outside_il = false; // until prove true 14 | var user_marker = null; 15 | var has_zoomed = false; 16 | var has_moved = false; 17 | 18 | function geocode(query) { 19 | if (typeof(query) == 'string') { 20 | pattr = /\sil\s|\sillinois\s/gi; 21 | match = query.match(pattr); 22 | if (!match) { 23 | query = query + ' IL'; 24 | } 25 | gr = { 'address': query }; 26 | } else { 27 | gr = { 'location': query }; 28 | } 29 | geocoder.geocode(gr, handle_geocode); 30 | } 31 | 32 | function handle_geocode(results, status) { 33 | alt_addresses(results); 34 | 35 | lat = results[0].geometry.location.lat(); 36 | lng = results[0].geometry.location.lng(); 37 | 38 | normalized_address = results[0].formatted_address; 39 | $('#query').val(normalized_address) 40 | 41 | var zoom = (has_zoomed) ? map.zoom : 10; 42 | process_location(lat, lng, zoom, true); 43 | } 44 | 45 | function alt_addresses(results) { 46 | $('#alt-addresses').html(''); 47 | 48 | keep = new Array(); 49 | 50 | $.each(results, function(i,val) { 51 | if (i==0) return; // skip the first result 52 | 53 | for (var t in val.types) { 54 | if (val.types[t] == 'street_address' || val.types[t] == 'intersection') { 55 | keep.push(val.formatted_address); 56 | break; 57 | } 58 | } 59 | }); 60 | 61 | if (keep.length <= 1) { 62 | $('#did-you-mean') 63 | .addClass('disabled-link') 64 | .unbind(); 65 | } else { 66 | $('#did-you-mean') 67 | .removeClass('disabled-link') 68 | .click(function(e) { 69 | e.stopPropagation(); 70 | toggle_alt_addresses(); 71 | }); 72 | 73 | $('#alt-addresses').append('

Did you mean...

'); 74 | for (var i in keep) { 75 | $('#alt-addresses').append('' + keep[i] + ''); 76 | } 77 | } 78 | } 79 | function process_location(lat, lng, zoom, showMarker) { 80 | var center = new google.maps.LatLng(lat, lng); 81 | map.panTo(center); 82 | if (zoom) { 83 | map.setZoom(zoom); 84 | } 85 | if (showMarker instanceof Array) { 86 | show_user_marker(showMarker[0],showMarker[1]); //? 87 | } else if (showMarker) { 88 | show_user_marker(lat, lng); //? 89 | } 90 | } 91 | 92 | function show_user_marker(lat, lng) { 93 | if (user_marker == null) { 94 | user_marker = new google.maps.Marker(); 95 | user_marker.setMap(map); 96 | } 97 | user_marker.setPosition(new google.maps.LatLng(lat, lng)); 98 | } 99 | 100 | function toggle_alt_addresses() { 101 | alt_adds_div = $('#alt-addresses'); 102 | if (alt_adds_div.is(':hidden')) { 103 | show_alt_addresses(); 104 | } else if (alt_adds_div.is(':visible')) { 105 | hide_alt_addresses(); 106 | } 107 | } 108 | 109 | function show_alt_addresses() { 110 | $('#alt-addresses').slideDown(250); 111 | $('#did-you-mean').addClass('highlight'); 112 | } 113 | 114 | function hide_alt_addresses() { 115 | $('#alt-addresses').hide(); 116 | $('#did-you-mean.highlight').removeClass('highlight'); 117 | } 118 | 119 | 120 | function parse_hash(s) { 121 | try { 122 | if (s[0] == "#") { 123 | s = s.substr(1); 124 | } 125 | parts = s.split(","); 126 | lat = parseFloat(parts[0]); 127 | lng = parseFloat(parts[1]); 128 | zoom = parseInt(parts[2]); 129 | if (parts.length == 5) { 130 | marker_location = [parts[3], parts[4]]; 131 | process_location(lat, lng, zoom, marker_location); 132 | } else { 133 | process_location(lat, lng, zoom, false); 134 | } 135 | } catch (e) { } 136 | } 137 | 138 | function make_hash() { 139 | var parts = [map.center.lat(),map.center.lng(),map.zoom] 140 | if (user_marker) { 141 | parts.push(user_marker.position.lat()); 142 | parts.push(user_marker.position.lng()); 143 | } 144 | return parts.join(","); 145 | } 146 | 147 | // --- end geocoding stuff --- 148 | 149 | $(document).ready(function() { 150 | 151 | census_demo_options = { 152 | getTileUrl: fetch_tile, 153 | tileSize: new google.maps.Size(256, 256), 154 | isPng: true 155 | } 156 | census_demo = new google.maps.ImageMapType(census_demo_options); 157 | 158 | map_options = { 159 | minZoom: 7, 160 | maxZoom: 10, 161 | zoom: 7, 162 | center: center, 163 | mapTypeControl: false, 164 | mapTypeId: "simple" 165 | }; 166 | 167 | backdrop_styles = [ 168 | { 169 | featureType: "administrative", 170 | elementType: "labels", 171 | stylers: [ 172 | { lightness: 10 } 173 | ] 174 | },{ 175 | featureType: "poi", 176 | elementType: "labels", 177 | stylers: [ 178 | { visibility: "off" } 179 | ] 180 | },{ 181 | featureType: "poi.park", 182 | elementType: "geometry", 183 | stylers: [ 184 | { visibility: "off" } 185 | ] 186 | },{ 187 | featureType: "road", 188 | elementType: "geometry", 189 | stylers: [ 190 | { visibility: "simplified" }, 191 | { saturation: -100 }, 192 | { lightness: 0 } 193 | ] 194 | },{ 195 | featureType: "road.arterial", 196 | elementType: "labels", 197 | stylers: [ 198 | { gamma: 10 } 199 | ] 200 | } 201 | ]; 202 | 203 | var initial_hash = window.location.hash; 204 | 205 | simple = new google.maps.StyledMapType(backdrop_styles, { name: "Illinois population 2010" }); 206 | map = new google.maps.Map(document.getElementById("map_canvas"), map_options); 207 | map.mapTypes.set("simple", simple); 208 | map.overlayMapTypes.push(census_demo); 209 | 210 | if (initial_hash) { 211 | parse_hash(initial_hash); 212 | } 213 | 214 | $("#search").submit(function(){geocode($("#query").val());return false;}); 215 | $("#show-wards").click(function(){ 216 | if(this.checked){ 217 | map.overlayMapTypes.push(wards); 218 | } 219 | else { 220 | map.overlayMapTypes.pop(); 221 | } 222 | }); 223 | 224 | google.maps.event.addListener(map, 'zoom_changed', function() { 225 | has_zoomed = true; 226 | }); 227 | google.maps.event.addListener(map, 'bounds_changed', function() { 228 | if (has_moved) { 229 | window.location.hash = make_hash(); 230 | } 231 | has_moved = true; 232 | }); 233 | }); 234 | -------------------------------------------------------------------------------- /census-demo/style.css: -------------------------------------------------------------------------------- 1 | html, body { 2 | width: 100%; 3 | height: 100% 4 | } 5 | 6 | body { 7 | margin: 0px; 8 | } 9 | 10 | #map_canvas { 11 | width: 100%; 12 | height: 100%; 13 | } 14 | 15 | #flag { 16 | position: absolute; 17 | top:13px; 18 | left:85px; 19 | } 20 | 21 | #legend { 22 | position: absolute; 23 | top:13px; 24 | right:13px; 25 | width:200px; 26 | background-color:#f3efe9; 27 | padding:10px; 28 | font-family: Arial, sans-serif; 29 | font-size:12px; 30 | border: 1px solid white; 31 | line-height:1.3em; 32 | } 33 | 34 | #legend h1 {font-size:18px; margin:0 0 4px 0;} 35 | #legend h2 {font-size:14px; margin:0;} 36 | #legend h3 {font-size:13px; margin: 10px 0 0 0;} 37 | 38 | #legend .colors {float:left;line-height:20px; width:110px; margin: 10px 0;} 39 | #legend .colors span {height:20px; width:20px; margin-right:5px; display:block; float:left; clear:left; opacity: .75;} 40 | #legend .less-than-five {background-color: #FFFFCC;} 41 | #legend .less-than-ten {background-color: #D9F0A3;} 42 | #legend .less-than-twenty-five {background-color: #ADDD8E;} 43 | #legend .less-than-fifty {background-color: #78C679;} 44 | #legend .less-than-one-hundred {background-color: #41AB5D;} 45 | #legend .less-than-five-hundred {background-color: #238443;} 46 | #legend .five-hundred-or-more {background-color: #005A32;} 47 | 48 | #legend p {clear:both; margin:5px 0 0 0;} 49 | 50 | #legend form#search {margin:15px 0;} 51 | #legend form#search label {font-size:16px; font-weight:bold; display:block;} 52 | #legend form#search input {font-size:14px; margin-top:4px;} 53 | #legend form#search input[type=text] {width:150px;} 54 | #legend form#search #alt-addresses p {margin-bottom:2px; font-style:italic;} 55 | #legend form#search #alt-addresses a {display:block; margin-bottom:3px;} 56 | 57 | #legend form#layers {margin:0; padding-top:20px; padding-bottom: 10px;clear:both;} 58 | #legend form#layers input[type="checkbox"] {margin:0; display:inline;} 59 | #legend form#layers label {margin:0; display:inline; font-size:16px; cursor:hand; text-decoration:underline; font-weight:bold;} 60 | 61 | #legend #credits {font-size:10px; line-height:1.2em;} -------------------------------------------------------------------------------- /csvcut: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """ 3 | Like cut, but for CSVs. To be used from a shell command line. 4 | 5 | Note that fields are zero-based, as opposed to 'cut' where they are 1-based. 6 | 7 | Should use something better than getopt, but this works... 8 | 9 | Usage: 10 | csvcut foobar.csv 11 | (prints the first column of each row of foobar.csv) 12 | 13 | head -10 foobar.csv | csvcut -f 0,2 14 | (prints the first and third columns of the first ten lines of foobar.csv) 15 | 16 | csvcut -f 0,2 -d "|" foobar.csv 17 | (prints the first and third columns of the pipe-delimited foobar.csv) 18 | 19 | csvcut -f 0,2 -t foobar.csv 20 | (prints the first and third columns of the tab-delimited foobar.csv 21 | if present, the -d option will be ignored.) 22 | 23 | csvcut -h foobar.csv 24 | (prints the values of the first line of foobar.csv, preceded by the field index which would 25 | be used to display that column. If present, the -f option will be ignored.) 26 | 27 | csvcut -f 0,1,2 -d "|" -o , foobar.csv 28 | (prints the first three columns of the pipe-delimited foobar.csv; output 29 | will be comma-delimited.) 30 | 31 | csvcut -f 0,1,2 -o "|" foobar.csv 32 | (prints the first three columns of the comma-delimited foobar.csv; output 33 | will be pipe-delimited.) 34 | 35 | csvcut -f : -o "|" foobar.csv 36 | (prints all the columns of the comma-delimited foobar.csv; output will be 37 | pipe-delimited.) 38 | 39 | csvcut -f 0,1 -d "," -q "|" foobar.csv 40 | (prints the first two columns of the comma-delimited, pipe-quoted foorbar.csv.) 41 | """ 42 | import sys, csv, getopt 43 | opts, args = getopt.getopt(sys.argv[1:], "f:d:o:q:ht", []) 44 | if args: 45 | i = open(args[0],"U") 46 | else: 47 | i = sys.stdin 48 | 49 | delimiter = ',' 50 | output_delimiter = ' ' 51 | cols = [0, ] 52 | show_headers = False 53 | 54 | if opts: 55 | opts = dict(opts) 56 | show_headers = '-h' in opts 57 | if '-f' in opts: 58 | cols = opts['-f'].split(",") 59 | if '-t' in opts: 60 | delimiter = "\t" 61 | elif '-d' in opts: 62 | delimiter = opts['-d'] 63 | if '-o' in opts: 64 | output_delimiter = opts['-o'] 65 | if '-q' in opts: 66 | quotechar = opts['-q'] 67 | else: 68 | quotechar = None 69 | 70 | for row in csv.reader(i, delimiter=delimiter, quotechar=quotechar): 71 | if show_headers: 72 | for i,c in enumerate(row): 73 | print "%3i: %s" % (i,c) 74 | break 75 | writer = csv.writer(sys.stdout, delimiter=output_delimiter) 76 | if cols == [':']: 77 | cols = range(len(row)) 78 | writer.writerow([row[int(c)] for c in cols]) -------------------------------------------------------------------------------- /merge.sql: -------------------------------------------------------------------------------- 1 | select 2 | county, 3 | population, 4 | (population / ST_Area(wkb_geometry)) * 1000000 as popsqkm, 5 | wkb_geometry, 6 | 7 | replace(county, ' County', '') || E'\n' || 8 | 'pop. ' || population || E'\n' || 9 | round((population / ST_Area(wkb_geometry))::numeric * 1000000, 1) || E' / km²\n' 10 | as label 11 | 12 | into merged 13 | from population, tl_2010_17_county10 14 | where id = geoid10; -------------------------------------------------------------------------------- /merged/merged.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsapps/making-maps-demo/12e6808108a0dca057ce480b840d6aa5076a9ae9/merged/merged.dbf -------------------------------------------------------------------------------- /merged/merged.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] -------------------------------------------------------------------------------- /merged/merged.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsapps/making-maps-demo/12e6808108a0dca057ce480b840d6aa5076a9ae9/merged/merged.shp -------------------------------------------------------------------------------- /merged/merged.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsapps/making-maps-demo/12e6808108a0dca057ce480b840d6aa5076a9ae9/merged/merged.shx -------------------------------------------------------------------------------- /population.csv: -------------------------------------------------------------------------------- 1 | 17001,Adams County,67103 2 | 17003,Alexander County,8238 3 | 17005,Bond County,17768 4 | 17007,Boone County,54165 5 | 17009,Brown County,6937 6 | 17011,Bureau County,34978 7 | 17013,Calhoun County,5089 8 | 17015,Carroll County,15387 9 | 17017,Cass County,13642 10 | 17019,Champaign County,201081 11 | 17021,Christian County,34800 12 | 17023,Clark County,16335 13 | 17025,Clay County,13815 14 | 17027,Clinton County,37762 15 | 17029,Coles County,53873 16 | 17031,Cook County,5194675 17 | 17033,Crawford County,19817 18 | 17035,Cumberland County,11048 19 | 17037,DeKalb County,105160 20 | 17039,De Witt County,16561 21 | 17041,Douglas County,19980 22 | 17043,DuPage County,916924 23 | 17045,Edgar County,18576 24 | 17047,Edwards County,6721 25 | 17049,Effingham County,34242 26 | 17051,Fayette County,22140 27 | 17053,Ford County,14081 28 | 17055,Franklin County,39561 29 | 17057,Fulton County,37069 30 | 17059,Gallatin County,5589 31 | 17061,Greene County,13886 32 | 17063,Grundy County,50063 33 | 17065,Hamilton County,8457 34 | 17067,Hancock County,19104 35 | 17069,Hardin County,4320 36 | 17071,Henderson County,7331 37 | 17073,Henry County,50486 38 | 17075,Iroquois County,29718 39 | 17077,Jackson County,60218 40 | 17079,Jasper County,9698 41 | 17081,Jefferson County,38827 42 | 17083,Jersey County,22985 43 | 17085,Jo Daviess County,22678 44 | 17087,Johnson County,12582 45 | 17089,Kane County,515269 46 | 17091,Kankakee County,113449 47 | 17093,Kendall County,114736 48 | 17095,Knox County,52919 49 | 17097,Lake County,703462 50 | 17099,LaSalle County,113924 51 | 17101,Lawrence County,16833 52 | 17103,Lee County,36031 53 | 17105,Livingston County,38950 54 | 17107,Logan County,30305 55 | 17109,McDonough County,32612 56 | 17111,McHenry County,308760 57 | 17113,McLean County,169572 58 | 17115,Macon County,110768 59 | 17117,Macoupin County,47765 60 | 17119,Madison County,269282 61 | 17121,Marion County,39437 62 | 17123,Marshall County,12640 63 | 17125,Mason County,14666 64 | 17127,Massac County,15429 65 | 17129,Menard County,12705 66 | 17131,Mercer County,16434 67 | 17133,Monroe County,32957 68 | 17135,Montgomery County,30104 69 | 17137,Morgan County,35547 70 | 17139,Moultrie County,14846 71 | 17141,Ogle County,53497 72 | 17143,Peoria County,186494 73 | 17145,Perry County,22350 74 | 17147,Piatt County,16729 75 | 17149,Pike County,16430 76 | 17151,Pope County,4470 77 | 17153,Pulaski County,6161 78 | 17155,Putnam County,6006 79 | 17157,Randolph County,33476 80 | 17159,Richland County,16233 81 | 17161,Rock Island County,147546 82 | 17163,St. Clair County,270056 83 | 17165,Saline County,24913 84 | 17167,Sangamon County,197465 85 | 17169,Schuyler County,7544 86 | 17171,Scott County,5355 87 | 17173,Shelby County,22363 88 | 17175,Stark County,5994 89 | 17177,Stephenson County,47711 90 | 17179,Tazewell County,135394 91 | 17181,Union County,17808 92 | 17183,Vermilion County,81625 93 | 17185,Wabash County,11947 94 | 17187,Warren County,17707 95 | 17189,Washington County,14716 96 | 17191,Wayne County,16760 97 | 17193,White County,14665 98 | 17195,Whiteside County,58498 99 | 17197,Will County,677560 100 | 17199,Williamson County,66357 101 | 17201,Winnebago County,295266 102 | 17203,Woodford County,38664 103 | -------------------------------------------------------------------------------- /render: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | rm -rf census-demo/.tiles 3 | mkdir census-demo/.tiles 4 | python render_tiles.py tilemill/census_demo.xml census-demo/.tiles/ 42.57 -91.65 36.9 -87.23 7 10 2 -------------------------------------------------------------------------------- /render_tiles.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | from math import pi,cos,sin,log,exp,atan 3 | from subprocess import call 4 | import sys, os 5 | from Queue import Queue 6 | import mapnik2 7 | import threading 8 | import argparse 9 | 10 | custom_fonts_dir = '/Library/Fonts/' 11 | mapnik2.register_fonts(custom_fonts_dir) 12 | 13 | DEG_TO_RAD = pi/180 14 | RAD_TO_DEG = 180/pi 15 | 16 | # Default number of rendering threads to spawn, should be roughly equal to number of CPU cores available 17 | NUM_THREADS = 4 18 | 19 | def minmax (a,b,c): 20 | a = max(a,b) 21 | a = min(a,c) 22 | return a 23 | 24 | class GoogleProjection: 25 | def __init__(self,levels=18): 26 | self.Bc = [] 27 | self.Cc = [] 28 | self.zc = [] 29 | self.Ac = [] 30 | c = 256 31 | for d in range(0,levels): 32 | e = c/2; 33 | self.Bc.append(c/360.0) 34 | self.Cc.append(c/(2 * pi)) 35 | self.zc.append((e,e)) 36 | self.Ac.append(c) 37 | c *= 2 38 | 39 | def fromLLtoPixel(self,ll,zoom): 40 | d = self.zc[zoom] 41 | e = round(d[0] + ll[0] * self.Bc[zoom]) 42 | f = minmax(sin(DEG_TO_RAD * ll[1]),-0.9999,0.9999) 43 | g = round(d[1] + 0.5*log((1+f)/(1-f))*-self.Cc[zoom]) 44 | return (e,g) 45 | 46 | def fromPixelToLL(self,px,zoom): 47 | e = self.zc[zoom] 48 | f = (px[0] - e[0])/self.Bc[zoom] 49 | g = (px[1] - e[1])/-self.Cc[zoom] 50 | h = RAD_TO_DEG * ( 2 * atan(exp(g)) - 0.5 * pi) 51 | return (f,h) 52 | 53 | 54 | 55 | class RenderThread: 56 | def __init__(self, tile_dir, mapfile, q, printLock, maxZoom): 57 | self.tile_dir = tile_dir 58 | self.q = q 59 | self.m = mapnik2.Map(256, 256) 60 | self.printLock = printLock 61 | # Load style XML 62 | mapnik2.load_map(self.m, mapfile, True) 63 | # Obtain projection 64 | self.prj = mapnik2.Projection(self.m.srs) 65 | # Projects between tile pixel co-ordinates and LatLong (EPSG:4326) 66 | self.tileproj = GoogleProjection(maxZoom+1) 67 | 68 | 69 | def render_tile(self, tile_uri, x, y, z): 70 | # Calculate pixel positions of bottom-left & top-right 71 | p0 = (x * 256, (y + 1) * 256) 72 | p1 = ((x + 1) * 256, y * 256) 73 | 74 | # Convert to LatLong (EPSG:4326) 75 | l0 = self.tileproj.fromPixelToLL(p0, z); 76 | l1 = self.tileproj.fromPixelToLL(p1, z); 77 | 78 | # Convert to map projection (e.g. mercator co-ords EPSG:900913) 79 | c0 = self.prj.forward(mapnik2.Coord(l0[0],l0[1])) 80 | c1 = self.prj.forward(mapnik2.Coord(l1[0],l1[1])) 81 | 82 | # Bounding box for the tile 83 | if hasattr(mapnik2,'mapnik_version') and mapnik2.mapnik_version() >= 800: 84 | bbox = mapnik2.Box2d(c0.x,c0.y, c1.x,c1.y) 85 | else: 86 | bbox = mapnik2.Envelope(c0.x,c0.y, c1.x,c1.y) 87 | render_size = 256 88 | self.m.resize(render_size, render_size) 89 | self.m.zoom_to_box(bbox) 90 | self.m.buffer_size = 128 91 | 92 | # Render image with default Agg renderer 93 | im = mapnik2.Image(render_size, render_size) 94 | mapnik2.render(self.m, im) 95 | im.save(tile_uri, 'png256') 96 | 97 | 98 | def loop(self): 99 | while True: 100 | #Fetch a tile from the queue and render it 101 | r = self.q.get() 102 | if (r == None): 103 | self.q.task_done() 104 | break 105 | else: 106 | (name, tile_uri, x, y, z) = r 107 | 108 | exists= "" 109 | if os.path.isfile(tile_uri): 110 | exists= "exists" 111 | else: 112 | self.render_tile(tile_uri, x, y, z) 113 | bytes=os.stat(tile_uri)[6] 114 | empty= '' 115 | if bytes == 103: 116 | empty = " Empty Tile " 117 | self.printLock.acquire() 118 | print name, ":", z, x, y, exists, empty 119 | self.printLock.release() 120 | self.q.task_done() 121 | 122 | 123 | 124 | def render_tiles(bbox, mapfile, tile_dir, minZoom=1,maxZoom=18, name="unknown", num_threads=NUM_THREADS): 125 | print "render_tiles(",bbox, mapfile, tile_dir, minZoom, maxZoom, name,")" 126 | 127 | # Launch rendering threads 128 | queue = Queue(32) 129 | printLock = threading.Lock() 130 | renderers = {} 131 | for i in range(num_threads): 132 | renderer = RenderThread(tile_dir, mapfile, queue, printLock, maxZoom) 133 | render_thread = threading.Thread(target=renderer.loop) 134 | render_thread.start() 135 | #print "Started render thread %s" % render_thread.getName() 136 | renderers[i] = render_thread 137 | 138 | if not os.path.isdir(tile_dir): 139 | os.mkdir(tile_dir) 140 | 141 | gprj = GoogleProjection(maxZoom+1) 142 | 143 | ll0 = (bbox[0],bbox[3]) 144 | ll1 = (bbox[2],bbox[1]) 145 | 146 | for z in range(minZoom,maxZoom + 1): 147 | px0 = gprj.fromLLtoPixel(ll0,z) 148 | px1 = gprj.fromLLtoPixel(ll1,z) 149 | 150 | # check if we have directories in place 151 | zoom = "%s" % z 152 | if not os.path.isdir(tile_dir + zoom): 153 | os.mkdir(tile_dir + zoom) 154 | for x in range(int(px0[0]/256.0),int(px1[0]/256.0)+1): 155 | # Validate x co-ordinate 156 | if (x < 0) or (x >= 2**z): 157 | continue 158 | # check if we have directories in place 159 | str_x = "%s" % x 160 | if not os.path.isdir(tile_dir + zoom + '/' + str_x): 161 | os.mkdir(tile_dir + zoom + '/' + str_x) 162 | for y in range(int(px0[1]/256.0),int(px1[1]/256.0)+1): 163 | # Validate x co-ordinate 164 | if (y < 0) or (y >= 2**z): 165 | continue 166 | str_y = "%s" % y 167 | tile_uri = tile_dir + zoom + '/' + str_x + '/' + str_y + '.png' 168 | # Submit tile to be rendered into the queue 169 | t = (name, tile_uri, x, y, z) 170 | queue.put(t) 171 | 172 | # Signal render threads to exit by sending empty request to queue 173 | for i in range(num_threads): 174 | queue.put(None) 175 | # wait for pending rendering jobs to complete 176 | queue.join() 177 | for i in range(num_threads): 178 | renderers[i].join() 179 | 180 | 181 | if __name__ == "__main__": 182 | 183 | #python render_tiles.py tilemill/wards.xml mayor-2011/.tiles/wards/ -89.03 41.07 -87.51 42.50 9 16 2 184 | parser = argparse.ArgumentParser(description='Render your tiles.') 185 | parser.add_argument('style_file', help="File containing Mapnik styles") 186 | parser.add_argument('tile_dir', help="Destination directory for rendered tiles") 187 | parser.add_argument('lat_1', type=float, help="Top-left corner latitude") 188 | parser.add_argument('lon_1', type=float, help="Top-left corner longitude") 189 | parser.add_argument('lat_2', type=float, help="Bottom-right corner latitude") 190 | parser.add_argument('lon_2', type=float, help="Bottom-right corner longitude") 191 | parser.add_argument('min_zoom', help="Minimum zoom level to render", type=int, default="9") 192 | parser.add_argument('max_zoom', help="Maximum zoom level to render", type=int, default="12") 193 | parser.add_argument('cores', help="Number of rendering threads to spawn, should be roughly equal to number of CPU cores available", type=int, default="2") 194 | args = parser.parse_args() 195 | 196 | bbox = (args.lon_1, args.lat_2, args.lon_2, args.lat_1) 197 | 198 | render_tiles(bbox, args.style_file, args.tile_dir, args.min_zoom, args.max_zoom) 199 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | Fabric==0.9.3 2 | argparse==1.1 3 | paramiko==1.7.6 4 | pycrypto==2.3 5 | -e svn+https://s3tools.svn.sourceforge.net/svnroot/s3tools/s3cmd/tags/1.0.0@465#egg=s3cmd-1.0.0 6 | wsgiref==0.1.2 -------------------------------------------------------------------------------- /setup: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # 3 | # create the database (first drop the old one, if it exists) 4 | # 5 | dropdb census_demo 6 | createdb census_demo -T template_postgis 7 | # 8 | # prepare the data, create the table and load it 9 | # ...using Joe Germuska's csvcut to trim the columns we don't need 10 | # ...using tail to yank off the ugly headers 11 | # ...using cut to trim the leading cruft off the id column 12 | # 13 | ./csvcut -f 2,4,5 -o "," DEC_10_PL_GCTPL2.ST05/DEC_10_PL_GCTPL2.ST05.csv | tail +5 | cut -c 10-200 > population.csv 14 | psql -d census_demo -c "create table population (id char(5), county varchar(100), population integer);" 15 | psql -d census_demo -c "copy population from '${HOME}/src/making-maps-demo/population.csv' delimiters ',' CSV;" 16 | # 17 | # load the shapefile 18 | # ...using the same projection as google maps because that's eventually how we'll 19 | # ...present it, so any geometric calcs we may run in our merge sql are correct 20 | # 21 | ogr2ogr -f PostgreSQL PG:dbname=census_demo tl_2010_17_county10/tl_2010_17_county10.shp -t_srs EPSG:900913 -nlt multipolygon -nln tl_2010_17_county10 22 | # 23 | # stitch the two tables together and write to a new shapefile 24 | # ...calculating the pop per sq km cuz using the raw population is less good 25 | # ...going back to 4269 so that TileMill is happy 26 | # 27 | psql -d census_demo -f merge.sql 28 | ogr2ogr -f "ESRI Shapefile" merged PG:dbname=census_demo -sql "select * from merged" -nln merged -t_srs EPSG:4269 -overwrite -------------------------------------------------------------------------------- /style: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | cp /Applications/TileMill/files/project/census_demo/* tilemill 3 | /Applications/TileMill/bin/carto tilemill/census_demo.mml > tilemill/census_demo.xml -------------------------------------------------------------------------------- /tilemill/census_demo.mml: -------------------------------------------------------------------------------- 1 | {"_center":{"lat":40.354916749459,"lon":-89.593505855734,"zoom":8},"_format":"png","srs":"+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs","Stylesheet":["style.mss"],"Layer":[{"id":"counties","name":"counties","srs":"","class":"","Datasource":{"file":"/Volumes/Home/bboyer/src/making-maps-demo/merged/merged.shp","type":"shape"},"geometry":"polygon"},{"id":"labels","name":"labels","srs":"","class":"","Datasource":{"file":"/Volumes/Home/bboyer/src/making-maps-demo/merged/merged.shp","type":"shape"},"geometry":"polygon"}]} -------------------------------------------------------------------------------- /tilemill/census_demo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 186 | 189 | counties 190 | 191 | /Volumes/Home/bboyer/src/making-maps-demo/merged/merged.shp 192 | shape 193 | 194 | 195 | 196 | 216 | 219 | labels 220 | 221 | /Volumes/Home/bboyer/src/making-maps-demo/merged/merged.shp 222 | shape 223 | 224 | 225 | 226 | 227 | -------------------------------------------------------------------------------- /tilemill/style.mss: -------------------------------------------------------------------------------- 1 | #counties { 2 | polygon-opacity: .75; 3 | line-color: #fff; 4 | line-width: 0.5; 5 | #counties[zoom = 8]{ line-width: 1; } 6 | #counties[zoom = 9]{ line-width: 2; } 7 | #counties[zoom = 10]{ line-width: 3; } 8 | } 9 | #counties { polygon-fill: #FFFFCC; } 10 | #counties[popsqkm >= 5 ] { polygon-fill: #D9F0A3; } 11 | #counties[popsqkm >= 10] { polygon-fill: #ADDD8E; } 12 | #counties[popsqkm >= 25] { polygon-fill: #78C679; } 13 | #counties[popsqkm >= 50] { polygon-fill: #41AB5D; } 14 | #counties[popsqkm >= 100] { polygon-fill: #238443; } 15 | #counties[popsqkm >= 500] { polygon-fill: #005A32; } 16 | 17 | #labels { 18 | text-name: "[label]"; 19 | text-face-name: "Arial Bold"; 20 | text-size: 4; 21 | #labels[zoom = 8] { text-size:8; text-line-spacing: 1; } 22 | #labels[zoom = 9] { text-size:16; text-line-spacing: 3; } 23 | #labels[zoom = 10] { text-size:32; text-line-spacing: 7; } 24 | } 25 | -------------------------------------------------------------------------------- /tl_2010_17_county10/tl_2010_17_county10.dbf: -------------------------------------------------------------------------------- 1 | n fA%STATEFP10CCOUNTYFP10CCOUNTYNS10CGEOID10CNAME10CdNAMELSAD10CdLSAD10CCLASSFP10CMTFCC10CCSAFP10CCBSAFP10CMETDIVFP10CFUNCSTAT10CALAND10NAWATER10NINTPTLAT10C INTPTLON10C 170090042420617009Brown Brown County 06H1G4020 A 791518279 4139308+39.9620694-090.7503095 170330042421817033Crawford Crawford County 06H1G4020 A 1148994475 5670462+39.0037296-087.7571722 170850042424417085Jo Daviess Jo Daviess County 06H1G4020 A 1556808594 45690178+42.3623905-090.2114705 170650042423417065Hamilton Hamilton County 06H1G4020 34500 A 1125777456 3174991+38.0852260-088.5390048 171090178472917109McDonough McDonough County 06H1G4020 31380 A 1526558259 2012556+40.4557890-090.6775788 171350178486617135Montgomery Montgomery County 06H1G4020 A 1822539599 15512968+39.2280917-089.4780068 170410042422217041Douglas Douglas County 06H1G4020 A 1079156495 1448702+39.7660780-088.2228656 171810178511317181Union Union County 06H1G4020 A 1070854490 22503527+37.4751042-089.2528747 171150042425617115Macon Macon County 06H1G4020 19500 A 1503976676 13406333+39.8602372-088.9615288 172010178521617201Winnebago Winnebago County 06H1G402046640420 A 1329601795 15250394+42.3373957-089.1612053 171330178486517133Monroe Monroe County 06H1G402047641180 A 997173442 33734465+38.2779831-090.1790777 171290042426617129Menard Menard County 06H1G4020 44100 A 814388302 2641608+40.0225693-089.7941326 170830042424317083Jersey Jersey County 06H1G402047641180 A 956408129 20348919+39.0801918-090.3613647 171710042428617171Scott Scott County 06H1G4020 27300 A 649861251 4812703+39.6369795-090.4777593 171310178475017131Mercer Mercer County 06H1G4020 19340 A 1453506907 19403406+41.2047906-090.7414333 170470042422517047Edwards Edwards County 06H1G4020 A 576054180 788767+38.4170954-088.0479408 170350042421917035Cumberland Cumberland County 06H1G4020 16660 A 896198602 2535805+39.2731210-088.2406193 171970178519017197Will Will County 06H1G40201761698016974A 2167580722 31904495+41.4484742-087.9784564 171430178492017143Peoria Peoria County 06H1G402042637900 A 1603744994 29499157+40.7859987-089.7673577 171950178516717195Whiteside Whiteside County 06H1G4020 44580 A 1772198878 31796457+41.7505708-089.9109567 170050042420417005Bond Bond County 06H1G402047641180 A 984918676 6426360+38.8859240-089.4365916 170990042224717099LaSalle LaSalle County 06H1G4020 36860 A 2939957539 33700941+41.3433407-088.8859312 170430042219117043DuPage DuPage County 06H1G40201761698016974A 848218379 23083362+41.8520581-088.0860383 170910042424717091Kankakee Kankakee County 06H1G402017628100 A 1752271023 12452094+41.1394937-087.8611252 171210042425917121Marion Marion County 06H1G4020 16460 A 1482413602 9512893+38.6483956-088.9202214 171270178473017127Massac Massac County 06H1G402042437140 A 614390561 11904547+37.2161190-088.7056578 170190042421117019Champaign Champaign County 06H1G4020 16580 A 2580316235 5509218+40.1391496-088.1972014 170690042423617069Hardin Hardin County 06H1G4020 A 459794312 10491249+37.5178517-088.2661478 171110178481517111McHenry McHenry County 06H1G40201761698016974A 1562206475 19791771+42.3242982-088.4522450 171490178494117149Pike Pike County 06H1G4020 A 2153268105 45333457+39.6251059-090.8890344 170490042422617049Effingham Effingham County 06H1G4020 20820 A 1240027936 3183199+39.0476943-088.5927862 170110042420717011Bureau Bureau County 06H1G4020 36860 A 2250780454 11583679+41.4013043-089.5283772 170390042659817039De Witt De Witt County 06H1G4020 A 1029554715 19608681+40.1814993-088.9018526 171570178496717157Randolph Randolph County 06H1G4020 A 1490537612 56215661+38.0565149-089.8212096 171170042425717117Macoupin Macoupin County 06H1G402047641180 A 2234917323 12287254+39.2659000-089.9263435 171690178503717169Schuyler Schuyler County 06H1G4020 A 1132531106 10511606+40.1569048-090.6134641 171530178496617153Pulaski Pulaski County 06H1G4020 A 515886434 10474968+37.2156152-089.1277549 171610042428217161Rock Island Rock Island County 06H1G4020 19340 A 1107573369 61257184+41.4684044-090.5722031 170550042422917055Franklin Franklin County 06H1G4020 A 1059017642 58416872+37.9918483-088.9262457 170230042421317023Clark Clark County 06H1G4020 A 1298666494 8806915+39.3323642-087.7916872 170510042422717051Fayette Fayette County 06H1G4020 A 1855679809 22950051+39.0011246-089.0179232 170210042421217021Christian Christian County 06H1G4020 45380 A 1837278793 16221497+39.5455242-089.2795925 171870178513417187Warren Warren County 06H1G4020 23660 A 1404823508 1674135+40.8504412-090.6202228 171390178488517139Moultrie Moultrie County 06H1G4020 A 870088946 22102477+39.6368956-088.6257259 170150042420917015Carroll Carroll County 06H1G4020 A 1152045333 55821513+42.0590844-089.9264854 171910042429617191Wayne Wayne County 06H1G4020 A 1848769796 4331019+38.4319482-088.4321291 171850042429317185Wabash Wabash County 06H1G4020 A 578218989 11017614+38.4458209-087.8391674 170770042424017077Jackson Jackson County 06H1G402016616060 A 1512763725 47391559+37.7860959-089.3812119 171070042425517107Logan Logan County 06H1G4020 30660 A 1600764560 2247126+40.1290697-089.3653078 170670042423517067Hancock Hancock County 06H1G4020 A 2055740516 53535882+40.4057924-091.1679875 170370042219017037DeKalb DeKalb County 06H1G40201761698016974A 1635077221 8684327+41.8946125-088.7689910 171190042425817119Madison Madison County 06H1G402047641180 A 1853347576 64697196+38.8270818-089.9001954 171370042427017137Morgan Morgan County 06H1G4020 27300 A 1473161231 9079454+39.7168060-090.2022771 171550042427917155Putnam Putnam County 06H1G4020 36860 A 414813807 31243045+41.1989402-089.2983864 172030178523117203Woodford Woodford County 06H1G402042637900 A 1366993724 38442098+40.7895956-089.2103006 170530042422817053Ford Ford County 06H1G4020 16580 A 1257738509 1621586+40.5944228-088.2247456 170450042422417045Edgar Edgar County 06H1G4020 A 1614531997 1610636+39.6790370-087.7471102 171650042428317165Saline Saline County 06H1G4020 25380 A 983725654 18029169+37.7516531-088.5450310 171470042427517147Piatt Piatt County 06H1G4020 16580 A 1137528578 672948+40.0090561-088.5923282 170950042424917095Knox Knox County 06H1G4020 23660 A 1855453788 8849496+40.9309412-090.2137611 171890178515017189Washington Washington County 06H1G4020 A 1457055371 3454799+38.3531405-089.4171873 171050042425417105Livingston Livingston County 06H1G4020 38700 A 2704686611 4252873+40.8943761-088.5528518 170790042424117079Jasper Jasper County 06H1G4020 A 1280774187 9348767+39.0048737-088.1507629 171830178511417183Vermilion Vermilion County 06H1G4020 19180 A 2326763569 7534481+40.1867398-087.7267715 171770178507617177Stephenson Stephenson County 06H1G402046623300 A 1462107736 1385932+42.3497262-089.6659942 171590042428117159Richland Richland County 06H1G4020 A 932370871 4937078+38.7115503-088.0856978 170810042424217081Jefferson Jefferson County 06H1G4020 34500 A 1479320495 32673835+38.3007796-088.9242100 171790178509417179Tazewell Tazewell County 06H1G402042637900 A 1680835450 23211163+40.5080739-089.5162597 171730178505117173Shelby Shelby County 06H1G4020 A 1964565410 24725624+39.3849258-088.7988615 170870042424517087Johnson Johnson County 06H1G4020 A 890735754 12816588+37.4608153-088.8829622 171750042428817175Stark Stark County 06H1G402042637900 A 746121703 708705+41.0969077-089.7974111 171930042429717193White White County 06H1G4020 A 1281438823 18375223+38.0873720-088.1785848 171670178501017167Sangamon Sangamon County 06H1G4020 44100 A 2248892510 22577397+39.7563782-089.6623110 170610042423217061Greene Greene County 06H1G4020 A 1406413796 8425403+39.3554444-090.3877569 171410178489417141Ogle Ogle County 06H1G402046640300 A 1964698351 11425054+42.0418840-089.3201764 170930042424817093Kendall Kendall County 06H1G40201761698016974A 829664827 5140545+41.5881403-088.4306257 171250042426117125Mason Mason County 06H1G4020 A 1396619128 62745254+40.2369926-089.9135746 170310178476617031Cook Cook County 06H1G40201761698016974A 2448383588 1785882224+41.8942937-087.6454546 171630178498717163St. Clair St. Clair County 06H1G402047641180 A 1703588508 42149850+38.4701976-089.9285459 171990178521517199Williamson Williamson County 06H1G402016632060 A 1088181449 62684233+37.7303533-088.9300182 170630042423317063Grundy Grundy County 06H1G40201761698016974A 1082725907 32126847+41.2924096-088.4010545 170030042420317003Alexander Alexander County 06H1G402016416020 A 609965908 44268323+37.1836828-089.3495061 170070042420517007Boone Boone County 06H1G402046640420 A 727059777 3380831+42.3189831-088.8242951 170170042421017017Cass Cass County 06H1G4020 A 973365036 20581547+39.9692024-090.2457045 170250042421417025Clay Clay County 06H1G4020 A 1212932408 3304659+38.7473124-088.4837894 170730042423817073Henry Henry County 06H1G4020 19340 A 2131522072 6884367+41.3500209-090.1308378 170570042423017057Fulton Fulton County 06H1G402042615900 A 2241880276 43974299+40.4656878-090.2067925 170750042423917075Iroquois Iroquois County 06H1G4020 A 2893835594 4172263+40.7488665-087.8336010 170010042420217001Adams Adams County 06H1G4020 39500 A 2214963578 41793038+39.9860525-091.1949607 170970178479617097Lake Lake County 06H1G40201761698029404A 1149099822 2395243697+42.3264435-087.4361178 170890042424617089Kane Kane County 06H1G40201761698016974A 1346943286 10730649+41.9395938-088.4280395 170590042423117059Gallatin Gallatin County 06H1G4020 A 836750424 13238548+37.7686768-088.2279642 170710042423717071Henderson Henderson County 06H1G4020 15460 A 981273730 42340541+40.8151413-090.9384797 170290042421617029Coles Coles County 06H1G4020 16660 A 1316466333 4624844+39.5136797-088.2207820 170130042420817013Calhoun Calhoun County 06H1G402047641180 A 657402816 77057174+39.1642619-090.6662949 171510042427717151Pope Pope County 06H1G4020 A 955110060 14328668+37.4171687-088.5423737 171010042425217101Lawrence Lawrence County 06H1G4020 A 963936870 5077778+38.7189542-087.7302207 171030042425317103Lee Lee County 06H1G4020 19940 A 1877472815 10506478+41.7474419-089.2993505 171230042426017123Marshall Marshall County 06H1G402042637900 A 1001778707 30368289+41.0311192-089.3423714 170270042421517027Clinton Clinton County 06H1G402047641180 A 1227874498 75592326+38.6064228-089.4231363 171130178483317113McLean McLean County 06H1G4020 14060 A 3064933852 7490543+40.4945594-088.8445391 171450178494017145Perry Perry County 06H1G4020 A 1144154902 13447403+38.0843845-089.3684869 -------------------------------------------------------------------------------- /tl_2010_17_county10/tl_2010_17_county10.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] -------------------------------------------------------------------------------- /tl_2010_17_county10/tl_2010_17_county10.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsapps/making-maps-demo/12e6808108a0dca057ce480b840d6aa5076a9ae9/tl_2010_17_county10/tl_2010_17_county10.shp -------------------------------------------------------------------------------- /tl_2010_17_county10/tl_2010_17_county10.shp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | U.S. Department of Commerce, U.S. Census Bureau, Geography Division 7 | 2010 8 | TIGER/Line Shapefile, 2010, 2010 state, Illinois, 2010 Census County and Equivalent State-based 9 | 2010 10 | vector digital data 11 | http://www.census.gov/geo/www/tiger 12 | 13 | 14 | 15 | The TIGER/Line Files are shapefiles and related database files (.dbf) that are an extract of selected geographic and cartographic information from the U.S. Census Bureau's Master Address File / Topologically Integrated Geographic Encoding and Referencing (MAF/TIGER) Database (MTDB). The MTDB represents a seamless national file with no overlaps or gaps between parts, however, each TIGER/Line File is designed to stand alone as an independent data set, or they can be combined to cover the entire nation. The primary legal divisions of most States are termed counties. In Louisiana, these divisions are known as parishes. In Alaska, which has no counties, the equivalent entities are the organized boroughs, city and boroughs, and municipalities, and for the unorganized area, census areas. The latter are delineated cooperatively for statistical purposes by the State of Alaska and the Census Bureau. In four States (Maryland, Missouri, Nevada, and Virginia), there are one or more incorporated places that are independent of any county organization and thus constitute primary divisions of their States. These incorporated places are known as independent cities and are treated as equivalent entities for purposes of data presentation. The District of Columbia and Guam have no primary divisions, and each area is considered an equivalent entity for purposes of data presentation. The Census Bureau treats the following entities as equivalents of counties for purposes of data presentation: Municipios in Puerto Rico, Districts and Islands in American Samoa, Municipalities in the Commonwealth of the Northern Mariana Islands, and Islands in the U.S. Virgin Islands. The entire area of the United States, Puerto Rico, and the Island Areas is covered by counties or equivalent entities. The 2010 Census boundaries for counties and equivalent entities are as of January 1, 2010, primarily as reported through the Census Bureau's Boundary and Annexation Survey (BAS). 16 | 17 | In order for others to use the information in the Census MAF/TIGER database in a geographic information system (GIS) or for other geographic applications, the Census Bureau releases to the public extracts of the database in the form of TIGER/Line Shapefiles. 18 | Illinois(17) 19 | 20 | 21 | 22 | 23 | 201001 24 | 201007 25 | 26 | 27 | Publication Date 28 | 29 | 30 | Complete 31 | TIGER/Line Shapefiles are extracted from the Census MAF/TIGER database. No changes or updates will be made to this version of the TIGER/Line Shapefiles. Future releases of TIGER/Line Shapefiles will reflect updates made to the Census MAF/TIGER database. 32 | 33 | 34 | 35 | -91.513079 36 | -87.019935 37 | 42.508338 38 | 36.970298 39 | 40 | 41 | 42 | 43 | ISO 19115 Topic Categories 44 | boundaries 45 | 46 | 47 | None 48 | 49 | State or equivalent entity 50 | Polygon 51 | 52 | 53 | INCITS.38-200x (R2004),INCITS.31-200x (R2007),INCITS.454-200x,INCITS 455-200x,INCITS 446-2008 54 | United States 55 | U.S. 56 | State or Equivalent Entity 57 | Illinois 58 | IL 59 | 17 60 | 61 | 62 | None 63 | The TIGER/Line Shapefile products are not copyrighted however TIGER/Line and Census TIGER are registered trademarks of the U.S. Census Bureau. These products are free to use in a product or publication, however acknowledgement must be given to the U.S. Census Bureau as the source. 64 | The boundary information in the TIGER/Line Shapefiles are for statistical data collection and tabulation purposes only; their depiction and designation for statistical purposes does not constitute a determination of jurisdictional authority or rights of ownership or entitlement and they are not legal land descriptions.Coordinates in the TIGER/Line shapefiles have six implied decimal places, but the positional accuracy of these coordinates is not as great as the six decimal places suggest. 65 | Yes, the data are free from Title 13 restrictions 66 | 67 | 68 | 69 | U.S. Department of Commerce, U.S. Census Bureau, Geography Division, Geographic Products Branch 70 | 71 | 72 | Mailing address 73 |
4600 Silver Hill Road, Stop 7400
74 | Washington 75 | DC 76 | 20233-7400 77 | United States 78 |
79 | 301-763-1128 80 | 301-763-4710 81 | geo.tiger@census.gov 82 |
83 |
84 |
85 | 8859part1 86 | eng 87 | 88 | 89 | Accurate against Federal Information Processing Standards (FIPS), FIPS Publication 6-4, and FIPS-55 at the 100% level for the codes and base names. The remaining attribute information has been examined but has not been fully tested for accuracy. 90 | 91 | The Census Bureau performed automated tests to ensure logical consistency and limits of shapefiles. Segments making up the outer and inner boundaries of a polygon tie end-to-end to completely enclose the area. All polygons are tested for closure. 92 | The Census Bureau uses its internally developed geographic update system to enhance and modify spatial and attribute data in the Census MAF/TIGER database. Standard geographic codes, such as FIPS codes for states, counties, municipalities, county subdivisions, places, American Indian/Alaska Native/Native Hawaiian areas, and congressional districts are used when encoding spatial entities. The Census Bureau performed spatial data tests for logical consistency of the codes during the compilation of the original Census MAF/TIGER database files. Most of the codes for geographic entities except states, counties, urban areas, Core Based Statistical Areas (CBSAs), American Indian Areas (AIAs), and congressional districts were provided to the Census Bureau by the USGS, the agency responsible for maintaining FIPS 55. Feature attribute information has been examined but has not been fully tested for consistency. 93 | For the TIGER/Line Shapefiles, the Point and Vector Object Count for the G-polygon SDTS Point and Vector Object Type reflects the number of records in the shapefile attribute table. For multi-polygon features, only one attribute record exists for each multi-polygon rather than one attribute record per individual G-polygon component of the multi-polygon feature. TIGER/Line Shapefile multi-polygons are an exception to the G-polygon object type classification. Therefore, when multi-polygons exist in a shapefile, the object count will be less than the actual number of G-polygons. 94 | Data completeness of the TIGER/Line Shapefiles reflects the contents of the Census MAF/TIGER database at the time the TIGER/Line Shapefiles were created. 95 | 96 | 97 | 98 | 99 | U.S. Department of Commerce, U.S. Census Bureau, Geography Division 100 | Unpublished material 101 | Census MAF/TIGER database 102 | 103 | 104 | online 105 | 106 | 107 | 108 | 201001 109 | 201007 110 | 111 | 112 | Publication Date 113 | 114 | MAF/TIGER 115 | The selected geographic and cartographic information (line segments) are derived from the U.S. Census Bureau's Master Address File Topologically Integrated Geographic Encoding and Referencing (MAF/TIGER) database. 116 | 117 | 118 | TIGER/Line Shapefiles are extracted from the Census MAF/TIGER database by nation, state, county, and entity. Census MAF/TIGER data for all of the aforementioned geographic entities are then distributed among the shapefiles each containing attributes for line, polygon, or landmark geographic data. 119 | Census MAF/TIGER 120 | 2010 121 | 122 | 123 | 124 | 125 | Federal Information Processing Standards (FIPS), ANSI, and feature names. 126 | Vector 127 | 128 | 129 | G-polygon 130 | 102 131 | 132 | 133 | 134 | 135 | 136 | 137 | 0.000458 138 | 0.000458 139 | Decimal degrees 140 | 141 | 142 | North American Datum of 1983 in the 48 contiguous states, the District of Columbia, Alaska, Hawaii, Puerto Rico, the Virgin Islands of the United States, and the Pacific Island Areas. 143 | Geodetic Reference System 80 144 | 6378137 145 | 298257 146 | 147 | 148 | 149 | 150 | 151 | 152 | COUNTY10.shp 153 | 2010 Census County and Equivalent State-based 154 | U.S. Census Bureau 155 | 156 | 157 | STATEFP10 158 | 2010 Census state Federal Information Processing Standards 159 | (FIPS) codes 160 | U.S. Census Bureau 161 | 162 | 163 | INCITS.38-200x (R2004), Codes for the Identification of 164 | the States, the District of Columbia, Puerto Rico, and the 165 | Insular Areas of the United States (Formerly FIPS 5-2) 166 | U.S. Census Bureau 167 | 168 | 169 | 170 | 171 | COUNTYFP10 172 | 2010 Census county Federal Information Processing Standards 173 | (FIPS) code 174 | U.S. Census Bureau 175 | 176 | 177 | INCITS.31-200x (R2007), Codes for the Identification of 178 | the Counties and Equivalent Areas of the United States, 179 | Puerto Rico, and the Insular Areas of the United States 180 | (Formerly FIPS 6-4) 181 | U.S. Census Bureau 182 | 183 | 184 | 185 | 186 | COUNTYNS10 187 | 2010 Census county ANSI code 188 | U.S. Census Bureau 189 | 190 | 191 | INCITS 446-2008, (GNIS) Identifying Attributes for Named 192 | Physical and Cultural Geographic Features (Except Roads 193 | and Highways) of the United States, Its Territories, 194 | Outlying Areas, and Freely Associated Areas, and the 195 | Waters of the Same to the Limit of the Twelve-Mile 196 | Statutory Zone 197 | U.S. Geological Survey (USGS) 198 | 199 | 200 | 201 | 202 | GEOID10 203 | County identifier; a concatenation of 2010 Census state FIPS 204 | code and county FIPS code 205 | U.S. Census Bureau 206 | 207 | 208 | INCITS.38-200x (R2004), Codes for the Identification of 209 | the States, the District of Columbia, Puerto Rico, and the 210 | Insular Areas of the United States (Formerly FIPS 5-2), 211 | INCITS.31-200x (R2007), Codes for the Identification of 212 | the Counties and Equivalent Areas of the United States, 213 | Puerto Rico, and the Insular Areas of the United States 214 | (Formerly FIPS 6-4) 215 | U.S. Census Bureau 216 | 217 | 218 | 219 | 220 | NAME10 221 | 2010 Census county name 222 | U.S. Census Bureau 223 | 224 | 225 | INCITS.31-200x (R2007), Codes for the Identification of 226 | the Counties and Equivalent Areas of the United States, 227 | Puerto Rico, and the Insular Areas of the United States 228 | (Formerly FIPS 6-4) 229 | U.S. Census Bureau 230 | 231 | 232 | 233 | 234 | NAMELSAD10 235 | 2010 Census name and the translated legal/statistical area 236 | description code for county 237 | U.S. Census Bureau 238 | 239 | 240 | INCITS.31-200x (R2007), Codes for the Identification of 241 | the Counties and Equivalent Areas of the United States, 242 | Puerto Rico, and the Insular Areas of the United States 243 | (Formerly FIPS 6-4) and the translated legal/statistical 244 | area description code for county that appears in LSAD10 245 | U.S. Census Bureau 246 | 247 | 248 | 249 | 250 | LSAD10 251 | 2010 Census legal/statistical area description code for county 252 | U.S. Census Bureau 253 | 254 | 255 | 00 256 | Blank 257 | U.S. Census Bureau 258 | 259 | 260 | 03 261 | City and Borough 262 | U.S. Census Bureau 263 | 264 | 265 | 04 266 | Borough 267 | U.S. Census Bureau 268 | 269 | 270 | 05 271 | Census Area 272 | U.S. Census Bureau 273 | 274 | 275 | 06 276 | County 277 | U.S. Census Bureau 278 | 279 | 280 | 07 281 | District 282 | U.S. Census Bureau 283 | 284 | 285 | 10 286 | Island 287 | U.S. Census Bureau 288 | 289 | 290 | 12 291 | Municipality 292 | U.S. Census Bureau 293 | 294 | 295 | 13 296 | Municipio 297 | U.S. Census Bureau 298 | 299 | 300 | 15 301 | Parish 302 | U.S. Census Bureau 303 | 304 | 305 | 25 306 | city 307 | U.S. Census Bureau 308 | 309 | 310 | 311 | 312 | CLASSFP10 313 | 2010 Census Federal Information Processing Standards (FIPS) 314 | class code 315 | U.S. Census Bureau 316 | 317 | 318 | C7 319 | An incorporated place that is independent of any county 320 | U.S. Census Bureau 321 | 322 | 323 | H1 324 | An active county or equivalent feature 325 | U.S. Census Bureau 326 | 327 | 328 | H4 329 | An inactive county or equivalent feature 330 | U.S. Census Bureau 331 | 332 | 333 | H5 334 | A statistical county equivalent feature 335 | U.S. Census Bureau 336 | 337 | 338 | H6 339 | A county that is coextensive with an incorporated place, 340 | part of an incorporated place, or a consolidated city and 341 | the governmental functions of the county are part of the 342 | municipal govenment 343 | U.S. Census Bureau 344 | 345 | 346 | 347 | 348 | MTFCC10 349 | MAF/TIGER feature class code 350 | U.S. Census Bureau 351 | 352 | 353 | G4020 354 | County or Equivalent Feature 355 | U.S. Census Bureau 356 | 357 | 358 | 359 | 360 | CSAFP10 361 | 2010 Census combined statistical area code 362 | U.S. Census Bureau 363 | 364 | 365 | 100 366 | 599 367 | 368 | 369 | 370 | 371 | CBSAFP10 372 | 2010 Census metropolitan statistical area/micropolitan 373 | statistical area code 374 | U.S. Census Bureau 375 | 376 | 377 | 10000 378 | 49999 379 | 380 | 381 | 382 | 383 | METDIVFP10 384 | 2010 Census metropolitan division code 385 | U.S. Census Bureau 386 | 387 | 388 | 10004 389 | 49994 390 | 391 | 392 | 393 | 394 | FUNCSTAT10 395 | 2010 Census functional status 396 | U.S. Census Bureau 397 | 398 | 399 | A 400 | Active government providing primary general-purpose functions 401 | U.S. Census Bureau 402 | 403 | 404 | B 405 | Active government that is partially consolidated with 406 | another government but with separate officials providing 407 | primary general-purpose functions 408 | U.S. Census Bureau 409 | 410 | 411 | C 412 | Active government consolidated with another government with 413 | a single set of officials 414 | U.S. Census Bureau 415 | 416 | 417 | F 418 | Fictitious entity created to fill the Census Bureau 419 | geographic hierarchy 420 | U.S. Census Bureau 421 | 422 | 423 | G 424 | Active government that is subordinate to another unit of 425 | government 426 | U.S. Census Bureau 427 | 428 | 429 | N 430 | Nonfunctioning legal entity 431 | U.S. Census Bureau 432 | 433 | 434 | S 435 | Statistical entity 436 | U.S. Census Bureau 437 | 438 | 439 | 440 | 441 | ALAND10 442 | 2010 Census land area (square meters) 443 | U.S. Census Bureau 444 | 445 | 446 | 0 to 9,999,999,999,999 447 | Blank 448 | U.S. Census Bureau 449 | 450 | 451 | 452 | 453 | AWATER10 454 | 2010 Census water area (square meters) 455 | U.S. Census Bureau 456 | 457 | 458 | 0 to 9,999,999,999,999 459 | Blank 460 | U.S. Census Bureau 461 | 462 | 463 | 464 | 465 | INTPTLAT10 466 | 2010 Census latitude of the internal point 467 | U.S. Census Bureau 468 | 469 | 470 | 00 471 | Blank 472 | U.S. Census Bureau 473 | 474 | 475 | 476 | 477 | INTPTLON10 478 | 2010 Census longitude of the internal point 479 | U.S. Census Bureau 480 | 481 | 482 | 00 483 | Blank 484 | U.S. Census Bureau 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | U.S. Department of Commerce, U.S. Census Bureau, Geography Division, Geographic Products Branch 495 | 496 | 497 | Mailing address 498 |
4600 Silver Hill Road, Stop 7400
499 | Washington 500 | DC 501 | 20233-7400 502 | United States 503 |
504 | 301-763-1128 505 | 301-763-4710 506 | geo.tiger@census.gov 507 |
508 |
509 | No warranty, expressed or implied is made with regard to the accuracy of these data, and no liability is assumed by the U.S. Government in general or the U.S. Census Bureau in specific as to the spatial or attribute accuracy of the data. The act of distribution shall not constitute any such warranty and no responsibility is assumed by the U.S. government in the use of these files. The boundary information in the TIGER/Line Shapefiles is for statistical data collection and tabulation purposes only; their depiction and designation for statistical purposes do not constitute a determination of jurisdictional authority or rights of ownership or entitlement and they are not legal land descriptions. 510 | 511 | 512 | 513 | TGRSHP (compressed) 514 | PK-ZIP, version 1.93 A or higher 515 | 516 | 517 | 518 | 519 | 520 | http://www.census.gov/geo/www/tiger 521 | 522 | 523 | 524 | 525 | DVD-ROM (Only if offered offline) 526 | ISO 9660 527 | 528 | 529 | 530 | The online copy of the TIGER/Line files may be accessed without charge. 531 | To obtain more information about ordering TIGER/Line shapefiles visit http://www.census.gov/geo/www/tiger 532 | 533 | The TIGER/Line shapefiles contain geographic data only and do not include display mapping software or statistical data. For information on how to use the TIGER/Line shapefile data with specific software package users shall contact the company that produced the software. 534 |
535 | 536 | 20100507 537 | 538 | 539 | 540 | U.S. Department of Commerce, U.S. Census Bureau, Geography Division, Geographic Products Branch 541 | 542 | 543 | Mailing address 544 |
4600 Silver Hill Road, Stop 7400
545 | Washington 546 | DC 547 | 20233-7400 548 | United States 549 |
550 | 301-763-1128 551 | 301-763-4710 552 | geo.tiger@census.gov 553 |
554 |
555 | FGDC Content Standards for Digital Geospatial Metadata 556 | FGDC-STD-001-1998 557 | 8859part1 558 | tl_2010_17_county10.shp.xml 559 | eng 560 |
561 |
562 | -------------------------------------------------------------------------------- /tl_2010_17_county10/tl_2010_17_county10.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsapps/making-maps-demo/12e6808108a0dca057ce480b840d6aa5076a9ae9/tl_2010_17_county10/tl_2010_17_county10.shx --------------------------------------------------------------------------------