In [9]:
# With the release of IPython 6 (coming April 2017), there's a GeoJSON display class that allows you to visualize GeoJSON data quickly.
# from IPython.display import GeoJSON
# In the meantime...
from IPython.display import display
def GeoJSON(data, **kwargs):
    bundle = {
        'application/geo+json': data,
        'text/plain': '<IPython.display.GeoJSON object>'
    }
    metadata = {
        'application/geo+json': kwargs
    }
    display(bundle, metadata=metadata, raw=True)

In [10]:
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 [11]:
GeoJSON(data)


<IPython.display.GeoJSON object>

In [8]:
GeoJSON(data={
    "type": "Feature",
    "geometry": {
        "type": "Point",
        "coordinates": [11.8, -45.04]
    }
}, url_template="http://s3-eu-west-1.amazonaws.com/whereonmars.cartodb.net/{basemap_id}/{z}/{x}/{y}.png", 
layer_options={
    "basemap_id": "mola-color",
    "attribution" : "NASA/MOLA",
    "tms": True,
    "minZoom" : 0,
    "maxZoom" : 6
})


<IPython.display.GeoJSON object>

In [ ]: