Visualising the Worldwide Win Percentage of the Hungarian National Football Team

I've often read the advice that side projects should be solving problems or answering questions that you yourself are interested in. To that end, I've always wanted to know how well the Hungarian national team have done against various countries worldwide and to explore this question, I scraped the matches played by the Hungarian national team and made an interactive world map.

This post originally appeared on my blog in 2017

I've often read, and agreed with, the advice that side projects should be solving problems or answering questions that you yourself are interested in.

To that end, I've always wanted to know how well the Hungarian national team have done against various countries worldwide. Hungary has a glorious football past, although the last 30 years have been possibly the worst ever decades in Hungarian football.

To explore this question, I scraped a dataset of all matches played by the Hungarian national team since 1907, aggregated it and made an interactive world map.

I'll start with the final map, and you can read about some of the details beneath.

Hungarian National Team worldwide win percentage
The worldwide win percentage of the national team

There is an interactive version where you can zoom and hover over each country to find out more. I encourage you to look at it if you want to dive into the data and explore. 

The Details

The Data

I scraped the data from the wonderful http://www.magyarfutball.hu which is a great resource for those with the very niche interest in Hungarian football. The data was unsurprisingly in Hungarian so I also had to translate it!

There is a Jupyter notebook for the scraping code and the final dataset is also available.

The Map

My last experiment making a choropleth map was missing some features I'd have liked to add, such as more interactivity. The library I used, folium, is still under development so for this project I tried something new.

Introducing plot.ly!

It's a great visualisation toolkit with a Python wrapper. It is much easier to make interactive choropleths with it, I specifically used this set of tutorials. The ability to customise the hover label meant I could make a much more useful visualisation, which you can explore.

There is a Jupyter notebook where I aggregated the data, dealt with countries that don't exist anymore (the USSR, Yugoslavia, etc.) and made the final map

About David

I'm a freelance data scientist consultant and educator with an MSc. in Data Science and a background in software and web development. My previous roles have been a range of data science, software development, team management and software architecting jobs.

Related articles tagged Projects

Analysis: Is Alan Davies Getting Better at QI?

Projects

I was watching a later series of QI recently and couldn't help but notice that Alan Davies was winning quite a few episodes. That prompted me to ask the question: is Alan Davies getting better at QI?

Visualising the Worldwide Win Percentage of the Hungarian National Football Team

Projects

I've often read the advice that side projects should be solving problems or answering questions that you yourself are interested in. To that end, I've always wanted to know how well the Hungarian national team have done against various countries worldwide and to explore this question, I scraped the matches played by the Hungarian national team and made an interactive world map.

The World Map of the 2016 FIFA Awards

Projects

A mini project to visualise the votes for the 2016 FIFA Awards, to see which country voted for which player.

Contact me

The best way to get in touch with me is to email me at hello@davidasboth.com

I'm also on LinkedIn and Bluesky

Join my newsletter

Subscribe to get my latest articles by email and updates on my book and the podcast.

    I won't send you spam. Unsubscribe at any time.