Flights during a storm

This vizualization took way more time than I expected. The idea came up on 29th June, when I was sitting in Microsoft’s office right next to the airport in Warsaw. The storm during that afternoon was huge. I immediately checked flightradar24 to see, what the airtraffic looks like. I wondered what it would look like if plotted with the clouds and maps. Fastforward 3(!) months and here it is:

You will find the detailed explaination below.

1. Flight data

I have conducted quite an extensive research and decided that Flightradar’s data is the most reliable, so I took out my credit card and started the trial. From the website I picked the flights and downloaded csv with columns: Timestamp, UTC, Callsign, Position, Altitude ,Speed, Direction. All the files that I used can be found here.

The main issue with the data was the fact that the time between observations(rows) was not constant. To give you an example: during the take off or landing you would have around 10 observations per minute, while on the cruising attitude 1, maybe 2 per minute. I had to interpolate the “missing” observations’ coords basing on the condition that the change between two observations was linear.

The code that I used to prepare the data was following:

2. Map and clouds

I received the cloud data from radar-opadow and its team got it from IMGW – a polish institution. The files are available here. These picutres need to be reprojected using proj4. The process is explained here. This was the slowest part and I ended up taking screenshots of the htmls I created (not proud of that). That left me with dozen pictures, which would be later used as the backgrounds of the plot. The example html with clouds overlay can be found here (click save as).

3. Plotting
At the beginning I was aiming to create an animated plot and write it into a gif, but I could not find a way to change the background with the animation. As a solution to the problem, I have decided to create a loop that will produce frames. The code is below:


This code produced 476 frames that later were made into a mp4 video. Initially I wanted to use python to create it, but my experiments left me with files of 500+ MB. This is why I decided to hand those over to my friend, who is a Photoshop pro. He managed to create a much lighter mp4 file.

What do you think? I will be happy to get any kind of feedback! Those are my baby steps in Python, so probably everything could be done better 🙂


Leave a Reply

Your email address will not be published. Required fields are marked *