Fun with GitHub's map tools

2015-01-18 2 min read

    After discovering GitHub’s map visualization feature I needed to give it a shot on the only GPS dataset I had available, my runs from RunKeeper. Unfortunately, the RunKeeper files were in GPX while GitHub expects either geoson or topjson. A short Python script later and I was able to convert the GPX data into geojson. The other hiccup I encountered was that the generated geojson file was too large for GitHub to visualize. My 232 runs contained 162,071 latitude/longitude pairs which turned into a 4MB file - not massive but large enough for GitHub to refuse to visualize it. The simplest solution was to generate multiple files but that made it impossible to see all my runs on a single map. The other solution was to see if converting to topojson would reduce the file size. That helped but I wasn’t able to find the right balance between compression and quality and ended up with a hybrid approach - two files, one per running year, each in topojson.

    The entire process was painless and quick. The geojson format was straightforward to generate and GitHub does a great job rendering it. The entire process took an hour and I had to read the topojson utility docs to figure out how simplification worked. One thing I didn’t get to do was explore GitHub’s map diffs but will try to in the next couple of weeks.