android 西班牙_分析西班牙足球联赛(西甲)

android 西班牙

The Spanish football league commonly known as La Liga is the first national football league in Spain, being one of the most popular professional sports leagues in the world. It was founded in 1929 and has been held every year since then with the exception of the period (1936–1939) due to the Spanish Civil War. At his foundation, it only consisted of 10 teams. Currently, it is made up of 20 teams quite evenly spread across the country but mainly from the most developed regions: Madrid, Barcelona, and Basque Country. The top four teams are qualified for the Champions League while the three lowest placed teams (positions 18–20) are relegated to the second division. As in most European countries, the winner of the game gets three points and both teams get 1 point if they draw.

西班牙足球联赛俗称西甲联赛,是西班牙第一个国家足球联赛,是世界上最受欢迎的职业体育联赛之一。 它成立于1929年,此后每年举办一次,但由于西班牙内战时期(1936年至1939年)除外。 在他的基础上,它仅由10个团队组成。 目前,它由20个团队组成,分布在全国各地,但主要来自最发达的地区:马德里,巴塞罗那和巴斯克地区。 排名前四的球队有资格参加欧洲冠军联赛,而排名最低的三支球队(排名18–20)则降级为第二组。 与大多数欧洲国家一样,比赛的获胜者获得3分,两队如果平局,则获得1分。

This article is a journey through the history of the Spanish league. Analyzing historical data (all classifications from 1929 until 2020), we will be able to answer many questions about La Liga. What teams nearly won La Liga? Do referees favor Real Madrid and Barcelona? Is La Liga becoming too soft? When did Barcelona and Real Madrid’s hegemony start? Since when is Barcelona catching up Real Madrid?

本文是西班牙联赛历史上的一次旅程。 分析历史数据(从1929年到2020年的所有分类),我们将能够回答有关西甲的许多问题。 哪些球队几乎赢得了西甲冠军? 裁判喜欢皇家马德里和巴塞罗那吗? 西甲会变得太软吗? 巴塞罗那和皇马的霸权何时开始? 巴塞罗那什么时候开始追赶皇家马德里?

Let’s get started 💜

让我们开始吧💜

Web数据提取 (Web data extraction)

The historical data of La Liga (from 1929 until 2020) was scraped from Bdfutbol.com. This website contains national and international football rankings.

西甲(1929年至2020年)的历史数据来自Bdfutbol.com。 该网站包含国内和国际足球排名。

To scrape the data, we have used BeautifulSoup which is a popular Python library for extracting information from an HTML page. After obtaining all the data, we have stored it in a Pandas data frame for further processing.

为了抓取数据,我们使用了BeautifulSoup,这是一个流行的Python库,用于从HTML页面提取信息。 获取所有数据后,我们将其存储在Pandas数据框中以进行进一步处理。

The programming code used in this analysis is available here. You can take a look at it as you read the article.

此分析中使用的编程代码可在此处获得。 阅读本文时,您可以对其进行查看。

数据清理 (Data Cleaning)

Data Cleaning is the process of transforming raw data into a standardized form that can easily be analyzed with data analytics tools. In this particular case, before analyzing the data using Pandas, we have performed multiple cleaning operations. We have removed unnecessary columns and renamed the remaining ones using English terms (remember that data was scraped from a Spanish website). During the exploratory data analysis, we have noticed that in some cases multiple names were used to refer to the same football team. Over the years, some football teams have changed their names obligated in most cases by law. For instance, during the Spanish Second Republic (1931–1939) was not allowed to use the royal symbols. As a consequence, many football teams modified their names which contained the word ‘Real’ (Royal in English) to avoid being convicted for praising the monarchy. Real Madrid was not only renamed just Madrid but also lost the crown of his shield. Subsequently, during the Franco regime, they recovered the word ‘Real’, but a new law affected other team names. The dictatorship banned the use of foreign words from 1941 until 1972. Consequently, teams such as Athletic Club, Racing de Santander, and Sporting de Gijón were forced to modify their historical names for 30 years to Atlético de Bilbao, Santander, and Real Gijón.

数据清理是将原始数据转换为可以使用数据分析工具轻松分析的标准化形式的过程。 在这种特殊情况下,在使用Pandas分析数据之前,我们已经执行了多次清理操作。 我们已删除了不必要的列,并使用英语术语重命名了其余的列(请记住,数据是从西班牙语网站中抓取的)。 在探索性数据分析过程中,我们注意到在某些情况下使用多个名称来指代同一支足球队。 多年来,一些足球队已经更改了大多数法律规定的名称。 例如,在西班牙第二共和国(1931-1939)期间,不允许使用皇家符号。 结果,许多橄榄球队修改了名字,包括“ Real”(皇家)一词,以避免因赞美君主制而被定罪。 皇家马德里不仅改名为马德里,而且失去了盾牌王冠。 随后,在佛朗哥政权期间,他们恢复了“真实”一词,但一项新法律影响了其他球队的名称。 独裁统治从1941年到1972年禁止使用外来词。因此,诸如运动俱乐部,桑坦德赛车队和希洪竞技队之类的球队被迫将自己的历史名称修改为毕尔巴鄂竞技队,桑坦德和皇家希洪长达30年。

After cleaning the data, we obtain a Pandas data frame that can be easily processed to extract conclusions. As shown below, the data frame contains information such as the number of games won, drawn, and lost, the number of yellow and red cards, the number of points, and the position in the ranking of all teams that took part in La Liga from 1929 until 2020.

清理数据后,我们获得了一个熊猫数据框,可以轻松对其进行处理以得出结论。 如下图所示,数据框包含诸如获胜,平局和输局的次数,黄牌和红牌的数量,积分的数量以及参加西甲联赛的所有球队的排名中的信息。从1929年到2020年。

Image for post

Now, we are ready to analyze the data! :)

现在,我们准备分析数据! :)

西班牙联赛冠军 (Spanish league winners)

The Spanish league has been played by more of 60 different clubs; however, only nine of them got their hands on the trophy. The following plot shows the Spanish league winners from season 1928–29 until 2019–20.

西班牙联赛已有60多个俱乐部参加过比赛; 然而,只有九个人得到了奖杯。 下图显示了从1928–29赛季到2019-20赛季的西班牙联赛冠军。

Image for post

As shown above, Real Madrid is the most successful club in the history of La Liga with 34 titles followed by Barcelona with 26 leagues. However, as we will see later, Barcelona is catching up. Apart from these two clubs, the Spanish first division has been won by other 7 clubs, including Atlético Madrid (10), Athletic Club (8), Valencia (6), Real Sociedad (2), Betis (1), Sevilla (1), and Deportivo de La Coruña (1).

如上所示,皇马是西甲历史上最成功的俱乐部,拥有34个冠军,其次是巴塞罗那,拥有26个联赛。 但是,正如我们稍后将看到的,巴塞罗那正在迎头赶上。 除这两个俱乐部外,西班牙甲级联赛还获得了其他7个俱乐部的冠军,其中包括马德里竞技(10),运动俱乐部(8),巴伦西亚(6),皇家社会(2),贝蒂斯(1),塞维利亚(1)。 )和拉科鲁尼亚(1)。

西班牙联赛亚军 (Spanish league runner-ups)

It is heartbreaking to be a runner-up. For Real Madrid and Barcelona to be second is a shameful failure that could easily end up with the dismissal of the coach or with multiple multi-millionaire signings for the next season. For other teams, it is just a dream that almost comes true, but definitely not a failure. Failure, after all, is just a matter of expectations.

成为亚军是令人心碎的。 对于皇家马德里和巴塞罗那来说,屈居第二是可耻的失败,很容易以解雇教练或在下个赛季多次签下千万富翁而告终。 对于其他团队来说,这只是梦想,几乎可以实现,但绝对不是失败。 毕竟,失败只是期望的问题。

As shown below, there are 5 football teams that have never won the league but they were on one occasion runner-ups: Racing de Santander (1930–31), Las Palmas (1968–69), Zaragoza (1974–75), Sporting de Gijón (1978–79), and Villarreal (2007–08).

