Problem statement: How to use Open 311 and Ushahidi together:
Random Hacks of Kindness
Philip Ashlock issued this problem definition for RHOK - a global hackathon. This is the activity plus code:
Problem listed on Rhok: http://www.rhok.org/problems/ushahidi-open311-georeport-api-integration
https://github.com/rgrp/pybossa-geodemo
https://twitter.com/#!/rufuspollock/statuses/143095584650305536
https://github.com/rgrp/pybossa-geodemo
http://okfn.org/members/rgrp
http://okfnpad.org/rhok-dec-2011
http://i.imgur.com/Zw4Mr.jpg
Code for America and Open Plans Activity
Courtesy of Philip Ashlock
Open311 API integration is possible with Ushahidi as a server, but not as a plugin so in addition to completing full support for the spec, the main work that needs to be done there is to properly integrate it with the codebase, as a plugin or otherwise. Here are examples of some of the API methods:
- http://ushahidi.georeport.org/georeport/v2/services.xml
- http://ushahidi.georeport.org/georeport/v2/services/3.xml
- http://ushahidi.georeport.org/georeport/v2/requests.xml
For viewing reports from the Ushahidi DB through the GeoReport API
http://svn.ashlock.us/public/georeport_ushahidi/v2/codeigniter/app/views/reports_xml.php
For posting reports through the GeoReport API to the Ushahidi DB
http://svn.ashlock.us/public/georeport_ushahidi/v2/codeigniter/app/controllers/reports.php
As you'd expect, you can view and checkout the rest of that via svn at http://svn.ashlock.us/public/georeport_ushahidi/v2/
These are live at http://ushahidi.georeport.org/georeport/v2/
eg:
http://ushahidi.georeport.org/georeport/v2/requests.xml
Prototype by Nicholas Doiron:
http://ushahidi.phpfogapp.com/
- When you add a report, it POSTs to Open311 with this format: http://wiki.open311.org/GeoReport_v2_docs#POST_Service_Request - I might need to add fields such as <status>open</status> for it to work well with Open311.
- Data from the Ushahidi API, such as http://ushahidi.phpfogapp.com/api?task=incidents&resp=xml , are in this format: http://wiki.open311.org/GeoReport_v2_docs#GET_Service_Requests I'm not sure how to set up the official Open311 RESTful API. JSON is also available http://ushahidi.phpfogapp.com/api?task=incidents
- "Open311 enabled" appears on the front page
- Other changes to the front page design come from a separate plugin
Updated March 11, 2012:
- Nicholas added new properties to OpenPlans Ushahidi / 311 mash-up: it now includes each report's title, verified/unverified status, closed/active status, and a media URL, if it has one: http://ushahidi.phpfogapp.com/v2/requests.xml he also added support to output JSON: http://ushahidi.phpfogapp.com/v2/requests.json
The combined code is on https://github.com/mapmeld/Open311-Plugin-for-Ushahidi
Tim Kochanski - Google summer of code
http://socghop.appspot.com/gsoc/project/google/gsoc2011/tskochanski/11001