Tip of the day
News
Instructions
Objective
Write a python assignment to implement titanic survival analytics.
Requirements and Specifications
Description: Project R: Titanic 1. Go on Kaggle.com. This is a website for Data Scientist to practice their skills on real-world datasets and solve real-world problems. You will need to sign up an account in order to access the data and problems on Kaggle. 2. Find the web page for Titanic: Machine Leaning for Disaster. First, understand what the problem is, then download "train.csv" file under the "Data" tab. NOTE: this is a live competition for price. You are NOT required to participate in the competition. DO NOT submit your code on Kaggle. You will only need to analyze the train.csv data in this course. 3. After completing Udacity lessons on Explore One Variable, perform at least TWO different analysis using One variable on the train.csv dataset. 4. Create an RMD file and name it as Titanic.rmd. Inside this file, include your name (5 points) 5. In the same RMD file, for each of the one-variable analysis you perform, explain: Why you want to perform this analysis. In other words, what question do you want to answer by performing this analysis? (20 points/analysis) What information/conclusion you get from the analysis result/plot. (20 points/analysis) In the RMD file, you must include R code in the R code chunks which will generate the results and plots. If the code is not included in the R code chunks, the maximum credit you can receive from this step is 20 points/analysis. 6. At last, create an HTML report from this RMD file (15 points). Your HTML report must be knitted from the RMD file and must include plots. If plots do not show up in the HTML file, the maximum credit you can receive from this step is 5 points. Submit HTML report and the RMD file. (HINT: the Tutorials on theTitanic: Machine Leaning for Disaster main page provide many interesting examples)
Source Code
# NAME: Adjoua# Load packageslibrary(ggplot2)# Load the datatrain = read.csv('train.csv', stringsAsFactors = F)# Summary statistics of training datasummary(train)#Taking a quick look at missing values.as.list(colSums(is.na(train) | train == ""))'We found that the age have 177 null rows, Cabin 687, Embarked 2'# Check the distribution of Sexes on the Titanicggplot(train,aes(Sex))+geom_bar(aes(fill=factor(Sex)))+ ggtitle("Passenger sexes")'We find that the most passengers gender are the males'# Chart to see how many people survived and how many didn'tggplot(train,aes(Survived))+geom_bar()+ ggtitle("Died vs Survived")'Unfortunately We find that most passengers are died'# Check the distribution of Ages on the Titanicggplot(train,aes(Age))+geom_histogram(bins=30, color='black', fill='#008B8B')+ ggtitle("Age distribution")'We find that most passengers are youth their age between 20 and 40 years old'# Box plot for class vs age.ggplot(train,aes(Pclass,Age))+geom_boxplot(aes(group=Pclass,fill=factor(Pclass), alpha=0.3))+ ggtitle("Age vs Pclass")'We notice that, the higher the age- the higher the people that survived'
Related Samples
Discover Python Assignment Samples: Explore our handpicked selection featuring Python solutions covering algorithms, data analysis, and more. From introductory exercises to advanced projects, each sample provides practical insights and coding techniques. Enhance your Python skills and excel in programming with our comprehensive examples.
Python
Word Count
4091 Words
Writer Name:Walter Parkes
Total Orders:2387
Satisfaction rate:
Python
Word Count
2184 Words
Writer Name:Dr. Jesse Turner
Total Orders:2365
Satisfaction rate:
Python
Word Count
6429 Words
Writer Name:Dr. Olivia Campbell
Total Orders:753
Satisfaction rate:
Python
Word Count
5883 Words
Writer Name:Dr. David Adam
Total Orders:489
Satisfaction rate:
Python
Word Count
5849 Words
Writer Name:Dr. Nicholas Scott
Total Orders:642
Satisfaction rate:
Python
Word Count
6162 Words
Writer Name:Professor Liam Mitchell
Total Orders:932
Satisfaction rate:
Python
Word Count
3640 Words
Writer Name:Professor Daniel Mitchell
Total Orders:465
Satisfaction rate:
Python
Word Count
4343 Words
Writer Name:Prof. Jackson Ng
Total Orders:627
Satisfaction rate:
Python
Word Count
7272 Words
Writer Name:Dr. Jennifer Carter
Total Orders:879
Satisfaction rate:
Python
Word Count
4577 Words
Writer Name:Dr. Sophia Nguyen
Total Orders:900
Satisfaction rate:
Python
Word Count
4145 Words
Writer Name:Dr. Isabella Scott
Total Orders:754
Satisfaction rate:
Python
Word Count
4193 Words
Writer Name:Dr. Isabella Scott
Total Orders:754
Satisfaction rate:
Python
Word Count
4165 Words
Writer Name:Dr. Ashley
Total Orders:685
Satisfaction rate:
Python
Word Count
4176 Words
Writer Name:Prof. Jackson Ng
Total Orders:627
Satisfaction rate:
Python
Word Count
3922 Words
Writer Name:Dr. Chloe Mitchell
Total Orders:957
Satisfaction rate:
Python
Word Count
4091 Words
Writer Name:Glenn R. Maguire
Total Orders:714
Satisfaction rate:
Python
Word Count
4747 Words
Writer Name:Dr. Sophia Nguyen
Total Orders:900
Satisfaction rate:
Python
Word Count
4594 Words
Writer Name:Dr. Samantha Benet
Total Orders:812
Satisfaction rate:
Python
Word Count
6716 Words
Writer Name:Dr. Isabella Scott
Total Orders:754
Satisfaction rate:
Python
Word Count
4347 Words
Writer Name:Prof. James Harper
Total Orders:664
Satisfaction rate: