December 06, 2005

Creating Graphs

Posted at December 6, 2005 11:07 AM in CaseWiki , MediaWiki .

I want to create an extension for MediaWiki that will all users to create graphs of data. I'm not talking about simple relationship graphs, as exist with Category:People, but instead graphs that depict data. I would like a line graph of the cost of tuition over the years to be an easy thing to make. So, the big question is: how do you faciliate to creation of these graphs to the average user?

Ideally, everything would be a web form. This is out of the question, as forms and MediaWiki do not play well together. Instead, I have to resort to some kind of markup to describe the graph. For instance, if you look at Category:University Presidents, you will see markup that describes a timeline. Likewise, it is possible to embed Graphviz markup in articles to render Graphviz graphs. So, I'm looking at some kind of a markup language.

Do readers think that a graph markup language is something that could be understood by others? Are there any graph markup languages in existence? I just need something plain and simple. You specify the type of graph, labels, axis scale, and data points. I was thinking about something like the following:

bar {
  title = Cost of Tuition at Case
  xtitle = Year
  ytitle = Total Tuition Cost ($)
  
  data {
    (1993, 15200)
    (1994, 15700)
    (1995, 16300)
    (1996, 17100)
    (1997, 17800)
    (1998, 18400)
    (1999, 19200)
    (2000, 20100)
    (2001, 21000)
    (2002, 22500)
    (2003, 24100)
    (2004, 26500)
  }
}

This would be the most basic example. You specify a plot type, some labels, and your data, and the graph gets generated for you. Of course, there could be other options that you can set, but those would be optional. I plan on using JpGrah, so the possibilities for graphs are almost endless. The problem is encapsulating everything in a markup language without exposing the user to PHP function calls.

If anyone could provide your opinion on this endeavor, it would be much appreciated.

Trackback

You can ping this entry by using http://blog.case.edu/gps10/mt-tb.cgi/4564 .

Comments

That markup seems pretty transparent to me, but I'm the wrong person to ask about such things.

Posted by Andrew Witte at December 6, 2005 11:40 AM

Post a comment










Remember personal info?