GIS use in Agroecology

Every Tuesday afternoon you’ll find me taking a break from coding and heading over the hills of Hobart to the University of Tasmania in Sandy Bay, where I’m lucky enough to be enrolled in a graduate certificate program for Geographic Information Sciences.

Although still bogged down in the basics, my long-term goal is to learn more about how GIS is used by different groups pursuing sustainability. Two applications are particularly interesting to me: 1) energy-efficient building, since I’ve done a lot of work already in that area with Lawrence Berkeley National Labs, and 2) agroecology, because … well I just find it so intriguing.

As part of this term’s work, I’m putting together a literature review of papers that discuss some aspect of GIS use in agroecology. If you’re not familiar with Agroecology, it’s the application of ecology to agriculture, or more aptly put by Stephen R. Gliessman, “applying ecological concepts and principles to the design and management of systems of food production.”

Even as it balances many disparate fields and systems, Agroecology puts a premium on supporting small farmers and preserving accumulated knowledge from millennia of efforts to make edible things grow. So how does that jibe with advanced technology like GIS? How are forward-looking groups unifying old and new in their pursuit of sustainability?

It’s early on, but I’ve already found some interesting papers, some directly related, some indirectly through related fields like organic farming.

I’ll post more here as I develop a more thorough list.

Meanwhile I’ve sent a few notes into the ether looking for help on this question:

…curious to see if either of those services turn up interesting answers.

Utilizing Events from Open edX via

One of the nice things about Open edX is that it comes with built-in support.

And you immediately say to yourself “so what?”

Well here’s the benefit: if your intention is to use 3rd party tools to make use of the data that Open edX generates, say send some automated emails to users who enrolled in a course, you can use the events arriving through Segment and plug them into (in this case) services that do email automation, like Autopilot or You don’t need any custom code within Open edX, the events are already packaged and sent to

To enable Segment in Open edX, all you have to is set the appropriate EDXAPP variables in your ansible build (details on building Open edX are outside the scope of this blog post….ehh….to say the least.)

Open edX will then start sending relevant events to from both code inside the Django app as well as a Javascript tracker embedded in the actual web pages.

Let’s say you are interested in doing something when a user enrolls in a course. When a user enrolls, a ‘track’ event is sent to Segment from the emit_event method in the Open edX Student model. (See it here on line 1201 in edx-platform on github)

When it gets to it looks something like this:


Ok, so is just a data broker, so what now?

You’ve got to attach that event to something that can utilize it or make sense of it. In this case, we could use a service like Autopilot to send an automated email for this event. You can set up Autopilot to watch for events of type edx.course.enrollment.activated  and start your email workflows when you see it. Here’s a simple one I set up (gotta love that visual workflow designer) that just sends out a targeted message after the student enrolls:


Screenshot of 'enrolled in course' workflow in Autopilot


That workflow is pretty basic. You could probably hack it by just skipping Segment and adding code directly to the Student model in Open edX to sending a direct event to somebody like SendGrid. But that’s ugly, so maybe you could write a Django IDA to plug into Open edX. But that’s time intensive and another thing for you to manage. So, given the tools a proper email automation SaaS should provide (tagging, branching, etc.) you could do quite a bit of cool stuff with minimal effort using this approach. For example, send out a reminder 3 days after enrolling if the user hasn’t yet logged in again. Or direct the user to a questionnaire 3 days after the the ‘unenrolled’ event.

The problem with these nice, fancy, borne-from-the-minds-of-ecommerce-specialists applications is that they ccoooosssst. Every one you look at seems to charge $300/month upwards if you have anything near decent traffic. Now, if you get a big financial return from a 1% uptick in sales because people dig your personalized emails, you don’t care. But if you’re running a site like Open edX in a non-profit context and measure your success in terms of improved learning and more course content viewed, you do care!

Cost aside, it’s a pretty cool set up. and Autopilot have free accounts, and I was able to set up a working workflow in a matter of hours. So give it a go, but don’t forget to check out the monthly costs…they’re not cheap!