Open Source FTW!

For some time, I’ve been frustrated with the lack of social spaces for developers to work together on map-related projects here in Portland. There are language-specific meetups, and there are definitely people hacking on spatial projects at those, but it’s in the context of the programming language, not the field of geospatial tech. I have also long been fascinated with the pedagogical issues of teaching developers about geographic principles and geographers about computer programming. I began wondering: is there a place for a meetup like this in Portland?

At some point during this thought process, I discovered MaptimeSF, a weekly map hack night run by a few of the excellent folks over at Stamen in San Francsico. I heard that there were a couple similar groups popping up around the country, so I decided to get in contact about starting one in Portland. Thus was born MaptimePDX.

This past weekend was WhereCampPDX, which seemed like the perfect time to hold the inaugural MaptimePDX event. In addition to hosting an open hack for anyone who was interested in joining us, I prepared a little exercise I’ve been wanting to write for a while. It’s called Learn GeoJSON, and its goal is to teach about the principles and ideas of git, GitHub, and GeoJSON without having to lead beginners through dealing with (a) code and (b) the command line. You can view the slides I used for my presentation here.

The basic idea is to use GitHub as a collaboration tool for building crowd-sourced geographic (GeoJSON) datasets with the help of the excellent Essentially, users fork the original (my) repo, open their desired geojson files using (which gives them the option of clicking back and forth between a table-based format and GeoJSON format — hooray unintentional learning tools!), add some points visually, commit to their repo, and make a pull request back to the original repo. (Further information and more detailed instructions are available on the README in the GitHub repo. I also intend on writing a blog post about it once it’s totally done, so look out for that.) It actually went pretty smoothly up to that point, which was awesome!

Then I turned back to the projector to show an example of merging a pull request, seeing as I had about ten of them at that point, and lo and behold…

Every pull request had a merge conflict! I got super frustrated, asked the group to talk amongst themselves, and investigated a little bit. When I checked the diff, this is what I saw:

Every feature in the dataset was on the same line! JavaScript doesn’t care about line breaks, so this is definitely acceptable and is totally still valid GeoJSON, but makes it near impossible for use with this collaboration technique I was preaching. I didn’t even notice it beforehand, because it appears to be line broken in

A conundrum, to be certain. I thought to myself, “Ugh, I can’t believe I didn’t figure this out ahead of time. How could I screw this up so badly?” It wasn’t a pretty scene.

But fortunately, I was surrounded by a few of the great geo hackers I had been so eager to recruit to MaptimePDX. And they said, “You know, is an open source project. We can just add some code to implement line breaks, make a pull request, and see if it gets merged!”

So they did. And less than an hour later…

It was merged! Mele checked it afterwards, and it totally works:

Now, save for having to resolve the conflicts with each of the commits made pre-prettifying, this exercise will work completely smoothly in the future. I can’t wait to present it again.

This is a long story.

But everyone has one of these stories — stories that make them realize what’s been right in front of them the whole time. And this is mine: open source is the future. I’m hooked. I’m completely and totally hooked. I think Mele put it best:

Let’s contribute to all the things!

Non sequiturs: Sometime soon I’ll write a more in-depth post discussing the Learn GeoJSON exercise, how it works, what needs to be added to it, and how it may solve some of the pedagogical problems with getting geographers into tech. On a similar note, I hosted an unconference session at WhereCampPDX about geospatial pedagogy that yielded an interesting discussion. I’ll write about that here, too.