Skip to content

Instantly share code, notes, and snippets.

@mapsam
Last active December 29, 2015 05:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mapsam/7622234 to your computer and use it in GitHub Desktop.
Save mapsam/7622234 to your computer and use it in GitHub Desktop.
Twenty Seventy
<!DOCTYPE html>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<style>
.states {
fill: #6BA0B5;
stroke: #fff;
stroke-width:1px;
}
.states:hover {
fill:#00C78C;
}
</style>
<body>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="http://d3js.org/topojson.v1.min.js"></script>
<script>
var width = 960,
height = 500;
var svg = d3.select('body').append('svg')
.attr('width', width)
.attr('height', height);
var projection = d3.geo.albersUsa()
.scale(1000)
.translate([width / 2, height / 2]);
var path = d3.geo.path()
.projection(projection);
d3.json('twentyseventy.json', function(error, us) {
svg.selectAll('.states')
.data(topojson.feature(us, us.objects.admin1_poly).features)
.enter()
.append('path')
.attr('class', 'states')
.attr('d', path);
});
</script>
</body>
</html>
Display the source blob
Display the rendered blob
Raw
{"type":"Topology","transform":{"scale":[0.0011642168721687216,0.0005235634056340564],"translate":[-169.53665,25.232668]},"objects":{"admin1_poly":{"type":"GeometryCollection","geometries":[{"type":"MultiPolygon","arcs":[[[0]],[[1,2,3]],[[4,5]],[[6]],[[7]],[[8]],[[9,10]]]},{"type":"Polygon","arcs":[[11,12,13,14,15]]},{"type":"Polygon","arcs":[[16,17,18,19,20]]},{"type":"Polygon","arcs":[[21,22,-15,23,24,25]]},{"type":"Polygon","arcs":[[26,27,-26,28,-21,29]]},{"type":"Polygon","arcs":[[30,31,32,33,34,35]]},{"type":"Polygon","arcs":[[36,37,38,39,-31]]},{"type":"Polygon","arcs":[[40,41,-35,42,43,44,45,46]]},{"type":"Polygon","arcs":[[47,-44,48,49,-22,-28]]},{"type":"Polygon","arcs":[[50,-45,-48,-27,51,52]]},{"type":"Polygon","arcs":[[53,-46,-51,54,55,56]]},{"type":"Polygon","arcs":[[57,-55,-53,58,59,60]]},{"type":"Polygon","arcs":[[61,-57,62,63,64]]},{"type":"Polygon","arcs":[[65,66,-37,-36,-42,67]]},{"type":"Polygon","arcs":[[68,69,-68,-41,70,71,72,73]]},{"type":"Polygon","arcs":[[74,-66,-70,75,76]]},{"type":"Polygon","arcs":[[77,78,-76,-69,79]]},{"type":"Polygon","arcs":[[80,-38,-67,-75]]},{"type":"Polygon","arcs":[[81,-78,82]]},{"type":"Polygon","arcs":[[-83,-80,-74,83,84]]},{"type":"Polygon","arcs":[[-84,85,86]]},{"type":"Polygon","arcs":[[-73,87,88,-86]]},{"type":"Polygon","arcs":[[89,90,91,92,93,94,95,96]]},{"type":"Polygon","arcs":[[97,-92,98,99]]},{"type":"Polygon","arcs":[[100,101,-65,102,103,-95]]},{"type":"Polygon","arcs":[[104,105,106,-101,-94]]},{"type":"Polygon","arcs":[[107,-71,-47,-54,-62,-102,-107]]},{"type":"Polygon","arcs":[[-99,-91,108,109,110]]},{"type":"Polygon","arcs":[[111,112,113,114,115,116]]},{"type":"Polygon","arcs":[[117,118,119,-115]]},{"type":"Polygon","arcs":[[120,-113,121,122]]},{"type":"Polygon","arcs":[[-122,-112,123]]},{"type":"Polygon","arcs":[[124,125,126,127,128]]},{"type":"Polygon","arcs":[[129,130,131,132]]},{"type":"Polygon","arcs":[[133,134,135,-130,136]]},{"type":"Polygon","arcs":[[137,138,-135,139]]},{"type":"MultiPolygon","arcs":[[[140,141]],[[-88,-72,-108,-106,142,143,144,145]]]},{"type":"MultiPolygon","arcs":[[[146]],[[147]],[[148,149,150]]]},{"type":"Polygon","arcs":[[151,-138,152,-12,153]]},{"type":"Polygon","arcs":[[-153,-140,-134,154,-13]]},{"type":"Polygon","arcs":[[-24,-14,-155,-137,-133,155,156]]},{"type":"MultiPolygon","arcs":[[[157]],[[158]],[[159,-156,-132,160,-149,161,162]]]},{"type":"Polygon","arcs":[[163,164,-19,165,-2,166]]},{"type":"Polygon","arcs":[[-30,-20,-165,167,168,-59,-52]]},{"type":"MultiPolygon","arcs":[[[169,170,-103,-64,171]],[[-61,172]],[[173]]]},{"type":"MultiPolygon","arcs":[[[174]],[[175,176,177,-170,178,-168,-164,179]]]},{"type":"Polygon","arcs":[[-120,180,-125,-116]]},{"type":"MultiPolygon","arcs":[[[-121,-110,-109,-97,181,-177,182,-118,-114]],[[183]]]},{"type":"Polygon","arcs":[[-163,184,185,186]]},{"type":"Polygon","arcs":[[-157,-160,-187,187,-17,-29,-25]]},{"type":"Polygon","arcs":[[-188,-186,188,-166,-18]]},{"type":"MultiPolygon","arcs":[[[189]],[[190,191]]]},{"type":"Polygon","arcs":[[192]]},{"type":"MultiPolygon","arcs":[[[193]],[[-191,194,195,-126,-181,-119,-183,-176,196]]]},{"type":"MultiPolygon","arcs":[[[-3,-189,-185,-162,-151,197]],[[198,-5]],[[199]],[[-10,200]],[[201]]]},{"type":"Polygon","arcs":[[-40,202,-154,203,-32]]},{"type":"Polygon","arcs":[[-142,204,-145,205,-143,-105,-93,-98,206]]},{"type":"Polygon","arcs":[[-34,207,-49,-43]]},{"type":"Polygon","arcs":[[-33,-204,-16,-23,-50,-208]]},{"type":"Polygon","arcs":[[-144,-206]]},{"type":"Polygon","arcs":[[208,209,210,-128,211]]},{"type":"Polygon","arcs":[[-210,212]]}]}},"arcs":[[[75342,75670],[1503,-1985],[-700,-933],[-2550,1234],[-1154,-1537],[-1249,962],[0,3008],[1289,612],[2861,-1361]],[[64272,66429],[-6075,0]],[[58197,66429],[0,402],[-1,960],[0,270],[0,27],[0,130],[-2,6666],[-16333,7662],[0,2078]],[[41861,84624],[868,0],[4132,-1880],[1118,-513],[0,-1215],[2636,0],[1623,-753],[530,-246],[0,1703],[276,128],[2091,959],[3146,-1445],[3478,0],[0,1434],[1001,-1263],[901,-1146],[0,1505],[1216,559],[0,2156],[-2133,963],[-216,97],[0,2204],[881,1069],[1585,0],[1454,-1768],[679,-832],[0,-1918],[775,-967],[0,-1444],[0,1],[607,2095],[1,0],[3266,-1489],[271,934],[541,1850],[1271,-573],[1989,-901],[0,-4587],[-4673,-2200],[-2301,-3020],[-4602,-6200],[0,-1492]],[[44838,85309],[6232,0],[0,4943]],[[51070,90252],[2254,-986],[-812,2669],[2882,-1248],[1040,-3454],[2666,-1190],[-1030,-3524],[-4078,1858],[-3088,-1405],[-2781,0],[0,1045],[-1588,0],[-1697,769],[0,523]],[[62802,90188],[-1636,-1975],[-3660,1610],[922,3012],[3563,0],[811,-2647]],[[65229,89929],[-1072,0],[-882,2882],[739,868],[4377,0],[-3162,-3750]],[[85056,88209],[8080,-10133],[-4875,0],[0,-6544],[-8190,3961],[3123,4055],[-5678,7124],[0,-805],[-7294,0],[-2133,2609],[4366,5203],[12601,-5470]],[[51105,94655],[0,3365]],[[51105,98020],[1,0],[558,633],[1395,-1587],[1895,0],[0,-1844],[-2505,0],[-1343,-567],[-1,0]],[[51961,22478],[-4264,0]],[[47697,22478],[0,9581]],[[47697,32059],[2541,0]],[[50238,32059],[0,-1864],[1,0],[1722,0]],[[51961,30195],[0,-7717]],[[56248,39616],[0,5860]],[[56248,45476],[1949,0]],[[58197,45476],[3574,0]],[[61771,45476],[104,-435],[722,-3050],[0,-2375]],[[62597,39616],[-1,0],[-6348,0]],[[56248,34108],[0,-1],[0,-3912]],[[56248,30195],[-4287,0]],[[50238,32059],[0,4766]],[[50238,36825],[0,890],[6010,0]],[[56248,37715],[0,-3607]],[[62597,34959],[0,-1616]],[[62597,33343],[-1,0],[-1316,765],[-5032,0]],[[56248,37715],[0,1901]],[[62597,39616],[-129,-553],[129,-555],[0,-3549]],[[64272,16658],[-2704,0],[-1821,1115],[0,3746],[-1,0],[-2674,0]],[[57072,21519],[0,959]],[[57072,22478],[847,0]],[[57919,22478],[6353,0]],[[64272,22478],[0,-930]],[[64272,21548],[0,-4890]],[[64272,16658],[209,-967],[162,-754]],[[64643,14937],[276,-1287],[0,-5141]],[[64919,8509],[-1073,0],[-1528,-2638],[0,-4039],[-1584,1007],[-2607,6259],[-936,-1613],[-3045,5220]],[[54146,12705],[2926,0],[0,8814]],[[68741,21361],[0,-1],[0,-684],[-282,0]],[[68459,20676],[-480,0],[0,219],[2,653],[-3709,0]],[[64272,22478],[0,3413],[-525,2356]],[[63747,28247],[-238,1060]],[[63509,29307],[1,0],[3785,0]],[[67295,29307],[0,-1431],[0,-1],[422,-1896],[409,-671],[53,-238],[562,-2546]],[[68741,22524],[0,-1163]],[[62597,33343],[618,-2728],[294,-1308]],[[63747,28247],[-5828,0]],[[57919,28247],[0,1948],[-1671,0]],[[67772,33227],[291,-466],[0,-1495],[-514,-828],[-254,-1131]],[[62597,34959],[4637,0]],[[67234,34959],[-1,-871],[269,-430],[270,-431]],[[69616,23242],[-65,-229],[-810,-489]],[[67772,33227],[2406,0]],[[70178,33227],[0,-1021],[309,-503]],[[70487,31703],[4,-5377],[-875,-3084]],[[70403,38585],[0,-1],[63,-273],[-290,-1257],[480,438],[-478,-2075],[0,-2190]],[[67234,34959],[16,0],[-1514,2395],[156,675],[580,2490]],[[66472,40519],[1056,598],[226,-128]],[[67754,40989],[2045,-1158],[361,-206],[1,0],[242,-1040]],[[72802,26487],[-1280,-2101],[-1906,-1144]],[[70487,31703],[553,0]],[[71040,31703],[1762,0]],[[72802,31703],[0,-5216]],[[68000,18568],[-462,-2136],[0,-1495]],[[67538,14937],[-2895,0]],[[68459,20676],[-459,-2108]],[[71690,18568],[-1968,0]],[[69722,18568],[-1722,0]],[[68741,21361],[1067,0],[0,377],[3658,0]],[[73466,21738],[1,0],[2100,0]],[[75567,21738],[-1,-1],[-1515,-2568],[-352,-600],[-1,-1]],[[73698,18568],[-2008,0]],[[69202,9565],[-675,0],[0,1509],[-1710,0],[721,2129],[0,1734]],[[69722,18568],[0,-9003]],[[69722,9565],[-520,0]],[[72421,11074],[-1843,0],[0,-1],[0,-1508]],[[70578,9565],[-856,0]],[[71690,18568],[135,-622],[596,-2761],[0,-4111]],[[69202,9565],[-1577,-2723],[0,1667],[-2706,0]],[[75647,10367],[1534,-7287],[-641,-3080],[-1132,753],[-979,4690],[280,1332],[-1533,2642],[-529,-908],[-614,1056],[-1455,0]],[[72421,11074],[413,-707],[2813,0]],[[73698,18568],[1608,-2703],[745,-3477]],[[76051,12388],[-404,-2021]],[[73698,18568],[1540,938],[733,-446],[1122,-683],[1250,-2103]],[[78343,16274],[-2292,-3886]],[[75567,21738],[4646,0]],[[80213,21738],[0,-2324],[-1870,-3140]],[[81453,30735],[2,-4],[-2,4]],[[81453,30735],[-322,-1433],[186,-525],[-496,-803],[-144,-233]],[[80677,27741],[-209,0]],[[80468,27741],[-3124,0]],[[77344,27741],[-887,0],[0,1667],[0,1]],[[76457,29409],[0,2450]],[[76457,31859],[627,1005]],[[77084,32864],[0,-751],[3513,0],[856,-1378]],[[81217,25317],[-749,0],[0,2424]],[[80677,27741],[131,-587],[0,-1]],[[80808,27153],[409,-1836]],[[76457,29409],[-369,-1646],[-221,-995],[-154,-252],[-1155,-1893]],[[74558,24623],[-1756,1864]],[[72802,31703],[938,0],[264,-154]],[[74004,31549],[961,-563],[1492,873]],[[77344,27741],[0,-905],[644,382],[1,0],[976,0]],[[78965,27218],[-1763,-1660],[-441,-1996],[-730,-439],[-892,-537],[-581,960]],[[74558,23546],[0,1077]],[[74558,23546],[-1092,-1808]],[[81453,30735],[2,-4]],[[81455,30731],[727,-455]],[[82182,30276],[1,0],[-252,-1066],[167,-270],[-405,-1815],[-434,-708],[-451,736]],[[84729,31096],[-379,1057],[-1,0],[-422,0]],[[83927,32153],[-1320,0],[-1,0]],[[82606,32153],[0,1345]],[[82606,33498],[1,0],[449,0],[205,0]],[[83261,33498],[1474,0]],[[84735,33498],[-324,-519],[704,-1129],[310,0],[107,488],[36,166],[0,-917],[-425,-248],[-414,-243]],[[82606,33498],[0,4250],[0,1]],[[82606,37749],[1,0],[1630,0]],[[84237,37749],[0,-1],[-166,-717],[-810,-3533]],[[82182,30276],[424,684],[0,1193]],[[83927,32153],[0,-1527]],[[83927,30626],[-1086,0],[-659,-350]],[[84729,31096],[-802,-470]],[[84735,33498],[0,4862]],[[84735,38360],[719,3081],[299,1271],[295,-165],[476,-268]],[[86524,42279],[1,-1]],[[86525,42278],[534,-301],[888,-3800]],[[87947,38177],[210,-909],[-1763,-1013],[-1659,-2757]],[[45185,39350],[-6369,0]],[[38816,39350],[0,4821],[1275,-713],[0,2018]],[[40091,45476],[5094,0]],[[45185,45476],[0,-6126]],[[45185,32059],[-2626,0]],[[42559,32059],[-1,0],[-3742,0]],[[38816,32059],[0,7290],[0,1]],[[45185,39350],[306,-1243],[-139,-602],[-167,-725],[0,-4721]],[[47288,18455],[0,-4773]],[[47288,13682],[0,-1],[-1940,-1200],[0,-1],[-13,-7],[-6519,10939],[0,8647]],[[42559,32059],[0,-5768],[4729,-7835],[0,-1]],[[80909,23926],[-205,-932],[-205,932]],[[80499,23926],[410,0]],[[78965,27218],[460,-752]],[[79425,26466],[56,-92],[34,-150]],[[79515,26224],[294,-1325]],[[79809,24899],[404,-1828],[0,-1333]],[[14828,62029],[-1472,-2090],[-843,1200],[2315,3258],[0,-2368]],[[3456,66016],[-242,-335],[-1812,912],[1611,808],[443,-609],[0,-776]],[[26423,66429],[1,-1],[1222,-1697],[1,0],[784,631],[457,366],[4659,-6571],[0,-2166]],[[33547,56991],[-1112,576],[-4026,5734],[-909,-738],[-2718,3792],[-2396,0],[-4289,2145],[0,-2318],[-2449,-1237],[0,2903],[1290,0],[0,1371],[-2988,-2363],[0,-1992],[-4683,-6633],[-9267,-4913],[10175,8484],[675,2595],[-1312,-667],[-2971,0],[0,3448],[-1469,-1171],[-1912,2629],[0,2527],[4201,2047],[0,1921],[-4469,0],[-1985,2594],[2894,1361],[1431,-671],[3044,0],[0,628],[-5666,2633],[0,2333],[7412,3331],[8568,0],[5878,-2635]],[[24494,84705],[0,-17443],[1325,0],[604,-833]],[[51961,11300],[-797,-1],[-3857,2394],[-19,-11]],[[47288,18455],[0,2335],[409,0],[0,1688]],[[51961,22478],[0,-11178]],[[45185,32059],[2512,0]],[[45185,45476],[791,0]],[[45976,45476],[0,-1273],[1068,-4543],[1807,-2835],[1387,0]],[[36936,48479],[2767,-4203],[-2403,1295],[-1504,2280],[-348,1442],[1488,-814]],[[32523,53312],[1356,-2006],[-2597,1374],[0,2633],[1241,0],[0,-2001]],[[48132,45476],[-1,0],[-2155,0]],[[40091,45476],[-5865,8796],[-679,2719]],[[26423,66429],[15960,0]],[[42383,66429],[0,-1],[0,-12349],[1,0],[5748,-8603]],[[69203,60491],[-5353,-7767],[0,-7248]],[[63850,45476],[-2079,0]],[[58197,45476],[0,20952],[0,1]],[[64272,66429],[0,-1],[0,-2224],[1289,0],[28,-108],[867,-3358],[1135,587],[1612,-834]],[[63850,45476],[0,1],[249,379],[537,-819],[1214,-676],[2155,-1204]],[[68005,43157],[0,-1],[-1435,-2218],[-98,-419]],[[74619,34254],[0,-1],[-208,-910],[-179,-790]],[[74232,32553],[-228,-1004]],[[71040,31703],[558,2452],[-267,1167],[-82,355],[398,1728],[1097,1720],[1600,-912],[-690,-2994],[882,807],[359,-569],[-276,-1203]],[[67754,40989],[2314,1292],[317,-1429],[1298,732],[173,-735],[1660,-941],[-2805,0],[-308,-1323]],[[69627,43430],[-696,0],[696,426],[0,-426]],[[74683,39633],[537,-839],[-1348,839],[811,0]],[[77321,50640],[0,-1],[0,-8230],[2226,-3460],[2190,0],[0,-1200]],[[81737,37749],[-500,0],[0,-1],[-403,-633],[-402,-635]],[[80432,36480],[-1200,-691],[-1258,0],[-148,-235],[-475,-754],[473,-752],[-221,-125],[-2906,-1642],[-253,148],[-212,124]],[[74619,34254],[147,-236],[59,-94],[1,0],[751,1195],[0,3365],[786,-1235],[280,-442],[543,0],[0,855],[-1188,1862],[-1328,753],[-1753,992],[-1,0],[-467,1985],[-66,279],[-611,0],[-215,905],[-131,551],[-1731,0],[-912,-1397],[-778,-435]],[[69203,60491],[1,0],[21,-11],[1596,-830],[0,-2348],[4096,0],[0,-4467],[1942,-2885],[185,276],[277,414]],[[84237,37749],[108,465],[34,146],[356,0]],[[77084,32864],[741,1184],[1017,589],[1229,0],[0,1272],[361,571]],[[81737,37749],[869,0]],[[83780,30030],[-1487,-876],[0,876],[1,0],[1486,0]],[[42383,66429],[8743,0]],[[51126,66429],[0,-1],[0,-20952]],[[51126,45476],[-2994,0]],[[51126,45476],[5122,0]],[[51126,66429],[7071,0]],[[97908,49356],[-749,-3107],[2363,0],[477,-1260],[-588,-2479],[-4414,0],[1670,6846],[1241,0]],[[96486,49784],[0,1187],[-7013,0],[-1820,2694],[0,2943],[3437,0],[0,8826]],[[91090,65434],[1278,-3097],[865,-2127],[0,-2195],[2433,-1281],[861,-455],[1252,-1826],[0,-2928],[-945,-1408],[-222,-333],[-1,0],[-125,0]],[[92357,40678],[-551,-858],[-962,0],[-447,1909],[708,-1059],[1252,8]],[[92678,46376],[0,-1362],[-1633,906],[-840,1274],[989,0],[1484,-818]],[[96486,49784],[-1148,0],[-503,-753],[-893,-1346],[-5484,0],[-656,-1723],[-1277,0],[-497,-1842],[1451,809],[2332,1293],[1009,-1539],[-1796,-1002]],[[89024,43681],[-2500,-1402]],[[77321,50640],[719,1069],[180,267],[-415,1681],[-621,2499],[2446,2045],[0,3943],[-1553,2182],[224,313],[897,1246],[0,3636],[-502,681],[-301,407],[1,0],[155,210],[622,836],[4904,-2412],[1762,-875],[0,-4357],[2590,-1323],[1137,4347],[331,1248],[189,-447],[1004,-2402]],[[24494,84705],[3044,-1382],[662,-303],[8158,3686],[420,-516],[1265,-1565],[1,-1],[3817,0]],[[44838,85309],[0,713],[3768,0],[-4922,2191],[0,1895],[3859,1675],[3527,-1531]],[[41913,89161],[-1921,-846],[-3274,1485],[2415,2876],[-1346,1577],[4662,0],[4268,-1823],[-4804,-2079],[0,-1190]],[[51105,94655],[-2018,-857],[-4570,1933],[2175,2487],[3364,-1395],[297,341],[752,856]],[[45345,97940],[-3161,-1313],[-1927,802],[689,784],[4357,1786],[1370,-559],[-1328,-1500]],[[54146,12705],[-1412,0],[0,-1405],[-1,0],[-772,0]],[[51961,22478],[5111,0]],[[80499,23926],[-452,2039],[-238,-1066]],[[79515,26224],[113,185],[-119,195],[-84,-138]],[[81217,25317],[-308,-1391]],[[57919,22478],[0,5769]],[[89024,43681],[210,-888],[587,329],[803,-3420]],[[90624,39702],[-233,-132]],[[90391,39570],[-2444,-1393]],[[86525,42278],[2499,1402],[0,1]],[[90624,39702],[1904,-1084],[808,3458],[386,0],[415,-1771],[-408,-1753],[-3101,-1775],[-1256,-1990],[-1009,1598],[2028,3185]]]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment