Who’s accountable?

This is another “inspiration” I submitted to the 2013 Knight News Challenge. The original post is here.

Your block has been skipped in trash pickup for the last month! The air conditioning in your child’s public school building doesn’t work very well! Details about entitlement benefits are changing or confusing but you’re not sure who to ask!

There has been awesome progress for helping people identify their elected officials based on geopgrahic boundaries, or reporting issues that are a government’s responsibility, but there is still a gap in identifying the individuals or entities within a structure of governance that are responsible for specific services or information. This creates a frustrating lack of responsiveness, real or perceived, to civic concerns.

Can technology be used to visualize and query boundaries of civic accountability around services, programs, issues or problems in the same way that we can with geographic boundaries? Can this be done in a way that is open, scalable and deployable across government and civic entities?

Published
Categorized as Civics, Ideas

Overflow at civic meetings doesn’t have to mean silence

This is an “inspiration” that I posted as part of the 2013 Knight News Challenge.  The original post is here.

Public meetings are a fundamental means of civic participation in the United States.  However, in cities like Chicago, meetings can be notoriously overcrowded causing participants to have to wait in line, sit in overflow areas or be locked out. In other cases, public comment can be monopolized or sidetracked by a few outspoken participants or tensions (or real threats) can intimidate people from speaking publicly. Economic mobility, physical ability, childcare needs and differences in language can also impede participation in public comment.

Digital technologies offer an opportunity for officials, advocates and journalists to enage people in public comment in real-time, in a physical place, or to connect participants across barries of geography, ability and time.  They also offer a parallel means of public comment that can act as a sort of A/B test for existing forms of public comment. Who participates through digital parallels who doesn’t in the big room of a civic forum? What topics, questions or concerns are surfaced through digital parallels that aren’t raised at the microphone? In this way, communities deploying digital technologies for forum participation don’t aim to replace time-honored methods of civic engagement, but instead gather insight into ways to improve in-person events.

Published
Categorized as Civics, Ideas

Running jasmine tests with jasmine-jquery HTML fixtures in Google Chrome

I use Jasmine to test the Backbone code for the software behind Floodlight. My Handlebars templates for the Backbone views are in a separate file, included by the Django templates, which allows me to use the same templates when testing the Backbone views. To load the Handlebars templates for the Jasmine tests, I use the jasmine-jquery library.

This was working fine for me in Firefox, but I found that the tests were failing in Chrome.

It seems that the reason for this is that Chrome, by default, prevents JavaScript from loading local files. You can override this by starting Chrome with the --allow-file-access-from-files switch. This is the command that I run from my shell in Ubuntu:

google-chrome --allow-file-access-from-file

Here is the issue that describes this behavior and where I found the workaround. I found it through this blog post.

Fracking in Illinois

Today I read Fracking industry draws closer in Illinois.

It seems like the energy industry’s case is:

  • There’s no clean energy. Fracking can be safely regulated.
  • This will create jobs in Illinois

In evaluating these things, I wonder:

  • Has fracking been in practice long enough to evaluate long term impacts?
  • How do early estimates of negative impacts and regulation to address this of established energy extraction techniques (off-shore drilling seems like a good example) match with the realities we’ve seen since the technology was introduced?
  • How long will the jobs created by fracking in Illinois exist? How long have they existed in other communities?  Will these jobs disappear in a manner similar to auto-industry jobs in the rust belt. Do places with low unemployment exist because they have have a single large industry that employs a lot of people or a mesh of industries with pathways for people to move to other types of work when one employer dries up?
  • How do you quantify the cost of unemployment vs. being employed in a dangerous or environmentally toxic job?

Floodlight

Floodlight is a web-based platform for telling community stories from people, places and organizations around the Denver metropolitan area.  The project was originally supported by The Piton Foundation and funded in part by a grant received as part of the Knight Foundation Community Information Challenge.

Role

Lead developer

Details

Since many of the stories told on Floodlight are about work being done in particular Denver, Colorado neighborhoods, authors needed to be able to tag their stories with boundary geographies (cities, neighborhoods, zip codes) or provide addresses of specific places, which are automatically geocoded and associated with boundary geographies.

For this project, I relied on the excellent spatial data support of the PostGIS database and abstractions offered by the Django Frameworks ORM to implement a data model and create scripts to easily load new boundary geographies from shapefiles and define their relationships with other boundaries.

Users searching for stories in their community can use a faceted browsing interface that not only filters based on address and boundary geography, but also other taxonomies.  In order to integrate these different types of filters, I used the Solr search server.  On the front end, the Backbone framework provides an interface to the faceted browse and the Leaflet mapping library is used to display boundary geographies and story markers based on the user’s filters.

The application is powered by a RESTful API that is consumed by a Backbone-based story builder.

In addition to the web platform, the project also included a great capacity-building component.  Team members conducted “story raising” events that trained community members in different digital storytelling skills and a “story navigator” worked with community groups to discover and tell stories using the platform.

More Information

Screenshots

Home_Floodlight_-_2014-01-15_22.07.30

Explore_Floodlight_Floodlight_-_2014-01-15_22.11.14

Floodlight_Why_Stories_Matter_A_Reflection_on_the_Denver_Camping_Ban_and_the_Conversation_around_Homelessness_-_2014-01-15_22.14.54

Escaping attribute selectors in LESS

I had a really rough time finding any documentation about how to do this.  To escape attribute selectors in LESS, you have to escape the selector and wrap the escaped string in parenthesis:

(~"[data-wysihtml5-command]") {
  text-decoration: none;
}

Offline map tiles in QGIS

Participatory Mapping Station

I was invited to run a station at a DiscoTech event sponsored by the Detroit Digital Justice Coalition (DDJC). DiscoTechs are community technology fairs, and are a really great model for sharing tech knowledge within and across communities. The DDJC has released a zine with stories and bootstrap practices so other groups can run their own DiscoTech events. While previous events had been held in somewhat central locations, this DiscoTech was held at a community center in the 48217 neighborhood at the edge of Detroit and home to a strong community of environmental justice activists who are part of the DDJC.

However, the recreation center where the event was located didn’t have Internet access. This posed a bit of a problem for our station, as we wanted to have people both create analog maps of their community using paper and transparency sheets with dry-erase markers, and digital ones. I chose Quantum GIS (QGIS) as the tool to make digital maps, because it could work on my notebook without any Internet connection. I’ve used the excellent OpenLayers QGIS Plugin to provide slippy map tiles from Open Street Map as a layer in QGIS, but this wouldn’t work without an Internet connection. My solution was to essentially run a full mapping stack on my notebook computer. This was surprisingly straightforward, and helped me better understand how the pieces of a modern custom mapping stack work together.

Make your tiles

First, I had to get the raw data from which to generate my tiles. I grabbed an extract of the Detroit Metro Area from the OpenStreetMap Metro Extracts page since we were just making maps of Detroit and selecting a subset of the map data would save a lot of time when rendering the tiles.

There are lots of ways to make map tiles, but TileMill is pretty easy to use, and very powerful. MapBox, the makers of TileMill also provide a template project called OSM Bright, which they describe as “a sensible starting point for quickly making beautiful maps in TileMill based on an OpenStreetMap database.” To get a basic set of tiles for Detroit, I just followed the OSM Bright quickstart tutorial to generate the tiles I needed.

TileMill lets you export your tiles in a number of different formats, but I chose the MBTiles format because I liked the idea of all of my tiles being packaged in a single file. It just seemed more portable in case I wanted to move my project to a separate machine.

Serve your tiles

There are also many different ways to serve your custom tiles. This tutorial provides a good rundown of one method of building a server, using Mapnik to generate the tiles. However, I wanted something really lightweight, and something that would use tiles in the MBTiles format. I found TileStache, which I liked because it was written in Python, had its own built-in webserver, and supported MBTiles. Because it supports a wide variety of datasources, the configuration seemed a bit daunting at first, but was ultimately pretty simple, at least for using an MBTiles tileset.

.

This is what my tilestache.xml looked like:


    
        http://127.0.0.1:8000/${z}/${x}/${y}.png
    
    
        -20037508.34
        20037508.34
        20037508.34
        -20037508.34
        18
        1
        1
        top
    
    EPSG:900913
    256
    256
    3
    

And this is what my tilestache.cfg (the file that configures the datasource) looked like:

{
  "cache": {"name": "Test"},
  "layers": {
    "detroit": {
      "provider": {
        "name": "mbtiles",
        "tileset": "detroit2.mbtiles"
      }
    }      
  }
}

Add your tiles as a layer in QGIS

Update: I originally hacked the OpenLayers plugin as described below, but Nathan and David Forest pointed out in the comments that there’s a less hacky way.

GDAL > 1.7.0 supports the Tiled Map Service (TMS) format that we’re serving using to serve our tiles in Tilestache.  You can create a VRT file as described in this blog post, How to display OpenStreetMap data tiles with no plugin inside Qgis and add your tiles as a raster layer.

