We’re waiting longer than ever for our favorite TV shows to return
November 28th, 2024
2 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.
This is Hans, a software engineer at Datawrapper, and the person who works a lot on our locator map feature. For this week’s edition of the Weekly Chart, I created an automatically updating weather map that shows the latest weather predictions.
This summer, I often check the upcoming weather using the service of the German Meteorological Service (DWD) to plan trips. I noticed that the website has a open data portal which also offers weather predictions for the upcoming days. This encouraged me to make my own weather map using a Datawrapper locator map. No matter when you’re reading this, here is the weather in Germany for tomorrow:
It shows similar information as the German weather map from DWD’s website:
I started recreating the map (with fewer locations) in the locator map editor. Conveniently, locator maps offer a variety of weather icons out of the box. I also gave the temperature markers colors that indicate the temperature. To show the date of the map, I used a marker with a text box.
But this is not a normal locator map. Creating a weather map for a single day would be pointless – it would be outdated by the time the blog post would have been published. So I wrote a script (scraper) that extracts the most recent weather data from the DWD data portal. You can find it on GitHub and adapt it if you like. There are also many weather stations available outside of Germany.
I then parsed that data to make it work with locator maps and displayed it on the map. Here’s how:
Using an external source for a locator map is currently not officially supported, so the steps are a little complicated – but doable. To create a map that uses the most recent weather predictions, you will
a) probably have to write a script that extracts data from a website or downloads it from somewhere, and you will
b) need to write a script that parses your data in a way that it works with locator maps.
You’ll need basic programming skills to do this. Here are the steps in detail:
We’re thinking of making these steps more convenient for you, so if you find it useful to use external data for your locator map, let us know – either below in the comments or at support@datawrapper.de. See you next week with a Weekly Chart from our support engineer Aya!
Comments