Wolfram Language

Time Series Processing

Manned Space Missions

MannedSpaceMissionData provides historic and current information about human space exploration.

In[1]:=
Click for copyable input
missions = MannedSpaceMissionData[];

You can create an EventSeries based on the launch date of the missions with vector values storing the mission entity and the duration of each mission.

In[2]:=
Click for copyable input
data = DeleteMissing[ MannedSpaceMissionData[ missions, {"LaunchDate", "Entity", "MissionDuration"}], 1, 2];
In[3]:=
Click for copyable input
es = EventSeries[data[[All, {2, 3}]], {data[[All, 1]]}]
Out[3]=

TimelinePlot of the time stamps shows the almost-continuous span of manned spaced missions since 1961.

In[4]:=
Click for copyable input
TimelinePlot[es["Dates"]]
Out[4]=

To analyze the missions' durations, extract the second component of the original event series and convert the values to hours.

In[5]:=
Click for copyable input
durations = UnitConvert[es["PathComponent", 2], "Hours"]
Out[5]=

The short missions are most common.

In[6]:=
Click for copyable input
Histogram[durations, Quantity[{0, 6000, 500}, "Hours"], AxesLabel -> Automatic]
Out[6]=
show complete Wolfram Language input
In[7]:=
Click for copyable input
x1 = 250; x2 = 4500; line1 = {{es["FirstDate"], x1}, {es["LastDate"], x1}}; line2 = {{es["FirstDate"], x2}, {es["LastDate"], x2}}; opts = {Joined -> {False, True, True}, Filling -> {1 -> 0}, PlotLabels -> {None, Quantity[x1, "Hours"], UnitConvert[Quantity[N[x2, 4], "Hours"], "Days"]}};
In[8]:=
Click for copyable input
DateListPlot[{durations, line1, line2}, opts]
Out[8]=

Compute some descriptive statistics of the mission durations. Note the mean and the median being far apart, indicating a long tail distribution.

In[9]:=
Click for copyable input
stats = {Min, Max, Mean, Median}; convert := UnitConvert[N[#], MixedUnit[{"Months", "Days", "Hours", "Minutes"}]] &
In[10]:=
Click for copyable input
TableForm[Map[convert[#[durations]] &, stats], TableHeadings -> {stats}]
Out[10]//TableForm=

The total time that there was a human in space.

In[11]:=
Click for copyable input
UnitConvert[Total[durations], MixedUnit[{"Years", "Months", "Days", "Hours", "Minutes", "Seconds"}]]
Out[11]=

Related Examples

de es fr ja ko pt-br ru zh