Was this page helpful?

Integrating MindTouch with Sunlight Foundation APIs

    DEMAND ACCOUNTABILITY - The following is an easy to install and configure set of MindTouch extensions and a tutorial replete with examples that demonstrate how you can use MindTouch with the Sunlight Foundation's Sunlight Labs and Capitol Words APIs. extensions with MindTouch. Why does this matter? Now it does not take programming skills to create sophisticated reports on our legislators. Now it's very easy to mashup and remix data from Sunlight Foundation with hundreds of MindTouch pre-packaged web services from Google, Microsoft, Yahoo!, Amazon as well as tens of thousands of widgets from dozens of providers. In short, with MindTouch and these new extensions pretty much anyone can shine powerful cleansing rays of sunlight into the legislative process <teehee, excuse the cheesy pun>. And of course, you can do this even with the free and open MindTouch core; so, download now and get cracking!

    Installing the Extensions

    Installing the XML extensions into your MindTouch environment takes seconds (alternatively, if you'd like to try the extensions right now, feel free to register here at our Developer Site and give them a go).

    First, download the XML extension files:

    Next, upload the files to your own MindTouch installation. In the Control Panel, click on Extensions, and click on the Add Script link. Use either Sunlight Labs or Capitol Words as the name. For the manifest, use the URL for the XML extension files you just uploaded. If you are installing the Sunlight Labs extension, you will need to obtain a free API key from Sunlight here. Click "Add Key", and create a key with the name api-key and the use the API key for the value. Click Edit Extension, and you're ready to go!

     

    Using the Extensions

    Using the extensions to gather information is easy. Now the ability to retrieve government data and use it is only a few clicks away.

    To access them via the Extension Manager, click the Extensions button, and scroll down to either the Capitol Words or Sunlight Labs extension.

    button.png

     

     

    Choose the desired function, and enter the requisite data, and click "Insert Extension".

    extmanager.png

     

    The Dekiscript (MindTouch's scripting language for mashing-up data from Deki, extensions, and virtually any XML/JSON web-service, more on that here) needed to invoke the extension is automatically generated; users don't have to know programming at all to use this! Click Save, Depending upon the method chosen, MindTouch will automatically go out to retrieve the data and return it in either a key/value map, or formatted as a table.

    save.png

     

    This particular method will return a list of words in key/value map format, showing the top 5 words, their wordcount, and the date:

    return value could not convert from 'xml' to 'list' (click for details)

    This is interesting, but the individuals and entities will really be able to bring the "power to the people" when they use that data and create mashups to make the data pertinent to them; users can now quickly and easily generate sophisticated reports, meaningful dashboards,

     

     

     

     

     

    Complete Profile Page

    This template shows an example of retrieving information from the Sunlight Labs API, and using that information to reach out to other APIs (such as Capitol Words, Google, and even Twitter) to create useful and up-to-the-second info data displays. This profile template was also demonstrated in a workshop presented by MindTouch at the Government 2.0 Camp.

    Template call:

    {{ template.profile{lastname: "boxer"} }}

    missing value for parameter 'bioguideId' (index 0) (click for details)

    's DC Office

    videos

    's Profile

    Website:
    missing value for parameter 'uri' (index 0) (click for details)
    Phone:

    on Twitter

    in the News

     

     

    Was this page helpful?
    Tag page

    Files 6

    FileVersionSizeModified 
    Viewing 1 of 1 comments: view all
    Are we moving this to a more logical location under extensions or tutorials? If we move the page, let's make sure we do so with the appropriate MindTouch page rewrite.
    Posted 19:04, 30 Mar 2009
    Viewing 1 of 1 comments: view all
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by