geojson



In [1]:
import IPython
import json

def geojson(data):
  bundle = {}
  bundle['application/geo+json'] = data
  IPython.display.display(bundle, raw=True)

In [2]:
data = {"type":"FeatureCollection","features":[{"type":"Feature","properties":{"place":"The coffee bar","login":"espresso","lat":"38.91427","lon":"-77.02827"},"geometry":{"type":"Point","coordinates":[-77.02827,38.91427]}},{"type":"Feature","properties":{"place":"Bistro Bohem","login":"2027355895","lat":"38.91538","lon":"-77.02013"},"geometry":{"type":"Point","coordinates":[-77.02013,38.91538]}},{"type":"Feature","properties":{"place":"Black Cat","login":"luckycat","lat":"38.91458","lon":"-77.03155"},"geometry":{"type":"Point","coordinates":[-77.03155,38.91458]}},{"type":"Feature","properties":{"place":"Snap","login":"nutella1","lat":"38.92239","lon":"-77.04227"},"geometry":{"type":"Point","coordinates":[-77.04227,38.92239]}},{"type":"Feature","properties":{"place":"Columbia Heights Coffee","login":"FAIRTRADE1","lat":"38.93222","lon":"-77.02854"},"geometry":{"type":"Point","coordinates":[-77.02854,38.93222]}},{"type":"Feature","properties":{"place":"Azi's Cafe","login":"sunny","lat":"38.90842","lon":"-77.02419"},"geometry":{"type":"Point","coordinates":[-77.02419,38.90842]}},{"type":"Feature","properties":{"place":"Blind Dog Cafe","login":"baxtercantsee","lat":"38.91931","lon":"-77.02518"},"geometry":{"type":"Point","coordinates":[-77.02518,38.91931]}},{"type":"Feature","properties":{"place":"Le Caprice","login":"baguette","lat":"38.93260","lon":"-77.03304"},"geometry":{"type":"Point","coordinates":[-77.03304,38.9326]}},{"type":"Feature","properties":{"place":"Filter","login":"","lat":"38.91368","lon":"-77.04509"},"geometry":{"type":"Point","coordinates":[-77.04509,38.91368]}},{"type":"Feature","properties":{"place":"Peregrine","login":"espresso","lat":"38.88516","lon":"-76.99656"},"geometry":{"type":"Point","coordinates":[-76.99656,38.88516]}},{"type":"Feature","properties":{"place":"Tryst","login":"coupetnt","lat":"38.921894","lon":"-77.042438"},"geometry":{"type":"Point","coordinates":[-77.042438,38.921894]}},{"type":"Feature","properties":{"place":"The Coupe","login":"voteforus","lat":"38.93206","lon":"-77.02821"},"geometry":{"type":"Point","coordinates":[-77.02821,38.93206]}},{"type":"Feature","properties":{"place":"Big Bear Cafe","login":"","lat":"38.91275","lon":"-77.01239"},"geometry":{"type":"Point","coordinates":[-77.01239,38.91275]}}]}

In [3]:
geojson(data)