NAME
Data::Dataset::Classic::Titanic - Provide the classic Titanic survivor dataset
VERSION
version 0.0103
SYNOPSIS
use Data::Dataset::Classic::Titanic;
my $filename = Data::Dataset::Classic::Titanic::as_file();
my @data = Data::Dataset::Classic::Titanic::headers();
@data = Data::Dataset::Classic::Titanic::as_list();
my %data = Data::Dataset::Classic::Titanic::as_hash();
DESCRIPTION
Data::Dataset::Classic::Titanic
provides access to the classic Titanic survivor dataset.
FUNCTIONS
as_file
$filename = Data::Dataset::Classic::Titanic::as_file();
Return the Titanic data filename location.
as_list
@data = Data::Dataset::Classic::Titanic::as_list();
Return the Titanic data as an array.
The headers are not included in the returned data. See the headers
function.
as_hash
%data = Data::Dataset::Classic::Titanic::as_hash();
Return the Titanic data as a hash.
Keys are equal to the data column headers. See the headers
function.
headers
@headers = Data::Dataset::Classic::Titanic::headers();
Return the data headers.
PassengerId, Survived, Pclass, Name, Sex, Age,
SibSp, Parch, Ticket, Fare, Cabin, Embarked
These stand for the passenger ID, whether they survived or not, their class (1st, 2nd, 3rd), their name, gender, age, the number of siblings and spouses aboard, number of parents and children aboard, their ticket number, the fare they paid, the cabin they were in, and finally, the port of embarkation (C = Cherbourg; Q = Queenstown; S = Southampton).
SEE ALSO
https://en.wikipedia.org/wiki/RMS_Titanic
https://github.com/datasciencedojo/datasets/blob/master/titanic.csv
AUTHOR
Gene Boggs <gene@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2022 by Gene Boggs.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.