Browse files

the code

  • Loading branch information...
1 parent cb63d52 commit 7d1f5838ccdaaeee14dc7a90c31149ff667bd20b Brian Boyer committed Mar 8, 2011
View
106 DEC_10_PL_GCTPL2.ST05/DEC_10_PL_GCTPL2.ST05.csv
@@ -0,0 +1,106 @@
+,,,,,HD01,SUBHD0201,SUBHD0202,SUBHD0203
+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
+Id,GEO,Target Geo Id,Geographic area,Geographic area,,Total,Occupied,Vacant
+0400000US17,Illinois,0400000US17,Illinois,Illinois,12830632,5296715,4836972,459743
+0400000US17,Illinois,0500000US17001,Illinois - Adams County,Adams County,67103,29842,27375,2467
+0400000US17,Illinois,0500000US17003,Illinois - Alexander County,Alexander County,8238,4006,3329,677
+0400000US17,Illinois,0500000US17005,Illinois - Bond County,Bond County,17768,7089,6427,662
+0400000US17,Illinois,0500000US17007,Illinois - Boone County,Boone County,54165,19970,18505,1465
+0400000US17,Illinois,0500000US17009,Illinois - Brown County,Brown County,6937,2462,2099,363
+0400000US17,Illinois,0500000US17011,Illinois - Bureau County,Bureau County,34978,15720,14262,1458
+0400000US17,Illinois,0500000US17013,Illinois - Calhoun County,Calhoun County,5089,2835,2085,750
+0400000US17,Illinois,0500000US17015,Illinois - Carroll County,Carroll County,15387,8437,6622,1815
+0400000US17,Illinois,0500000US17017,Illinois - Cass County,Cass County,13642,5836,5270,566
+0400000US17,Illinois,0500000US17019,Illinois - Champaign County,Champaign County,201081,87569,80665,6904
+0400000US17,Illinois,0500000US17021,Illinois - Christian County,Christian County,34800,15563,14055,1508
+0400000US17,Illinois,0500000US17023,Illinois - Clark County,Clark County,16335,7772,6782,990
+0400000US17,Illinois,0500000US17025,Illinois - Clay County,Clay County,13815,6404,5697,707
+0400000US17,Illinois,0500000US17027,Illinois - Clinton County,Clinton County,37762,15311,14005,1306
+0400000US17,Illinois,0500000US17029,Illinois - Coles County,Coles County,53873,23425,21463,1962
+0400000US17,Illinois,0500000US17031,Illinois - Cook County,Cook County,5194675,2180359,1966356,214003
+0400000US17,Illinois,0500000US17033,Illinois - Crawford County,Crawford County,19817,8661,7763,898
+0400000US17,Illinois,0500000US17035,Illinois - Cumberland County,Cumberland County,11048,4874,4377,497
+0400000US17,Illinois,0500000US17037,Illinois - DeKalb County,DeKalb County,105160,41079,38484,2595
+0400000US17,Illinois,0500000US17039,Illinois - De Witt County,De Witt County,16561,7521,6811,710
+0400000US17,Illinois,0500000US17041,Illinois - Douglas County,Douglas County,19980,8390,7720,670
+0400000US17,Illinois,0500000US17043,Illinois - DuPage County,DuPage County,916924,356179,337132,19047
+0400000US17,Illinois,0500000US17045,Illinois - Edgar County,Edgar County,18576,8803,7839,964
+0400000US17,Illinois,0500000US17047,Illinois - Edwards County,Edwards County,6721,3187,2840,347
+0400000US17,Illinois,0500000US17049,Illinois - Effingham County,Effingham County,34242,14570,13515,1055
+0400000US17,Illinois,0500000US17051,Illinois - Fayette County,Fayette County,22140,9302,8311,991
+0400000US17,Illinois,0500000US17053,Illinois - Ford County,Ford County,14081,6282,5676,606
+0400000US17,Illinois,0500000US17055,Illinois - Franklin County,Franklin County,39561,18525,16617,1908
+0400000US17,Illinois,0500000US17057,Illinois - Fulton County,Fulton County,37069,16195,14536,1659
+0400000US17,Illinois,0500000US17059,Illinois - Gallatin County,Gallatin County,5589,2746,2403,343
+0400000US17,Illinois,0500000US17061,Illinois - Greene County,Greene County,13886,6389,5570,819
+0400000US17,Illinois,0500000US17063,Illinois - Grundy County,Grundy County,50063,19996,18546,1450
+0400000US17,Illinois,0500000US17065,Illinois - Hamilton County,Hamilton County,8457,4104,3489,615
+0400000US17,Illinois,0500000US17067,Illinois - Hancock County,Hancock County,19104,9274,8040,1234
+0400000US17,Illinois,0500000US17069,Illinois - Hardin County,Hardin County,4320,2488,1915,573
+0400000US17,Illinois,0500000US17071,Illinois - Henderson County,Henderson County,7331,3827,3149,678
+0400000US17,Illinois,0500000US17073,Illinois - Henry County,Henry County,50486,22161,20373,1788
+0400000US17,Illinois,0500000US17075,Illinois - Iroquois County,Iroquois County,29718,13452,11956,1496
+0400000US17,Illinois,0500000US17077,Illinois - Jackson County,Jackson County,60218,28578,25538,3040
+0400000US17,Illinois,0500000US17079,Illinois - Jasper County,Jasper County,9698,4345,3940,405
+0400000US17,Illinois,0500000US17081,Illinois - Jefferson County,Jefferson County,38827,16954,15365,1589
+0400000US17,Illinois,0500000US17083,Illinois - Jersey County,Jersey County,22985,9848,8828,1020
+0400000US17,Illinois,0500000US17085,Illinois - Jo Daviess County,Jo Daviess County,22678,13574,9753,3821
+0400000US17,Illinois,0500000US17087,Illinois - Johnson County,Johnson County,12582,5598,4584,1014
+0400000US17,Illinois,0500000US17089,Illinois - Kane County,Kane County,515269,182047,170479,11568
+0400000US17,Illinois,0500000US17091,Illinois - Kankakee County,Kankakee County,113449,45246,41511,3735
+0400000US17,Illinois,0500000US17093,Illinois - Kendall County,Kendall County,114736,40321,38022,2299
+0400000US17,Illinois,0500000US17095,Illinois - Knox County,Knox County,52919,24077,21535,2542
+0400000US17,Illinois,0500000US17097,Illinois - Lake County,Lake County,703462,260310,241712,18598
+0400000US17,Illinois,0500000US17099,Illinois - LaSalle County,LaSalle County,113924,49978,45347,4631
+0400000US17,Illinois,0500000US17101,Illinois - Lawrence County,Lawrence County,16833,6936,6130,806
+0400000US17,Illinois,0500000US17103,Illinois - Lee County,Lee County,36031,15049,13758,1291
+0400000US17,Illinois,0500000US17105,Illinois - Livingston County,Livingston County,38950,15895,14613,1282
+0400000US17,Illinois,0500000US17107,Illinois - Logan County,Logan County,30305,12107,11070,1037
+0400000US17,Illinois,0500000US17109,Illinois - McDonough County,McDonough County,32612,14419,13057,1362
+0400000US17,Illinois,0500000US17111,Illinois - McHenry County,McHenry County,308760,116040,109199,6841
+0400000US17,Illinois,0500000US17113,Illinois - McLean County,McLean County,169572,69656,65104,4552
+0400000US17,Illinois,0500000US17115,Illinois - Macon County,Macon County,110768,50475,45855,4620
+0400000US17,Illinois,0500000US17117,Illinois - Macoupin County,Macoupin County,47765,21584,19381,2203
+0400000US17,Illinois,0500000US17119,Illinois - Madison County,Madison County,269282,117106,108094,9012
+0400000US17,Illinois,0500000US17121,Illinois - Marion County,Marion County,39437,18296,16148,2148
+0400000US17,Illinois,0500000US17123,Illinois - Marshall County,Marshall County,12640,5914,5161,753
+0400000US17,Illinois,0500000US17125,Illinois - Mason County,Mason County,14666,7077,6079,998
+0400000US17,Illinois,0500000US17127,Illinois - Massac County,Massac County,15429,7113,6362,751
+0400000US17,Illinois,0500000US17129,Illinois - Menard County,Menard County,12705,5654,5140,514
+0400000US17,Illinois,0500000US17131,Illinois - Mercer County,Mercer County,16434,7358,6734,624
+0400000US17,Illinois,0500000US17133,Illinois - Monroe County,Monroe County,32957,13392,12589,803
+0400000US17,Illinois,0500000US17135,Illinois - Montgomery County,Montgomery County,30104,13080,11652,1428
+0400000US17,Illinois,0500000US17137,Illinois - Morgan County,Morgan County,35547,15515,14104,1411
+0400000US17,Illinois,0500000US17139,Illinois - Moultrie County,Moultrie County,14846,6260,5758,502
+0400000US17,Illinois,0500000US17141,Illinois - Ogle County,Ogle County,53497,22561,20856,1705
+0400000US17,Illinois,0500000US17143,Illinois - Peoria County,Peoria County,186494,83034,75793,7241
+0400000US17,Illinois,0500000US17145,Illinois - Perry County,Perry County,22350,9426,8335,1091
+0400000US17,Illinois,0500000US17147,Illinois - Piatt County,Piatt County,16729,7269,6782,487
+0400000US17,Illinois,0500000US17149,Illinois - Pike County,Pike County,16430,7951,6639,1312
+0400000US17,Illinois,0500000US17151,Illinois - Pope County,Pope County,4470,2491,1829,662
+0400000US17,Illinois,0500000US17153,Illinois - Pulaski County,Pulaski County,6161,3155,2642,513
+0400000US17,Illinois,0500000US17155,Illinois - Putnam County,Putnam County,6006,3074,2509,565
+0400000US17,Illinois,0500000US17157,Illinois - Randolph County,Randolph County,33476,13707,12314,1393
+0400000US17,Illinois,0500000US17159,Illinois - Richland County,Richland County,16233,7513,6726,787
+0400000US17,Illinois,0500000US17161,Illinois - Rock Island County,Rock Island County,147546,65756,61303,4453
+0400000US17,Illinois,0500000US17163,Illinois - St. Clair County,St. Clair County,270056,116249,105045,11204
+0400000US17,Illinois,0500000US17165,Illinois - Saline County,Saline County,24913,11697,10379,1318
+0400000US17,Illinois,0500000US17167,Illinois - Sangamon County,Sangamon County,197465,89901,82986,6915
+0400000US17,Illinois,0500000US17169,Illinois - Schuyler County,Schuyler County,7544,3459,3040,419
+0400000US17,Illinois,0500000US17171,Illinois - Scott County,Scott County,5355,2459,2214,245
+0400000US17,Illinois,0500000US17173,Illinois - Shelby County,Shelby County,22363,10396,9216,1180
+0400000US17,Illinois,0500000US17175,Illinois - Stark County,Stark County,5994,2674,2425,249
+0400000US17,Illinois,0500000US17177,Illinois - Stephenson County,Stephenson County,47711,22081,19845,2236
+0400000US17,Illinois,0500000US17179,Illinois - Tazewell County,Tazewell County,135394,57516,54146,3370
+0400000US17,Illinois,0500000US17181,Illinois - Union County,Union County,17808,7924,7167,757
+0400000US17,Illinois,0500000US17183,Illinois - Vermilion County,Vermilion County,81625,36318,32655,3663
+0400000US17,Illinois,0500000US17185,Illinois - Wabash County,Wabash County,11947,5585,5012,573
+0400000US17,Illinois,0500000US17187,Illinois - Warren County,Warren County,17707,7682,6918,764
+0400000US17,Illinois,0500000US17189,Illinois - Washington County,Washington County,14716,6534,5926,608
+0400000US17,Illinois,0500000US17191,Illinois - Wayne County,Wayne County,16760,7975,7102,873
+0400000US17,Illinois,0500000US17193,Illinois - White County,White County,14665,7181,6313,868
+0400000US17,Illinois,0500000US17195,Illinois - Whiteside County,Whiteside County,58498,25770,23740,2030
+0400000US17,Illinois,0500000US17197,Illinois - Will County,Will County,677560,237501,225256,12245
+0400000US17,Illinois,0500000US17199,Illinois - Williamson County,Williamson County,66357,30359,27421,2938
+0400000US17,Illinois,0500000US17201,Illinois - Winnebago County,Winnebago County,295266,125965,115501,10464
+0400000US17,Illinois,0500000US17203,Illinois - Woodford County,Woodford County,38664,15145,14276,869
View
4 DEC_10_PL_GCTPL2.ST05/DEC_10_PL_GCTPL2.ST05.txt
@@ -0,0 +1,4 @@
+
+ NOTE: For information on confidentiality protection, nonsampling error, and definitions, see http://www.census.gov/prod/cen2010/pl94-171.pdf
+Source: U.S. Census Bureau, 2010 Census.
+2010 Census Redistricting Data (Public Law 94-171) Summary File, Tables P1 and H1
View
27 DEC_10_PL_GCTPL2.ST05/aff_download_readme.txt
@@ -0,0 +1,27 @@
+This zip file contains a number of zip documents containing materials related to the table which you have downloaded.
+
+Table Zip file: The table file name is based on the Table Id and/or Table ID and Stub
+ for Geographic Comparison Table (GCT) and Geographic Ranking Tables (GRT).
+This Zip file contains the following files:
+
+ Data file:
+ file name: <table_id>
+ Includes the tabular data for the table.
+
+ Annotation file:
+ file name: <table_id>_ann
+ This file contains cell annotations, which could be simple jam values or code of more complex cell annotations
+ for the values in the data file.
+ This file has a parallel structure to the data file, but it includes only those lines that correspond to the lines
+ from the data file that have annotations. If there are no lines to be included in the annotation file, then the
+ whole annotation file is omitted.
+ A simple jamming cell annotation starts with '$', and the string that follows the '$' char is the jamming string.
+ For example, '$1000+' is a simple cell annotation that would replace the content of the cell with the string '1000+'.
+ A cell annotation that does not start with '$' is a code that is described in the notes file (see below).
+
+ Notes file:
+ file name: <table_id>.txt
+ This file contains the head notes, footnotes and the description of the cell annotations occurring in the data file
+ (simple jamming cell annotations are excluded).
+
+
View
44 census-demo/index.html
@@ -0,0 +1,44 @@
+<html>
+ <head>
+ <title>Census Map Demo</title>
+ <link rel="stylesheet" type="text/css" href="style.css">
+ </head>
+ <body>
+ <div id="map_canvas"></div>
+ <div id="flag"><img src="logo.png" alt="Chicago Tribune" /></div>
+ <div id="legend">
+
+ <h1>Illinois population 2010<br/></h1>
+ <h2>Mapped by county</h2>
+
+ <p>Counties are colored by the number of people per square kilometer.</p>
+
+ <div class="colors">
+ <span class="less-than-five"></span>Fewer than 5<br/>
+ <span class="less-than-ten"></span>5 or more<br/>
+ <span class="less-than-twenty-five"></span>10 or more<br/>
+ <span class="less-than-fifty"></span>25 or more<br/>
+ <span class="less-than-one-hundred"></span>50 or more<br/>
+ <span class="less-than-five-hundred"></span>100 or more<br/>
+ <span class="five-hundred-or-more"></span>500 or more<br/>
+ </div>
+
+ <p>Zoom in or search to see population of each county.</p>
+
+ <form id="search">
+ <label for="query">Search for your address</label>
+ <input id="query" type="text" />
+ <input type="submit" value="Go" />
+ <div id="alt-addresses"></div>
+ </form>
+ <div id="credits">
+ <p>Made by Brian Boyer</p>
+ <p>Data from the U.S. Census Bureau's <a href="factfinder2.census.gov">American FactFinder</a></p>
+ </div>
+ </div>
+
+ <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
+ <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
+ <script type="text/javascript" src="map.js"></script>
+ </body>
+</html>
View
BIN census-demo/logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
233 census-demo/map.js
@@ -0,0 +1,233 @@
+var map = null;
+var center = new google.maps.LatLng(39.8, -89.2);
+
+function fetch_tile(coord, zoom) {
+ return "./.tiles/" + zoom + "/" + coord.x + "/" + coord.y + ".png";
+}
+
+// --- begin geocoding stuff --
+var geocoder = new google.maps.Geocoder();
+var southwest_limit = new google.maps.LatLng(41.6, -88);
+var northeast_limit = new google.maps.LatLng(42.05, -87.5);
+var bounding_box = new google.maps.LatLngBounds(southwest_limit, northeast_limit);
+var outside_il = false; // until prove true
+var user_marker = null;
+var has_zoomed = false;
+var has_moved = false;
+
+function geocode(query) {
+ if (typeof(query) == 'string') {
+ pattr = /\sil\s|\sillinois\s/gi;
+ match = query.match(pattr);
+ if (!match) {
+ query = query + ' IL';
+ }
+ gr = { 'address': query };
+ } else {
+ gr = { 'location': query };
+ }
+ geocoder.geocode(gr, handle_geocode);
+}
+
+function handle_geocode(results, status) {
+ alt_addresses(results);
+
+ lat = results[0].geometry.location.lat();
+ lng = results[0].geometry.location.lng();
+
+ normalized_address = results[0].formatted_address;
+ $('#query').val(normalized_address)
+
+ var zoom = (has_zoomed) ? map.zoom : 10;
+ process_location(lat, lng, zoom, true);
+}
+
+function alt_addresses(results) {
+ $('#alt-addresses').html('');
+
+ keep = new Array();
+
+ $.each(results, function(i,val) {
+ if (i==0) return; // skip the first result
+
+ for (var t in val.types) {
+ if (val.types[t] == 'street_address' || val.types[t] == 'intersection') {
+ keep.push(val.formatted_address);
+ break;
+ }
+ }
+ });
+
+ if (keep.length <= 1) {
+ $('#did-you-mean')
+ .addClass('disabled-link')
+ .unbind();
+ } else {
+ $('#did-you-mean')
+ .removeClass('disabled-link')
+ .click(function(e) {
+ e.stopPropagation();
+ toggle_alt_addresses();
+ });
+
+ $('#alt-addresses').append('<p>Did you mean...</p>');
+ for (var i in keep) {
+ $('#alt-addresses').append('<a href="javascript:geocode(\'' + keep[i] + '\');">' + keep[i] + '</a>');
+ }
+ }
+}
+function process_location(lat, lng, zoom, showMarker) {
+ var center = new google.maps.LatLng(lat, lng);
+ map.panTo(center);
+ if (zoom) {
+ map.setZoom(zoom);
+ }
+ if (showMarker instanceof Array) {
+ show_user_marker(showMarker[0],showMarker[1]); //?
+ } else if (showMarker) {
+ show_user_marker(lat, lng); //?
+ }
+}
+
+function show_user_marker(lat, lng) {
+ if (user_marker == null) {
+ user_marker = new google.maps.Marker();
+ user_marker.setMap(map);
+ }
+ user_marker.setPosition(new google.maps.LatLng(lat, lng));
+}
+
+function toggle_alt_addresses() {
+ alt_adds_div = $('#alt-addresses');
+ if (alt_adds_div.is(':hidden')) {
+ show_alt_addresses();
+ } else if (alt_adds_div.is(':visible')) {
+ hide_alt_addresses();
+ }
+}
+
+function show_alt_addresses() {
+ $('#alt-addresses').slideDown(250);
+ $('#did-you-mean').addClass('highlight');
+}
+
+function hide_alt_addresses() {
+ $('#alt-addresses').hide();
+ $('#did-you-mean.highlight').removeClass('highlight');
+}
+
+
+function parse_hash(s) {
+ try {
+ if (s[0] == "#") {
+ s = s.substr(1);
+ }
+ parts = s.split(",");
+ lat = parseFloat(parts[0]);
+ lng = parseFloat(parts[1]);
+ zoom = parseInt(parts[2]);
+ if (parts.length == 5) {
+ marker_location = [parts[3], parts[4]];
+ process_location(lat, lng, zoom, marker_location);
+ } else {
+ process_location(lat, lng, zoom, false);
+ }
+ } catch (e) { }
+}
+
+function make_hash() {
+ var parts = [map.center.lat(),map.center.lng(),map.zoom]
+ if (user_marker) {
+ parts.push(user_marker.position.lat());
+ parts.push(user_marker.position.lng());
+ }
+ return parts.join(",");
+}
+
+// --- end geocoding stuff ---
+
+$(document).ready(function() {
+
+ census_demo_options = {
+ getTileUrl: fetch_tile,
+ tileSize: new google.maps.Size(256, 256),
+ isPng: true
+ }
+ census_demo = new google.maps.ImageMapType(census_demo_options);
+
+ map_options = {
+ minZoom: 7,
+ maxZoom: 10,
+ zoom: 7,
+ center: center,
+ mapTypeControl: false,
+ mapTypeId: "simple"
+ };
+
+ backdrop_styles = [
+ {
+ featureType: "administrative",
+ elementType: "labels",
+ stylers: [
+ { lightness: 10 }
+ ]
+ },{
+ featureType: "poi",
+ elementType: "labels",
+ stylers: [
+ { visibility: "off" }
+ ]
+ },{
+ featureType: "poi.park",
+ elementType: "geometry",
+ stylers: [
+ { visibility: "off" }
+ ]
+ },{
+ featureType: "road",
+ elementType: "geometry",
+ stylers: [
+ { visibility: "simplified" },
+ { saturation: -100 },
+ { lightness: 0 }
+ ]
+ },{
+ featureType: "road.arterial",
+ elementType: "labels",
+ stylers: [
+ { gamma: 10 }
+ ]
+ }
+ ];
+
+ var initial_hash = window.location.hash;
+
+ simple = new google.maps.StyledMapType(backdrop_styles, { name: "Illinois population 2010" });
+ map = new google.maps.Map(document.getElementById("map_canvas"), map_options);
+ map.mapTypes.set("simple", simple);
+ map.overlayMapTypes.push(census_demo);
+
+ if (initial_hash) {
+ parse_hash(initial_hash);
+ }
+
+ $("#search").submit(function(){geocode($("#query").val());return false;});
+ $("#show-wards").click(function(){
+ if(this.checked){
+ map.overlayMapTypes.push(wards);
+ }
+ else {
+ map.overlayMapTypes.pop();
+ }
+ });
+
+ google.maps.event.addListener(map, 'zoom_changed', function() {
+ has_zoomed = true;
+ });
+ google.maps.event.addListener(map, 'bounds_changed', function() {
+ if (has_moved) {
+ window.location.hash = make_hash();
+ }
+ has_moved = true;
+ });
+});
View
61 census-demo/style.css
@@ -0,0 +1,61 @@
+html, body {
+ width: 100%;
+ height: 100%
+ }
+
+body {
+ margin: 0px;
+ }
+
+#map_canvas {
+ width: 100%;
+ height: 100%;
+ }
+
+#flag {
+ position: absolute;
+ top:13px;
+ left:85px;
+}
+
+#legend {
+ position: absolute;
+ top:13px;
+ right:13px;
+ width:200px;
+ background-color:#f3efe9;
+ padding:10px;
+ font-family: Arial, sans-serif;
+ font-size:12px;
+ border: 1px solid white;
+ line-height:1.3em;
+}
+
+#legend h1 {font-size:18px; margin:0 0 4px 0;}
+#legend h2 {font-size:14px; margin:0;}
+#legend h3 {font-size:13px; margin: 10px 0 0 0;}
+
+#legend .colors {float:left;line-height:20px; width:110px; margin: 10px 0;}
+#legend .colors span {height:20px; width:20px; margin-right:5px; display:block; float:left; clear:left; opacity: .75;}
+#legend .less-than-five {background-color: #FFFFCC;}
+#legend .less-than-ten {background-color: #D9F0A3;}
+#legend .less-than-twenty-five {background-color: #ADDD8E;}
+#legend .less-than-fifty {background-color: #78C679;}
+#legend .less-than-one-hundred {background-color: #41AB5D;}
+#legend .less-than-five-hundred {background-color: #238443;}
+#legend .five-hundred-or-more {background-color: #005A32;}
+
+#legend p {clear:both; margin:5px 0 0 0;}
+
+#legend form#search {margin:15px 0;}
+#legend form#search label {font-size:16px; font-weight:bold; display:block;}
+#legend form#search input {font-size:14px; margin-top:4px;}
+#legend form#search input[type=text] {width:150px;}
+#legend form#search #alt-addresses p {margin-bottom:2px; font-style:italic;}
+#legend form#search #alt-addresses a {display:block; margin-bottom:3px;}
+
+#legend form#layers {margin:0; padding-top:20px; padding-bottom: 10px;clear:both;}
+#legend form#layers input[type="checkbox"] {margin:0; display:inline;}
+#legend form#layers label {margin:0; display:inline; font-size:16px; cursor:hand; text-decoration:underline; font-weight:bold;}
+
+#legend #credits {font-size:10px; line-height:1.2em;}
View
78 csvcut
@@ -0,0 +1,78 @@
+#!/usr/bin/env python
+"""
+Like cut, but for CSVs. To be used from a shell command line.
+
+Note that fields are zero-based, as opposed to 'cut' where they are 1-based.
+
+Should use something better than getopt, but this works...
+
+Usage:
+ csvcut foobar.csv
+ (prints the first column of each row of foobar.csv)
+
+ head -10 foobar.csv | csvcut -f 0,2
+ (prints the first and third columns of the first ten lines of foobar.csv)
+
+ csvcut -f 0,2 -d "|" foobar.csv
+ (prints the first and third columns of the pipe-delimited foobar.csv)
+
+ csvcut -f 0,2 -t foobar.csv
+ (prints the first and third columns of the tab-delimited foobar.csv
+ if present, the -d option will be ignored.)
+
+ csvcut -h foobar.csv
+ (prints the values of the first line of foobar.csv, preceded by the field index which would
+ be used to display that column. If present, the -f option will be ignored.)
+
+ csvcut -f 0,1,2 -d "|" -o , foobar.csv
+ (prints the first three columns of the pipe-delimited foobar.csv; output
+ will be comma-delimited.)
+
+ csvcut -f 0,1,2 -o "|" foobar.csv
+ (prints the first three columns of the comma-delimited foobar.csv; output
+ will be pipe-delimited.)
+
+ csvcut -f : -o "|" foobar.csv
+ (prints all the columns of the comma-delimited foobar.csv; output will be
+ pipe-delimited.)
+
+ csvcut -f 0,1 -d "," -q "|" foobar.csv
+ (prints the first two columns of the comma-delimited, pipe-quoted foorbar.csv.)
+"""
+import sys, csv, getopt
+opts, args = getopt.getopt(sys.argv[1:], "f:d:o:q:ht", [])
+if args:
+ i = open(args[0],"U")
+else:
+ i = sys.stdin
+
+delimiter = ','
+output_delimiter = ' '
+cols = [0, ]
+show_headers = False
+
+if opts:
+ opts = dict(opts)
+ show_headers = '-h' in opts
+ if '-f' in opts:
+ cols = opts['-f'].split(",")
+ if '-t' in opts:
+ delimiter = "\t"
+ elif '-d' in opts:
+ delimiter = opts['-d']
+ if '-o' in opts:
+ output_delimiter = opts['-o']
+ if '-q' in opts:
+ quotechar = opts['-q']
+ else:
+ quotechar = None
+
+for row in csv.reader(i, delimiter=delimiter, quotechar=quotechar):
+ if show_headers:
+ for i,c in enumerate(row):
+ print "%3i: %s" % (i,c)
+ break
+ writer = csv.writer(sys.stdout, delimiter=output_delimiter)
+ if cols == [':']:
+ cols = range(len(row))
+ writer.writerow([row[int(c)] for c in cols])
View
14 merge.sql
@@ -0,0 +1,14 @@
+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;
View
BIN merged/merged.dbf
Binary file not shown.
View
1 merged/merged.prj
@@ -0,0 +1 @@
+GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]
View
BIN merged/merged.shp
Binary file not shown.
View
BIN merged/merged.shx
Binary file not shown.
View
102 population.csv
@@ -0,0 +1,102 @@
+17001,Adams County,67103
+17003,Alexander County,8238
+17005,Bond County,17768
+17007,Boone County,54165
+17009,Brown County,6937
+17011,Bureau County,34978
+17013,Calhoun County,5089
+17015,Carroll County,15387
+17017,Cass County,13642
+17019,Champaign County,201081
+17021,Christian County,34800
+17023,Clark County,16335
+17025,Clay County,13815
+17027,Clinton County,37762
+17029,Coles County,53873
+17031,Cook County,5194675
+17033,Crawford County,19817
+17035,Cumberland County,11048
+17037,DeKalb County,105160
+17039,De Witt County,16561
+17041,Douglas County,19980
+17043,DuPage County,916924
+17045,Edgar County,18576
+17047,Edwards County,6721
+17049,Effingham County,34242
+17051,Fayette County,22140
+17053,Ford County,14081
+17055,Franklin County,39561
+17057,Fulton County,37069
+17059,Gallatin County,5589
+17061,Greene County,13886
+17063,Grundy County,50063
+17065,Hamilton County,8457
+17067,Hancock County,19104
+17069,Hardin County,4320
+17071,Henderson County,7331
+17073,Henry County,50486
+17075,Iroquois County,29718
+17077,Jackson County,60218
+17079,Jasper County,9698
+17081,Jefferson County,38827
+17083,Jersey County,22985
+17085,Jo Daviess County,22678
+17087,Johnson County,12582
+17089,Kane County,515269
+17091,Kankakee County,113449
+17093,Kendall County,114736
+17095,Knox County,52919
+17097,Lake County,703462
+17099,LaSalle County,113924
+17101,Lawrence County,16833
+17103,Lee County,36031
+17105,Livingston County,38950
+17107,Logan County,30305
+17109,McDonough County,32612
+17111,McHenry County,308760
+17113,McLean County,169572
+17115,Macon County,110768
+17117,Macoupin County,47765
+17119,Madison County,269282
+17121,Marion County,39437
+17123,Marshall County,12640
+17125,Mason County,14666
+17127,Massac County,15429
+17129,Menard County,12705
+17131,Mercer County,16434
+17133,Monroe County,32957
+17135,Montgomery County,30104
+17137,Morgan County,35547
+17139,Moultrie County,14846
+17141,Ogle County,53497
+17143,Peoria County,186494
+17145,Perry County,22350
+17147,Piatt County,16729
+17149,Pike County,16430
+17151,Pope County,4470
+17153,Pulaski County,6161
+17155,Putnam County,6006
+17157,Randolph County,33476
+17159,Richland County,16233
+17161,Rock Island County,147546
+17163,St. Clair County,270056
+17165,Saline County,24913
+17167,Sangamon County,197465
+17169,Schuyler County,7544
+17171,Scott County,5355
+17173,Shelby County,22363
+17175,Stark County,5994
+17177,Stephenson County,47711
+17179,Tazewell County,135394
+17181,Union County,17808
+17183,Vermilion County,81625
+17185,Wabash County,11947
+17187,Warren County,17707
+17189,Washington County,14716
+17191,Wayne County,16760
+17193,White County,14665
+17195,Whiteside County,58498
+17197,Will County,677560
+17199,Williamson County,66357
+17201,Winnebago County,295266
+17203,Woodford County,38664
View
4 render
@@ -0,0 +1,4 @@
+#! /bin/sh
+rm -rf census-demo/.tiles
+mkdir census-demo/.tiles
+python render_tiles.py tilemill/census_demo.xml census-demo/.tiles/ 42.57 -91.65 36.9 -87.23 7 10 2
View
198 render_tiles.py
@@ -0,0 +1,198 @@
+#!/usr/bin/python
+from math import pi,cos,sin,log,exp,atan
+from subprocess import call
+import sys, os
+from Queue import Queue
+import mapnik2
+import threading
+import argparse
+
+custom_fonts_dir = '/Library/Fonts/'
+mapnik2.register_fonts(custom_fonts_dir)
+
+DEG_TO_RAD = pi/180
+RAD_TO_DEG = 180/pi
+
+# Default number of rendering threads to spawn, should be roughly equal to number of CPU cores available
+NUM_THREADS = 4
+
+def minmax (a,b,c):
+ a = max(a,b)
+ a = min(a,c)
+ return a
+
+class GoogleProjection:
+ def __init__(self,levels=18):
+ self.Bc = []
+ self.Cc = []
+ self.zc = []
+ self.Ac = []
+ c = 256
+ for d in range(0,levels):
+ e = c/2;
+ self.Bc.append(c/360.0)
+ self.Cc.append(c/(2 * pi))
+ self.zc.append((e,e))
+ self.Ac.append(c)
+ c *= 2
+
+ def fromLLtoPixel(self,ll,zoom):
+ d = self.zc[zoom]
+ e = round(d[0] + ll[0] * self.Bc[zoom])
+ f = minmax(sin(DEG_TO_RAD * ll[1]),-0.9999,0.9999)
+ g = round(d[1] + 0.5*log((1+f)/(1-f))*-self.Cc[zoom])
+ return (e,g)
+
+ def fromPixelToLL(self,px,zoom):
+ e = self.zc[zoom]
+ f = (px[0] - e[0])/self.Bc[zoom]
+ g = (px[1] - e[1])/-self.Cc[zoom]
+ h = RAD_TO_DEG * ( 2 * atan(exp(g)) - 0.5 * pi)
+ return (f,h)
+
+
+
+class RenderThread:
+ def __init__(self, tile_dir, mapfile, q, printLock, maxZoom):
+ self.tile_dir = tile_dir
+ self.q = q
+ self.m = mapnik2.Map(256, 256)
+ self.printLock = printLock
+ # Load style XML
+ mapnik2.load_map(self.m, mapfile, True)
+ # Obtain <Map> projection
+ self.prj = mapnik2.Projection(self.m.srs)
+ # Projects between tile pixel co-ordinates and LatLong (EPSG:4326)
+ self.tileproj = GoogleProjection(maxZoom+1)
+
+
+ def render_tile(self, tile_uri, x, y, z):
+ # Calculate pixel positions of bottom-left & top-right
+ p0 = (x * 256, (y + 1) * 256)
+ p1 = ((x + 1) * 256, y * 256)
+
+ # Convert to LatLong (EPSG:4326)
+ l0 = self.tileproj.fromPixelToLL(p0, z);
+ l1 = self.tileproj.fromPixelToLL(p1, z);
+
+ # Convert to map projection (e.g. mercator co-ords EPSG:900913)
+ c0 = self.prj.forward(mapnik2.Coord(l0[0],l0[1]))
+ c1 = self.prj.forward(mapnik2.Coord(l1[0],l1[1]))
+
+ # Bounding box for the tile
+ if hasattr(mapnik2,'mapnik_version') and mapnik2.mapnik_version() >= 800:
+ bbox = mapnik2.Box2d(c0.x,c0.y, c1.x,c1.y)
+ else:
+ bbox = mapnik2.Envelope(c0.x,c0.y, c1.x,c1.y)
+ render_size = 256
+ self.m.resize(render_size, render_size)
+ self.m.zoom_to_box(bbox)
+ self.m.buffer_size = 128
+
+ # Render image with default Agg renderer
+ im = mapnik2.Image(render_size, render_size)
+ mapnik2.render(self.m, im)
+ im.save(tile_uri, 'png256')
+
+
+ def loop(self):
+ while True:
+ #Fetch a tile from the queue and render it
+ r = self.q.get()
+ if (r == None):
+ self.q.task_done()
+ break
+ else:
+ (name, tile_uri, x, y, z) = r
+
+ exists= ""
+ if os.path.isfile(tile_uri):
+ exists= "exists"
+ else:
+ self.render_tile(tile_uri, x, y, z)
+ bytes=os.stat(tile_uri)[6]
+ empty= ''
+ if bytes == 103:
+ empty = " Empty Tile "
+ self.printLock.acquire()
+ print name, ":", z, x, y, exists, empty
+ self.printLock.release()
+ self.q.task_done()
+
+
+
+def render_tiles(bbox, mapfile, tile_dir, minZoom=1,maxZoom=18, name="unknown", num_threads=NUM_THREADS):
+ print "render_tiles(",bbox, mapfile, tile_dir, minZoom, maxZoom, name,")"
+
+ # Launch rendering threads
+ queue = Queue(32)
+ printLock = threading.Lock()
+ renderers = {}
+ for i in range(num_threads):
+ renderer = RenderThread(tile_dir, mapfile, queue, printLock, maxZoom)
+ render_thread = threading.Thread(target=renderer.loop)
+ render_thread.start()
+ #print "Started render thread %s" % render_thread.getName()
+ renderers[i] = render_thread
+
+ if not os.path.isdir(tile_dir):
+ os.mkdir(tile_dir)
+
+ gprj = GoogleProjection(maxZoom+1)
+
+ ll0 = (bbox[0],bbox[3])
+ ll1 = (bbox[2],bbox[1])
+
+ for z in range(minZoom,maxZoom + 1):
+ px0 = gprj.fromLLtoPixel(ll0,z)
+ px1 = gprj.fromLLtoPixel(ll1,z)
+
+ # check if we have directories in place
+ zoom = "%s" % z
+ if not os.path.isdir(tile_dir + zoom):
+ os.mkdir(tile_dir + zoom)
+ for x in range(int(px0[0]/256.0),int(px1[0]/256.0)+1):
+ # Validate x co-ordinate
+ if (x < 0) or (x >= 2**z):
+ continue
+ # check if we have directories in place
+ str_x = "%s" % x
+ if not os.path.isdir(tile_dir + zoom + '/' + str_x):
+ os.mkdir(tile_dir + zoom + '/' + str_x)
+ for y in range(int(px0[1]/256.0),int(px1[1]/256.0)+1):
+ # Validate x co-ordinate
+ if (y < 0) or (y >= 2**z):
+ continue
+ str_y = "%s" % y
+ tile_uri = tile_dir + zoom + '/' + str_x + '/' + str_y + '.png'
+ # Submit tile to be rendered into the queue
+ t = (name, tile_uri, x, y, z)
+ queue.put(t)
+
+ # Signal render threads to exit by sending empty request to queue
+ for i in range(num_threads):
+ queue.put(None)
+ # wait for pending rendering jobs to complete
+ queue.join()
+ for i in range(num_threads):
+ renderers[i].join()
+
+
+if __name__ == "__main__":
+
+ #python render_tiles.py tilemill/wards.xml mayor-2011/.tiles/wards/ -89.03 41.07 -87.51 42.50 9 16 2
+ parser = argparse.ArgumentParser(description='Render your tiles.')
+ parser.add_argument('style_file', help="File containing Mapnik styles")
+ parser.add_argument('tile_dir', help="Destination directory for rendered tiles")
+ parser.add_argument('lat_1', type=float, help="Top-left corner latitude")
+ parser.add_argument('lon_1', type=float, help="Top-left corner longitude")
+ parser.add_argument('lat_2', type=float, help="Bottom-right corner latitude")
+ parser.add_argument('lon_2', type=float, help="Bottom-right corner longitude")
+ parser.add_argument('min_zoom', help="Minimum zoom level to render", type=int, default="9")
+ parser.add_argument('max_zoom', help="Maximum zoom level to render", type=int, default="12")
+ 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")
+ args = parser.parse_args()
+
+ bbox = (args.lon_1, args.lat_2, args.lon_2, args.lat_1)
+
+ render_tiles(bbox, args.style_file, args.tile_dir, args.min_zoom, args.max_zoom)
View
6 requirements.txt
@@ -0,0 +1,6 @@
+Fabric==0.9.3
+argparse==1.1
+paramiko==1.7.6
+pycrypto==2.3
+-e svn+https://s3tools.svn.sourceforge.net/svnroot/s3tools/s3cmd/tags/1.0.0@465#egg=s3cmd-1.0.0
+wsgiref==0.1.2
View
28 setup
@@ -0,0 +1,28 @@
+#! /bin/sh
+#
+# create the database (first drop the old one, if it exists)
+#
+dropdb census_demo
+createdb census_demo -T template_postgis
+#
+# prepare the data, create the table and load it
+# ...using Joe Germuska's csvcut to trim the columns we don't need
+# ...using tail to yank off the ugly headers
+# ...using cut to trim the leading cruft off the id column
+#
+./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
+psql -d census_demo -c "create table population (id char(5), county varchar(100), population integer);"
+psql -d census_demo -c "copy population from '${HOME}/src/Census-Map-Demo/population.csv' delimiters ',' CSV;"
+#
+# load the shapefile
+# ...using the same projection as google maps because that's eventually how we'll
+# ...present it, so any geometric calcs we may run in our merge sql are correct
+#
+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
+#
+# stitch the two tables together and write to a new shapefile
+# ...calculating the pop per sq km cuz using the raw population is less good
+# ...going back to 4269 so that TileMill is happy
+#
+psql -d census_demo -f merge.sql
+ogr2ogr -f "ESRI Shapefile" merged PG:dbname=census_demo -sql "select * from merged" -nln merged -t_srs EPSG:4269 -overwrite
View
3 style
@@ -0,0 +1,3 @@
+#! /bin/sh
+cp /Applications/TileMill/files/project/census_demo/* tilemill
+/Applications/TileMill/bin/carto tilemill/census_demo.mml > tilemill/census_demo.xml
View
1 tilemill/census_demo.mml
@@ -0,0 +1 @@
+{"_center":{"lat":40.090679836478,"lon":-89.107360836266,"zoom":7},"_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":"/Users/bboyer/src/census2010/census_demo/merged/merged.shp","type":"shape"},"geometry":"polygon"},{"id":"labels","name":"labels","srs":"","class":"","Datasource":{"file":"/Users/bboyer/src/census2010/census_demo/merged/merged.shp","type":"shape"},"geometry":"polygon"}]}
View
226 tilemill/census_demo.xml
@@ -0,0 +1,226 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE Map[]>
+<Map 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">
+
+
+<Style name="counties" filter-mode="first">
+ <Rule>
+ <MaxScaleDenominator>750000</MaxScaleDenominator>
+ <MinScaleDenominator>400000</MinScaleDenominator>
+ <Filter>([popsqkm] &gt;= 500)</Filter>
+ <LineSymbolizer stroke-width="3" stroke="#ffffff" />
+ <PolygonSymbolizer fill="#005a32" fill-opacity="0.75" />
+ </Rule>
+ <Rule>
+ <MaxScaleDenominator>1500000</MaxScaleDenominator>
+ <MinScaleDenominator>750000</MinScaleDenominator>
+ <Filter>([popsqkm] &gt;= 500)</Filter>
+ <LineSymbolizer stroke-width="2" stroke="#ffffff" />
+ <PolygonSymbolizer fill="#005a32" fill-opacity="0.75" />
+ </Rule>
+ <Rule>
+ <MaxScaleDenominator>3000000</MaxScaleDenominator>
+ <MinScaleDenominator>1500000</MinScaleDenominator>
+ <Filter>([popsqkm] &gt;= 500)</Filter>
+ <LineSymbolizer stroke-width="1" stroke="#ffffff" />
+ <PolygonSymbolizer fill="#005a32" fill-opacity="0.75" />
+ </Rule>
+ <Rule>
+ <Filter>([popsqkm] &gt;= 500)</Filter>
+ <PolygonSymbolizer fill="#005a32" fill-opacity="0.75" />
+ <LineSymbolizer stroke="#ffffff" stroke-width="0.5" />
+ </Rule>
+ <Rule>
+ <MaxScaleDenominator>750000</MaxScaleDenominator>
+ <MinScaleDenominator>400000</MinScaleDenominator>
+ <Filter>([popsqkm] &gt;= 100)</Filter>
+ <LineSymbolizer stroke-width="3" stroke="#ffffff" />
+ <PolygonSymbolizer fill="#238443" fill-opacity="0.75" />
+ </Rule>
+ <Rule>
+ <MaxScaleDenominator>1500000</MaxScaleDenominator>
+ <MinScaleDenominator>750000</MinScaleDenominator>
+ <Filter>([popsqkm] &gt;= 100)</Filter>
+ <LineSymbolizer stroke-width="2" stroke="#ffffff" />
+ <PolygonSymbolizer fill="#238443" fill-opacity="0.75" />
+ </Rule>
+ <Rule>
+ <MaxScaleDenominator>3000000</MaxScaleDenominator>
+ <MinScaleDenominator>1500000</MinScaleDenominator>
+ <Filter>([popsqkm] &gt;= 100)</Filter>
+ <LineSymbolizer stroke-width="1" stroke="#ffffff" />
+ <PolygonSymbolizer fill="#238443" fill-opacity="0.75" />
+ </Rule>
+ <Rule>
+ <Filter>([popsqkm] &gt;= 100)</Filter>
+ <PolygonSymbolizer fill="#238443" fill-opacity="0.75" />
+ <LineSymbolizer stroke="#ffffff" stroke-width="0.5" />
+ </Rule>
+ <Rule>
+ <MaxScaleDenominator>750000</MaxScaleDenominator>
+ <MinScaleDenominator>400000</MinScaleDenominator>
+ <Filter>([popsqkm] &gt;= 50)</Filter>
+ <LineSymbolizer stroke-width="3" stroke="#ffffff" />
+ <PolygonSymbolizer fill="#41ab5d" fill-opacity="0.75" />
+ </Rule>
+ <Rule>
+ <MaxScaleDenominator>1500000</MaxScaleDenominator>
+ <MinScaleDenominator>750000</MinScaleDenominator>
+ <Filter>([popsqkm] &gt;= 50)</Filter>
+ <LineSymbolizer stroke-width="2" stroke="#ffffff" />
+ <PolygonSymbolizer fill="#41ab5d" fill-opacity="0.75" />
+ </Rule>
+ <Rule>
+ <MaxScaleDenominator>3000000</MaxScaleDenominator>
+ <MinScaleDenominator>1500000</MinScaleDenominator>
+ <Filter>([popsqkm] &gt;= 50)</Filter>
+ <LineSymbolizer stroke-width="1" stroke="#ffffff" />
+ <PolygonSymbolizer fill="#41ab5d" fill-opacity="0.75" />
+ </Rule>
+ <Rule>
+ <Filter>([popsqkm] &gt;= 50)</Filter>
+ <PolygonSymbolizer fill="#41ab5d" fill-opacity="0.75" />
+ <LineSymbolizer stroke="#ffffff" stroke-width="0.5" />
+ </Rule>
+ <Rule>
+ <MaxScaleDenominator>750000</MaxScaleDenominator>
+ <MinScaleDenominator>400000</MinScaleDenominator>
+ <Filter>([popsqkm] &gt;= 25)</Filter>
+ <LineSymbolizer stroke-width="3" stroke="#ffffff" />
+ <PolygonSymbolizer fill="#78c679" fill-opacity="0.75" />
+ </Rule>
+ <Rule>
+ <MaxScaleDenominator>1500000</MaxScaleDenominator>
+ <MinScaleDenominator>750000</MinScaleDenominator>
+ <Filter>([popsqkm] &gt;= 25)</Filter>
+ <LineSymbolizer stroke-width="2" stroke="#ffffff" />
+ <PolygonSymbolizer fill="#78c679" fill-opacity="0.75" />
+ </Rule>
+ <Rule>
+ <MaxScaleDenominator>3000000</MaxScaleDenominator>
+ <MinScaleDenominator>1500000</MinScaleDenominator>
+ <Filter>([popsqkm] &gt;= 25)</Filter>
+ <LineSymbolizer stroke-width="1" stroke="#ffffff" />
+ <PolygonSymbolizer fill="#78c679" fill-opacity="0.75" />
+ </Rule>
+ <Rule>
+ <Filter>([popsqkm] &gt;= 25)</Filter>
+ <PolygonSymbolizer fill="#78c679" fill-opacity="0.75" />
+ <LineSymbolizer stroke="#ffffff" stroke-width="0.5" />
+ </Rule>
+ <Rule>
+ <MaxScaleDenominator>750000</MaxScaleDenominator>
+ <MinScaleDenominator>400000</MinScaleDenominator>
+ <Filter>([popsqkm] &gt;= 10)</Filter>
+ <LineSymbolizer stroke-width="3" stroke="#ffffff" />
+ <PolygonSymbolizer fill="#addd8e" fill-opacity="0.75" />
+ </Rule>
+ <Rule>
+ <MaxScaleDenominator>1500000</MaxScaleDenominator>
+ <MinScaleDenominator>750000</MinScaleDenominator>
+ <Filter>([popsqkm] &gt;= 10)</Filter>
+ <LineSymbolizer stroke-width="2" stroke="#ffffff" />
+ <PolygonSymbolizer fill="#addd8e" fill-opacity="0.75" />
+ </Rule>
+ <Rule>
+ <MaxScaleDenominator>3000000</MaxScaleDenominator>
+ <MinScaleDenominator>1500000</MinScaleDenominator>
+ <Filter>([popsqkm] &gt;= 10)</Filter>
+ <LineSymbolizer stroke-width="1" stroke="#ffffff" />
+ <PolygonSymbolizer fill="#addd8e" fill-opacity="0.75" />
+ </Rule>
+ <Rule>
+ <Filter>([popsqkm] &gt;= 10)</Filter>
+ <PolygonSymbolizer fill="#addd8e" fill-opacity="0.75" />
+ <LineSymbolizer stroke="#ffffff" stroke-width="0.5" />
+ </Rule>
+ <Rule>
+ <MaxScaleDenominator>750000</MaxScaleDenominator>
+ <MinScaleDenominator>400000</MinScaleDenominator>
+ <Filter>([popsqkm] &gt;= 5)</Filter>
+ <LineSymbolizer stroke-width="3" stroke="#ffffff" />
+ <PolygonSymbolizer fill="#d9f0a3" fill-opacity="0.75" />
+ </Rule>
+ <Rule>
+ <MaxScaleDenominator>1500000</MaxScaleDenominator>
+ <MinScaleDenominator>750000</MinScaleDenominator>
+ <Filter>([popsqkm] &gt;= 5)</Filter>
+ <LineSymbolizer stroke-width="2" stroke="#ffffff" />
+ <PolygonSymbolizer fill="#d9f0a3" fill-opacity="0.75" />
+ </Rule>
+ <Rule>
+ <MaxScaleDenominator>3000000</MaxScaleDenominator>
+ <MinScaleDenominator>1500000</MinScaleDenominator>
+ <Filter>([popsqkm] &gt;= 5)</Filter>
+ <LineSymbolizer stroke-width="1" stroke="#ffffff" />
+ <PolygonSymbolizer fill="#d9f0a3" fill-opacity="0.75" />
+ </Rule>
+ <Rule>
+ <Filter>([popsqkm] &gt;= 5)</Filter>
+ <PolygonSymbolizer fill="#d9f0a3" fill-opacity="0.75" />
+ <LineSymbolizer stroke="#ffffff" stroke-width="0.5" />
+ </Rule>
+ <Rule>
+ <MaxScaleDenominator>750000</MaxScaleDenominator>
+ <MinScaleDenominator>400000</MinScaleDenominator>
+ <LineSymbolizer stroke-width="3" stroke="#ffffff" />
+ <PolygonSymbolizer fill="#ffffcc" fill-opacity="0.75" />
+ </Rule>
+ <Rule>
+ <MaxScaleDenominator>1500000</MaxScaleDenominator>
+ <MinScaleDenominator>750000</MinScaleDenominator>
+ <LineSymbolizer stroke-width="2" stroke="#ffffff" />
+ <PolygonSymbolizer fill="#ffffcc" fill-opacity="0.75" />
+ </Rule>
+ <Rule>
+ <MaxScaleDenominator>3000000</MaxScaleDenominator>
+ <MinScaleDenominator>1500000</MinScaleDenominator>
+ <LineSymbolizer stroke-width="1" stroke="#ffffff" />
+ <PolygonSymbolizer fill="#ffffcc" fill-opacity="0.75" />
+ </Rule>
+ <Rule>
+ <PolygonSymbolizer fill="#ffffcc" fill-opacity="0.75" />
+ <LineSymbolizer stroke="#ffffff" stroke-width="0.5" />
+ </Rule>
+</Style>
+<Layer
+ name="counties"
+ srs="+proj=longlat +ellps=GRS80 +no_defs">
+ <StyleName>counties</StyleName>
+ <Datasource>
+ <Parameter name="file">/Users/bboyer/src/census2010/census_demo/merged/merged.shp</Parameter>
+ <Parameter name="type">shape</Parameter>
+ </Datasource>
+ </Layer>
+
+<Style name="labels" filter-mode="first">
+ <Rule>
+ <MaxScaleDenominator>750000</MaxScaleDenominator>
+ <MinScaleDenominator>400000</MinScaleDenominator>
+ <TextSymbolizer size="32" line-spacing="7" name="[label]" face-name="Arial Bold" />
+ </Rule>
+ <Rule>
+ <MaxScaleDenominator>1500000</MaxScaleDenominator>
+ <MinScaleDenominator>750000</MinScaleDenominator>
+ <TextSymbolizer size="16" line-spacing="3" name="[label]" face-name="Arial Bold" />
+ </Rule>
+ <Rule>
+ <MaxScaleDenominator>3000000</MaxScaleDenominator>
+ <MinScaleDenominator>1500000</MinScaleDenominator>
+ <TextSymbolizer size="8" line-spacing="1" name="[label]" face-name="Arial Bold" />
+ </Rule>
+ <Rule>
+ <TextSymbolizer name="[label]" face-name="Arial Bold" size="4" />
+ </Rule>
+</Style>
+<Layer
+ name="labels"
+ srs="+proj=longlat +ellps=GRS80 +no_defs">
+ <StyleName>labels</StyleName>
+ <Datasource>
+ <Parameter name="file">/Users/bboyer/src/census2010/census_demo/merged/merged.shp</Parameter>
+ <Parameter name="type">shape</Parameter>
+ </Datasource>
+ </Layer>
+
+</Map>
View
24 tilemill/style.mss
@@ -0,0 +1,24 @@
+#counties {
+ polygon-opacity: .75;
+ line-color: #fff;
+ line-width: 0.5;
+ #counties[zoom = 8]{ line-width: 1; }
+ #counties[zoom = 9]{ line-width: 2; }
+ #counties[zoom = 10]{ line-width: 3; }
+}
+#counties { polygon-fill: #FFFFCC; }
+#counties[popsqkm >= 5 ] { polygon-fill: #D9F0A3; }
+#counties[popsqkm >= 10] { polygon-fill: #ADDD8E; }
+#counties[popsqkm >= 25] { polygon-fill: #78C679; }
+#counties[popsqkm >= 50] { polygon-fill: #41AB5D; }
+#counties[popsqkm >= 100] { polygon-fill: #238443; }
+#counties[popsqkm >= 500] { polygon-fill: #005A32; }
+
+#labels {
+ text-name: "[label]";
+ text-face-name: "Arial Bold";
+ text-size: 4;
+ #labels[zoom = 8] { text-size:8; text-line-spacing: 1; }
+ #labels[zoom = 9] { text-size:16; text-line-spacing: 3; }
+ #labels[zoom = 10] { text-size:32; text-line-spacing: 7; }
+}
View
BIN tl_2010_17_county10/tl_2010_17_county10.dbf
Binary file not shown.
View
1 tl_2010_17_county10/tl_2010_17_county10.prj
@@ -0,0 +1 @@
+GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]
View
BIN tl_2010_17_county10/tl_2010_17_county10.shp
Binary file not shown.
View
561 tl_2010_17_county10/tl_2010_17_county10.shp.xml
@@ -0,0 +1,561 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<metadata>
+ <idinfo>
+ <citation>
+ <citeinfo>
+ <origin>U.S. Department of Commerce, U.S. Census Bureau, Geography Division</origin>
+ <pubdate>2010</pubdate>
+ <title>TIGER/Line Shapefile, 2010, 2010 state, Illinois, 2010 Census County and Equivalent State-based</title>
+ <edition>2010</edition>
+ <geoform>vector digital data</geoform>
+ <onlink>http://www.census.gov/geo/www/tiger</onlink>
+ </citeinfo>
+ </citation>
+ <descript>
+ <abstract>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).
+</abstract>
+ <purpose>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.</purpose>
+ <Subject_Entity>Illinois(17)</Subject_Entity>
+ </descript>
+ <timeperd>
+ <timeinfo>
+ <rngdates>
+ <begdate>201001</begdate>
+ <enddate>201007</enddate>
+ </rngdates>
+ </timeinfo>
+ <current>Publication Date</current>
+ </timeperd>
+ <status>
+ <progress>Complete</progress>
+ <update>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.</update>
+ </status>
+ <spdom>
+ <bounding>
+ <westbc>-91.513079</westbc>
+ <eastbc>-87.019935</eastbc>
+ <northbc>42.508338</northbc>
+ <southbc>36.970298</southbc>
+ </bounding>
+ </spdom>
+ <keywords>
+ <theme>
+ <themekt>ISO 19115 Topic Categories</themekt>
+ <themekey>boundaries</themekey>
+ </theme>
+ <theme>
+ <themekt>None</themekt>
+
+ <themekey>State or equivalent entity</themekey>
+ <themekey>Polygon</themekey>
+ </theme>
+ <place>
+ <placekt>INCITS.38-200x (R2004),INCITS.31-200x (R2007),INCITS.454-200x,INCITS 455-200x,INCITS 446-2008</placekt>
+ <placekey>United States</placekey>
+ <placekey>U.S.</placekey>
+ <placekey>State or Equivalent Entity</placekey>
+ <placekey>Illinois</placekey>
+ <placekey>IL</placekey>
+ <placekey>17</placekey>
+ </place>
+ </keywords>
+ <accconst>None</accconst>
+ <useconst>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.
+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.</useconst>
+ <Title_13_Restrictions>Yes, the data are free from Title 13 restrictions</Title_13_Restrictions>
+ <ptcontac>
+ <cntinfo>
+ <cntorgp>
+ <cntorg>U.S. Department of Commerce, U.S. Census Bureau, Geography Division, Geographic Products Branch</cntorg>
+ </cntorgp>
+ <cntaddr>
+ <addrtype>Mailing address</addrtype>
+ <address>4600 Silver Hill Road, Stop 7400</address>
+ <city>Washington</city>
+ <state>DC</state>
+ <postal>20233-7400</postal>
+ <country>United States</country>
+ </cntaddr>
+ <cntvoice>301-763-1128</cntvoice>
+ <cntfax>301-763-4710</cntfax>
+ <cntemail>geo.tiger@census.gov</cntemail>
+ </cntinfo>
+ </ptcontac>
+ </idinfo>
+ <Data_Set_Character_Set>8859part1</Data_Set_Character_Set>
+ <Data_Set_Language>eng</Data_Set_Language>
+ <dataqual>
+ <attracc>
+ <attraccr>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.</attraccr>
+ </attracc>
+ <logic>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.
+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.
+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.</logic>
+ <complete>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.</complete>
+ <lineage>
+ <srcinfo>
+ <srccite>
+ <citeinfo>
+ <origin>U.S. Department of Commerce, U.S. Census Bureau, Geography Division</origin>
+ <pubdate>Unpublished material</pubdate>
+ <title>Census MAF/TIGER database</title>
+ </citeinfo>
+ </srccite>
+ <typesrc>online</typesrc>
+ <srctime>
+ <timeinfo>
+ <rngdates>
+ <begdate>201001</begdate>
+ <enddate>201007</enddate>
+ </rngdates>
+ </timeinfo>
+ <srccurr>Publication Date</srccurr>
+ </srctime>
+ <srccitea>MAF/TIGER</srccitea>
+ <srccontr>The selected geographic and cartographic information (line segments) are derived from the U.S. Census Bureau&apos;s Master Address File Topologically Integrated Geographic Encoding and Referencing (MAF/TIGER) database.</srccontr>
+ </srcinfo>
+ <procstep>
+ <procdesc>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. </procdesc>
+ <srcused>Census MAF/TIGER</srcused>
+ <procdate>2010</procdate>
+ </procstep>
+ </lineage>
+ </dataqual>
+ <spdoinfo>
+ <indspref>Federal Information Processing Standards (FIPS), ANSI, and feature names.</indspref>
+ <direct>Vector</direct>
+ <ptvctinf>
+ <sdtsterm>
+ <sdtstype>G-polygon</sdtstype>
+ <ptvctcnt>102</ptvctcnt>
+ </sdtsterm>
+ </ptvctinf>
+ </spdoinfo>
+ <spref>
+ <horizsys>
+ <geograph>
+ <latres>0.000458</latres>
+ <longres>0.000458</longres>
+ <geogunit>Decimal degrees</geogunit>
+ </geograph>
+ <geodetic>
+ <horizdn>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.</horizdn>
+ <ellips>Geodetic Reference System 80</ellips>
+ <semiaxis>6378137</semiaxis>
+ <denflat>298257</denflat>
+ </geodetic>
+ </horizsys>
+ </spref>
+ <eainfo>
+ <detailed>
+ <enttyp>
+ <enttypl>COUNTY10.shp</enttypl>
+ <enttypd>2010 Census County and Equivalent State-based</enttypd>
+ <enttypds>U.S. Census Bureau</enttypds>
+ </enttyp>
+ <attr>
+ <attrlabl>STATEFP10</attrlabl>
+ <attrdef>2010 Census state Federal Information Processing Standards
+ (FIPS) codes</attrdef>
+ <attrdefs>U.S. Census Bureau</attrdefs>
+ <attrdomv>
+ <codesetd>
+ <codesetn>INCITS.38-200x (R2004), Codes for the Identification of
+ the States, the District of Columbia, Puerto Rico, and the
+ Insular Areas of the United States (Formerly FIPS 5-2)</codesetn>
+ <codesets>U.S. Census Bureau</codesets>
+ </codesetd>
+ </attrdomv>
+ </attr>
+ <attr>
+ <attrlabl>COUNTYFP10</attrlabl>
+ <attrdef>2010 Census county Federal Information Processing Standards
+ (FIPS) code</attrdef>
+ <attrdefs>U.S. Census Bureau</attrdefs>
+ <attrdomv>
+ <codesetd>
+ <codesetn>INCITS.31-200x (R2007), Codes for the Identification of
+ the Counties and Equivalent Areas of the United States,
+ Puerto Rico, and the Insular Areas of the United States
+ (Formerly FIPS 6-4)</codesetn>
+ <codesets>U.S. Census Bureau</codesets>
+ </codesetd>
+ </attrdomv>
+ </attr>
+ <attr>
+ <attrlabl>COUNTYNS10</attrlabl>
+ <attrdef>2010 Census county ANSI code</attrdef>
+ <attrdefs>U.S. Census Bureau</attrdefs>
+ <attrdomv>
+ <codesetd>
+ <codesetn>INCITS 446-2008, (GNIS) Identifying Attributes for Named
+ Physical and Cultural Geographic Features (Except Roads
+ and Highways) of the United States, Its Territories,
+ Outlying Areas, and Freely Associated Areas, and the
+ Waters of the Same to the Limit of the Twelve-Mile
+ Statutory Zone</codesetn>
+ <codesets>U.S. Geological Survey (USGS)</codesets>
+ </codesetd>
+ </attrdomv>
+ </attr>
+ <attr>
+ <attrlabl>GEOID10</attrlabl>
+ <attrdef>County identifier; a concatenation of 2010 Census state FIPS
+ code and county FIPS code</attrdef>
+ <attrdefs>U.S. Census Bureau</attrdefs>
+ <attrdomv>
+ <codesetd>
+ <codesetn>INCITS.38-200x (R2004), Codes for the Identification of
+ the States, the District of Columbia, Puerto Rico, and the
+ Insular Areas of the United States (Formerly FIPS 5-2),
+ INCITS.31-200x (R2007), Codes for the Identification of
+ the Counties and Equivalent Areas of the United States,
+ Puerto Rico, and the Insular Areas of the United States
+ (Formerly FIPS 6-4)</codesetn>
+ <codesets>U.S. Census Bureau</codesets>
+ </codesetd>
+ </attrdomv>
+ </attr>
+ <attr>
+ <attrlabl>NAME10</attrlabl>
+ <attrdef>2010 Census county name</attrdef>
+ <attrdefs>U.S. Census Bureau</attrdefs>
+ <attrdomv>
+ <codesetd>
+ <codesetn>INCITS.31-200x (R2007), Codes for the Identification of
+ the Counties and Equivalent Areas of the United States,
+ Puerto Rico, and the Insular Areas of the United States
+ (Formerly FIPS 6-4)</codesetn>
+ <codesets>U.S. Census Bureau</codesets>
+ </codesetd>
+ </attrdomv>
+ </attr>
+ <attr>
+ <attrlabl>NAMELSAD10</attrlabl>
+ <attrdef>2010 Census name and the translated legal/statistical area
+ description code for county</attrdef>
+ <attrdefs>U.S. Census Bureau</attrdefs>
+ <attrdomv>
+ <codesetd>
+ <codesetn>INCITS.31-200x (R2007), Codes for the Identification of
+ the Counties and Equivalent Areas of the United States,
+ Puerto Rico, and the Insular Areas of the United States
+ (Formerly FIPS 6-4) and the translated legal/statistical
+ area description code for county that appears in LSAD10</codesetn>
+ <codesets>U.S. Census Bureau</codesets>
+ </codesetd>
+ </attrdomv>
+ </attr>
+ <attr>
+ <attrlabl>LSAD10</attrlabl>
+ <attrdef>2010 Census legal/statistical area description code for county</attrdef>
+ <attrdefs>U.S. Census Bureau</attrdefs>
+ <attrdomv>
+ <edom>
+ <edomv>00</edomv>
+ <edomvd>Blank</edomvd>
+ <edomvds>U.S. Census Bureau</edomvds>
+ </edom>
+ <edom>
+ <edomv>03</edomv>
+ <edomvd>City and Borough</edomvd>
+ <edomvds>U.S. Census Bureau</edomvds>
+ </edom>
+ <edom>
+ <edomv>04</edomv>
+ <edomvd>Borough</edomvd>
+ <edomvds>U.S. Census Bureau</edomvds>
+ </edom>
+ <edom>
+ <edomv>05</edomv>
+ <edomvd>Census Area</edomvd>
+ <edomvds>U.S. Census Bureau</edomvds>
+ </edom>
+ <edom>
+ <edomv>06</edomv>
+ <edomvd>County</edomvd>
+ <edomvds>U.S. Census Bureau</edomvds>
+ </edom>
+ <edom>
+ <edomv>07</edomv>
+ <edomvd>District</edomvd>
+ <edomvds>U.S. Census Bureau</edomvds>
+ </edom>
+ <edom>
+ <edomv>10</edomv>
+ <edomvd>Island</edomvd>
+ <edomvds>U.S. Census Bureau</edomvds>
+ </edom>
+ <edom>
+ <edomv>12</edomv>
+ <edomvd>Municipality</edomvd>
+ <edomvds>U.S. Census Bureau</edomvds>
+ </edom>
+ <edom>
+ <edomv>13</edomv>
+ <edomvd>Municipio</edomvd>
+ <edomvds>U.S. Census Bureau</edomvds>
+ </edom>
+ <edom>
+ <edomv>15</edomv>
+ <edomvd>Parish</edomvd>
+ <edomvds>U.S. Census Bureau</edomvds>
+ </edom>
+ <edom>
+ <edomv>25</edomv>
+ <edomvd>city</edomvd>
+ <edomvds>U.S. Census Bureau</edomvds>
+ </edom>
+ </attrdomv>
+ </attr>
+ <attr>
+ <attrlabl>CLASSFP10</attrlabl>
+ <attrdef>2010 Census Federal Information Processing Standards (FIPS)
+ class code</attrdef>
+ <attrdefs>U.S. Census Bureau</attrdefs>
+ <attrdomv>
+ <edom>
+ <edomv>C7</edomv>
+ <edomvd>An incorporated place that is independent of any county</edomvd>
+ <edomvds>U.S. Census Bureau</edomvds>
+ </edom>
+ <edom>
+ <edomv>H1</edomv>
+ <edomvd>An active county or equivalent feature</edomvd>
+ <edomvds>U.S. Census Bureau</edomvds>
+ </edom>
+ <edom>
+ <edomv>H4</edomv>
+ <edomvd>An inactive county or equivalent feature</edomvd>
+ <edomvds>U.S. Census Bureau</edomvds>
+ </edom>
+ <edom>
+ <edomv>H5</edomv>
+ <edomvd>A statistical county equivalent feature</edomvd>
+ <edomvds>U.S. Census Bureau</edomvds>
+ </edom>
+ <edom>
+ <edomv>H6</edomv>
+ <edomvd>A county that is coextensive with an incorporated place,
+ part of an incorporated place, or a consolidated city and
+ the governmental functions of the county are part of the
+ municipal govenment</edomvd>
+ <edomvds>U.S. Census Bureau</edomvds>
+ </edom>
+ </attrdomv>
+ </attr>
+ <attr>
+ <attrlabl>MTFCC10</attrlabl>
+ <attrdef>MAF/TIGER feature class code</attrdef>
+ <attrdefs>U.S. Census Bureau</attrdefs>
+ <attrdomv>
+ <edom>
+ <edomv>G4020</edomv>
+ <edomvd>County or Equivalent Feature</edomvd>
+ <edomvds>U.S. Census Bureau</edomvds>
+ </edom>
+ </attrdomv>
+ </attr>
+ <attr>
+ <attrlabl>CSAFP10</attrlabl>
+ <attrdef>2010 Census combined statistical area code</attrdef>
+ <attrdefs>U.S. Census Bureau</attrdefs>
+ <attrdomv>
+ <rdom>
+ <rdommin>100</rdommin>
+ <rdommax>599</rdommax>
+ </rdom>
+ </attrdomv>
+ </attr>
+ <attr>
+ <attrlabl>CBSAFP10</attrlabl>
+ <attrdef>2010 Census metropolitan statistical area/micropolitan
+ statistical area code</attrdef>
+ <attrdefs>U.S. Census Bureau</attrdefs>
+ <attrdomv>
+ <rdom>
+ <rdommin>10000</rdommin>
+ <rdommax>49999</rdommax>
+ </rdom>
+ </attrdomv>
+ </attr>
+ <attr>
+ <attrlabl>METDIVFP10</attrlabl>
+ <attrdef>2010 Census metropolitan division code</attrdef>
+ <attrdefs>U.S. Census Bureau</attrdefs>
+ <attrdomv>
+ <rdom>
+ <rdommin>10004</rdommin>
+ <rdommax>49994</rdommax>
+ </rdom>
+ </attrdomv>
+ </attr>
+ <attr>
+ <attrlabl>FUNCSTAT10</attrlabl>
+ <attrdef>2010 Census functional status</attrdef>
+ <attrdefs>U.S. Census Bureau</attrdefs>
+ <attrdomv>
+ <edom>
+ <edomv>A</edomv>
+ <edomvd>Active government providing primary general-purpose functions</edomvd>
+ <edomvds>U.S. Census Bureau</edomvds>
+ </edom>
+ <edom>
+ <edomv>B</edomv>
+ <edomvd>Active government that is partially consolidated with
+ another government but with separate officials providing
+ primary general-purpose functions</edomvd>
+ <edomvds>U.S. Census Bureau</edomvds>
+ </edom>
+ <edom>
+ <edomv>C</edomv>
+ <edomvd>Active government consolidated with another government with
+ a single set of officials</edomvd>
+ <edomvds>U.S. Census Bureau</edomvds>
+ </edom>
+ <edom>
+ <edomv>F</edomv>
+ <edomvd>Fictitious entity created to fill the Census Bureau
+ geographic hierarchy</edomvd>
+ <edomvds>U.S. Census Bureau</edomvds>
+ </edom>
+ <edom>
+ <edomv>G</edomv>
+ <edomvd>Active government that is subordinate to another unit of
+ government</edomvd>
+ <edomvds>U.S. Census Bureau</edomvds>
+ </edom>
+ <edom>
+ <edomv>N</edomv>
+ <edomvd>Nonfunctioning legal entity</edomvd>
+ <edomvds>U.S. Census Bureau</edomvds>
+ </edom>
+ <edom>
+ <edomv>S</edomv>
+ <edomvd>Statistical entity</edomvd>
+ <edomvds>U.S. Census Bureau</edomvds>
+ </edom>
+ </attrdomv>
+ </attr>
+ <attr>
+ <attrlabl>ALAND10</attrlabl>
+ <attrdef>2010 Census land area (square meters)</attrdef>
+ <attrdefs>U.S. Census Bureau</attrdefs>
+ <attrdomv>
+ <edom>
+ <edomv>0 to 9,999,999,999,999</edomv>
+ <edomvd>Blank</edomvd>
+ <edomvds>U.S. Census Bureau</edomvds>
+ </edom>
+ </attrdomv>
+ </attr>
+ <attr>
+ <attrlabl>AWATER10</attrlabl>
+ <attrdef>2010 Census water area (square meters)</attrdef>
+ <attrdefs>U.S. Census Bureau</attrdefs>
+ <attrdomv>
+ <edom>
+ <edomv>0 to 9,999,999,999,999</edomv>
+ <edomvd>Blank</edomvd>
+ <edomvds>U.S. Census Bureau</edomvds>
+ </edom>
+ </attrdomv>
+ </attr>
+ <attr>
+ <attrlabl>INTPTLAT10</attrlabl>
+ <attrdef>2010 Census latitude of the internal point</attrdef>
+ <attrdefs>U.S. Census Bureau</attrdefs>
+ <attrdomv>
+ <edom>
+ <edomv>00</edomv>
+ <edomvd>Blank</edomvd>
+ <edomvds>U.S. Census Bureau</edomvds>
+ </edom>
+ </attrdomv>
+ </attr>
+ <attr>
+ <attrlabl>INTPTLON10</attrlabl>
+ <attrdef>2010 Census longitude of the internal point</attrdef>
+ <attrdefs>U.S. Census Bureau</attrdefs>
+ <attrdomv>
+ <edom>
+ <edomv>00</edomv>
+ <edomvd>Blank</edomvd>
+ <edomvds>U.S. Census Bureau</edomvds>
+ </edom>
+ </attrdomv>
+ </attr>
+ </detailed>
+ </eainfo>
+ <distinfo>
+ <distrib>
+ <cntinfo>
+ <cntorgp>
+ <cntorg>U.S. Department of Commerce, U.S. Census Bureau, Geography Division, Geographic Products Branch</cntorg>
+ </cntorgp>
+ <cntaddr>
+ <addrtype>Mailing address</addrtype>
+ <address>4600 Silver Hill Road, Stop 7400</address>
+ <city>Washington</city>
+ <state>DC</state>
+ <postal>20233-7400</postal>
+ <country>United States</country>
+ </cntaddr>
+ <cntvoice>301-763-1128</cntvoice>
+ <cntfax>301-763-4710</cntfax>
+ <cntemail>geo.tiger@census.gov</cntemail>
+ </cntinfo>
+ </distrib>
+ <distliab>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.</distliab>
+ <stdorder>
+ <digform>
+ <digtinfo>
+ <formname>TGRSHP (compressed)</formname>
+ <filedec>PK-ZIP, version 1.93 A or higher</filedec>
+ </digtinfo>
+ <digtopt>
+ <onlinopt>
+ <computer>
+ <networka>
+ <networkr>http://www.census.gov/geo/www/tiger</networkr>
+ </networka>
+ </computer>
+ </onlinopt>
+ <offoptn>
+ <offmedia>DVD-ROM (Only if offered offline)</offmedia>
+ <recfmt>ISO 9660</recfmt>
+ </offoptn>
+ </digtopt>
+ </digform>
+ <fees>The online copy of the TIGER/Line files may be accessed without charge.</fees>
+ <ordering>To obtain more information about ordering TIGER/Line shapefiles visit http://www.census.gov/geo/www/tiger </ordering>
+ </stdorder>
+ <techpreq>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.</techpreq>
+ </distinfo>
+ <metainfo>
+ <metd>20100507</metd>
+ <metc>
+ <cntinfo>
+ <cntorgp>
+ <cntorg>U.S. Department of Commerce, U.S. Census Bureau, Geography Division, Geographic Products Branch</cntorg>
+ </cntorgp>
+ <cntaddr>
+ <addrtype>Mailing address</addrtype>
+ <address>4600 Silver Hill Road, Stop 7400</address>
+ <city>Washington</city>
+ <state>DC</state>
+ <postal>20233-7400</postal>
+ <country>United States</country>
+ </cntaddr>
+ <cntvoice>301-763-1128</cntvoice>
+ <cntfax>301-763-4710</cntfax>
+ <cntemail>geo.tiger@census.gov</cntemail>
+ </cntinfo>
+ </metc>
+ <metstdn>FGDC Content Standards for Digital Geospatial Metadata</metstdn>
+ <metstdv>FGDC-STD-001-1998</metstdv>
+ <Metadata_Character_Set>8859part1</Metadata_Character_Set>
+ <Metadata_File_Identifier>tl_2010_17_county10.shp.xml</Metadata_File_Identifier>
+ <Metadata_Language>eng</Metadata_Language>
+ </metainfo>
+</metadata>
View
BIN tl_2010_17_county10/tl_2010_17_county10.shx
Binary file not shown.

0 comments on commit 7d1f583

Please sign in to comment.