Skip to content

Instantly share code, notes, and snippets.

@jorgeehernandez
Last active September 15, 2016 20:53
Show Gist options
  • Save jorgeehernandez/079836284d434e3365bf5ef4be017bf4 to your computer and use it in GitHub Desktop.
Save jorgeehernandez/079836284d434e3365bf5ef4be017bf4 to your computer and use it in GitHub Desktop.
fresh block
license: mit
city_id city_state latitude longitude population bounding_box
1 New York NY 40.706577301026 -73.882373809815 8550405 ---\n- -74.287002563477\n- 40.409755706787\n- -73.477745056152\n- 41.003398895264\n
2 Los Angeles CA 34.018239974976 -118.396377563475 3884307 ---\n- -118.68238067627\n- 33.695030212402\n- -118.11037445068\n- 34.341449737549\n
3 San Francisco CA 37.777643203736 -122.447261810305 837442 ---\n- -122.56141662598\n- 37.685516357422\n- -122.33310699463\n- 37.869770050049\n
4 Chicago IL 41.840885162354 -87.729518890381 2719000 ---\n- -87.982803344727\n- 41.607227325439\n- -87.476234436035\n- 42.074542999268\n
5 Seattle WA 47.612010955811 -122.305038452145 652405 ---\n- -122.46631622314\n- 47.40340423584\n- -122.14376068115\n- 47.820617675781\n
6 Portland OR 45.538421630860 -122.666431427005 609456 ---\n- -122.89488220215\n- 45.399112701416\n- -122.43798065186\n- 45.677730560303\n
7 Boston MA 42.332338333130 -71.045619964600 645966 ---\n- -71.200416564941\n- 42.206142425537\n- -70.890823364258\n- 42.458534240723\n
8 Austin TX 30.326808929443 -97.758968353272 885400 ---\n- -97.938652038574\n- 30.107877731323\n- -97.579284667969\n- 30.545740127563\n
9 Nashville TN 36.191211700440 -86.792076110840 659042 ---\n- -87.056602478027\n- 35.970085144043\n- -86.527549743652\n- 36.412338256836\n
10 Philadelphia PA 40.013805389405 -75.123245239258 1553000 ---\n- -75.305595397949\n- 39.853588104248\n- -74.940895080566\n- 40.174022674561\n
11 Minneapolis MN 45.023744583130 -93.264568328858 400070 ---\n- -93.440948486328\n- 44.84029006958\n- -93.088188171387\n- 45.20719909668\n
12 San Diego CA 32.805479049683 -117.112926483150 1356000 ---\n- -117.32033538818\n- 32.509761810303\n- -116.90551757812\n- 33.101196289062\n
13 Atlanta GA 33.813949584961 -84.415809631348 447841 ---\n- -84.592147827148\n- 33.571758270264\n- -84.239471435547\n- 34.056140899658\n
14 Washington DC 38.920152664185 -76.995414733886 658893 ---\n- -77.131103515625\n- 38.780132293701\n- -76.859725952148\n- 39.060173034668\n
15 Denver CO 39.773494720459 -104.897109985355 649495 ---\n- -105.21083068848\n- 39.590194702148\n- -104.58338928223\n- 39.95679473877\n
16 Oakland CA 37.814783096314 -122.252685546875 406253 ---\n- -122.38859558105\n- 37.696182250977\n- -122.1167755127\n- 37.93338394165\n
17 Dallas TX 32.832572937012 -96.799346923828 1258000 ---\n- -97.038223266602\n- 32.59708404541\n- -96.560470581055\n- 33.068061828613\n
18 Pittsburgh PA 40.432306289673 -79.953876495362 305841 ---\n- -80.130020141602\n- 40.329795837402\n- -79.777732849121\n- 40.534816741943\n
19 Salt Lake City UT 40.729885101319 -111.833744049070 191180 ---\n- -112.16431427002\n- 40.539836883545\n- -111.50317382812\n- 40.919933319092\n
20 Baltimore MD 39.285652160645 -76.620155334473 622104 ---\n- -76.756240844727\n- 39.163410186768\n- -76.484069824219\n- 39.407894134521\n
21 New Orleans LA 30.015501976013 -89.948886871338 378715 ---\n- -90.177154541016\n- 29.861404418945\n- -89.72061920166\n- 30.169599533081\n
22 Phoenix AZ 33.583984375000 -112.106609344485 1513000 ---\n- -112.35758209229\n- 33.267467498779\n- -111.85563659668\n- 33.900501251221\n
23 Houston TX 29.856493949890 -95.417060852051 2196000 ---\n- -95.853569030762\n- 29.484748840332\n- -94.98055267334\n- 30.228239059448\n
24 Orlando FL 28.490674972534 -81.356910705566 255483 ---\n- -81.62215423584\n- 28.307252883911\n- -81.091667175293\n- 28.674097061157\n
25 Detroit MI 42.354639053345 -83.102840423584 688701 ---\n- -83.319839477539\n- 42.229080200195\n- -82.885841369629\n- 42.480197906494\n
26 St. Louis MO 38.635620117188 -90.308238983154 315685 ---\n- -90.472457885742\n- 38.498741149902\n- -90.144020080566\n- 38.772499084473\n
27 Columbus OH 39.995920181275 -82.974956512451 850106 ---\n- -83.167251586914\n- 39.839385986328\n- -82.782661437988\n- 40.152454376221\n
28 Miami FL 25.788707733155 -80.250251770020 441003 ---\n- -80.440383911133\n- 25.558006286621\n- -80.060119628906\n- 26.019409179688\n
29 Kansas City MO 39.075366973877 -94.575485229492 475378 ---\n- -94.767425537109\n- 38.827823638916\n- -94.383544921875\n- 39.322910308838\n
30 Las Vegas NV 36.159383773804 -115.184368133545 623747 ---\n- -115.40588378906\n- 35.944103240967\n- -114.96285247803\n- 36.374664306641\n
31 Tucson AZ 32.180599212647 -110.891246795655 531641 ---\n- -111.07669830322\n- 32.035182952881\n- -110.70579528809\n- 32.326015472412\n
32 Cleveland OH 41.501890182495 -81.654659271240 388072 ---\n- -81.908996582031\n- 41.340358734131\n- -81.400321960449\n- 41.663421630859\n
33 San Jose CA 37.319139480591 -121.849975585935 1026908 ---\n- -122.05451965332\n- 37.126987457275\n- -121.64543151855\n- 37.511291503906\n
34 Boulder CO 40.035774230957 -105.282112121585 107349 ---\n- -105.43853759766\n- 39.914772033691\n- -105.12568664551\n- 40.156776428223\n
35 Cincinnati OH 39.133911132813 -84.538906097412 298550 ---\n- -84.732940673828\n- 39.022441864014\n- -84.344871520996\n- 39.245380401611\n
36 Providence RI 41.825307846070 -71.407291412354 179207 ---\n- -71.495063781738\n- 41.756118774414\n- -71.319519042969\n- 41.894496917725\n
37 Sacramento CA 38.596345901490 -121.417602539065 490712 ---\n- -121.5799407959\n- 38.43278503418\n- -121.25526428223\n- 38.759906768799\n
38 Indianapolis IN 39.783233642578 -86.151756286621 853173 ---\n- -86.367218017578\n- 39.606479644775\n- -85.936294555664\n- 39.959987640381\n
39 Milwaukee WI 43.053672790528 -87.946819305420 600155 ---\n- -88.095008850098\n- 42.903877258301\n- -87.798629760742\n- 43.203468322754\n
40 Madison WI 43.056749343872 -89.414928436279 248951 ---\n- -89.571411132812\n- 42.928966522217\n- -89.258445739746\n- 43.184532165527\n
41 Richmond VA 37.506361007691 -77.448028564453 220289 ---\n- -77.617889404297\n- 37.349674224854\n- -77.278167724609\n- 37.663047790527\n
42 Berkeley CA 37.879423141480 -122.288604736330 120972 ---\n- -122.37190246582\n- 37.821350097656\n- -122.20530700684\n- 37.937496185303\n
43 Savannah GA 32.049282073975 -81.098953247070 145674 ---\n- -81.184677124023\n- 31.936721801758\n- -81.013229370117\n- 32.161842346191\n
44 Tampa FL 27.999587059021 -82.477714538575 369075 ---\n- -82.693916320801\n- 27.816608428955\n- -82.261512756348\n- 28.182565689087\n
45 Grand Rapids MI 42.9634 -85.6681 195097 ---\n- -85.749450683594\n- 42.866069793701\n- -85.533027648926\n- 43.041103363037\n
46 Raleigh NC 35.787322998047 -78.625759124756 451066 ---\n- -78.805961608887\n- 35.570526123047\n- -78.445556640625\n- 36.004119873047\n
47 Ann Arbor MI 42.271152496338 -83.733390808106 117070 ---\n- -83.88459777832\n- 42.182922363281\n- -83.582183837891\n- 42.359382629395\n
48 Rochester NY 43.174661636353 -77.610042572022 209802 ---\n- -77.709053039551\n- 43.073902130127\n- -77.511032104492\n- 43.275421142578\n
49 Charlotte NC 35.225978851319 -80.826972961426 827097 ---\n- -81.031806945801\n- 34.999031066895\n- -80.622138977051\n- 35.452926635742\n
50 Provo UT 40.258039474487 -111.653549194335 115264 ---\n- -111.74674987793\n- 40.173198699951\n- -111.56034851074\n- 40.342880249023\n
51 Cambridge MA 42.379587173462 -71.117202758789 110402 ---\n- -71.177726745605\n- 42.345428466797\n- -71.056678771973\n- 42.413745880127\n
52 Asheville NC 35.548343658448 -82.555904388428 87236 ---\n- -82.647743225098\n- 35.431510925293\n- -82.464065551758\n- 35.665176391602\n
53 St. Paul MN 44.907003402710 -93.090122222901 294873 ---\n- -93.24715423584\n- 44.786880493164\n- -92.933090209961\n- 45.027126312256\n
54 Albuquerque NM 35.095998764038 -106.580200195315 559121 ---\n- -106.81017303467\n- 34.943714141846\n- -106.35022735596\n- 35.24828338623\n
55 San Antonio TX 29.466041564942 -98.507839202881 1469845 ---\n- -98.755653381348\n- 29.232334136963\n- -98.260025024414\n- 29.69974899292\n
56 Portland ME 43.649669647217 -70.270099639892 66318 ---\n- -70.39249420166\n- 43.568519592285\n- -70.147705078125\n- 43.730819702148\n
57 Santa Cruz CA 37.402074813843 -122.194534301755 62864 ---\n- -122.46185302734\n- 36.523571014404\n- -121.92721557617\n- 38.280578613281\n
58 Durham NC 35.976833343506 -78.912662506104 257636 ---\n- -79.064994812012\n- 35.828548431396\n- -78.760330200195\n- 36.125118255615\n
59 Honolulu HI 21.444651603699 -157.879631042480 352769 ---\n- -158.11016845703\n- 21.223461151123\n- -157.64909362793\n- 21.665842056274\n
60 Boise ID 43.603206634522 -116.216068267825 218281 ---\n- -116.36724853516\n- 43.511695861816\n- -116.06488800049\n- 43.694717407227\n
61 Louisville KY 38.228870391846 -85.729377746582 615366 ---\n- -85.849227905273\n- 38.146385192871\n- -85.609527587891\n- 38.31135559082\n
62 Black Rock City NV 40.665184020996 -119.344482421875 70000 ---\n- -119.40619659424\n- 40.605613708496\n- -119.28276824951\n- 40.724754333496\n
63 Long Beach CA 33.785112380982 -118.182636260985 474140 ---\n- -118.28567504883\n- 33.697635650635\n- -118.07959747314\n- 33.872589111328\n
64 Burlington VT 44.482067108155 -73.246837615967 42284 ---\n- -73.32103729248\n- 44.427589416504\n- -73.172637939453\n- 44.536544799805\n
65 Buffalo NY 42.906599044800 -78.830677032471 258071 ---\n- -78.940200805664\n- 42.789604187012\n- -78.721153259277\n- 43.023593902588\n
66 Santa Barbara CA 34.432859420776 -119.699863433835 90412 ---\n- -119.76951599121\n- 34.388706207275\n- -119.63021087646\n- 34.477012634277\n
67 Charlottesville VA 38.064289093018 -78.484169006348 44349 ---\n- -78.570007324219\n- 37.97696685791\n- -78.398330688477\n- 38.151611328125\n
68 Charleston SC 32.800279617310 -79.970191955566 132609 ---\n- -80.072952270508\n- 32.680038452148\n- -79.867431640625\n- 32.920520782471\n
69 Eugene OR 44.058530807495 -123.098022460935 163460 ---\n- -123.20896911621\n- 43.979682922363\n- -122.98707580566\n- 44.137378692627\n
70 Tulsa OK 36.128057479858 -95.912395477295 403505 ---\n- -96.071060180664\n- 36.006511688232\n- -95.753730773926\n- 36.249603271484\n
71 New Haven CT 41.297464370728 -72.931396484375 130322 ---\n- -73.011917114258\n- 41.234451293945\n- -72.850875854492\n- 41.36047744751\n
72 Syracuse NY 43.041278839112 -76.141174316406 144142 ---\n- -76.222717285156\n- 42.976757049561\n- -76.059631347656\n- 43.105800628662\n
73 Jacksonville FL 30.340986251832 -81.701900482178 868031 ---\n- -82.018058776855\n- 30.094827651978\n- -81.3857421875\n- 30.587144851685\n
74 Santa Monica CA 34.025335311890 -118.495040893555 92472 ---\n- -118.56084442139\n- 33.956066131592\n- -118.42923736572\n- 34.094604492188\n
75 Santa Fe NM 35.667537689209 -105.966724395750 69972 ---\n- -106.11702728271\n- 35.572959899902\n- -105.81642150879\n- 35.762115478516\n
76 Fort Worth TX 32.754192352295 -97.295284271240 833319 ---\n- -97.540565490723\n- 32.54500579834\n- -97.050003051758\n- 32.96337890625\n
77 Memphis TN 35.126482009888 -89.931720733642 655770 ---\n- -90.141235351562\n- 34.973178863525\n- -89.722206115723\n- 35.27978515625\n
78 Orange CA 33.818319320679 -117.829265594480 140992 ---\n- -117.94166564941\n- 33.758152008057\n- -117.71686553955\n- 33.878486633301\n
79 Bellingham WA 48.753416061402 -122.489719390870 82631 ---\n- -122.60050201416\n- 48.673164367676\n- -122.37893676758\n- 48.833667755127\n
80 Athens GA 33.948089599610 -83.363376617432 122604 ---\n- -83.483390808105\n- 33.862003326416\n- -83.243362426758\n- 34.034175872803\n
81 Springfield MO 37.185358047486 -93.290458679200 165378 ---\n- -93.393508911133\n- 37.102447509766\n- -93.187408447266\n- 37.268268585205\n
82 Denton TX 33.202152252197 -97.117023468017 131044 ---\n- -97.211067199707\n- 33.116527557373\n- -97.022979736328\n- 33.287776947021\n
83 Oklahoma City OK 35.480123519898 -97.526165008545 631346 ---\n- -97.692352294922\n- 35.290328979492\n- -97.359977722168\n- 35.669918060303\n
84 Bozeman MT 45.696117401124 -111.005966186525 39860 ---\n- -111.22348022461\n- 45.550601959229\n- -110.78845214844\n- 45.841632843018\n
85 Colorado Springs CO 38.848209381104 -104.797710418700 456568 ---\n- -104.92852783203\n- 38.700714111328\n- -104.66689300537\n- 38.995704650879\n
86 Greensboro NC 36.081953048706 -79.828304290772 285342 ---\n- -79.967834472656\n- 35.985752105713\n- -79.688774108887\n- 36.178153991699\n
87 Lexington KY 38.016494750977 -84.475677490234 314488 ---\n- -84.669052124023\n- 37.848152160645\n- -84.282302856445\n- 38.184837341309\n
88 Columbia SC 34.053157806397 -81.096736907959 133803 ---\n- -81.481300354004\n- 33.91423034668\n- -80.712173461914\n- 34.192085266113\n
89 Omaha NE 41.278352737427 -96.046394348145 443885 ---\n- -96.217163085938\n- 41.160869598389\n- -95.875625610352\n- 41.395835876465\n
90 Albany NY 42.656948089600 -73.786499023438 98424 ---\n- -73.850830078125\n- 42.604682922363\n- -73.72216796875\n- 42.709213256836\n
91 Somerville MA 42.391500473023 -71.100463867188 78804 ---\n- -71.137924194336\n- 42.365203857422\n- -71.063003540039\n- 42.417797088623\n
92 Palo Alto CA 37.428852081299 -122.156639099125 66642 ---\n- -122.24933624268\n- 37.350372314453\n- -122.06394195557\n- 37.507331848145\n
93 Spokane WA 47.679931640625 -117.409084320065 213272 ---\n- -117.52263641357\n- 47.590881347656\n- -117.29553222656\n- 47.768981933594\n
94 Bloomington IN 39.167499542237 -86.534294128418 82575 ---\n- -86.610359191895\n- 39.107151031494\n- -86.458229064941\n- 39.227848052979\n
95 Greenville SC 34.861907958985 -82.385963439941 61397 ---\n- -82.468238830566\n- 34.775634765625\n- -82.303688049316\n- 34.948181152344\n
96 Irvine CA 33.685895919800 -117.784126281735 256927 ---\n- -117.88820648193\n- 33.594131469727\n- -117.68004608154\n- 33.777660369873\n
97 Birmingham AL 33.501335144043 -86.796535491943 212461 ---\n- -87.040344238281\n- 33.331317901611\n- -86.552726745605\n- 33.671352386475\n
98 Chattanooga TN 35.081394195557 -85.259548187256 176588 ---\n- -85.424194335938\n- 34.95792388916\n- -85.094902038574\n- 35.204864501953\n
99 Knoxville TN 35.972425460816 -83.953208923340 185291 ---\n- -84.131645202637\n- 35.875907897949\n- -83.774772644043\n- 36.068943023682\n
100 Reno NV 39.511653900147 -119.881504058835 241445 ---\n- -120.03936767578\n- 39.320701599121\n- -119.72364044189\n- 39.702606201172\n
101 Dayton OH 39.754037857056 -84.177890777587 140599 ---\n- -84.311744689941\n- 39.654357910156\n- -84.044036865234\n- 39.853717803955\n
102 Olympia WA 47.050598144531 -122.853885650635 48338 ---\n- -123.00842285156\n- 46.974571228027\n- -122.69934844971\n- 47.126625061035\n
103 Missoula MT 46.870380401612 -114.000953674315 69122 ---\n- -114.08383178711\n- 46.804847717285\n- -113.91807556152\n- 46.935913085938\n
104 Wilmington NC 34.205772399903 -77.864322662354 115933 ---\n- -77.997802734375\n- 34.102779388428\n- -77.730842590332\n- 34.308765411377\n
105 Ithaca NY 42.438610076905 -76.501892089844 30515 ---\n- -76.585517883301\n- 42.391513824463\n- -76.418266296387\n- 42.485706329346\n
106 Evanston IL 42.050825119019 -87.697616577148 75570 ---\n- -87.744850158691\n- 41.994575500488\n- -87.650382995605\n- 42.107074737549\n
107 Tallahassee FL 30.461129188538 -84.274120330810 189907 ---\n- -84.406326293945\n- 30.346990585327\n- -84.141914367676\n- 30.575267791748\n
108 Lancaster PA 40.037454605103 -76.308513641358 161103 ---\n- -76.379699707031\n- 39.981998443604\n- -76.237327575684\n- 40.092910766602\n
109 Tempe AZ 33.386764526367 -111.937965393070 175826 ---\n- -112.01159667969\n- 33.292999267578\n- -111.86433410645\n- 33.480529785156\n
110 Fort Collins CO 40.552579879761 -105.073425292965 161175 ---\n- -105.16278839111\n- 40.460235595703\n- -104.98406219482\n- 40.644924163818\n
111 Lincoln NE 40.804924011231 -96.690525054932 277348 ---\n- -96.796119689941\n- 40.71284866333\n- -96.584930419922\n- 40.896999359131\n
112 Sarasota FL 27.322411537171 -82.514755249023 53326 ---\n- -82.631950378418\n- 27.219638824463\n- -82.397560119629\n- 27.425184249878\n
113 Pasadena CA 34.383003234864 -117.987312316895 153784 ---\n- -118.2307434082\n- 34.055362701416\n- -117.74388122559\n- 34.710643768311\n
114 Tacoma WA 47.203907012940 -122.478595733645 207948 ---\n- -122.66399383545\n- 47.081165313721\n- -122.29319763184\n- 47.326648712158\n
115 Burbank CA 34.195165634156 -118.337600708005 105319 ---\n- -118.4065246582\n- 34.132179260254\n- -118.26867675781\n- 34.258152008057\n
116 Chapel Hill NC 35.866436004639 -79.070480346679 59635 ---\n- -79.152694702148\n- 35.766536712646\n- -78.988265991211\n- 35.966335296631\n
117 Fort Lauderdale FL 26.147892951966 -80.188789367676 178590 ---\n- -80.32218170166\n- 26.027940750122\n- -80.055397033691\n- 26.267845153809\n
118 Anchorage AK 61.165851593018 -149.560783386235 298695 ---\n- -150.1079864502\n- 60.90168762207\n- -149.01358032227\n- 61.430015563965\n
119 Northampton MA 42.326967239380 -72.635120391846 28495 ---\n- -72.696617126465\n- 42.282009124756\n- -72.573623657227\n- 42.371925354004\n
120 Lawrence KS 38.973061000000 -95.236526000000 90811 ---\n- -95.33532\n- 38.912571\n- -95.172699\n- 39.033588\n
121 Hartford CT 41.758859634400 -72.686496734619 124006 ---\n- -72.755126953125\n- 41.68786239624\n- -72.617866516113\n- 41.829856872559\n
122 Virginia Beach VA 36.795871734620 -76.053306579590 452745 ---\n- -76.218635559082\n- 36.558471679688\n- -75.887977600098\n- 37.033271789551\n
123 Mountain View CA 37.396455764771 -122.081436157225 77846 ---\n- -122.13355255127\n- 37.338439941406\n- -122.02931976318\n- 37.454471588135\n
124 Huntington Beach CA 33.698020935059 -118.008907318115 201899 ---\n- -118.08834075928\n- 33.627769470215\n- -117.92947387695\n- 33.768272399902\n
125 Lansing MI 42.717645645142 -84.559490203858 115056 ---\n- -84.646179199219\n- 42.651195526123\n- -84.472801208496\n- 42.78409576416\n
126 Jersey City NJ 40.704143524170 -74.040191650391 264290 ---\n- -74.127586364746\n- 40.624767303467\n- -73.952796936035\n- 40.783519744873\n
127 Kalamazoo MI 42.279705047608 -85.604866027832 75548 ---\n- -85.696105957031\n- 42.216091156006\n- -85.513626098633\n- 42.343318939209\n
128 Des Moines IA 41.591337203980 -93.609844207764 210330 ---\n- -93.743934631348\n- 41.502902984619\n- -93.47575378418\n- 41.67977142334\n
129 San Luis Obispo CA 35.284353256226 -120.668804168705 46377 ---\n- -120.72369384766\n- 35.227672576904\n- -120.61391448975\n- 35.341033935547\n
130 Toledo OH 41.662519454956 -83.581287384034 279789 ---\n- -83.71053314209\n- 41.574970245361\n- -83.452041625977\n- 41.750068664551\n
131 Columbia MO 38.951366424561 -92.335742950440 133803 ---\n- -92.426399230957\n- 38.891136169434\n- -92.245086669922\n- 39.011596679688\n
132 Winston-Salem NC 36.108188629150 -80.246788024903 241218 ---\n- -80.430145263672\n- 35.990081787109\n- -80.063430786133\n- 36.226295471191\n
133 Little Rock AR 34.726249694824 -92.341236114502 197992 ---\n- -92.483825683594\n- 34.604034423828\n- -92.19864654541\n- 34.84846496582\n
134 Baton Rouge LA 30.438614845276 -91.099308013916 228590 ---\n- -91.24299621582\n- 30.320035934448\n- -90.955619812012\n- 30.557193756104\n
135 Ashland OR 42.196846008301 -122.694732666015 20713 ---\n- -122.74921417236\n- 42.166709899902\n- -122.64025115967\n- 42.226982116699\n
136 St. Petersburg FL 27.780269622803 -82.707313537598 257083 ---\n- -82.837860107422\n- 27.646078109741\n- -82.576766967773\n- 27.914461135864\n
137 Scottsdale AZ 33.661760330200 -111.873146057130 236839 ---\n- -112.00012207031\n- 33.447887420654\n- -111.74617004395\n- 33.875633239746\n
138 Amherst MA 42.363775253296 -72.509822845459 37819 ---\n- -72.55167388916\n- 42.308292388916\n- -72.467971801758\n- 42.419258117676\n
139 Fresno CA 36.786609649659 -119.780998229980 520052 ---\n- -119.91851806641\n- 36.661533355713\n- -119.64347839355\n- 36.911685943604\n
140 Vancouver WA 45.662916183472 -122.589099884035 172860 ---\n- -122.76848602295\n- 45.575500488281\n- -122.40971374512\n- 45.750331878662\n
141 Santa Rosa CA 38.439472198487 -122.707214355465 174972 ---\n- -122.83683776855\n- 38.376461029053\n- -122.57759094238\n- 38.50248336792\n
142 Fort Wayne IN 41.079948425293 -85.140361785889 260326 ---\n- -85.275146484375\n- 40.971683502197\n- -85.005577087402\n- 41.188213348389\n
143 Orem UT 40.287059783936 -111.692382812500 91648 ---\n- -111.77333068848\n- 40.23804473877\n- -111.61143493652\n- 40.336074829102\n
144 Mesa AZ 33.428762435913 -111.734291076660 471825 ---\n- -111.90510559082\n- 33.326934814453\n- -111.5634765625\n- 33.530590057373\n
145 Akron OH 41.089349746704 -81.518779754639 197542 ---\n- -81.615997314453\n- 41.018699645996\n- -81.421562194824\n- 41.159999847412\n
146 Fayetteville AR 36.050920486450 -94.192504882813 201963 ---\n- -94.330757141113\n- 35.961750030518\n- -94.054252624512\n- 36.140090942383\n
147 State College PA 40.795457839966 -77.864219665528 41757 ---\n- -77.916542053223\n- 40.759876251221\n- -77.811897277832\n- 40.831039428711\n
148 Iowa City IA 41.668243408203 -91.551055908203 71591 ---\n- -91.642112731934\n- 41.607822418213\n- -91.459999084473\n- 41.728664398193\n
149 Ventura CA 34.265268325806 -119.242515563965 109708 ---\n- -119.34199523926\n- 34.211910247803\n- -119.14303588867\n- 34.318626403809\n
150 Lafayette LA 30.212817192078 -92.039878845215 127657 ---\n- -92.094787597656\n- 30.134233474731\n- -91.984970092773\n- 30.291400909424\n
151 Wichita KS 37.683626174927 -97.326313018799 389965 ---\n- -97.513999938965\n- 37.590702056885\n- -97.138626098633\n- 37.776550292969\n
152 Anaheim CA 33.843378067017 -117.847328186035 350742 ---\n- -118.02923583984\n- 33.781356811523\n- -117.66542053223\n- 33.90539932251\n
153 Riverside CA 33.927299499512 -117.384098052980 322424 ---\n- -117.54750823975\n- 33.809871673584\n- -117.22068786621\n- 34.044727325439\n
154 Duluth MN 46.764358520508 -92.113021850586 86265 ---\n- -92.289276123047\n- 46.649906158447\n- -91.936767578125\n- 46.878810882568\n
155 York PA 39.955772399902 -76.702991485596 43935 ---\n- -76.794219970703\n- 39.881080627441\n- -76.611763000488\n- 40.030464172363\n
156 Gainesville FL 29.660666465759 -82.350040435791 130128 ---\n- -82.474967956543\n- 29.565351486206\n- -82.225112915039\n- 29.755981445312\n
<!DOCTYPE html>
<meta charset="utf-8">
<style>
text {
font: 10px sans-serif;
}
</style>
<body>
<h2>Kickstarter projects in: <select name="city" id="selectCity"></select></h2>
<div id="chart"></div>
<script src="//d3js.org/d3.v4.js"></script>
<script>
var diameter = 900,
format = d3.format(",d"),
color = d3.scaleOrdinal(d3.schemeCategory20c);
var bubble = d3.pack()
.size([diameter, diameter])
.padding(0);
var svg = d3.select("body").append("svg")
.attr("width", diameter)
.attr("height", diameter)
.attr("class", "bubble");
function ready(error,
unique_subs,
city_data,
city_meta,
project_backers
// uSmap,
// ipInfo
)
{
if (error) throw error;
function updateCity(city_id) {
var mapSubs = d3.map(unique_subs, function (d) { return d.sub_id;});
var mapSubsCounts = d3.map();
var mapCities = d3.map(city_meta, function (d) { return d.city_id;});
data = project_backers.filter(function (d) {
return d.city_id == city_id;
});
project_backers.forEach(function (d) {
d.backers_count = +d.backers_count;
d.city = mapCities.get(d.city_id);
d.sub = mapSubs.get(d.sub_id);
if (!mapSubsCounts.has(d.sub_id)) {
mapSubsCounts.set(d.sub_id, 0);
}
mapSubsCounts.set(d.sub_id, mapSubsCounts.get(d.sub_id)+1);
});
var root = d3.hierarchy({children:data})
.sum(function(d) { return d.backers_count; })
.sort(function(a, b) {
//Sort by categories that have more projects first
return d3.descending(mapSubsCounts.get(a.data.sub_id), mapSubsCounts.get(b.data.sub_id)) ||
// d3.ascending(a.data.sub_id, b.data.sub_id) ||
b.data.backers_count - a.data.backers_count ;
});
bubble(root);
d3.selectAll(".node").remove();
var node = svg.selectAll(".node")
.data(root.children)
.enter().append("g")
.attr("class", "node")
.attr("transform", function(d) { return "translate(" + d.x + "," + d.y + ")"; });
node.append("title")
.text(function(d) { return "Project id: " + d.data.project_id +
" Category:" + d.data.sub.subcategory +
" Backers: " + format(d.data.backers_count); });
node.append("circle")
.attr("r", function(d) { return d.r; })
.style("fill", function(d) {
return color(d.data.sub_id);
});
//Text looks kind of ugly...
// node.append("text")
// .attr("dy", ".3em")
// .style("text-anchor", "middle")
// .text(function(d) { return d.data.project_id.substring(0, d.r / 3); });
}
d3.select("#selectCity")
.on("change", function () {
updateCity(d3.select(this).property("value"));
})
.selectAll("option")
.data(city_meta)
.enter()
.append("option")
.text(function (d) { return d.city_state; })
.attr("value", function (d) { return d.city_id; });
updateCity("1") //New York
}
d3.queue()
.defer(d3.csv, "unique_subs.csv") // 67KB
.defer(d3.csv, "city_map_5.csv") // 23KB
.await(ready);
d3.select(self.frameElement).style("height", diameter + "px");
</script>
</body>
subcategory sub_id
3D Printing 1
Academic 2
Accessories 3
Action 4
Animals 5
Animation 6
Anthologies 7
Apparel 8
Apps 9
Architecture 10
Art 11
Art Books 12
Audio 13
Bacon 14
Blues 15
Calendars 16
Camera Equipment 17
Candles 18
Ceramics 19
Children's Books 20
Childrenswear 21
Chiptune 22
Civic Design 23
Classical Music 24
Comedy 25
Comic Books 26
Comics 27
Community Gardens 28
Conceptual Art 29
Cookbooks 30
Country & Folk 31
Couture 32
Crafts 33
Crochet 34
Dance 35
Design 36
Digital Art 37
DIY 38
DIY Electronics 39
Documentary 40
Drama 41
Drinks 42
Electronic Music 43
Embroidery 44
Events 45
Experimental 46
Fabrication Tools 47
Faith 48
Family 49
Fantasy 50
Farmer's Markets 51
Farms 52
Fashion 53
Festivals 54
Fiction 55
Film & Video 56
Fine Art 57
Flight 58
Food 59
Food Trucks 60
Footwear 61
Gadgets 62
Games 63
Gaming Hardware 64
Glass 65
Graphic Design 66
Graphic Novels 67
Hardware 68
Hip-Hop 69
Horror 70
Illustration 71
Immersive 72
Indie Rock 73
Installations 74
Interactive Design 75
Jazz 76
Jewelry 77
Journalism 78
Kids 79
Knitting 80
Latin 81
Letterpress 82
Literary Journals 83
Live Games 84
Makerspaces 85
Metal 86
Mixed Media 87
Mobile Games 88
Movie Theaters 89
Music 90
Music Videos 91
Musical 92
Narrative Film 93
Nature 94
Nonfiction 95
Painting 96
People 97
Performance Art 98
Performances 99
Periodicals 100
Pet Fashion 101
Photo 102
Photobooks 103
Photography 104
Places 105
Playing Cards 106
Plays 107
Poetry 108
Pop 109
Pottery 110
Print 111
Printing 112
Product Design 113
Public Art 114
Publishing 115
Punk 116
Puzzles 117
Quilts 118
R&B 119
Radio & Podcasts 120
Ready-to-wear 121
Residencies 122
Restaurants 123
Robots 124
Rock 125
Romance 126
Science Fiction 127
Sculpture 128
Shorts 129
Small Batch 130
Software 131
Sound 132
Space Exploration 133
Spaces 134
Stationery 135
Tabletop Games 136
Taxidermy 137
Technology 138
Television 139
Textiles 140
Theater 141
Thrillers 142
Translations 143
Typography 144
Vegan 145
Video 146
Video Art 147
Video Games 148
Wearables 149
Weaving 150
Web 151
Webcomics 152
Webseries 153
Woodworking 154
Workshops 155
World Music 156
Young Adult 157
Zines 158
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment