# Research in programming Wikidata/Tennis

Author: Ukpere Williams
This chapter is dedicated to tennis(Q847) Wikidata object analysis. Using SPARQL queries executed on Wikidata objects of tennis type, several tasks were fulfilled. These include the Introduction to Tennis using Wikidata , a list of tennis players, list of tennis competitions and players whom have participated, a list of most successful tennis players and players with the highest amount of trophies and awards .

## Introduction to Tennis using Wikidata

Let's get a list of all tennis competitions using SPARQL Queries.We make use of a property instance of (P31) with a type or value of tennis tournaments (Q13219666). This query has no limits and is made to list out tournaments with & without references. If we run this query without the condition (FILTER NOT EXISTS { ?item wdt:P585  }) ,it makes a list of all the years tennis competitions were played and it then produces a result of 44,577 events , but the main idea of our task is to list tennis competitions around the Globe and not the years those tennis competitions were played. So we make use of the condition (FILTER NOT EXISTS { ?item wdt:P585  }) where P585 is the time these events took place and we then remove this filter in other to list only tennis competitions.Lets take a look at the SPARQL code below;
Above is a SPARQL query which gets a list of all tournaments and lawn tennis games that are played all around the world. It lists 5410 results SPARQL-query.

## Tennis Players
### Female

When it comes to females tennis ,there is no tennis without Serena, and no Serena without tennis. Serena Williams has undoubtedly made an impact on tennis as one of the strongest and most dominant women to ever play the sport. Since the late 1990s, Serena and Venus have dominated the women's tennis world. They have captured 14 Grand Slam Doubles championships overall. Serena now holds the record for the most Grand Slam singles titles by a tennis player in the Open Era, whether a man or a woman, with 23 titles, including the 2017 Australian Open. Serena's skills have undoubtedly stood the test of time and opposition. She has won the 2017 Australian Open, and she has won Grand Slam tournaments over an 18-year span beginning in 1999. Serena reached four Grand Slam finals before quitting tennis after the 2022 US Open, having missed most of 2017 due to pregnancy. However, she was unable to tie Margaret Court's record of 24 titles. I think Serena can now legitimately be called the greatest female tennis player of all time. Her 23-10 record in Grand Slam finals and her high level of play over a very long career make the argument convincing. No offense intended to Steffi, Martina, or Margaret, but Serena has earned the title of greatest of all time.
Let's make use of SPARQL Query to get a list of female players all around the world. We make use of two conditions. The first condition has a property of occupation (P106) and a type tennis player (Q10833314),while the second has a property of sex or gender (P21) and a matching data type female (Q6581072).
This query generates 5409 results SPARQL-query.
We will make use of SPARQL to Rank the number of awards received by the Top ten Female tennis players using a Bar chart.In this query there are two properties occupation (P106) and P21 (sex or gender) with a matching data type or value of tennis player (Q10833314) and female (Q6581072) respectively.We then make use of ?num_awards to also list the number of awards received along side the item label.We notice that the results are scattered and need to be arranged . We make use of the statement ORDER BY DESC(?num_awards),we also use the limit of 10 to limit the number of results listed because we only want to show the top ten female tennis players with the highest number of awards.
Above it is clear that Serena has the highest career awards followed by Steffi.The above was made using SPARQL bar chart and the image above is a screenshot of the results.
SPARQL-query.

### Male

