Data::Dataset::Classic::Titanic - Provide the classic Titanic survivor dataset
version 0.0103
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();
Data::Dataset::Classic::Titanic provides access to the classic Titanic survivor dataset.
Data::Dataset::Classic::Titanic
$filename = Data::Dataset::Classic::Titanic::as_file();
Return the Titanic data filename location.
@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.
headers
%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 = 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).
https://en.wikipedia.org/wiki/RMS_Titanic
https://github.com/datasciencedojo/datasets/blob/master/titanic.csv
Data::Dataset::Classic::Iris
Gene Boggs <gene@cpan.org>
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.
To install Data::Dataset::Classic::Titanic, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Dataset::Classic::Titanic
CPAN shell
perl -MCPAN -e shell install Data::Dataset::Classic::Titanic
For more information on module installation, please visit the detailed CPAN module installation guide.