I heard you bet? Python to predict which team will win the championship! Don't be a rumor! A little bet is a pleasant affair!

Source: Internet
Author: User

The dataset contains data columns with the following information:

    • Date
    • Home Name
    • Visiting name
    • Home team goal number (excluding penalty)
    • Number of away goals (excluding penalty)
    • Types of Competitions
    • The city where the competition is
    • Countries in which the competition is located
    • Whether neutral

The results are as follows:

Get data on all World Cup matches (including qualifiers)

World Cup record analysis (including qualifiers)

In the past, the 5 most powerful teams in the history of the World Cup were Germany, Argentina, Brazil, France and Spain.

Next, we will expand the range to include World Cup qualifiers, and analyze the match between 5 teams.

The results are as follows:

Below, focus on the 5 teams, in the World Cup, 22 against the outcome of the situation.

First, customize two functions to get the number of winning fields for both teams and customize the drawing function, as follows:

The results are as follows:

Statistical phenomenon 1:

The number of wins in the World Cup is as follows (without a tie):

Brazil 1:1 Germany, Brazil 6:3 Argentina, Brazil 1:2 France, Brazil 3:1 Spain

Brazil team, win or lose a bad judgment ...

Germany vs 3 Other teams

The code is similar to part 2.1, with the following results:

Argentina 2:0 France, Argentina 1:0 Spain

But Argentina lost to Brazil and Germany.

Spain vs France

Since 2014, the record of all competitions has been compared

First of all, time selection 2014 years later (including 2014 years), the time is relatively close to the present, relatively speaking, the team's composition changes smaller.

Of course, the time selection here has an impact on the results. We can discuss the impact of this factor.

Overview of all teams ' wins and losers since 2014:

From the perspective of 2014, Mexico, France, Germany, Portugal, Brazil, Belgium, South Korea and Spain have been performing relatively well.

Is the result a little different from the imaginary? The June 17 group competition, Germany lost to Mexico, it seems that there is no reason for all.

However, this time we should mainly consider the 32-strong between the match, so as to reflect the reality of the situation.

Since 2014 32 strong each other at an overview of all competitions:

From the point of view, since 2014, Brazil, France, Portugal, Argentina, Mexico, Belgium, Germany, Spain, the United Kingdom are top 9.

Let's analyze the winning and losing situation between Top 9:

When the friendlies are removed, Top 9 is as follows:

As can be seen in the overview, whether to eliminate the friendlies (friendly), the ranking still has an impact.

In addition, after excluding friendlies, the total number of games is less (only 13 games), some teams between the top 9 no game, or have not won, the data used to analyze the role of more limited.

Of course, it should be debatable whether a friendly match should be removed from the analysis.

Top nine 22 vs. the outcome of the situation overview

Here, we follow the analysis of the use of data containing friendlies, to analyze the 9 between the 22 against the situation, to see which team winning higher.

Start by customizing several functions to facilitate analysis. Customize to get the team a year to date win ratio function:

In the above diagram, the x-axis represents a year-to-date (data set containing part 2018 of the game data), the outcome of the two teams.

For example, 2012 corresponds to Germany and Brazil from 2012 to the present, the outcome of the two teams. Therefore, the earlier the time, the greater the number of games between the two teams, the data curve may be less volatile.

Using the above function can quickly analyze the historical outcome of the two teams, of course, some teams, meet very little, or have not encountered in recent years, the analysis may not be good use.

Of course, the data analysis is only a historical situation, football is round, the field is changing rapidly. Argentina, for example, is now in a precarious Messines.

Forecast

    • This World Cup is really upset too much: Italy, Holland, not even in the group game
    • Argentina, it can be said that it is now half cold
    • German team, if not the last of the lore, also almost can send a cool cold, but now see the most

Finally, to put on my God's predictions. The Dark Horse has, this year is particularly much, forecast is not allowed, wait for PIA Pia face.

Special Note: The above data analysis, purely personal learning, the forecast results and the actual situation may be a large deviation, can not be used for other purposes. You can play on the line Oh!

Incoming group: 125240963 to get dozens of sets of PDFs. If you need source code also please enter the group!

I heard you bet? Python to predict which team will win the championship! Don't be a rumor! A little bet is a pleasant affair!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.