{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# **Lab1: Introduction to Data Analysis**\n",
"\n",
"**Course**: **INF-604: Data Analysis**
\n",
"**Lecturer**: **Sothea HAS, PhD**\n",
"\n",
"-----\n",
"\n",
"**Objective:** You have already seen some elements of Data Analysis in the course. In this lab, we will take our first step into working with the main element of Data Analysis, which is the dataset. By the end of this lab, you will be able to import data into a Jupyter Notebook and perform some data manipulation.\n",
"\n",
"- The `notebook` of this `Lab` can be downloaded here: [Lab1_Introduction.ipynb](https://hassothea.github.io/Data_Analysis_AUPP/Labs/Lab1_Introduction.ipynb){target=\"_blank\"}.\n",
"\n",
"- Or you can work directly with `Google Colab` here: [Lab1_Introduction.ipynb](https://colab.research.google.com/drive/14L1fgW35_yZAW3BIsG-oGLxBO0lXANMO?usp=sharing){target=\"_blank\"}.\n",
"\n",
"\n",
"-----\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"- Student's name: ...\n",
"- Year: ...\n",
"- Major: ...\n",
"\n",
"-----"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## **1. Data for Your Business**\n",
"\n",
"Imagine you want to start your own business, such as a coffee shop or a bookstore. What types of data do you think you need to gather to determine the potential success of your business? Here are some questions to help you think and answer this question:\n",
"\n",
"- What is your plan for the business?\n",
"\n",
"- What information might you need to collect? What is the size of the data?\n",
"\n",
"- Where do you think you can find this information?\n",
"\n",
"- What might go wrong with the collected data?\n",
"\n",
"- What step do we need to handle this problem?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"`Answer:`\n",
"\n",
"\n",
"\n",
"---------\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## **2. Importing Some Data**\n",
"\n",
"\n",
"There are many online data sources that you can explore, and one of the most popular is [`Kaggle`](https://www.kaggle.com/datasets/). In addition to datasets, `Kaggle` also hosts data competitions with prizes and offers courses to help you advance in data learning.\n",
"\n",
"\n",
"Here, we start our journey by exploring a dataset that you probably have heard its name before: [`Titanic`](https://www.kaggle.com/datasets/mahmoudsaadmohamed/titanic-dataset). You can download it from `Kaggle` using the following codes."
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n", " | PassengerId | \n", "Survived | \n", "Pclass | \n", "Name | \n", "Sex | \n", "Age | \n", "SibSp | \n", "Parch | \n", "Ticket | \n", "Fare | \n", "Cabin | \n", "Embarked | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "1 | \n", "0 | \n", "3 | \n", "Braund, Mr. Owen Harris | \n", "male | \n", "22.0 | \n", "1 | \n", "0 | \n", "A/5 21171 | \n", "7.2500 | \n", "NaN | \n", "S | \n", "
1 | \n", "2 | \n", "1 | \n", "1 | \n", "Cumings, Mrs. John Bradley (Florence Briggs Th... | \n", "female | \n", "38.0 | \n", "1 | \n", "0 | \n", "PC 17599 | \n", "71.2833 | \n", "C85 | \n", "C | \n", "
2 | \n", "3 | \n", "1 | \n", "3 | \n", "Heikkinen, Miss. Laina | \n", "female | \n", "26.0 | \n", "0 | \n", "0 | \n", "STON/O2. 3101282 | \n", "7.9250 | \n", "NaN | \n", "S | \n", "
3 | \n", "4 | \n", "1 | \n", "1 | \n", "Futrelle, Mrs. Jacques Heath (Lily May Peel) | \n", "female | \n", "35.0 | \n", "1 | \n", "0 | \n", "113803 | \n", "53.1000 | \n", "C123 | \n", "S | \n", "
4 | \n", "5 | \n", "0 | \n", "3 | \n", "Allen, Mr. William Henry | \n", "male | \n", "35.0 | \n", "0 | \n", "0 | \n", "373450 | \n", "8.0500 | \n", "NaN | \n", "S | \n", "