Skip to content
This repository was archived by the owner on Nov 23, 2024. It is now read-only.

Commit 16bbb90

Browse files
committed
docs: create notebook for Titanic dataset
1 parent dd2bdef commit 16bbb90

File tree

3 files changed

+100
-9
lines changed

3 files changed

+100
-9
lines changed

docs/examples/titanic.ipynb

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"source": [
6+
"# Titanic\n",
7+
"\n",
8+
"Based on the [\"Titanic\" dataset](https://www.openml.org/search?type=data&sort=runs&id=40945&status=active) by Frank E. Harrell Jr. and Thomas Cason:\n",
9+
"\n",
10+
"> The original Titanic dataset, describing the survival status of individual passengers on the Titanic. The titanic data does not contain information from the crew, but it does contain actual ages of half of the passengers. The principal source for data about Titanic passengers is the Encyclopedia Titanica. The datasets used here were begun by a variety of researchers. One of the original sources is Eaton & Haas (1994) Titanic: Triumph and Tragedy, Patrick Stephens Ltd, which includes a passenger list created by many researchers and edited by Michael A. Findlay.\n",
11+
">\n",
12+
"> Thomas Cason of UVa has greatly updated and improved the titanic data frame using the Encyclopedia Titanica and created the dataset here. Some duplicate passengers have been dropped, many errors corrected, many missing ages filled in, and new variables created.\n",
13+
"\n",
14+
"## Sample\n"
15+
],
16+
"metadata": {
17+
"collapsed": false
18+
}
19+
},
20+
{
21+
"cell_type": "code",
22+
"execution_count": null,
23+
"outputs": [],
24+
"source": [
25+
"from safeds_examples.tabular import load_titanic\n",
26+
"\n",
27+
"titanic = load_titanic()\n",
28+
"titanic.slice(end=10)"
29+
],
30+
"metadata": {
31+
"collapsed": false,
32+
"pycharm": {
33+
"is_executing": true
34+
}
35+
}
36+
},
37+
{
38+
"cell_type": "markdown",
39+
"source": [
40+
"## Schema"
41+
],
42+
"metadata": {
43+
"collapsed": false
44+
}
45+
},
46+
{
47+
"cell_type": "code",
48+
"execution_count": null,
49+
"outputs": [],
50+
"source": [
51+
"titanic.schema\n"
52+
],
53+
"metadata": {
54+
"collapsed": false
55+
}
56+
},
57+
{
58+
"cell_type": "markdown",
59+
"source": [
60+
"## Statistics"
61+
],
62+
"metadata": {
63+
"collapsed": false
64+
}
65+
},
66+
{
67+
"cell_type": "code",
68+
"execution_count": null,
69+
"outputs": [],
70+
"source": [
71+
"titanic.summary()\n"
72+
],
73+
"metadata": {
74+
"collapsed": false
75+
}
76+
}
77+
],
78+
"metadata": {
79+
"kernelspec": {
80+
"display_name": "Python 3",
81+
"language": "python",
82+
"name": "python3"
83+
},
84+
"language_info": {
85+
"codemirror_mode": {
86+
"name": "ipython",
87+
"version": 2
88+
},
89+
"file_extension": ".py",
90+
"mimetype": "text/x-python",
91+
"name": "python",
92+
"nbconvert_exporter": "python",
93+
"pygments_lexer": "ipython2",
94+
"version": "2.7.6"
95+
}
96+
},
97+
"nbformat": 4,
98+
"nbformat_minor": 0
99+
}

docs/examples/titanic.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

mkdocs.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ nav:
77
- README.md
88
- Changelog: CHANGELOG.md
99
- Examples:
10-
- Titanic: examples/titanic.md
10+
- Titanic: examples/titanic.ipynb
1111
- API Reference: reference/
1212
- Development:
1313
- Environment: development/environment.md
@@ -64,7 +64,6 @@ plugins:
6464
include: ["*.ipynb"]
6565
execute: true
6666
allow_errors: false
67-
include_source: true
6867

6968
watch:
7069
- src

0 commit comments

Comments
 (0)