Research in programming Wikidata/Spacecraft and stations

From Wikiversity
Jump to navigation Jump to search

The article deals with the study of spacecrafts and stations based on the Wikidata international project data. For the items classified as "spacecraft and stations" the queries were performed via SPARQL and the following lists were received: the list of all spacecrafts and stations, the list of spacecrafts and stations that has been designed in the USSR and Russia, the bar chart for spaceships and stations that shows the number of designed spacecrafts for decades, in the period from 1960 to 2017. Moreover, the Wikidata were evaluated from the point of their completeness. It showed that many objects have the wrong value of property "instance of (P31)".

Examples of the objects "Spacecrafts and stations"[edit | edit source]

Let's build up a list of all spacecrafts and space stations in English and Russian.

#List of spacecraft and space stations
SELECT  ?spacecraft ?spacecraftLabel   
WHERE
{
  {?spacecraft wdt:P31 wd:Q40218.} UNION #spacecraft
  {?spacecraft wdt:P31 wd:Q18039177.} UNION #fictional spacecraft
  {?spacecraft wdt:P31 wd:Q402330.} #robotic spacecraft
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en, ru, [AUTO_LANGUAGE]"}
}

SPARQL-request, 172 objects (2021).

The most complete and elaborated archive on the Wikidata is Apollo 8
Almost empty and uninformative archives were: Europa Astrobiology Lander, Project Orbiter, LRK, EarthForce One, Soyuz GVK, CubeSat for Solar Particles.

Positive and negative objects[edit | edit source]

Examples of the most fully filled in objects "spacestation (Q40218)" are:

  1. International Space Station
  2. Mir
  3. Tiangong-1

Examples of poorly filled in objects "spacecraft (Q25956)" were:

  1. SpaceX Dragon
  2. Orion
  3. Voskhod

The list of hierarchy and output of spacecrafts[edit | edit source]

The aim was to build up a hierarchy of spacecrafts so that to obtain the final list of spacecrafts which includes transport spaceships, fictional starships, and other space transportation. The tasks were to write a script that will list all the spacecrafts on the hierarchy basis. Spacecrafts are transport (designed for people), freight, fictional, and all others. This hierarchy will be used for solving the task. The following script helps to fulfil this task:

#List of spacecraft in English 
SELECT  ?spacecraft  ?label_en ?label_ru
WHERE
{
  {?spacecraft wdt:P31 wd:Q40218.} UNION #spacecraft
  {?spacecraft wdt:P31 wd:Q18039177.} UNION #fictional spacecraft
  {?spacecraft wdt:P31 wd:Q402330.} #robotic spacecraft
  ?spacecraft rdfs:label ?label_en filter (lang(?label_en) = "en").
}

SPARQL-request returns 136 spacecrafts of all types (2017), 156 (2021).

The search for Soviet Union and Russian spacecrafts among the objects of the Wikidata[edit | edit source]

From the general list of spacecrafts we deduce those that were designed in the USSR or Russia.

#List of Russian and USSR spacecraft
SELECT  ?spacecraft  ?spacecraftLabel 
WHERE
{
  {?spacecraft wdt:P31 wd:Q40218.} UNION #spacecraft
  {?spacecraft wdt:P31 wd:Q18039177.} UNION #fictional spacecraft
  {?spacecraft wdt:P31 wd:Q402330.}#robotic spacecraft
  {?spacecraft wdt:P17 wd:Q15180. } UNION #USSR
  {?spacecraft wdt:P17 wd:Q159. } #Russia
  SERVICE wikibase:label { bd:serviceParam wikibase:language "ru, en, [AUTO_LANGUAGE]"}
}

SPARQL-request returns 103 spacecrafts (2017), 21 (2021).

Analysis of Wikidata completeness[edit | edit source]

At the moment the analysis was conducted there were too few Wikidata in the field of spacecrafts and stations. The requests on all the spacecrafts and stations showed 48 results all in all, and only 3 of them were withdrawn on the request for Russian and Soviet Union spacecrafts. At the same time the data in the article Soviet space program, the English Wikipedia, showed 42 spacecrafts designed in the USSR, which indicates the fact that the data in Wikidata are being far from complete. The website "Encyclopedia of the Winged Space" [1] describes 39 spacecrafts developed in the USSR. The script, with the help of which the search for Russian and Soviet Union spacecrafts in the knowledge base was made, is shown below:

#List of Russian and USSR spacecraft
SELECT  ?spacecraft  ?spacecraftLabel 
WHERE
{
  {?spacecraft wdt:P31 wd:Q40218.} UNION #spacecraft
  {?spacecraft wdt:P31 wd:Q18039177.} UNION #fictional spacecraft
  {?spacecraft wdt:P31 wd:Q402330.}#robotic spacecraft
  {?spacecraft wdt:P17 wd:Q15180. } UNION #USSR
  {?spacecraft wdt:P17 wd:Q159. } #Russia
  SERVICE wikibase:label { bd:serviceParam wikibase:language "ru, en, [AUTO_LANGUAGE]"}
}

