Embed Limn visualizations in Mediawiki
JavaScript PHP
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
modules
.gitignore
LICENSE
Limn.i18n.magic.php
Limn.i18n.php
Limn.php
Limn_body.php
README.md

README.md

Limn MediaWiki Extension

A MediaWiki extension to embed Limn visualizations via wikitext. Limn aims to further democratize data exploration by providing a backend-agnostic GUI for building visualizations without need of programming skills, pairing nicely with the open content tools provided by MediaWiki.

This extension is a work in progress! It was created as a prototype at a recent hackathon; kindly pardon the mess while things get smoothed out.

WikiText API

The embedding API is provided via a tag and a parser function which have identical functionality:

  • Function: {{#graph:<GRAPH_ID>|<OPTION_KEY>=<OPTION_VAL>|...}}
  • Tag: <graph graph-id="<GRAPH_ID>" <OPTION_KEY>="<OPTION_VAL>" ... />

These both add Limn to the page, and instruct it to render the graph with the given GRAPH_ID at the location of the call. The graph definition and data will be pulled from an existing Limn server configured via the extension (see below).

Currently, all options are a TODO, but the plan is to support:

  • width, height -- Set the size of the graph container.
  • float={none | left | right } -- Float the graph container in surrounding text.

Installation

Install into mediawiki/extensions/Limn, and then load the extension in your configuration file (LocalSettings.php or whatever):

require_once( "$IP/extensions/Limn/Limn.php" );
$wgLimnServerBase = 'http://dev-reportcard.wmflabs.org/';
$wgLimnDataRemoteMode = 'proxy';

Given the above, the extension would expect a Limn server running at http://dev-reportcard.wmflabs.org/ with proxy enabled for fetching remote data-files.

Configuration

Much like API options, most configuration is aspirational.

Ext Var Limn Conf Type Default Description
$wgLimnServerBase server.base URL Required Sever URL prefix, used to load resources and data files.
$wgLimnDataRemoteMode data.remoteMode proxy, cors, error error Handling for remote datafiles: use Limn Proxy, assume CORS, or show an error.
$wgLimnDataLazy data.lazy Boolean false TODO Renderables wait until render to load required resources (self, datasources, datafiles, etc); implies render.lazy.
$wgLimnRenderLazy render.lazy Boolean false TODO Renderables wait until visible and scrolled into viewport before rendering. If data.lazy is false, resources will still be pre-loaded.

Feedback

Find a bug or want to contribute? Open a ticket (or fork the source!) on github. You're also welcome to send me email at dsc@less.ly.

License

Limn Mediawiki extension was written by David Schoonover. It is open-source software and freely available under the MIT License.