Research in programming Wikidata/Ships

From Wikiversity
Jump to navigation Jump to search

The article is devoted to the study of the object of the Wikidata ships. Three examples of good and poorly filled "ships" objects are distinguished. With the help of SPARQL queries, computed on objects of the "ship" type, the following tasks are solved: lists all ships of the world, as well as ships that participated in military conflicts and are associated with any country. Also an estimate of the completeness of the Wikidata is given. The paper presents a graph showing the relationship between ships associated with Russia and the military conflicts in which they participated.

Instances of the object "ship"[edit]

A ship is a large marine vessel.

Let's build a list of all ships in English and Russian.

#List of ship in English
SELECT ?ship ?shipLabel
WHERE
{
  ?ship wdt:P31 wd:Q11446. # instance of ship
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}

SPARQL-query, 19 820 results.

#List of ship from Russia, Soviet Union and Russian Empire
SELECT ?ship ?shipLabel
WHERE
{
  ?ship wdt:P31 wd:Q11446. # instance of ship
                                     # ships belongs to:
  { ?ship wdt:P17 wd:Q34266 } UNION  # Russian Empire
  { ?ship wdt:P17 wd:Q15180 } UNION  # Soviet Union
  { ?ship wdt:P17 wd:Q159 }.         # Russia
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}

SPARQL-query, 107 results.

Bad and good examples[edit]

Good examples of ships on the site of the Wikidata are: SMS Moltke, HMS Hermes, HMS Barham.

Bad examples of ships on the site of the Wikidata were: Likhoy, Nikolay Vilkov, SHCH-310.

Completeness of the Wikidata[edit]

Finding the exact number of ships in the world is a difficult task. After all, data about some of them are top secret, some are private vessels and there is no information about them either. Suppose that the total number of ships is 1 210 895, as indicated in the vessel database [1]. SPARQL-query showed only 19 886 records, which makes up only 1.6% of the total number of ships. As for the Russian ships, the actual combat naval personnel of the Russian Navy[2] issue 72 submarines, as well as 211 warships and boats. At the time when the query issued only 25 records. In the first and in the second case, the difference between the actual number of ships and the result of requests is huge, which indicates the incompleteness of the Wikidata.

Filling the properties of warships[edit]

It is required to find and fill a hundred objects of ships connected with Russia and participating in any military conflicts.

#List of ships with countries and war conflicts in Russian
SELECT ?ship ?shipLabel ?countryLabel ?conflict ?conflictLabel
WHERE
{
  ?ship wdt:P31 wd:Q11446;        # instance of ship
        wdt:P17 ?country;         # belongs to country
        wdt:P607 ?conflict.       # engaged in some conflict
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}

SPARQL-query, 1300 entries for October 28, 2017, 23:12.

SPARQL-query, 1400 entries for October 29, 2017, 23:39.

When filling the properties of warships, namely the military conflicts in which they participated, the property conflict (P607) (war/battle) was indicated. At the same time, military conflicts and military operations, which are part of wars, are different concepts. Filled data on ships can be roughly divided into two types:

  1. Objects in which military operations are combined with military conflicts. For example, in Soviet destroyer Gremyashchiy nine wars / battles. Such a large number is due to the fact that the ship took part in many arctic convoys which are military operations.
  2. Objects in which military operations are separated from military conflicts. For example, in the British cruiser HMS Trinidad participation in the military campaign and the Arctic convoy are listed as part of World War II with the qualifier including (P1012). Thus, in the Wikidata, this cruiser has one war/battle.

For the first type of filling in the scripts with the search for conflict (P607) properties, the ships will display more wars/battles than the second. But in this case, the operation The Odessa Defense will stand alongside World War II, although it is part of this war. In this situation, the output data will not be accurate.

For the second type of filling, scripts will clearly distinguish where the war is, and where the military operation, also the data displayed on the chart will be more accurate.

#List of ship with countries and war conflicts in Russian
SELECT ?ship ?shipLabel ?countryLabel ?conflict ?conflictLabel
WHERE
{
  ?ship wdt:P31 wd:Q11446;        # instance of ship
        wdt:P17 ?country;         # belongs to country
        wdt:P607 ?conflict.       # engaged in some conflict
  
  { ?ship wdt:P17 wd:Q34266 } UNION  # Russian Empire
  { ?ship wdt:P17 wd:Q15180 } UNION  # Soviet Union
  { ?ship wdt:P17 wd:Q159 }.    
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}

Run query — there were 105 results, 07:38, on November 6, 2017.

Fig. 1 shows a graph of the dependence of ships associated with Russia and participating in any military conflicts.

You can see that most of the ships and military operations belong to time the USSR and Russia. It should also be noted that in this graph, as well as in the data themselves, from which they were built, there is one shortcoming. The fact is that Russia can be divided into several different countries (by periods: in particular, on Russian Empire, Russian Socialist Federative Soviet Republic, USSR and the post-Soviet period). And in the ships filled with the editors of the Wikidata ships, the period when the ship existed is not always true. For example, in Fig. 1 can be seen (and the Wikidadata confirm this) that Borodino battleship existed in Russia, and not in the Russian Empire, which is a mistake.

Despite the shortcomings, the graph clearly shows which ship is participating in which particular military battle. The figure shows this dependence in the context of some periods of Russian rule. It also allows you to track which military event has the most warships and vice versa, to find a ship that participates in more wars.

Fig. 1. List of ships with countries and war conflicts in English

Future work[edit]

  1. Find the "Guinness ship" (to choose from: the largest, the longest, the most capacious).
  2. Output pictures of those ships, about which the film were shot. If there are no such, then those ships, about which the books were written.
  3. Bring out the museum ships.

Exercises[edit]

1

Based on the graph of the dependence of ships and military operations, which country has the most values of wars associated with ships?

Soviet Union
Russia
Russian Empire

2

Based on the graph of the dependence of ships and military operations, which war accounts for most of the values of ships?

Russo-Japanese War
World War II
Crimean War

3

The figure shows the most famous Soviet destroyer project 7, awarded the title of "Guards", name it.

Secret Grem ship.jpg


References[edit]

  1. The vessel database 2017.
  2. The actual combat naval personnel of the Russian Navy 2017.

Links[edit]

  • "The vessel database" (in Russian). 2017.