Take a look at a demonstration webapp at nlytx.io/2016/metacognition. This was written for the research paper Towards the Discovery of Learner Metacognition From Reflective Writing and is soon to appear in the Journal of Learning Analytics. The software was originally demoed at ALASI 15. The server-side code is a REST API written in Scala using Finagle/Finch and Factorie. The Client-side is coded in TypeScript using Angular, and d3.js. This webapp is open source. The API code is available from my GitHub (AndrewResearch) page.