{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"provenance": []
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"language_info": {
"name": "python"
}
},
"cells": [
{
"cell_type": "markdown",
"source": [
"# **Assignment #1: EDA & Dataset**\n",
"\n",
"**DATE: March2026**\n",
"\n"
],
"metadata": {
"id": "w84cR3AZIU0e"
}
},
{
"cell_type": "markdown",
"source": [
"### **Overview**\n",
"\n",
"In this first assignment, you will gain hands-on experience selecting and preparing a dataset, performing exploratory data analysis (EDA), adding it to HF's Datasets, and presenting your findings in a short video.\n",
"\n",
"Through these steps, you’ll begin building essential data science skills in Python.\n",
"\n",
"Think of your notebook as a cohesive story where EDA reveals the narrative of your data, which provides the resolution to the main question or goal."
],
"metadata": {
"id": "n7afdXdxIbLA"
}
},
{
"cell_type": "markdown",
"source": [
"### **Objectives**\n",
"\n",
"1. Explore various data tools/hubs (e.g., Kaggle, UCI, or local data) to find a suitable dataset.\n",
"2. Prepare the selected dataset, focusing on cleaning, transformation, manipulation, and quality.\n",
"3. Build foundational EDA skills, including missing data, outlier handling, and clear data visualization.\n",
"4. Upload your work and your dataset to HuggingFace.\n",
"5. Communicate findings concisely in both a structured notebook, README file, and a short video presentation, demonstrating clarity in each step of the workflow."
],
"metadata": {
"id": "lJAPMumvIUyW"
}
},
{
"cell_type": "markdown",
"source": [
"### **Submission Guidelines**\n",
"\n",
"1. Please note that this is an individual assignment.\n",
"2. Submit a text file with your info and the link to HF's dataset.\n",
"3. The dataset will include all of your work.\n",
" - **Python Notebook**: a well-structured notebook (e.g.`.ipynb` file) with clear comments or markdown explanations of each step.\n",
" - **Video Link**: the README file will include your short video presentation at the beginning of the file.\n",
"4. **Oral Report**: Students may be randomly chosen to present their work in a quick online session with the T.A., typically lasting ±10 minutes.\n",
"\n",
"\n",
"\n"
],
"metadata": {
"id": "MwRmaJBiIjMR"
}
},
{
"cell_type": "markdown",
"source": [
"### **Evaluation Criteria**\n",
"\n",
"1. **Organization & Clarity (20%)**: Overall structure of your HF Dataset, code, notebook, clear communication, and a concise summary.\n",
"\n",
"2. **Data Handling (30%)**: Quality of data cleaning, appropriate handling of outliers, and more.\n",
"\n",
"3. **Visualizations (30%)**: well-presented relevant visuals, variety of plot types.\n",
"\n",
"4. **Presentation (20%)**: Clearly communicated approach and findings in your 2–3 minute overview.\n"
],
"metadata": {
"id": "hD9SZmagIjOV"
}
},
{
"cell_type": "markdown",
"source": [
"### **Additional Tips**\n",
"\n",
"- The first thing you should do is download a copy of this notebook to your drive.\n",
"- Keep your dataset size manageable. If the dataset is large, you can sample a subset.\n",
"- A few clear visuals are more effective than many complicated ones.\n",
"- Ask for help or feedback early if you get stuck."
],
"metadata": {
"id": "h3vpVHSxIUwI"
}
},
{
"cell_type": "markdown",
"source": [
"
\n",
"\n",
"---\n",
"\n",
"Reminder: Always start with copy the NOTEBOOK to your drive."
],
"metadata": {
"id": "6kUonEv8Ipkp"
}
},
{
"cell_type": "markdown",
"source": [
""
],
"metadata": {
"id": "RMcHZdKiaPNW"
}
},
{
"cell_type": "markdown",
"source": [
"---\n",
"\n",
"
"
],
"metadata": {
"id": "7ql9QlVfaSEL"
}
},