SPARQL-request returns 3 results (30.10.2017), 21 (2021).

It turned out that the objects of the spacecrafts do exist, but they have wrong value in the property "instance of": for example, as a "manned flight."

Filling in Wikidata on the objects of spacecrafts and stations.[edit | edit source]

In order to get more records when executing the script to search for Russian and Soviet Union spacecrafts and stations, it was decided to fill in the property "instance of (P86)" for objects of the type human spaceflight (Q752783) ". The results are presented below:

#List of Russian and USSR spacecraft
SELECT  ?spacecraft  ?spacecraftLabel 
WHERE
{
  {?spacecraft wdt:P31 wd:Q40218.} UNION #spacecraft
  {?spacecraft wdt:P31 wd:Q18039177.} UNION #fictional spacecraft
  {?spacecraft wdt:P31 wd:Q402330.}#robotic spacecraft
  {?spacecraft wdt:P17 wd:Q15180. } UNION #USSR
  {?spacecraft wdt:P17 wd:Q159. } #Russia
  SERVICE wikibase:label { bd:serviceParam wikibase:language "ru, en, [AUTO_LANGUAGE]"}
}

SPARQL-request returns 3 results (09.11.2017), 21 (2021).

Before we made the corrections in Wikidata, some of these objects had the property "instance of" with the wrong value "manned flight". These errors were fixed. These Wikidata corrections allow us to construct more correct time schedules presented at bar graphs below.


Time schedules of space exploration in Russia and the USSR and in the world[edit | edit source]

The following script constructs the bar graph with the schedule of launching spacecraft in Russia and the USSR from 1960 to 2017.

 
# spacecraft launch schedule
SELECT (str(?decade) AS ?decade) (COUNT(?inception) AS ?quantity) # number of "inceptions" ...
WHERE {
   {?item wdt:P31 wd:Q40218.} UNION
  {?item wdt:P31 wd:Q18039177.} UNION
  {?item wdt:P31 wd:Q402330.}
  {?item wdt:P17 wd:Q15180. } UNION
  {?item wdt:P17 wd:Q159. }
  ?item wdt:P619 ?inception.
  BIND( YEAR(?inception) as ?year ) 
  BIND( FLOOR(?year/10)*10 as ?decade ) # ... per each 10 years
} 
GROUP BY ?decade # Group by decade
ORDER BY ?decade # Order by decade

SPARQL-request.

Time schedule for launching spacecraft in Russia and the USSR

It can be seen from the graph that the most active period of space exploration in Russia and the USSR was in the 1970-1999 years.

The same graph with script for the whole world are shown below:

# Spacecraft launch schedule in the world
SELECT (str(?decade) AS ?decade) (COUNT(?inception) AS ?quantity) # number of "inceptions" ...
WHERE {
   {?item wdt:P31 wd:Q40218.} UNION #spacecraft
   {?item wdt:P31 wd:Q18039177.} UNION #fiction spacecraft
   {?item wdt:P31 wd:Q402330.} #robotic spacecraft
   ?item wdt:P619 ?inception.
   BIND( YEAR(?inception) as ?year ) 
   BIND( FLOOR(?year/10)*10 as ?decade ) # ... per each 10 years
} 
GROUP BY ?decade 
ORDER BY ?decade

SPARQL-request.

Time schedule for launching spacecraft in the world

The graph shows that at the current moment the data on Russian and Soviet Union spacecrafts prevail in the Wikidata, and spacecrafts from other countries are undistinguishable.

Future work[edit | edit source]

  • Calculate and display the list of ships that are sent or planned to be sent to Mars.
  • Calculate and make bar chart depicting the share of the ships intended for travelling to Mars and to the Moon.
  • Find crashed spacecrafts.

Exercises[edit | edit source]

1 Choose how many spacecrafts were launched in the USSR in the 60's, 70's and 80's of the XX century.

34 29 11
60th
70th
80th

2 Arrange the number of spacecrafts launched by decades in ascending order.

1 2 3 4
1970s.
1980s.
1990s.
2000s.

3 Write the name of the country where these spaceships were designed.

Soyuz 19 Soyuz-T Soviet lunar lander drawing


SPARQL-request with answers:
Answer to the first 2 questions.

Images of spacecrafts.

Acknowledgements[edit | edit source]

The authors are grateful to Evgenia Ivanovna Sokolova, the Head of the Foreign Languages Department at PetrSU, for the help in translating the article into the English language.

References[edit | edit source]

  1. Lukashivich 1998.

Links[edit | edit source]

  • "All ships" (in Russian). 1998.
  • SavinovED. "All Spacecraft". ProWD. Retrieved 2021-09-24.