New forum feature: preview & embed Our World in Data charts
By EdMathieu, JP Addison🔸 @ 2022-03-31T07:41 (+90)
You can now integrate Our World in Data charts much more easily into forum posts. These new features work with any of our interactive charts – their URLs look like this:
https://ourworldindata.org/grapher/[name-of-the-chart]
Previews on hover
If you add a link to an OWID chart in your text, a preview window will automatically appear when readers hover over it. For example, here's the yearly number of deaths from malaria by age since 1990.
Embedded charts
If you want to make a chart visible directly in your post, you can simply paste the URL and an embedded version of the chart should automatically appear. Here, for example, I'm pasting this:
https://ourworldindata.org/grapher/cost-of-sequencing-a-full-human-genome
to show this:
Note that when you make changes to an interactive chart on OWID (e.g. choosing a time window, selecting countries, switching to a different scale), your configuration is saved in the URL. Starting from this chart of primary energy from nuclear, I can make a line chart for G7 countries, and copy the resulting URL from my browser:
https://ourworldindata.org/grapher/nuclear-primary-energy?tab=chart&country=FRA~DEU~USA~GBR~ITA~JPN~CAN
which I can paste here to embed this:
Many thanks to Adam Binks for coming up with this idea at EAGx Oxford!
Miranda_Zhang @ 2022-03-31T11:38 (+7)
This is slick, thank you! I don't use OWiD charts in my posts, but I might now that there's this feature.
isabel @ 2022-04-22T00:46 (+4)
drafting a post which uses this feature, and I'm a bit disappointed in terms of how much smaller the map is compared to using the downloaded figure from the OWiD. I think it would be better if the map were took up more of the available width.
Michael Huang @ 2022-04-03T02:13 (+3)
Great feature! Just wondering whether Our World in Data charts can be embedded into Substack and Ghost in a similar way.
lennart @ 2022-04-05T16:58 (+5)
You can implement them easily in Ghost by using the HTML embed. You find this when you click on the bottom right corner the share button and click "embed".
Michael Huang @ 2022-04-07T04:35 (+1)
Thanks very much!
Greg_Colbourn @ 2022-04-01T08:55 (+2)
How does it work with data explorers? e.g. https://ourworldindata.org/explorers/coronavirus-data-explorer
EdMathieu @ 2022-04-01T09:38 (+3)
The current implementation doesn't include them. I guess it would be possible to do it, but they're quite larger than Grapher charts in terms of interface, so I'm not sure we would manage to find a user-friendly way to make them fit within the width of a forum post.
isabel @ 2022-04-01T06:44 (+2)
Love this feature! Very excited to use this in my next post.
Max Ghenis @ 2024-05-05T14:18 (+1)
Are there plans to support OWID's explorer charts? For example this one doesn't render:
https://ourworldindata.org/explorers/poverty-explorer?tab=chart&time=latest&facet=none&country=USA~AUS~AUT~BEL~CAN~CHL~COL~CRI~CZE~DNK~EST~FIN~FRA~DEU~GRC~HUN~ISL~IRL~ISR~ITA~JPN~LVA~LTU~LUX~MEX~NLD~NOR~POL~PRT~SVK~KOR~SVN~SWE~CHE~ESP~TUR~GBR~OWID_WRL&Indicator=Income+or+consumption+of+the+poorest+10%25&Poverty+line=%242.15+per+day%3A+International+Poverty+Line&Household+survey+data+type=Show+data+from+both+income+and+consumption+surveys&Show+breaks+between+less+comparable+surveys=false
Screenshot:
JP Addison @ 2024-05-06T21:28 (+3)
I'll write down the request. I tried previewing what it would look like and it's not perfect
so we'd probably need OWID to make a dedicated preview page.