
{
"cell_type": "markdown",
"source": [
"# **Part 1: Select a Dataset**\n",
"\n",
"1. Choose a numeric tabular dataset, such as the . If you prefer, you may use other open-source datasets; [Hugginface](https://huggingface.co/datasets?task_categories=task_categories:tabular-classification&sort=trending), [Kaggle](https://www.kaggle.com/datasets?tags=13302-Classification&minUsabilityRating=8.00+or+higher), etc.\n",
"\n",
"\n",
" Examples for a good dataset:\n",
" - \"Determine a genre of a song\"\n",
" - \"Determine the type of flowers\"\n",
" - \"Determine the animal - cat or dog\"\n",
" - \"Determine the category of a product\"\n",
" - \"Determine if an email is spam or not spam\"\n",
" - \"Determine whether a tumor is malignant or benign\"\n",
" - \"Determine whether a transaction is fraudulent or not\"\n",
" - \"Determine whether a student is likely to pass a course\"\n",
"\n",
"2. Avoid choosing a \"basic\"/\"small\" dataset.\n",
" - 1K rows and more.\n",
" - 10 features and more.\n",
"\n",
"\n",
"3. Please submit your dataset [here](https://forms.gle/YYiRLXJnbwUfwuwc7), to share it with the class so everyone can see.\n",
"And make sure your chosen dataset is unique using this [link](https://docs.google.com/spreadsheets/d/1M8uojrzhSyVnOlSAJpzCKxrhWdzPR77k4x8Kxvr8VDk/edit?usp=sharing).\n",
"\n",
" *Note: Due to their popularity, the following are datasets you may not choose.*\n",
" > - Iris dataset\n",
" > - Wine dataset\n",
" > - Titanic dataset\n",
" > - Boston Housing dataset\n",
" > - ImageNet, Cifar, CelebFaces, IMDB\n",
"\n",
"4. Choose a dataset with moslty numaric values. This way you would have enough information to work on, and you could drop columns that aren't numeric.\n",
"\n",
"5. Briefly describe your chosen dataset (source, size, features) and the question you want to answer.\n",
"\n",
"6. Clearly identify the target variable to predict (if exists).\n",
"\n",
"\n",
"\n",
"\n"
],
"metadata": {
"id": "a_vsO0Q1IOMT"
}
},
{
"cell_type": "markdown",
"source": [],
"metadata": {
"id": "GFaHgQJyKwa5"
}
},
{
"cell_type": "code",
"source": [
"# בחרתי לעבוד עם דאטה-סט המרכז סטטיסטיקות של יויוטיוברים מובילים מרחבי העולם.\n",
"# הנתונים כוללים מידע על כמות רשומים, צפיות, קטגוריית תוכן ונתונים כלכליים.\n",
"# המטרה שלי היא לנתח מהם המשתנים המשפיעים ביותר על הצלחה בפלטפורמה.\n",
"# המקור לנתונים: Kaggle (Global YouTube Statistics 2023)"
],
"metadata": {
"id": "OI0MZzohKwfE"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"source": [],
"metadata": {
"id": "Lgum4x_tKwjL"
}
},