如下图所示,有5支从未赢得过联赛冠军的橄榄球队,但它们曾一次获得亚军:桑坦德赛车队(1930–31),拉斯帕尔马斯(1968–69),萨拉戈萨(1974–75),体育德希洪(1978–79)和比利亚雷亚尔(2007-08)。

Image for post

Additionally, we can also observe that Barcelona has been on more occasions runner-up of La Liga than Real Madrid.

此外,我们还可以观察到,巴塞罗那在西甲联赛中的获得次数多于皇家马德里。

第一部门的总赛季数(前10名) (Total number of seasons in the first division (Top 10))

There are only 3 football teams that have never been relegated to the second division: Athletic Club, Barcelona, and Real Madrid. Espanyol and Valencia played 4 seasons in the second division, and Atlético de Madrid 6.

只有3支从未降级到第二部的足球队:运动俱乐部,巴塞罗那和皇家马德里。 西班牙人队和瓦伦西亚队在乙级联赛中打了4个赛季,马德里竞技队则打了6个赛季。

Image for post

All teams from the image above are currently in the first division with the exception of Zaragoza (since 2012–13 in the second division).

上图中的所有团队目前都在第一级别,萨拉戈萨除外(自2012-13以来在第二级别)。

每个赛季在西班牙联赛中的球队数量 (Number of teams in the Spanish league per season)

The number of teams in La Liga has steadily increased from 10 to 20 teams with the exception of the seasons 1995–96 and 1996–97, during which 22 teams played.

西甲联赛的球队数量从10支稳定增加到20支,但1995–96赛季和1996–97赛季除外,在此期间有22支球队参赛。

Image for post

Currently, 20 teams play the Spanish league. The same number of teams play the Serie A (Italy), the Ligue 1 (France), and the Premier League (England). On the contrary, 18 teams take part in the Bundesliga (Germany), the Primeira Liga (Portugal), and the Eredivisie (Holand).Evolution of the number of leagues

目前,有20支球队参加西班牙联赛。 相同数量的球队参加意甲(意大利),联赛1(法国)和英超(英格兰)。 相反,有18支球队参加了德甲(德国),西甲联赛(葡萄牙)和埃雷迪维西(荷兰)的比赛。

联赛数量的演变 (Evolution of the number of leagues)

It is said in Spain that La Liga is played by two teams the rest is ornamentation and in my opinion, that is totally true 😢. Since 2000, Real Madrid and Barcelona have won 17 out of 20 leagues, being for other teams almost impossible to compete against them. But has always been the Spanish league that boring? Has always been dominated by Madrid or Barcelona? When did the Real Madrid and Barcelona’s hegemony begin? Let’s clarify all questions with a simple plot.

据说在西班牙,西甲由两支球队组成,其余的都是装饰,我认为那是完全正确的。 自2000年以来,皇家马德里和巴塞罗那赢得了20场联赛中的17场,对于其他球队来说几乎是不可能与他们竞争的。 但是西班牙联赛向来如此无聊吗? 一直被马德里或巴塞罗那统治? 皇马和巴塞罗那的霸权何时开始? 让我们用一个简单的图来阐明所有问题。

The following plot shows the evolution of the number of leagues by team.

下图显示了球队联赛数量的演变。

Image for post

As shown in the plot, in the first years of the league, although we can observe the slight prominence of Athletic Club, La Liga was not as hegemonic as it is nowadays and it was not clearly dominated by any club. In the late fifties, we start to see the beginning of Real Madrid’s dominance with the signing of Di Stefano. The Argentinean completely changed the fate of Real Madrid which at that time was an average team and had not won the league in 20 years.

如图所示,在联赛成立的头几年,尽管我们可以观察到竞技俱乐部的突出地位,但西甲联赛并不像现在那样霸权,也没有明显地被任何俱乐部所统治。 在五十年代后期,随着斯蒂芬诺的加盟,我们开始看到皇马的统治地位开始。 阿根廷人彻底改变了皇家马德里的命运,当时皇家马德里是一支普通球队,并且在20年内没有赢得联赛冠军。

