Mapping GeoJSON On Github

By Matt Stiles | | Topics: Social Media

I’ve been hoping to tinker with Github’s new mapping service since the company announced it earlier this month. Turns out it’s quite easy. You just commit a GeoJSON file to your repo, and voilà.

The points on this simple map represents the location of each car2go I’ve rented (excluding those in Austin, Texas). Surprise, they’re mostly clustered in our neighborhood:

car2go locations

This is a simple as it gets. The service also allows other data types, like polygons, for example. Tomorrow I’ll try a more interesting data set, maybe DC property parcels or 311 calls locations. And I’ll experiment with the Github docs to see how I can customize the icons and design. We’ll see…

BTW: Github is using MapBox to create its custom map base layer. Read more about that here. And thanks to my co-worker, Chris Groskopf, whose csvkit suite makes it super easy to convert basic data files into GeoJSON.

4 thoughts on “Mapping GeoJSON On Github

  1. You should also try converting some government shapefiles (or shapefiles, say, from the World Bank database) using the GDAL tool. The command looks like:
    ogr2ogr -f geoJSON outfile.json infile.shp
    Works like a charm. You can make some nifty maps that way. I’ve been looking for an excuse to integrate MapBox (or plain Leaflet, the library on which it’s based) into one of my journalistic projects. It’s such a flexible tool, and makes lovely maps.

    1. I’m a big fan of GDAL, which is great for quickly converting/editing shapefiles. Thanks for your comment!

      1. I was pretty sure I wasn’t telling you anything you didn’t know, but thought I’d mention it just the same. Speaking of great projects, I’ve recently been hacking on the nprapps Flask-based app-template on github. It’s pretty sweet. I’m probably going to strip out the branding and use it to kickstart a future data project. Don’t know if you were involved with that oersonally, but if so, great work! Good on you guys to give back to the open source news community.

        1. Cool. Let us know if you publish something with the template. Our team will be geeked to see it.

Leave a Reply to Matc Lajoie Cancel reply

Your email address will not be published. Required fields are marked *