]> pere.pagekite.me Git - homepage.git/blob - blog/data/2011-04-29-fixmystreet.txt
Generated.
[homepage.git] / blog / data / 2011-04-29-fixmystreet.txt
1 Title: Initial notes on adding Open311 server API on FixMyStreet
2 Tags: english, fiksgatami, open311
3 Date: 2011-04-29 10:00
4
5 <p>The last few days I have spent some time trying to add support for
6 the <a href="http://www.open311.org/">Open311 API</a> in the
7 <a href="http://www.fiksgatami.no/">Norwegian FixMyStreet service</a>.
8 Earlier I believed Open311 would be a useful API to use to submit
9 reports to the municipalities, but when I noticed that the
10 <a href="http://fixmystreet.org.nz/">New Zealand version</a> of
11 FixMyStreet had implemented Open311 on the server side, it occurred to
12 me that this was a nice way to allow the public, press and
13 municipalities to do data mining directly in the FixMyStreet service.
14 Thus I went to work implementing the Open311 specification for
15 FixMyStreet. The implementation is not yet ready, but I am starting
16 to get a draft limping along. In the process, I have discovered a few
17 issues with the Open311 specification.</p>
18
19 <p>One obvious missing feature is the lack of natural language
20 handling in the specification. The specification seem to assume all
21 reports will be written in English, and do not provide a way for the
22 receiving end to specify which languages are understood there. To be
23 able to use the same client and submit to several Open311 receivers,
24 it would be useful to know which language to use when writing reports.
25 I believe the specification should be extended to allow the receivers
26 of problem reports to specify which language they accept, and the
27 submitter to specify which language the report is written in.
28 Language of a text can also be automatically guessed using statistical
29 methods, but for multi-lingual persons like myself, it is useful to
30 know which language to use when writing a problem report. I suspect
31 some lang=nb,nn kind of attribute would solve it.</p>
32
33 <p>A key part of the Open311 API is the list of services provided,
34 which is similar to the categories used by FixMyStreet. One issue I
35 run into is the need to specify both name and unique identifier for
36 each category. The specification do not state that the identifier
37 should be numeric, but all example implementations have used numbers
38 here. In FixMyStreet, there is no number associated with each
39 category. As the specification do not forbid it, I will use the name
40 as the unique identifier for now and see how open311 clients handle
41 it.</p>
42
43 <p>The report format in open311 and the report format in FixMyStreet
44 differ in a key part. FixMyStreet have a title and a description,
45 while Open311 only have a description and lack the title. I'm not
46 quite sure how to best handle this yet. When asking for a FixMyStreet
47 report in Open311 format, I just merge title an description into the
48 open311 description, but this is not going to work if the open311 API
49 should be used for submitting new reports to FixMyStreet.</p>
50
51 <p>The search feature in Open311 is missing a way to ask for problems
52 near a geographic location. I believe this is important if one is to
53 use Open311 as the query language for mobile units. The specification
54 should be extended to handle this, probably using some new lat=, lon=
55 and range= options.</p>
56
57 <p>The final challenge I see is that the FixMyStreet code handle
58 several administrations in one interface, while the Open311 API seem
59 to assume only one administration. For FixMyStreet, this mean a
60 report can be sent to several administrations, and the categories
61 available depend on the location of the problem. Not quite sure how
62 to best handle this. I've noticed
63 <a href="http://seeclickfix.com/open311/">SeeClickFix</a> added
64 latitude and longitude options to the services request, but it do not
65 solve the problem of what to return when no location is specified.
66 Will have to investigate this a bit more.</p>
67
68 <p>My distaste for web forums have kept me from bringing these issues
69 up with the open311 developer group. I really wish they had a email
70 list available via <a href="http://www.gmane.org/">Gmane</a> to use for
71 discussions instead of only
72 <a href="http://lists.open311.org/groups/discuss">a forum<a/>. Oh,
73 well. That will probably resolve itself, one way or another. I've
74 also tried visiting the IRC channel #open311 on FreeNode, but no-one
75 seem to reply to my questions there. This make me wonder if I just
76 fail to understand how the open311 community work. It sure do not
77 work like the free software project communities I am used to.</p>