There is no doubt of his glory in the sporting tennis world and his many victories.He is loved by many and he has been voted as the Greatest of all time Male players. Djokovic, who is 35 years old and in the latter stages of his career, can undoubtedly win more Grand Slam championships. Rafael Nadal, who has 22 Grand Slam titles, is the only player ahead of him with 21. It's also difficult to consider Djokovic anything less than the greatest of all time when he spent a record 373 weeks at the top of the rankings. It was evident that Novak Djokovic was the best player in the world in 2021 after his dominant start to the season, which included victories at the Australian Open, French Open, and Wimbledon. By defeating Rafael Nadal in the 2021 French Open semifinals, he made it abundantly clear that he is capable of defeating Rafa on his preferred surface. In the 2021 Wimbledon Championship, Djokovic was dominant, dropping just two sets en route to defeating Matteo Berrettini of Italy in four sets. Despite the tennis world's eager anticipation, Djokovic was unable to complete the calendar Grand Slam by winning all four majors in 2021.
In the US Open final of 2021, Djokovic lost to Daniil Medvedev in straight sets, which indicates that either he is losing ground to younger competitors or that they have arrived. Djokovic has experienced turmoil in 2022. Due to his immunization status, Novak was unable to compete in Australia. He was also defeated by Rafa in the quarterfinals of Paris. However, Novak bounced back to win Wimbledon with ease. Due to a Rafa injury, the ideal final with Rafa was not to be. Due to his vaccination history, Djokovic was also forced to withdraw from the 2022 US Open.Novak Djokovic currently holds the title of greatest of all time thanks to his track record of multiple Major victories on all surfaces and his advantage in head-to-head matches against both Federer and Nadal.
Let's make use of SPARQL Query to get a list of male players all around the world. We make use of two conditions. The first condition has a property of occupation(P106) and a type tennis player (Q10833314), while the second has a property of sex or gender (P21) and a matching data type male (Q6581097)
This query produces 6954 results SPARQL-query.
We will make use of SPARQL to Rank the number of awards received by the Top ten male tennis players using a Bar chart.In this query there are two properties occupation (P106) and P21 (sex or gender) with a matching data type or value of tennis player (Q10833314) respectively. We then make use of ?num_awards to also list the number of awards received along side the item label. We notice that the results are scattered and need to be arranged . We make use of the statement ORDER BY DESC(?num_awards),we also use the limit of 10 to limit the number of results listed because we only want to show the top ten male tennis players with the highest number of awards.
The above was made using SPARQL bar chart and the image above is a screenshot of the results SPARQL-query

## Competitions

In the first section (about tennis), we made use of a SPARQL query to make a list of all the Tennis tournaments and competitions around the world. In this section we will talk about the 5 most popular competitions around the world.

### Wimbledon Championship

The Wimbledon Championships is considered by the majority of tennis players to be the world's best tennis event. Wimbledon attracts a lot of attention because it is one of the four Grand Slam competitions, and for good reason. Since 1877 (1884 for women), the tournament has been held at the All-England Club in London on a grass field, with the exception of the World Wars (1915–1918, 1940–1945), and the COVID–19 Pandemic (2020). All of the best players in the world participate in this tournament when they are healthy, and for many of them, winning the competition is their greatest dream.
Let use SPARQL query to list past winners of the Wimbledon Championship. In this query we will make use of three conditions. The first condition has a property of Part of (P361) and a matching value of Wimbledon Championship (Q41520) and the second condition has a property of point in time (P585) without a matching type and the the third property winner (P1346) has no data type as well. This Query produces 1162 results.
SPARQL-query

### US Open

The United States Open is ranked number two on this list and is the second of the four Grand Slams. Since its founding as the US National Championships in 1881 (1887 for women), it has been held annually. In 1968, it changed its name to the US Open. Before settling in the New York City borough of Queens in 1968, the competition was held at numerous locations across the country for many years. Since 1978, the competition has taken place on hard courts. However, it has historically been played on both grass (1881–1974) and clay (1975–1977).
Let use SPARQL query to list past winners of the US Open. In this query we will make use of three conditions. The first condition has a property of Part of (P361) and a matching value of US Open (Q123577) and the second condition has a property of point in time (P585) without a matching type and the the third property winner (P1346) has no data type as well. This Query produces 697 results .
SPARQL-query

### Australian Open

The Australian Open ranks third on this list of Grand Slam competitions. The inaugural competition took place in 1905, and a women's tournament was added in 1922. The competition took a break during the World Wars, just like Wimbledon. Early on, the top players didn't always go to Australia, but that has changed as jet travel has become more popular. Prior to the 1988 tournament's permanent relocation to Melbourne, Sydney, Brisbane, Melbourne, and Adelaide alternated as hosts. Prior to switching to hard courts in 1988, the Australian Open was held on grass from 1905 to 1987.
Let use SPARQL query to list past winners of the Australian Open. In this query we will make use of three conditions. The first condition has a property of Part of (P361) and a matching value of Australian Open (Q60874) and the second condition has a property of point in time (P585) without a matching type and the the third property winner (P1346) has no data type as well.This Query produces 870 results.
SPARQL-query

### French Open

The French Open, the final Grand Slam competition on this list, is ranked fourth. The French Championships hosted the first men's competition in 1891, and the women's event followed in 1897. The French Open, which is currently a clay court competition, is held at Stade Roland Garros, where it has been since 1928. The French Open was originally held on sand courts up until 1907, which is unusual in the modern era. The French Open was forced to stop competing during World War II, just like all other international competitions.
Let use SPARQL query to list past winners of the French Open. In this query we will make use of three conditions. The first condition has a property of Part of (P361) and a matching value of French Open (Q43605) and the second condition has a property of point in time (P585) without a matching type and the the third property winner (P1346) has no data type as well.This Query produces 705 results.
SPARQL-query

### ATP/WTA Tour

