Extension:OurWorldInData
Appearance
OurWorldInData Release status: stable |
|
---|---|
Implementation | Tag |
Description | Embed visualizations from OurWorldInData inside of wiki pages |
Author(s) | Skizzerztalk |
Latest version | 1.1.0 (2022-09-05) |
Compatibility policy | Snapshots releases along with MediaWiki. Master is not backward compatible. |
MediaWiki | 1.37+ |
PHP | 7.3+ |
Database changes | No |
License | GNU General Public License 3.0 or later |
Download | |
Example | https://mdwiki.org |
|
|
Quarterly downloads | 0 |
Translate the OurWorldInData extension if it is available at translatewiki.net | |
Issues | Open tasks · Report a bug |
Embed interactive visualizations from OurWorldInData into your wiki pages.
Installation
[edit]- Download and move the extracted
OurWorldInData
folder to yourextensions/
directory.
Developers and code contributors should install the extension from Git instead, using:cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/OurWorldInData - Add the following code at the bottom of your LocalSettings.php file:
wfLoadExtension( 'OurWorldInData' );
- Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
Configuration
[edit]By default, the extension will pull data directly from ourworldindata.org by embedding it as a web-page. A mirrored version of OurWorldInData more amenable to embedding in wiki pages is available at https://owidm.wmcloud.org/. To make use of this mirror, add the following to your LocalSettings.php after the wfLoadExtension call:
$wgOurWorldInDataUrl = 'https://owidm.wmcloud.org/grapher/$1';
Usage
[edit]This extension adds a new parser tag, <ourworldindata>
. Place the chart name inside of the tag. Additional parameters can be used to adjust how the chart is displayed.
- Specify a chart name directly:
<ourworldindata>historic-and-un-pop-projections-by-age</ourworldindata>
- Filter parameters can be added to the tag:
<ourworldindata time="1950..2020">historic-and-un-pop-projections-by-age</ourworldindata>
You can use TemplateStyles to further style the generated <iframe>
by targeting iframe.owid-frame
in your CSS.