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

Commit

Permalink
docs: create notebook for Titanic dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
lars-reimann committed Mar 15, 2023
1 parent dd2bdef commit 16bbb90
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 9 deletions.
99 changes: 99 additions & 0 deletions docs/examples/titanic.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
{
"cells": [
{
"cell_type": "markdown",
"source": [
"# Titanic\n",
"\n",
"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",
"\n",
"> 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",
">\n",
"> 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",
"\n",
"## Sample\n"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"from safeds_examples.tabular import load_titanic\n",
"\n",
"titanic = load_titanic()\n",
"titanic.slice(end=10)"
],
"metadata": {
"collapsed": false,
"pycharm": {
"is_executing": true
}
}
},
{
"cell_type": "markdown",
"source": [
"## Schema"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"titanic.schema\n"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "markdown",
"source": [
"## Statistics"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"titanic.summary()\n"
],
"metadata": {
"collapsed": false
}
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
7 changes: 0 additions & 7 deletions docs/examples/titanic.md

This file was deleted.

3 changes: 1 addition & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ nav:
- README.md
- Changelog: CHANGELOG.md
- Examples:
- Titanic: examples/titanic.md
- Titanic: examples/titanic.ipynb
- API Reference: reference/
- Development:
- Environment: development/environment.md
Expand Down Expand Up @@ -64,7 +64,6 @@ plugins:
include: ["*.ipynb"]
execute: true
allow_errors: false
include_source: true

watch:
- src
Expand Down

0 comments on commit 16bbb90

Please sign in to comment.