The ATP/WTA Tour Finals are the most fascinating tennis events in the world ,following the four Grand Slams. The WTA started hosting their event in 1971, two years after the ATP started holding theirs. Both sports are played on courts with hard surfaces. For both tours, the top eight players in the standings at the end of the year are eligible to compete in the tournament. The top four players then advance to the semifinals after playing a round-robin-style event. Since their inception, the men's and women's competitions have each been held in a number of locations worldwide.

#### Male

Let use SPARQL query to list past winners of the ATP Tour . In this query we will make use of three conditions. The first condition has a property of Part of (P361) and a matching value of ATP Tour(Q270907) and the second condition has a property of point in time (P585) without a matching type and the the third property winner (P1346) has no data type as well.This Query produces 113 results.
SPARQL-query

#### Female

Let use SPARQL query to list past winners of the WTP Tour . In this query we will make use of three conditions. The first condition has a property of Part of (P361) and a matching value of WTP Tour(Q220347) and the second condition has a property of point in time (P585) without a matching type and the the third property winner (P1346) has no data type as well.This Query produces 147 results.
SPARQL-query

## Techniques
### Learning Tennis Techniques

Developing a strong foundation in the fundamentals of tennis is crucial when learning the game. Students must fully grasp the fundamentals of tennis footwork, body positioning, and stroke mechanics before moving on to more advanced strokes. To avoid having incorrect moves ingrained in your muscle memory, it is crucial to learn the right moves and techniques the first time. It is much more difficult to undo incorrect technique and start over than it is to get it right the first time.
Below we will use the SPARQL Query to list out Tennis techniques which would be useful to enjoy the sport. In the query we make use of a two condition. The first condition has a property type instance of (P31) with a matching property type of sports technique (Q61996437) and the second condition has a property type of sports (P641) and a matching value of tennis (Q847). This query with the help of Wikidata Query service produces 71 results of various techniques and skills used in tennis.
SPARQL-query

### Dominant Player Hand

We will try to use Wikidata to provide the total number of tennis players who are right handed, left handed or use both their hands.

#### Properties and Data types

occupation (P106)
Tennis Player (Q10833314
Playing Hand (P741)
Left Handed (Q789447)
Right Handed (Q3039938)
Using FIGMA I created a Ven diagram to represent the information gotten from Wikidata ;
SPARQL-query
We discovered that Wikidata has limited data about the dominant hands of tennis players. To confirm this discovery I made a Query to list all Tennis players and it produced 12,523 results meanwhile total of all elements in the ven diagram and SPARQL Query above is 2,334 results. It means that Wikidata doesn't have sufficient data about 10,189 tennis players.

#### Properties and Data types

occupation (P106)
Tennis Player (Q10833314)
SPARQL-query

## Players and Their Net worth

There are many talented tennis players in the world. The skill of swinging the racket has been honed by these players over many years. These accomplished athletes have ascended to the pinnacles of sport and amassed enormous wealth in the process. Who is the highest-paid tennis player in the present?
We will try to make use of Wikidata to create a query which lists out Tennis players and their networths. In the query we use three property types of occupation (P106), nationality (P27) and net worth (P2218) and one data type of tennis player (Q10833314) for the first property occupation (P106). It turns out that Wikidata doesn't have the net worth of most tennis players and the net worth of Roger Federer provided by Wikidata is not updated or recent, and it only prints out 6 results.
SPARQL-Query
Due to the lack of sufficient Data from the Wikidata Query , we will create a table ranking top 10 players by their net worth and nationality using Wikidata properties and types;
| NO. | Tennis players | Nationality | Net worth |
| 1 | Ion Tiriac | Romania | $1.2 Billion |
| 2 | Roger Federer | Switzerland | $550 Million |
| 3 | Serena Williams | USA | $250 Million |
| 4 | Novak Djokovic | Serbia | $220 Million |
| 5 | Rafael Nadal | Spain | $220 Million |
| 6 | Maria Sharapova | Russia | $180 Million |
| 7 | Andre Agassi | USA | $175 Million |
| 8 | Pete Sampras | USA | $150 Million |
| 9 | Andy Murray | United Kingdom | $110 Million |
| 10 | John McEnroe | USA | $100 Million |
In the table above we have successfully created a table with Wikidata properties and types of tennis players and their nationalities. In order to create this table above, the source was used.

# Tests
## Future work

1) Find 10 tennis Legends who are already retired
2) Write individual wiki pages for these legends using Wikidata
3) Using Wikidata to make list of awards received by these legends
4) Use Wikidata to show the countries of these legends
5) Use Wikidata to show which tournaments these legends participated in