From the 1960s onward, Real Madrid took control over the league winning 14 titles in only two decades. At the time, ‘El Clásico’ was the match between Atlético de Madrid and Real Madrid since Atlético de Madrid was the only serious rival of The Meringues winning 4 leagues between 1960 and 1980.

从1960年代起,皇马仅用了20年就获得了联赛的14项冠军。 当时,“马德里竞技”是皇家马德里和皇家马德里之间的较量,因为马德里竞技是“蛋白甜饼”在1960年至1980年之间赢得4个联赛的唯一严重对手。

From the nineties onwards, Barcelona has dominated the Spanish league winning 16 titles. In the 1990s, under the supervision of Johan Cruyff (1988–1996), Barcelona ended with the overwhelming dominance of Real Madrid in the last years. Johan Cruyff created a possession-based football style that continued to be imitated by Barcelona’s subsequent coaches, Louis Van Gaal, Frank Rijkaard, and particularly Guardiola. From the 2000s on, the hegemony of Barcelona continued powered by home-grown players such as Messi, Iniesta, Xavi, Busquets, Puyol or Pique.

从九十年代开始,巴塞罗那统治了西班牙联赛,赢得了16个冠军。 在1990年代,在约翰·克鲁伊夫(Johan Cruyff,1988–1996)的监督下,巴塞罗那在过去几年中以皇马的压倒性优势而告终。 约翰·克鲁伊夫(Johan Cruyff)创造了一种以财产为基础的足球风格,该风格继续受到巴塞罗那随后的教练路易斯·范加尔(Louis Van Gaal),弗兰克·里杰卡尔(Frank Rijkaard)尤其是瓜迪奥拉的模仿。 从2000年代开始,巴塞罗那的霸权一直由梅西,伊涅斯塔,哈维,布斯克茨,普约尔或皮克等本土球员提供动力。

All the aforesaid can also be observed in the following plot which shows the number of leagues by team and decade.

所有上述内容也可以在下面的图表中看到,该图表显示了按球队和十年划分的联赛数量。

Image for post

皇家马德里和巴塞罗那之间的联赛差异 (The difference in leagues between Real Madrid and Barcelona)

The following plot shows the difference in leagues between Real Madrid and Barcelona over time. As shown below, the maximum difference in favor of Barcelona was in the season 1952–1953. At that time, Barcelona had 4 leagues more than Real Madrid. However, in the mid-fifties, the luck of Real Madrid was about to change. From this time until the nineties, Real Madrid clearly dominated La Liga and the difference in leagues between The Blancos and Barcelona was increasing over time reaching its maximum in the season 1989–90 (15 leagues). From the 1990s onward, we observe how the difference in leagues is decreasing over time as a consequence of Barcelona’s hegemony. Currently, Real Madrid has 8 leagues more than Barcelona.

下图显示了随着时间的推移皇家马德里和巴塞罗那之间的联赛差异。 如下图所示,支持巴塞罗那的最大差异是在1952–1953年。 当时,巴塞罗那比皇家马德里多4个联赛。 然而,在五十年代中期,皇家马德里的运气即将改变。 从这个时间到90年代,皇家马德里显然统治了西甲,而布朗科斯和巴塞罗那之间的联赛差距随着时间的推移而不断增加,达到1989-90赛季的最高水平(15个联赛)。 从1990年代开始,我们观察到由于巴塞罗那霸权主义,联赛之间的差异如何随着时间的推移而减小。 目前,皇马比巴塞罗那多拥有8个联赛。

Image for post

西甲的黄牌和红牌 (Yellow and red cards in La Liga)

There is one thing that most football fans across the world take for granted: the use cards. However, it was not until 1970 at the World Cup in Mexico that the yellow and red card system was used for the first time in football. The system was invented in 1966 by the English referee Ken Aston who noticed that many times football players did not understand or just ignored the warnings made by referees which at the time were orally communicated. Then, inspired by the colors of the traffic lights (red and yellow) and their meanings, Aston created a color-coding scheme to clearly indicate that a football player has been cautioned or expelled.

