I was very encouraged by Friday's phone call about creating interfaces
and widgets for the Social Entrepreneur API. I'd very much like to be
part of a community that shares resources to develop interfaces which
help social entrepreneurs and all manner of "independent thinkers".
I created a PHP page:
http://www.worknets.org/software/entrepreneurs/
for accessing search results from the Social Entrepreneur API. The
source code is here:
http://www.worknets.org/software/entrepreneurs/source.txt
just rename it index.php, put it in any directory and it should work if
you have PHP version 5.2 or higher. Please let me know if it does or
doesn't!
Peter pointed me to the JSON output of the API. We can call this output
by entering a url such as
http://search.socialentrepreneurapi.org/entrepreneurs.json?q=water
where in this example our search term is "water". This returns a file
with the search results. PHP has a way to get the contents of a file
gotten from the web, see my function get_include_contents.
JSON is a data format that is like XML only simpler to parse. Each
record is surrounded by curly brackets { } and there may be subbrackets
within that. A list of records is delimited by commas "," and placed
within square brackets [ ]. So in my program I take off the square
brackets. Then I go through each character one by one, counting the
number of left hand curly brackets and the number of right hand curly
brackets that I encounter. Usually there are more left hand than right
hand brackets but when they are balanced then I know that I have come to
the end of a record. In this way I note where to separate out the records.
PHP version 5.2 and higher has a built-in program json_decode for
decoding the JSON record. This yields an array for each record. Then I
can go through the array and look for each field. Some fields
(categories, site, tags, profile, connections) have multiple values so I
run through the values. ("site" is singular but maybe it should be
made plural?) I also placed the photo, name and description at the top
so that they look nice enough.
A next step would be to place the results in a nice way. I imagine that
what would be useful would be to output the data as HTML with lots of
classes and/or ids which stylesheets can display as needed. We can make
some basic stylesheets and then people can make more as needed.
I spent about 3 hours learning about JSON and making this page. Of
course, it's easy to work for 3 hours and have nothing to show for it.
So this is an example where it's more efficient just to do some work and
have something to show, rather than spend a lot of time guessing. And
we can help each other as needed and able.
I would be very happy if you might award me $1,000 with the intent that
I do as much as I can in the course of a month and keep sharing my
results and getting your feedback and priorities what to do next. My
work is in the Public Domain and others can build on it, too.
John asked that we write about our technical skills.
My main technical strength is to develop simple web tools that help us
connect the dots in our efforts to help concrete individuals.
For example, we use ProWiki to keep lists of our values, endeavors,
tasks, dreams and so on:
http://www.worknets.org/wiki.cgi?Values
http://www.worknets.org/wiki.cgi?Endeavors
http://www.worknets.org/wiki.cgi?Tasks
http://www.worknets.org/wiki.cgi?Dreams
If we add the relevant metadata (like * Value = ... ) on a wiki page,
then it ends up in the list. Our wiki acts like a database that is
rather easy to extend as needed.
Now we want to monitor and link those in a more sophisticated way,
especially organized around our list of Tasks. We have a chat room
http://www.worknets.org/chat/ where I'm training Fred Kayiwa of Uganda
to help with our tasks and train others as well. He can do quite a lot
for $100 per month. I want to make it easier to monitor our work and
how it relates to our tasks. This will be like a lightweight task
management system.
So today I created a way to list our wiki pages by type (such as Person,
Endeavor, Global Village, Event, and so on):
http://www.worknets.org/software/show.php
What's happening is that every five minutes our server is checking the
free form metadata at our wiki and pumping it into a MySQL database.
Today I created routines which distinguish as relevant those pages which
users have given some kind of metadata, and infers from that metadata,
what kind of page it is. (For example, if it has a DeepestValue= then
it's a Person, but if it has an EventSummary= then it's an Event). So
now I can make various simple or complex views of lists of our wiki
pages. For example, here is our calendar:
http://www.worknets.org/software/calendar.php
We're using a wiki and the advantage is that we have a lot more
flexibility for our work then if we had a set-in-stone
one-or-two-or-three-sizes-fits-all content-management-system or
social-networking-system. The disadvantage is that it takes a long time
to learn how to use a wiki, it's like writing on a blank piece of
paper. So we're traning online assistants and we're building interfaces
on our wiki that will, in time, let certain pages be more structured,
easy to fill out, like a form.
Other parts of our system include our Yahoo groups. We read the RSS
feeds and then merge the output so we can follow what's happening in
various groups, see: http://www.ms.lt We also have customized our chat
room so that people can see from our various pages whether anybody is
chatting, and we can see from our chat room whether anybody is active at
our wiki. We can also tweet from our chat room. These are simple bits
but they work together.
I use a variety of technologies:
* PHP as simplest for web pages
* sometimes in combination with MySQL databases
* Perl for manipulating files, and it's also what ProWiki uses
* Carp, software for managing RSS feeds, I would look for alternatives
* XML for accessing data, but it's painful and JSON seems a smart
alternative
* SVG for maps and diagrams
* CSS for display, but it's tedious and I try to avoid it
* JavaScript for client side functionality, but it's nasty and I try to
avoid it
* ImageMagick for creating or manipulating images programatically
* Microsoft Access which was great but it's not open source so it's a
mental ghetto
* Microsoft Excel as spreadsheets can be useful for storing tabular data
and content
* I have also worked with Python which is nice but I would use for more
conceptual work, like manipulating lists
* I would avoid any content management system. I have worked with Drupal
and Plone and they (and all of them) are designed for configuration but
not customization, and it's the latter that makes for websites that
support organic activity that I seek to support.
I am interested to:
* develop my PHP page further so that it provides access to the data for
display by stylesheets
* create stylesheets to layout the search results for particular
websites that wish to show them
* get to know various environments like Facebook, Ning, etc. and create
related widgets
* make PHP pages and other tools for organizers to manage their own
personal lists of social entrepreneurs, so that such data can be
collected and shareed in a distributed fashion
* extend functionality to support other projects like John's My Action
Map and locations
* pursue ideas that build further on the Social Entrepreneur API
capabilities, both the search results and the data format
I'm glad that Wael al Saad has joined us here! I'm also wondering what's
the practical way to deal with location information. Often
longitude-latitude don't quite tell the story. Partly because some
people don't want to give exact information, they might let people know
they are in London, but not exactly where. So how do you indicate the
margin of error? So it seems more relevant for my lab's purposes to
indicate our own set of locations and who we associate (or
self-associate) with them, and then attach longitude-latitude to the
latter, but not to people directly. And a person can care about several
locations including ones where they've never been. So it's interesting
what's the practical way to work with that. Here's an example from our
Pyramid of Peace that worked well:
http://www.worknets.org/wiki.cgi?HelpKenyans and see our related map
http://www.pyramidofpeace.net/map.php
I look forward to Thursday's call! and also tomorrow's developers' call
with John and Zachary.
Andrius
Andrius Kulikauskas
Minciu Sodas
http://www.ms.lt
m...@ms.lt
+370 699 30003