Extension:OurWorldInDataMirror
This page is currently a draft.
|
![]() Release status: beta |
|
---|---|
Implementation | Tag |
Description | Embed visualizations from OurWorldInDataMirror inside of wiki pages |
Latest version | 1.0.0 (2022-02-24) |
Compatibility policy | Master maintains backward compatibility. |
MediaWiki | 1.37+ |
PHP | 7.3+ |
Database changes | No |
License | GNU General Public License 3.0 or later |
Download | GitHub: Note: |
Example | https://mdwiki.org |
Embed interactive visualizations from OurWorldInDataMirror into your wiki pages.
Installation[edit]
- Download and place the file(s) in a directory called
OurWorldInDataMirror
in yourextensions/
folder. - Add the following code at the bottom of your LocalSettings.php:
wfLoadExtension( 'OurWorldInDataMirror' );
Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
Usage[edit]
This extension adds a new parser tag, <ourworldindatamirror>
. Place the chart name or OurWorldInDataMirror URL inside of the tag. Additional parameters can be used to adjust how the chart is displayed.
- Copy/paste the share link into the page:
<ourworldindatamirror>https://ourworldindata.org/grapher/historic-and-un-pop-projections-by-age</ourworldindatamirror>
- The share link may include parameters to filter the chart:
<ourworldindatamirror>https://ourworldindata.org/grapher/historic-and-un-pop-projections-by-age?time=1950..2020</ourworldindatamirror>
- Specify a chart name directly:
<ourworldindatamirror>historic-and-un-pop-projections-by-age</ourworldindatamirror>
- Filter parameters can be added to the tag:
<ourworldindatamirror time="1950..2020">historic-and-un-pop-projections-by-age</ourworldindatamirror>
You can use TemplateStyles to further style the generated <iframe>
by targeting iframe.owid-frame
in your CSS.