全世界大多数足球迷都想一想:使用卡。 但是,直到1970年在墨西哥举行的世界杯足球赛上,才首次使用黄牌和红牌系统。 该系统是由英国裁判肯·阿斯顿(Ken Aston)于1966年发明的,他注意到很多时候足球运动员都不理解或只是忽略了裁判的警告,当时警告是通过口头传达的。 然后,在交通信号灯(红色和黄色)的颜色及其含义的启发下,阿斯顿​​创建了一种颜色编码方案,以清楚地表明足球运动员已被警告或开除。

But as Hemingway said, Spain is different. The Spanish National team did not take part at the 1970 World Cup in Mexico where the card system was first used. The Spanish Federation of football thought that yellow cards were actually white so that is how they looked like in black and white TVs of the time. In January 1971 red and white cards were introduced in the Spanish League until 1976 when ýellow cards finally replaced white cards.

但是正如海明威所说,西班牙是不同的。 西班牙国家队没有参加第一次使用卡系统的1970年墨西哥世界杯。 西班牙足球联合会认为黄牌实际上是白色的,因此在当时的黑白电视中它们的外观是这样的。 1971年1月,西班牙联赛引入了红牌和白牌,直到1976年yellow牌最终取代了白牌。

The following plot shows the total number of red cards per season. As I previously said, before the year 1971, the referee announced to the player his fines verbally. In the figure below, prior to 1971, red cards represent football players that were expelled during the match only with words (without using cards).

下图显示了每个季节的红牌总数。 正如我之前所说,在1971年之前,裁判员向球员口头宣布了罚款。 在下图中,1971年之前,红牌表示足球比赛期间被踢出的足球运动员,只用文字(不使用纸牌)。

Image for post

We observe a growing tendency until the mid-nineties. From that moment on, the total amount of red cards is steadily decreasing over time.

直到九十年代中期,我们观察到一种增长的趋势。 从那一刻起,红卡的总数随着时间的推移稳步下降。

Likewise, the plot below shows the total number of yellow cards (including white cards) per season.

同样,下图显示了每个季节黄牌(包括白牌)的总数。

Image for post

The total number of yellow cards per season has grown steadily from 1971 until the mid-nineties. From this time on, the number of cards remains nearly constant around 2000 cards per season.

从1971年到90年代中期,每个季节的黄牌总数一直稳定增长。 从那时起,每个赛季的卡片数量几乎保持不变,约为2000张。

Prior to the use of cards, players often did not receive penalties. Only in special cases (really strong fouls), football players were expelled from the game.

在使用纸牌之前,玩家通常不会受到处罚。 仅在特殊情况下(确实犯规),足球运动员才被踢出比赛。

In Spain, it is said that referees favor Real Madrid and Barcelona in the last years. But is that really true? Let’s see the numbers :)

在西班牙,据说裁判员最近几年青睐皇家马德里和巴塞罗那。 但这是真的吗? 让我们看看数字:)

The following plots show the average number of red and yellow cards by team from 1990 until 2020. As said, Real Madrid and Barcelona received on average fewer cards than other strong teams such as Atlético de Madrid, Valencia, Sevilla, or Athletic Club. Maybe their success is not only a combination of money and good players but also a little bit of help 😆

以下图表显示了1990年至2020年各队的红卡和黄牌的平均数量。如上所述,皇家马德里和巴萨的平均牌数少于马德里竞技,巴伦西亚,塞维利亚或竞技俱乐部等其他强队。 也许他们的成功不仅是金钱和优秀球员的结合,而且是一点帮助

Image for post
Image for post

最近十年的表现 (Performance in the last 10 years)

The following plots show the performance of Valencia, Real Madrid, Barcelona, Atlético de Madrid, and Athletic Club in the last 10 years. As shown below, Real Madrid and Barcelona score on average more goals than the other teams.

以下图表显示了瓦伦西亚,皇家马德里,巴塞罗那,马德里竞技和竞技俱乐部在过去十年中的表现。 如下图所示,皇家马德里和巴塞罗那的进球数平均高于其他球队。