Hack the OpenLayers QGIS Plugin

The last step is to get the QGIS OpenLayers Plugin to use my local tileserver instead of grabbing them from the OSM tile server over the web. There’s definitely more elegant ways of doing this, but I needed to get this to work fast, so I simply edited the osm.html file that is part of the plugin. On my system, this file was located at ~/.qgis/python/plugins/openlayers/html/osm.html. I edited the file so that around line 33 of the file

, I replaced the tile URL string “http://tile.openstreetmap.org/${z}/${x}/${y}.png” with “http://127.0.0.1:8000/${z}/${x}/${y}.png”, the ServerUrl directive from my tilestache.xml.

After editing this file and starting QGIS, I was able to choose “Add OpenStreetMap layer” from the “Plugins > OpenLayers plugin” menu in QGIS to add a base layer of my custom tileset.

Public schools + artist studios, music practice spaces and startup offices

Chicago is filled with grand neighborhood school architecture, but the infrastructure doesn’t always match up with current population demographics.  Schools may be closed due to low enrollment or converted to charter magnets, or if open, have large portions of the building unused.

Schools have space and Internet connections and are often only used during school hours. Schools could rent unused space at an affordable cost to artists needing studios, musicians needing practice space, or startups needing offices.  This tenancy would provide a new dimension of connection between public schools and their neighborhoods, particularly in the case of magnet cluster schools where the student body comes largely from outside the neighborhood.  Bringing more people into the schools on a regular basis offers the opportunity for resource sharing or leveraging the tenants for mentorship or cocurricular activities.  Though these relationships could be formalized, it would be an awesome experiment to see what kind of relationships evolve organically just from sharing space.

Beatbox

This was built by me and a few of the other Knight Scholars in my cohort at the Medill School at a hackathon sponsored by The Media Consortium. It’s an SMS alert system designed for block clubs.

The repo is on GitHub.

From the README:

BeatBox is a mobile application to help neighborhood watch groups in cities like Chicago share information about public safety incidents. Users sign up as part of a beat and send alerts via SMS or mobile web. A “beat leader” then receives the alert and can choose to forward it on to other users in the beat.

It was created over the course of one weekend at The Media Consortium’s Mobile Hackathon by Shane Shifflett, Steve Melendez, Geoff Hing and Chris Keller. Bernie Leung created a prototype for an Android app based on BeatBox.

Shane Shifflett came up with the idea after reporting about muggings in Chicago’s Chinatown neighborhood. He found that even though there was a community that was tightly knit and concerned about neighborhood safety but, because of language barriers, was unwilling to notify police, or waited hours to find an English speaker before reporting the incident. BeatBox lets neighbors share alerts in real time and saves documentation to show the police at beat meetings.

Some important features and design principles

  • Accessible technology: We want lots of different communities including lots of different people to be able to use this with the technology they have. Our initial prototype works through both SMS and mobile web.
  • Don’t freak out!: Too often neighborhood safety alerts create more gossip or fear instead of useful information or community. This app prioritizes small chunks of useful information and generates data as a starting point for conversations with neighbors, police, politicians and other community stakeholders. All alerts are moderated by a human to try use community judgment to decide which information is important to share in real time

Different communities

This app could be used both by communities with strong neighborhood watch groups and a working relationship with the police and communities that are less cohesive or have a different relationship with the police.

Communities who are concerned about safety but are worried about profiling or harassment could use the system for community-based responses to safety.

Published
Categorized as Projects

Curry Crawl

The Curry Crawl Uhaul, photo from the IDEO Labs blog

Last year, while working as a contractor for Food Genius, I got to build a mobile web app that consumed their new API of restaurant POIs and dish suggestions. The app tried to aggregate the ratings of Indian food dishes and make suggestions for the next dish as we drove around the Loop and West Town neighborhoods in a “reverse food truck”. Our collaborators at IDEO, where Food Genius had a residency, decked out a Uhaul like an Indian restaurant.

This was one of my first experiences writing a mobile web-app, dealing with OAuth and consuming an emerging API. I wrote the app using Python’s Flask framework and used Twitter’s Bootstrap (and its responsive features) to quickly prototype the UI. The biggest takeaway from the event was how delighted passersby were to experience the weirdness of people dining in the back of a truck. I also liked making a technology where individuals interacted with their personal devices to drive a collective experience. Often, interaction with devices, particularly around food and dining take people away from the collective experience, rather than feeding back into it.

The folks at IDEO wrote about the event on the IDEO labs blog.

Published
Categorized as Projects