Skip to content

Instantly share code, notes, and snippets.

@ryanpitts
Created May 20, 2014 19:43
Show Gist options
  • Save ryanpitts/750aacecc167233c5547 to your computer and use it in GitHub Desktop.
Save ryanpitts/750aacecc167233c5547 to your computer and use it in GitHub Desktop.
Example API response from Census Reporter, showing geograhic metadata (including coordinates) for Spokane, WA. If you make a request to http://api.censusreporter.org/1.0/geo/tiger2012/16000US5367000?geom=true, you'll get results like this.
{
"geometry": {
"type": "MultiPolygon",
"coordinates": [
[
[
[
-117.604044,
47.615714
],
[
-117.60403099999999,
47.628339
],
[
-117.59343799999999,
47.628358999999996
],
[
-117.593321,
47.624615
],
[
-117.582397,
47.624626
],
[
-117.582402,
47.626695
],
[
-117.560919,
47.628357
],
[
-117.56091599999999,
47.630027999999996
],
[
-117.556748,
47.630624
],
[
-117.55675,
47.631684
],
[
-117.550449,
47.633914999999995
],
[
-117.55043,
47.635732999999995
],
[
-117.555745,
47.635794
],
[
-117.555725,
47.637504
],
[
-117.550907,
47.637709
],
[
-117.550347,
47.646603999999996
],
[
-117.510343,
47.646539999999995
],
[
-117.506271,
47.645982
],
[
-117.506278,
47.644845
],
[
-117.504076,
47.644852
],
[
-117.50404,
47.646172
],
[
-117.502259,
47.646167
],
[
-117.502308,
47.644866
],
[
-117.492312,
47.645844
],
[
-117.492274,
47.644777999999995
],
[
-117.486126,
47.644774
],
[
-117.484744,
47.643038999999995
],
[
-117.475757,
47.642913
],
[
-117.47575499999999,
47.647019
],
[
-117.480953,
47.649625
],
[
-117.47913199999999,
47.652899
],
[
-117.470934,
47.655584
],
[
-117.464545,
47.653489
],
[
-117.464342,
47.665895
],
[
-117.469103,
47.66585
],
[
-117.47415699999999,
47.670342
],
[
-117.480409,
47.680474
],
[
-117.475127,
47.679717
],
[
-117.47675,
47.68709
],
[
-117.46905,
47.688489999999994
],
[
-117.46725,
47.69019
],
[
-117.480951,
47.69669
],
[
-117.493551,
47.693289
],
[
-117.496651,
47.694289
],
[
-117.497551,
47.696988999999995
],
[
-117.492151,
47.700789
],
[
-117.49435199999999,
47.704088999999996
],
[
-117.49945199999999,
47.706889
],
[
-117.50125299999999,
47.713589
],
[
-117.498753,
47.718789
],
[
-117.50125299999999,
47.720689
],
[
-117.512853,
47.720988999999996
],
[
-117.514054,
47.725289
],
[
-117.510954,
47.72996
],
[
-117.49680000000001,
47.72998
],
[
-117.496688,
47.731533999999996
],
[
-117.49928,
47.733591999999994
],
[
-117.502256,
47.733591
],
[
-117.502155,
47.736689999999996
],
[
-117.504355,
47.740944
],
[
-117.507494,
47.740939999999995
],
[
-117.508636,
47.749151999999995
],
[
-117.521458,
47.758727
],
[
-117.474835,
47.758638
],
[
-117.47512499999999,
47.749427
],
[
-117.47244599999999,
47.749424
],
[
-117.472374,
47.742185
],
[
-117.475161,
47.742259999999995
],
[
-117.475248,
47.737790999999994
],
[
-117.4726,
47.737193
],
[
-117.472658,
47.731752
],
[
-117.470163,
47.731741
],
[
-117.470146,
47.72992
],
[
-117.453902,
47.729866
],
[
-117.453745,
47.737092
],
[
-117.446241,
47.73701
],
[
-117.446113,
47.740635999999995
],
[
-117.43898300000001,
47.740552
],
[
-117.438928,
47.744177
],
[
-117.430347,
47.744066
],
[
-117.43005099999999,
47.742988999999994
],
[
-117.432227,
47.742157999999996
],
[
-117.428049,
47.741585
],
[
-117.427252,
47.738274
],
[
-117.430847,
47.735354
],
[
-117.432489,
47.728913
],
[
-117.431666,
47.724384
],
[
-117.434536,
47.720929999999996
],
[
-117.432334,
47.720709
],
[
-117.432345,
47.715412
],
[
-117.412555,
47.715092999999996
],
[
-117.412587,
47.722164
],
[
-117.422017,
47.722394
],
[
-117.422026,
47.725998
],
[
-117.415073,
47.725863
],
[
-117.415014,
47.728581999999996
],
[
-117.411355,
47.729442999999996
],
[
-117.411415,
47.745784
],
[
-117.405678,
47.745701
],
[
-117.400428,
47.751141999999994
],
[
-117.395182,
47.751129
],
[
-117.395309,
47.747522
],
[
-117.38992999999999,
47.747515
],
[
-117.390084,
47.74386
],
[
-117.395425,
47.743936
],
[
-117.395344,
47.736791
],
[
-117.379228,
47.736703
],
[
-117.378817,
47.718523
],
[
-117.373451,
47.718474
],
[
-117.373437,
47.71629
],
[
-117.371731,
47.716288999999996
],
[
-117.371719,
47.714923
],
[
-117.346835,
47.714953
],
[
-117.34685,
47.712142
],
[
-117.342569,
47.712165999999996
],
[
-117.342569,
47.71009
],
[
-117.346834,
47.710096
],
[
-117.346616,
47.700435999999996
],
[
-117.345365,
47.700441
],
[
-117.34501900000001,
47.702205
],
[
-117.341877,
47.702239999999996
],
[
-117.3412,
47.70039
],
[
-117.335094,
47.700432
],
[
-117.335125,
47.693422999999996
],
[
-117.333324,
47.693417
],
[
-117.333259,
47.691635999999995
],
[
-117.335763,
47.691641999999995
],
[
-117.335855,
47.689809
],
[
-117.345346,
47.689792
],
[
-117.345439,
47.686274999999995
],
[
-117.346677,
47.686268
],
[
-117.346855,
47.676227
],
[
-117.340596,
47.676657
],
[
-117.333236,
47.681286
],
[
-117.334515,
47.682545
],
[
-117.33381800000001,
47.683847
],
[
-117.33107,
47.686256
],
[
-117.326964,
47.686918999999996
],
[
-117.327015,
47.689771
],
[
-117.320004,
47.689631
],
[
-117.32001,
47.691289
],
[
-117.31487,
47.693242999999995
],
[
-117.303865,
47.693760999999995
],
[
-117.303904,
47.688674
],
[
-117.30934500000001,
47.688717
],
[
-117.309338,
47.685939999999995
],
[
-117.312144,
47.686046999999995
],
[
-117.312048,
47.682074
],
[
-117.325264,
47.678729999999995
],
[
-117.325318,
47.671167999999994
],
[
-117.346837,
47.666917
],
[
-117.347091,
47.622822
],
[
-117.33764099999999,
47.62444
],
[
-117.33764099999999,
47.622085
],
[
-117.340569,
47.62084
],
[
-117.338497,
47.620816
],
[
-117.33836,
47.616490999999996
],
[
-117.341359,
47.616496
],
[
-117.341449,
47.612894999999995
],
[
-117.346512,
47.612891999999995
],
[
-117.346258,
47.609296
],
[
-117.355752,
47.609345999999995
],
[
-117.355789,
47.607654
],
[
-117.357638,
47.607684
],
[
-117.357659,
47.605761
],
[
-117.395269,
47.605948
],
[
-117.394963,
47.602995
],
[
-117.389949,
47.602312
],
[
-117.388582,
47.598904
],
[
-117.393011,
47.596202999999996
],
[
-117.393919,
47.591336
],
[
-117.39938000000001,
47.587278
],
[
-117.431597,
47.5871
],
[
-117.431551,
47.590745999999996
],
[
-117.437479,
47.590744
],
[
-117.437426,
47.594358
],
[
-117.447288,
47.594373
],
[
-117.434679,
47.604293
],
[
-117.429914,
47.613752
],
[
-117.464607,
47.613887
],
[
-117.464763,
47.632065999999995
],
[
-117.472951,
47.632016
],
[
-117.472103,
47.637432999999994
],
[
-117.48119,
47.634527
],
[
-117.489516,
47.637817999999996
],
[
-117.5151,
47.613817999999995
],
[
-117.523312,
47.613673999999996
],
[
-117.545765,
47.608858999999995
],
[
-117.554121,
47.601723
],
[
-117.562142,
47.601842
],
[
-117.562022,
47.605140999999996
],
[
-117.564443,
47.604616
],
[
-117.564429,
47.60729
],
[
-117.561939,
47.607279999999996
],
[
-117.561899,
47.608366
],
[
-117.564421,
47.608376
],
[
-117.56442799999999,
47.610948
],
[
-117.567191,
47.610957
],
[
-117.567214,
47.609182
],
[
-117.56985399999999,
47.609227999999995
],
[
-117.56984800000001,
47.607338999999996
],
[
-117.57258999999999,
47.607363
],
[
-117.572599,
47.60554
],
[
-117.575259,
47.605553
],
[
-117.57527400000001,
47.602349
],
[
-117.580986,
47.60192
],
[
-117.580981,
47.605643
],
[
-117.585892,
47.605647999999995
],
[
-117.585902,
47.611461999999996
],
[
-117.580622,
47.611466
],
[
-117.580637,
47.613825
],
[
-117.604061,
47.613868
],
[
-117.604044,
47.615714
]
]
]
]
},
"type": "Feature",
"properties": {
"awater": 1991595,
"display_name": "Spokane, WA",
"simple_name": "Spokane",
"sumlevel": "160",
"population": 208040,
"full_geoid": "16000US5367000",
"aland": 178021482
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment