A retrospective of 15 years of data visualization projects
October 24th, 2024
4 min
Datawrapper lets you show your data as beautiful charts, maps or tables with a few clicks. Find out more about all the available visualization types.
Our mission is to help everyone communicate with data - from newsrooms to global enterprises, non-profits or public service.
We want to enable everyone to create beautiful charts, maps, and tables. New to data visualization? Or do you have specific questions about us? You'll find all the answers here.
Data vis best practices, news, and examples
250+ articles that explain how to use Datawrapper
Answers to common questions
An exchange place for Datawrapper visualizations
Attend and watch how to use Datawrapper best
Learn about available positions on our team
Our latest small and big improvements
Build your integration with Datawrapper's API
Get in touch with us – we're happy to help
This article is brought to you by Datawrapper, a data visualization tool for creating charts, maps, and tables. Learn more.
Hi, this is David with Datawrapper! For today’s Weekly Chart, I’d like to take a look at a new feature I’m very excited about: the ability to embed Datawrapper visualizations as web components.
If you’re an avid reader of Datawrapper’s blog, you might have already read yesterday’s announcement: There’s a new and improved way to embed Datawrapper visualizations.
For the longest time, Datawrapper (and most other tools that allow you to embed interactive content) has used iframes to embed into other websites. Iframes are very versatile, but they have one big disadvantage, and that is their performance. When using iframes, every single embed is essentially its own little website within your article or website. This provides a clear separation between the embed and the surrounding webpage. It has a drawback though: the more iframe embeds you include in your website, the more resources your browser has to load and display, which prolongs loading time and makes your website respond more slowly. “Resources” are the underlying bits of code that make up your website: the JavaScript, CSS, markup, and other data. Less resource use means a faster website, and faster is always better, so this is something we set out to improve.
With Datawrapper’s new web component embedding, this is turned on its head: rather than each embed bringing all its own resources with it, visualizations are able to share resources. This means, you can add more visualizations to a page while retaining great performance.
To test this, I created a dashboard of six visualizations, representing a typical election results page. Then, I measured the total page size of my dashboard after adding each visualization:
In this chart, the y-axis shows the total amount of data that needs to be transferred to display the webpage, and the x-axis represents the number of visualizations on the page. As you can see, as soon as you embed more than one chart, web components are already at a 30% advantage compared to iframes! This effect compounds when more embeds are added to a page.
All in all, we believe web components to be the future of rich embeds in websites, and encourage everyone to seek out alternatives to iframes to improve your website’s loading speed.
That’s it from me for this week! Next week, you’ll hear from our writer Rose again.
Comments