Mapping prototypes - MediaWiki
The DFM wiki is currently a semi-public space for meeting minutes, guidelines, reports, and other materials that are being migrated from OneDrive. We hope to promote this application in the next stage of the project as a collaborative workspace.
This memo provides some notes on mapping options in the DFM wiki.
Extensions
There are two robust mapping extensions that work in MediaWiki – “Maps” and “Kartographer” – but neither of these is necessarily ideal for our use case scenario.
- Kartographer works but is not supported outside Wikimedia projects; third-party access to the Wikimedia tile server has recently been disabled, and support for other tile servers is incomplete (the markers don’t work with OSM, for example). Moreover, the Visual Editor interface supports the simple creation of very basic maps but more complex visualizations require editing GeoJSON and/or SPARQL queries, which is well beyond the level of technical proficiency of anyone in our research teams.
- The “Maps” extension works well enough, though it also only supports basic marker points and manually-drawn shapes unless you are able to edit GeoJSON.
Geographic data in unstructured wiki pages
Given that we anticipate mixed data to be presented in reports uploaded to the wiki, it would be desirable to prioritize the querying of tabular data in unstructured datasets, as opposed to the implementation of an interface that requires manual translation of the research data into a new database. If warranted by efficiency gains, we could anticipate a data-mining tool or module that extracts data contained within these unstructured data sources and stores it in a database, potentially triggered on each page save.
It is easy enough to pull tabular data out of pages on the DFM wiki on demand, and to create consolidated data tables, using the MediaWiki API. In fact we already have a basic python CGI script that does this, implemented to query project monitoring data tables across multiple pages, where the tables have arbitrary headings in common (e.g., "team name", "deliverable", "date", "status"). We could do something similar with geographic data, possibly by creating an html form that:
- queries a set of manually listed wiki pages (or all pages in a specified category),
- filters the data in html tables contained within those pages according to parameters supplied by the user (e.g., only data rows mentioning “fish paste” AND “Cambodia”),
- creates a map based on layout parameters supplied in the form, and
- stores a copy of the map in a cache, which will be returned next time the same query is given.
If we want something a bit more high-level, we could dispense with the MediaWiki API and simply extract data from arbitrary documents that are accessible on the web, by parsing html tables.