Knowledge Forum API: A demo

2014-06-06

Knowledge Forum (KF) has been recognized as the founding software in the computer-supported collaborative learning (CSCL) community. And it was also one of the earliest to offer embedded analytic tools for formative assessment. Thanks to contributions from a broad international community, a number of analytic tools have been developed for KF, including a suite of embedded applets (e.g., Contributions, Social Networks, Semantic Overlap, Vocabulary Growth, and Lexical Analysis; see Teplovs et al., 2007), a standalone Analytic Toolkit (ATK, Burtis, 1998), and more recently, a few independent analytic tools such as Idea Thread Mapper and Knowledge Building Discourse Explorer. Underlying these development projects is a fundamental emphasis of knowledge building—the theory and pedagogy behind Knowledge Forum—on “embedded, concurrent, transformative assessment” for continual idea improvement. Thus, both the spirits and practice of learning analytics are present within the established line of knowledge building research.

Despite such a strong presence of learning analytics, I have a few complains about the way those analytic tools have been developed. First, developing an embedded analytic applet for the old KF is not a trivial task. Because an applet (written in Java Swing) uses the same communication mechanism as the core KF client, writing it requires a certain level of familiarity with the core KF codebase. This situation makes prototyping new tools especially difficult. Second, the condition for developing those independent analytic tools such as Idea Thread Mapper is not ideal either. Such work requires similar familiarity with KF development stack, and thus demands direct support from the core engineering team. Moreover, because teams in our distributed international community tend to favor a variety of different development stacks (relation vs. non-relation databases, for instance), plenty of redundant efforts have been made to retrieve KF data. We definitely need a more agile and standard way to make KF data accessible.

So when developing the next-generation Knowledge Forum, I have been advocating for an open Knowledge Forum API. Thanks to our engineer team’s hard work, such an API is finally taking shape. It is currently being used to develop an iPad version of KF. Because of my interests in learning analytics, I am especially interested in building a new technological framework for KF analytics. In this post, I am going to demo the API in R, a statistical programming language widely used by data scientists, to demonstrate how analytics could be compiled using the new API.

Note: The API is in its preliminary stage. So any suggestion will be appreciated.

Setup

I’ve written an R wrapper for the KF API to make it easier to work with the API in R. This library currently depends on two R packages: RCurl—to make HTTP calls to the API, and jsonlite—to parse JSON objects returned by the API.

After loading the API library functions, you would need to create a ‘curl handle’ that will be shared by all API calls.

{% highlight r %}
source(“kf-api-lib.R”) # load the function library

Create a curl handle that will be shared among API calls

curl = CreateCurlHandle()
{% endhighlight %}

User authentication

After the server and login information is configured, user authentication can be done with one line of code. The results of authentication contain information about which sections (or knowledge-building communities) I’m currently registered in.

And then, I can further find out the overlap between the community’s and my own top terms.

intersect(myFreqTerms, freqTerms)

## [1] "design" "need" "note" "view" "will"

Future work

As a researcher interested in learning analytic tools, I am personally very excited about this API. As shown in this demo, it makes prototyping in R extremely easy. Using rApache or Shiny, we could further turn prototypes into analytic tools that can be seamlessly integrated within the new KF. Of course, you could choose to access the API in other languages such as Python and Java as well.

However, the API is still in its preliminary stage. More work needs to be done to make user clicklog accessible. Meanwhile, it should also support posting data backwards to KF.

In this year’s Knowledge Building Summer Institute in Quebec City, I will be leading a knowledge building analytics workshop to further discuss the design of this API. Other broader issues related to epistemological, ethical, and technological aspects of knowledge building analytics will also be explored. Stay tuned.