Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Analyzing the Eurovision Song Contest With Graphs

Posted on Jun 9 • Originally published at Memgraph.com After the 2020 Eurovision Song Contest was canceled, we are excited about this year's finals more than ever, but geeks among us can't just wait around doing nothing! Every year Eurovision brings us a fantastic mash-up of extravagant outfits, catchy songs, and bold dance moves. Underneath the surface of glitter and rainbows, there is a complicated story of geopolitics, rivalry, and tactics hidden in the collection of interconnected data. We will try to untangle strategic voting, neighbor preferences, and political rivalries with the help of graph analytics. Our dataset is quite simple. There are 51 Country nodes with the following properties: name, capital, lat, lng and flag. The properties lat and lng represent the coordinates of a country's capital city and will be important for visualizing the data on a map. The same is true for the flag property.Each year's winner and runner-up are connected to Winner and RunnerUp nodes, respectively, with an edge IS that contains the properties year and points.The Country nodes are connected with the BORDERS edge if they are neighboring countries.VOTE_JURY and VOTE_TELEVOTE edges have properties year and points. VOTE_JURY edges represent a number of points given by each country's professional jury, and VOTE_TELEVOTE edges represent the general public's vote that has been introduced in 1997. The voting system has been changed a few times so far but since 2009 the winner is determined by votes of the jury and public in an equal split.You can find the Eurovision song contest dataset in Memgraph Lab and on Memgraph Playground online. Memgraph Lab is an integrated development environment used to import data, develop, debug and profile database queries and visualize query results. Just go to the Datasets tab and load the Eurovision voting results dataset.Visualizing data in Memgraph is pretty simple. Memgraph Lab automatically detects nodes that have numerical lat and lng properties and displays them on a map. You can style the map to your liking by using the Style editor in Memgraph Lab. To find out more about the style editor, take a look at this tutorial.Each country node also has a flag property which is used to display an image. You can use the following styling script to display the flags on a map:To get your graph, run the following Cypher query:If everything works properly, you should get a visualization similar to the one below.Some countries have been more successful than others in producing good music (or keeping strong relationships with their neighbors). Let's check which country was the most victorious since 1975:Interestingly, Ireland and Sweden stay on top despite our dataset being incomplete.Coming in second on Eurovision is like nearly winning a medal at the Olympics. Let's check the biggest runner-ups of Eurovision:It seems that the UK is the most notable runner-up in history.But it's not all about winning! There is a special satisfaction in supporting your favorite song and casting a vote. Some countries were better than others in predicting a winner, or is it just that some have better taste? Let's check which countries gave the most points to the winners throughout history:But it turns out that it isn't a matter of good or bad taste. When we take a look at the list of countries that didn't give any points to winners over the years:The UK is again at the top of our list.So what's Eurovision voting really about? Is having a catchy song really what it takes to win, or is there more to it? Maybe similar languages or familiar cultures play a role. Let's check who fancies who by looking into which countries exchange the most points between each other:Relationships are symmetrical, so for every pair, there are two results. The number of points calculated is identical in both results, but countries switch places.It's not surprising that most love is exchanged between neighbors!Let's check how number of points from neighbors influenced the choice of winners over the years:Looks like France has amazing relationships with its neighbors. But is it about quality or quantity?First, let's find out who has the most neighbors participating in the competition:Seems like quantity wins in this case. France, Russia, and Germany have the largest number of neighbors and the most significant influence on their victories.Let's finish with a specific example of how much geographical location influences the vote. Russia was the winner in 2008, but how many points would it get if voting for neighbors were forbidden?That's a significant difference! There is a lot more to untangle and explore, but as the 2021 Grand Final is approaching, it's time to stop analyzing. After we find out this year's winner, we'll update the dataset and come back next year with new and more exciting analysis. Until then, for more interesting examples of how to use graph analytics to analyze network data, visit Memgraph Playground and check out one of the available tutorials. You can also download Memgraph Lab and try it out locally.Now relax and enjoy all things Eurovision!"Good night, Europe! And Good morning, Australia!"Templates let you quickly answer FAQs or store snippets for re-use. Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink. Hide child comments as well Confirm For further actions, you may consider blocking this person and/or reporting abuse Osamuyi - Feb 21 Rifki Andriyanto - Mar 3 Olaniyi Philip Ojeyinka - Mar 13 Wengao Ye - Mar 13 If you like Memgraph, visit our GitHub and become our Stargazer! 🙌 Once suspended, memgraph will not be able to comment or publish posts until their suspension is removed. Once unsuspended, memgraph will be able to comment and publish posts again. Once unpublished, all posts by memgraph will become hidden and only accessible to themselves. If memgraph is not suspended, they can still re-publish their posts from their dashboard. Note: Once unpublished, this post will become invisible to the public and only accessible to Memgraph. They can still re-publish the post if they are not suspended. Thanks for keeping DEV Community safe. Here is what you can do to flag memgraph: memgraph consistently posts content that violates DEV Community's code of conduct because it is harassing, offensive or spammy. Unflagging memgraph will restore default visibility to their posts. DEV Community — A constructive and inclusive social network for software developers. With you every step of your journey. Built on Forem — the open source software that powers DEV and other inclusive communities.Made with love and Ruby on Rails. DEV Community © 2016 - 2023. We're a place where coders share, stay up-to-date and grow their careers.



This post first appeared on VedVyas Articles, please read the originial post: here

Share the post

Analyzing the Eurovision Song Contest With Graphs

×

Subscribe to Vedvyas Articles

Get updates delivered right to your inbox!

Thank you for your subscription

×