Image for post

However, if we analyze the goals against, we observe that Atlético de Madrid is defensively the strongest team, even better than Barcelona, and the person responsible for all of this is Diego Simeone.

但是,如果我们对目标进行分析,就会发现马德里竞技是防守最强的球队,甚至比巴塞罗那还要强,而负责这一切的人是迭戈·西蒙内。

Image for post

The Argentinean is the manager of Atlético de Madrid since December 2011. Under his supervision, Atletico de Madrid has developed a distinct identity based on a strong defensive style. With Diego Simeone as coach, Atlético de Madrid has won La Liga, La Copa del Rey, the Europa League twice, and the UEFA Super Cup also twice, currently being the only serious rival of Real Madrid and Barcelona.

阿根廷人从2011年12月起担任马德里竞技队的经理。在他的监督下,马德里竞技队以其强大的防守风格建立了鲜明的身份。 在迭戈·西蒙内(Siegoone)的执教下,马德里竞技(Atléticode Madrid)赢得了西甲,拉科帕·德·雷伊(La Copa del Rey),欧罗巴联赛两次,以及欧洲联盟超级杯也两次,目前是皇家马德里和巴塞罗那的唯一重要对手。

摘要 (Summary)

The Spanish league has been clearly dominated by Real Madrid and Barcelona for a long time. In the beginning, the league was not as hegemonic as it is today and it was not clearly dominated by any club. From the mid-fifties on, Real Madrid took control over the league, being Atlético de Madrid his only serious rival. In the season 1989–90, Real Madrid had 15 leagues more than Barcelona. However, in the 90s, under the supervision of Johan Cruyff, Barcelona ended with the overwhelming dominance of Real Madrid. From that time on, the difference in leagues between them is gradually decreasing. Nowadays, Real Madrid and particularly Barcelona clearly dominate La Liga, being really hard for other teams to compete against them.

长期以来,西班牙联赛显然一直由皇马和巴塞罗那统治。 最初,该联盟不像今天那样霸权,也没有明显地被任何俱乐部支配。 从五十年代中期开始,皇马开始控制联盟,成为马德里竞技的唯一对手。 在1989-90赛季,皇家马德里比巴塞罗那多15个联赛。 然而,在90年代,在约翰·克鲁伊夫(Johan Cruyff)的监督下,巴塞罗那以皇马的压倒性优势而告终。 从那时起,它们之间的联赛差异逐渐减小。 如今,皇家马德里,尤其是巴塞罗那显然统治了西甲,其他球队很难与他们竞争。

A more plural league would be also a more interesting one. However, in my view, this situation is not likely to change any time soon. The Spanish league is highly monetized and there is an especial interest in the hegemony Real Madrid-Barcelona, as they are the teams that generate the most benefits.

多元化的联盟也将是一个更有趣的联盟。 但是,我认为这种情况不太可能很快改变。 西班牙联赛货币化程度很高,对霸权皇马-巴塞罗那特别感兴趣,因为他们是收益最大的球队。

致谢 (Acknowledgments)

Although I like football, I have never been a big fan of it. I selected the topic nearly by chance without expecting to discover so many interesting things. I hope you have enjoyed reading this article as much as I enjoyed writing it.

尽管我喜欢足球,但我从来都不是足球迷。 我几乎是偶然地选择了这个主题,却没想到会发现很多有趣的事情。 希望您喜欢阅读本文并喜欢撰写本文。

Lastly, I would like to thank my parents for their support. Without the long conversations about football with them, it would not have been possible to write this article. Thank you 😊. And yes, we all support Atlético de Madrid ❤️

最后,我要感谢父母的支持。 没有与他们之间关于足球的长时间讨论,就不可能写这篇文章。 谢谢😊。 是的,我们都支持马德里竞技❤️

Amanda 🍀

阿曼达🍀

翻译自: https://towardsdatascience.com/analysis-of-the-spanish-football-league-la-liga-7c636a9317b3

android 西班牙

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值