
{
"cell_type": "code",
"source": [
"import kagglehub\n",
"import pandas as pd\n",
"import os\n",
"\n",
"# 1. הורדת הגרסה האחרונה של הדאטה-סט\n",
"path = kagglehub.dataset_download(\"nelgiriyewithana/global-youtube-statistics-2023\")\n",
"\n",
"# 2. מציאת קובץ CSV בתוך התיקייה שירדה\n",
"files = os.listdir(path)\n",
"csv_file = [f for f in files if f.endswith('.csv')][0]\n",
"full_path = os.path.join(path, csv_file)\n",
"\n",
"# 3. טעינת הנתונים לתוך df\n",
"df = pd.read_csv(full_path, encoding='latin-1')\n",
"\n",
"print(\" הנתונים ירדו \")\n",
"print(f\"מידות הטבלה: {df.shape}\")\n",
"df.head()"
],
"metadata": {
"id": "SWIrnfSLKwnE",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 481
},
"outputId": "82c1504e-2c4e-42f6-cefd-56a7f4d76e64"
},
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Downloading to /root/.cache/kagglehub/datasets/nelgiriyewithana/global-youtube-statistics-2023/1.archive...\n"
]
},
{
"output_type": "stream",
"name": "stderr",
"text": [
"100%|██████████| 60.1k/60.1k [00:00<00:00, 10.8MB/s]"
]
},
{
"output_type": "stream",
"name": "stdout",
"text": [
"Extracting files...\n",
" הנתונים ירדו \n",
"מידות הטבלה: (995, 28)\n"
]
},
{
"output_type": "stream",
"name": "stderr",
"text": [
"\n"
]
},
{
"output_type": "execute_result",
"data": {
"text/plain": [
" rank Youtuber subscribers video views \\\n",
"0 1 T-Series 245000000 2.280000e+11 \n",
"1 2 YouTube Movies 170000000 0.000000e+00 \n",
"2 3 MrBeast 166000000 2.836884e+10 \n",
"3 4 Cocomelon - Nursery Rhymes 162000000 1.640000e+11 \n",
"4 5 SET India 159000000 1.480000e+11 \n",
"\n",
" category Title uploads Country \\\n",
"0 Music T-Series 20082 India \n",
"1 Film & Animation youtubemovies 1 United States \n",
"2 Entertainment MrBeast 741 United States \n",
"3 Education Cocomelon - Nursery Rhymes 966 United States \n",
"4 Shows SET India 116536 India \n",
"\n",
" Abbreviation channel_type ... subscribers_for_last_30_days \\\n",
"0 IN Music ... 2000000.0 \n",
"1 US Games ... NaN \n",
"2 US Entertainment ... 8000000.0 \n",
"3 US Education ... 1000000.0 \n",
"4 IN Entertainment ... 1000000.0 \n",
"\n",
" created_year created_month created_date \\\n",
"0 2006.0 Mar 13.0 \n",
"1 2006.0 Mar 5.0 \n",
"2 2012.0 Feb 20.0 \n",
"3 2006.0 Sep 1.0 \n",
"4 2006.0 Sep 20.0 \n",
"\n",
" Gross tertiary education enrollment (%) Population Unemployment rate \\\n",
"0 28.1 1.366418e+09 5.36 \n",
"1 88.2 3.282395e+08 14.70 \n",
"2 88.2 3.282395e+08 14.70 \n",
"3 88.2 3.282395e+08 14.70 \n",
"4 28.1 1.366418e+09 5.36 \n",
"\n",
" Urban_population Latitude Longitude \n",
"0 471031528.0 20.593684 78.962880 \n",
"1 270663028.0 37.090240 -95.712891 \n",
"2 270663028.0 37.090240 -95.712891 \n",
"3 270663028.0 37.090240 -95.712891 \n",
"4 471031528.0 20.593684 78.962880 \n",
"\n",
"[5 rows x 28 columns]"
],
"text/html": [
"\n",
"
| \n", " | rank | \n", "Youtuber | \n", "subscribers | \n", "video views | \n", "category | \n", "Title | \n", "uploads | \n", "Country | \n", "Abbreviation | \n", "channel_type | \n", "... | \n", "subscribers_for_last_30_days | \n", "created_year | \n", "created_month | \n", "created_date | \n", "Gross tertiary education enrollment (%) | \n", "Population | \n", "Unemployment rate | \n", "Urban_population | \n", "Latitude | \n", "Longitude | \n", "
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | \n", "1 | \n", "T-Series | \n", "245000000 | \n", "2.280000e+11 | \n", "Music | \n", "T-Series | \n", "20082 | \n", "India | \n", "IN | \n", "Music | \n", "... | \n", "2000000.0 | \n", "2006.0 | \n", "Mar | \n", "13.0 | \n", "28.1 | \n", "1.366418e+09 | \n", "5.36 | \n", "471031528.0 | \n", "20.593684 | \n", "78.962880 | \n", "
| 1 | \n", "2 | \n", "YouTube Movies | \n", "170000000 | \n", "0.000000e+00 | \n", "Film & Animation | \n", "youtubemovies | \n", "1 | \n", "United States | \n", "US | \n", "Games | \n", "... | \n", "NaN | \n", "2006.0 | \n", "Mar | \n", "5.0 | \n", "88.2 | \n", "3.282395e+08 | \n", "14.70 | \n", "270663028.0 | \n", "37.090240 | \n", "-95.712891 | \n", "
| 2 | \n", "3 | \n", "MrBeast | \n", "166000000 | \n", "2.836884e+10 | \n", "Entertainment | \n", "MrBeast | \n", "741 | \n", "United States | \n", "US | \n", "Entertainment | \n", "... | \n", "8000000.0 | \n", "2012.0 | \n", "Feb | \n", "20.0 | \n", "88.2 | \n", "3.282395e+08 | \n", "14.70 | \n", "270663028.0 | \n", "37.090240 | \n", "-95.712891 | \n", "
| 3 | \n", "4 | \n", "Cocomelon - Nursery Rhymes | \n", "162000000 | \n", "1.640000e+11 | \n", "Education | \n", "Cocomelon - Nursery Rhymes | \n", "966 | \n", "United States | \n", "US | \n", "Education | \n", "... | \n", "1000000.0 | \n", "2006.0 | \n", "Sep | \n", "1.0 | \n", "88.2 | \n", "3.282395e+08 | \n", "14.70 | \n", "270663028.0 | \n", "37.090240 | \n", "-95.712891 | \n", "
| 4 | \n", "5 | \n", "SET India | \n", "159000000 | \n", "1.480000e+11 | \n", "Shows | \n", "SET India | \n", "116536 | \n", "India | \n", "IN | \n", "Entertainment | \n", "... | \n", "1000000.0 | \n", "2006.0 | \n", "Sep | \n", "20.0 | \n", "28.1 | \n", "1.366418e+09 | \n", "5.36 | \n", "471031528.0 | \n", "20.593684 | \n", "78.962880 | \n", "
5 rows × 28 columns
\n", "| \n", " | subscribers | \n", "video views | \n", "lowest_monthly_earnings | \n", "
|---|---|---|---|
| count | \n", "8.340000e+02 | \n", "8.340000e+02 | \n", "834.000000 | \n", "
| mean | \n", "2.299209e+07 | \n", "1.139365e+10 | \n", "37636.358537 | \n", "
| std | \n", "1.808354e+07 | \n", "1.502993e+10 | \n", "65999.309848 | \n", "
| min | \n", "1.230000e+07 | \n", "0.000000e+00 | \n", "0.000000 | \n", "
| 25% | \n", "1.450000e+07 | \n", "4.308531e+09 | \n", "4825.000000 | \n", "
| 50% | \n", "1.760000e+07 | \n", "7.768225e+09 | \n", "15500.000000 | \n", "
| 75% | \n", "2.410000e+07 | \n", "1.361947e+10 | \n", "40175.000000 | \n", "
| max | \n", "2.450000e+08 | \n", "2.280000e+11 | \n", "576000.000000 | \n", "