Deakin University SIT742 Modern Data Science Unit Assessment Handbook Gang Li Trimester 1, 2020 School of Information Technology Deakin University, Australia CONTENTS 0 Assessment Overview 1 0.1...

1 answer below »
only the first task, which is 1


Deakin University SIT742 Modern Data Science Unit Assessment Handbook Gang Li Trimester 1, 2020 School of Information Technology Deakin University, Australia CONTENTS 0 Assessment Overview 1 0.1 General Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 0.1.1 Where to Get Help? . . . . . . . . . . . . . . . . . . . . . . . . . . 1 0.1.2 Where to Submit? . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 0.1.3 Important Dates . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 0.1.4 Assignment Results . . . . . . . . . . . . . . . . . . . . . . . . . . 2 0.2 General Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1 Data Exploration: Data Scientists Survey 5 1.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.2 Task Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.2.1 Data Exploration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.2.2 Text analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.3 What to Submit? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2 Data Analytics: FIFA 2019 7 2.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.2 Task Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.2.1 FIFA19 Data Analytics . . . . . . . . . . . . . . . . . . . . . . . . 8 2.2.2 Project Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.3 What to Submit? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.3.1 Important Dates . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.3.2 Files to Submit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3 Appendix 11 3.1 Code Style: Pep 8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.2 Academic Skills . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.2.1 How to Find Papers? . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.2.2 How to Read Papers? . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.2.3 How to Write a Paper? . . . . . . . . . . . . . . . . . . . . . . . . 13 i CHAPTER ZERO ASSESSMENT OVERVIEW Contents 0.1 General Information . . . . . . . . . . . . . . . . . . . . . . . . 1 0.1.1 Where to Get Help? . . . . . . . . . . . . . . . . . . . . . . 1 0.1.2 Where to Submit? . . . . . . . . . . . . . . . . . . . . . . . 2 0.1.3 Important Dates . . . . . . . . . . . . . . . . . . . . . . . . 2 0.1.4 Assignment Results . . . . . . . . . . . . . . . . . . . . . . 2 0.2 General Requirements . . . . . . . . . . . . . . . . . . . . . . . 2 0.1 General Information 2020 SIT742 assessment consists of 4 components as detailed below: Table 0.1: SIT742 Assessment Plan Components Percentage Submission Methods Working Mode Task 1 25% Critical Analysis and Report Individual Task 2 40% Project Work Group Task 3 05% Online Quiz in CloudDeakin Individual Final Examination 30% Exam Individual 0.1.1 Where to Get Help? Students are encouraged to discuss the unit related assessment in CloudDeakin unit [home page] → [Discussions] → [Student Discussion]. If you are trying to form a project group for Assessment Task 2, you can post messages at: [home page] → [Discussions] → [Finding a project group?]. Any enquiry about this unit can be posted at: [home page] → [Discussions] → [Questions for the Unit Chair]. 1 0.2. GENERAL REQUIREMENTS ⇒[SIT742]⇐ 0.1.2 Where to Submit? All tasks should be submitted to CloudDeakin by following corresponding specific
Answered Same DayApr 15, 2021SIT742Deakin University

Answer To: Deakin University SIT742 Modern Data Science Unit Assessment Handbook Gang Li Trimester 1, 2020...

Abr Writing answered on Apr 17 2021
145 Votes
SIT742Task1.docx
SIT742Task1.ipynb
{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "EMX0qNbHot1x"
},
"source": [
"# SIT742: Modern Data Science \n",
"**(2020 Assessment Task 01: Exploration for Data Scientists Survey Data)**\n",
"\n",
"---\n",
"- Materials in this module include resources collected from various open-source online repositories.\n",
"- You are free to use, change and distribute this package.\n",
"\n",
"Prepared by **SIT742 Teaching Team**\n",
"\n",
"\n",
"---\n",
"\n",
"
\n",
"Enter your information in the following cell. Please make sure you fill your Student ID and Name correctly. \n",
"
\n",
"\n",
"**Student Information:** Please fill your information below\n",
"\n",
"- Name: \n",
"- Student ID: \n",
"- Email: \n",
"- Lab Session and Tutor (for on campus students): \n",
"\n",
"---"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "cHdQMSVzJyip"
},
"source": [
"## Overview\n",
"\n",
"In 2017, [Kaggle](https://www.kaggle.com) (a data science community and competition platform) conducted a survey on a large range of users registered as the data scientist in their platform. The survey data are broadly covered the skill set of the data scientists, the demographic of the data scientists, the feedback of the platform and many other information. \n",
"\n",
"In this task, you will need to \n",
"\n",
"- **Part 1**: Given the following two data sets, you are required to finish some required analysis, with the exploreation data analytics skills as well as visuilization skills\n",
" - [MCQResponses.csv](https://github.com/tulip-lab/sit742/raw/master/Assessment/2020/data/MCQResponses.csv): Participants' answers to multiple choice questions. Each column contains the answers of one respondent to a specific question. \n",
" - [ConversionRates.csv](https://github.com/tulip-lab/sit742/raw/master/Assessment/2020/data/ConversionRates.csv): Currency conversion rates to USD. \n",
"- **Part 2**: Given the following data set, you are required to find out top keywords for hiring the data scientists. \n",
" - [JobPostings.csv](https://github.com/tulip-lab/sit742/raw/master/Assessment/2020/data/JobPostings.csv): Data scientists job advertising in US with job descriptions, from JobPikr.\n",
"\n",
"\n",
"You will be required to complete the coding to answer the questions with a neat and clean format, and your commenting and adherence to code standards will also be considered when marking. Further information on Python standards, please visit https://www.python.org/dev/peps/pep-0008/ \n",
"\n",
"\n",
"**Note**: You are not necessary to stick to the partial code provided, and you can write your own code to implement the required tasks. But you should provide sufficient comments.\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "0d3FjO8fJyir"
},
"source": [
"## Part 1 - What we could know about the Data Scientists? "
]
},
{
"cell_type": "markdown",
"metadata": {
"_cell_guid": "06c9b38b-000e-4b8a-95f0-65a93bb332f2",
"_uuid": "2bfa8ca86a226c9900a67a02236a072274bc0d18",
"colab_type": "text",
"id": "NuDhBkqaot17"
},
"source": [
"### 1.0. Libraries and data files\n",
"\n",
"***\n"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 193
},
"colab_type": "code",
"id": "Tzx_NMcsJyiv",
"outputId": "e6e14060-52f1-497f-8e0e-f7b719d41fa5"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Requirement already satisfied: wget in c:\\users\\kanish\\anaconda3\\lib\\site-packages (3.2)\n"
]
}
],
"source": [
"!pip install wget"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"_cell_guid": "bf6d21b3-22d5-48e4-8a62-a50ef36bae42",
"_kg_hide-input": true,
"_kg_hide-output": false,
"_uuid": "76567470049e7d7e878b76d72e81858f56bdbd2a",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 72
},
"colab_type": "code",
"id": "7AVjZqvmot2A",
"outputId": "da316df2-73b9-4ff7-f0da-70872bd0e55c",
"scrolled": true
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"C:\\Users\\Kanish\\anaconda3\\lib\\site-packages\\ipykernel_launcher.py:4: FutureWarning: The pandas.datetime class is deprecated and will be removed from pandas in a future version. Import from datetime module instead.\n",
" after removing the cwd from sys.path.\n"
]
}
],
"source": [
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"import pandas as pd\n",
"from pandas import datetime\n",
"import wget\n",
"import seaborn as sns\n",
"sns.set(style=\"whitegrid\")"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"_cell_guid": "bf6d21b3-22d5-48e4-8a62-a50ef36bae42",
"_kg_hide-input": true,
"_kg_hide-output": false,
"_uuid": "76567470049e7d7e878b76d72e81858f56bdbd2a",
"colab": {},
"colab_type": "code",
"id": "xtJ1n3tO0AKO",
"scrolled": true
},
"outputs": [],
"source": [
"link_to_data = 'https://github.com/tulip-lab/sit742/raw/master/Assessment/2020/data/MCQRe
sponses.csv'\n",
"DataSet = wget.download(link_to_data)\n",
"\n",
"link_to_data = 'https://github.com/tulip-lab/sit742/raw/master/Assessment/2020/data/ConversionRates.csv'\n",
"DataSet = wget.download(link_to_data)\n",
"\n",
"link_to_data = 'https://github.com/tulip-lab/sit742/raw/master/Assessment/2020/data/JobPostings.csv'\n",
"DataSet = wget.download(link_to_data)"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "xt84oidr-jof"
},
"source": [
"
\n",
"\n",
"**Code**: \n",
" You are required to load MCQResponses.csv into dataframe df_demog, and check the data statistics and general infommation by printing its top 5 rows.\n",
"
"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 395
},
"colab_type": "code",
"id": "Xl5VV8v4ot2N",
"outputId": "3026ed31-5315-49ad-b84b-7cd170c94834"
},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"
GenderSelectCountryAgeEmploymentStatusCodeWriterCurrentJobTitleSelectTitleFitCurrentEmployerTypeMLToolNextYearSelectMLMethodNextYearSelectLanguageRecommendationSelectFormalEducationMajorSelectFirstTrainingSelectCompensationAmountCompensationCurrencyJobSatisfaction
0MaleUnited States56Independent contractor, freelancer, or self-em...YesOperations Research PractitionerPoorlySelf-employedTensorFlowNeural NetsPythonMaster's degreeMathematics or statisticsUniversity courses250000.0USD10 - Highly Satisfied
1FemaleAustralia43Employed full-timeYesBusiness AnalystFineEmployed by non-profit or NGOMicrosoft Excel Data MiningLink AnalysisPythonBachelor's degreeNaNWork80000.0AUD7
2MaleRussia33Employed full-timeYesSoftware Developer/Software EngineerFineEmployed by a company that doesn't perform adv...C/C++Deep learningPythonBachelor's degreeOtherSelf-taught1200000.0RUB7
3MaleIndia27Employed full-timeYesData ScientistFineEmployed by professional services/consulting f...OtherDeep learningPythonBachelor's degreeElectrical EngineeringUniversity courses95000.0INR7
4MaleTaiwan26Employed full-timeYesSoftware Developer/Software EngineerFineEmployed by professional services/consulting firmTensorFlowDeep learningPythonMaster's degreeComputer ScienceOnline courses (coursera, udemy, edx, etc.)1100000.0TWD5
\n",
"
"
],
"text/plain": [
" GenderSelect Country Age \\\n",
"0 Male United States 56 \n",
"1 Female Australia 43 \n",
"2 Male Russia 33 \n",
"3 Male India 27 \n",
"4 Male Taiwan 26 \n",
"\n",
" EmploymentStatus CodeWriter \\\n",
"0 Independent contractor, freelancer, or self-em... Yes \n",
"1 Employed full-time Yes \n",
"2 Employed full-time Yes \n",
"3 Employed full-time Yes \n",
"4 Employed full-time Yes \n",
"\n",
" CurrentJobTitleSelect TitleFit \\\n",
"0 Operations Research Practitioner Poorly \n",
"1 Business Analyst Fine \n",
"2 Software Developer/Software Engineer Fine \n",
"3 Data Scientist Fine \n",
"4 Software Developer/Software Engineer Fine \n",
"\n",
" CurrentEmployerType \\\n",
"0 Self-employed \n",
"1 Employed by non-profit or NGO \n",
"2 Employed by a company that doesn't perform adv... \n",
"3 Employed by professional services/consulting f... \n",
"4 Employed by professional services/consulting firm \n",
"\n",
" MLToolNextYearSelect MLMethodNextYearSelect \\\n",
"0 TensorFlow Neural Nets \n",
"1 Microsoft Excel Data Mining Link Analysis \n",
"2 C/C++ Deep learning \n",
"3 Other Deep learning \n",
"4 TensorFlow Deep learning \n",
"\n",
" LanguageRecommendationSelect FormalEducation MajorSelect \\\n",
"0 Python Master's degree Mathematics or statistics \n",
"1 Python Bachelor's degree NaN \n",
"2 Python Bachelor's degree Other \n",
"3 Python Bachelor's degree Electrical Engineering \n",
"4 Python Master's degree Computer Science \n",
"\n",
" FirstTrainingSelect CompensationAmount \\\n",
"0 University courses 250000.0 \n",
"1 Work 80000.0 \n",
"2 Self-taught 1200000.0 \n",
"3 University courses 95000.0 \n",
"4 Online courses (coursera, udemy, edx, etc.) 1100000.0 \n",
"\n",
" CompensationCurrency JobSatisfaction \n",
"0 USD 10 - Highly Satisfied \n",
"1 AUD 7 \n",
"2 RUB 7 \n",
"3 INR 7 \n",
"4 TWD 5 "
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Your code\n",
"\n",
"df_demog = pd.read_csv('MCQResponses.csv')\n",
"df_demog.head(5)"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "7gclqLjREEe7"
},
"source": [
"
\n",
"\n",
"**Code**: \n",
" Check which columns have NAs (don't remove them now), and for each of those columns, display how many records with values\n",
"\n",
"\n",
"
\n",
" \n",
"**Report**: \n",
" **1.0.A** Please include your result for this coding task into your report, with proper section title '1.0.A'.\n",
"
\n",
"
\n",
"\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 570
},
"colab_type": "code",
"id": "jk5oshZLot2U",
"outputId": "bc8f13a8-08ee-408f-c112-3f8edf0e8ed2"
},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"
0
GenderSelect0
Country0
Age0
EmploymentStatus0
CodeWriter0
CurrentJobTitleSelect0
TitleFit76
CurrentEmployerType52
MLToolNextYearSelect121
MLMethodNextYearSelect157
LanguageRecommendationSelect99
FormalEducation0
MajorSelect375
FirstTrainingSelect3
CompensationAmount0
CompensationCurrency0
JobSatisfaction10
\n",
"
"
],
"text/plain": [
" 0\n",
"GenderSelect 0\n",
"Country 0\n",
"Age 0\n",
"EmploymentStatus 0\n",
"CodeWriter 0\n",
"CurrentJobTitleSelect 0\n",
"TitleFit 76\n",
"CurrentEmployerType 52\n",
"MLToolNextYearSelect 121\n",
"MLMethodNextYearSelect 157\n",
"LanguageRecommendationSelect 99\n",
"FormalEducation 0\n",
"MajorSelect 375\n",
"FirstTrainingSelect 3\n",
"CompensationAmount 0\n",
"CompensationCurrency 0\n",
"JobSatisfaction 10"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Your Code\n",
"display(pd.DataFrame(df_demog.isna().sum()))"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "MclqalahEVm-"
},
"source": [
"
\n",
"\n",
"**Code**: \n",
" Select the users whose current job title is 'Data Scientist', and store into variable df_demog_ds \n",
"\n",
"
\n",
" \n",
"**Report**: \n",
" **1.0.B** Please include your result of `how many Data Scientists?' into your report, with proper section title '1.0.B'.\n",
"
\n",
"
\n",
"\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 35
},
"colab_type": "code",
"id": "sjdZZOc8ot2g",
"outputId": "25bd7d78-fc76-47ab-87a7-5abcfc6c40e6"
},
"outputs": [
{
"data": {
"text/plain": [
"(1263, 17)"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Your code\n",
"\n",
"df_demog_ds = df_demog[df_demog.CurrentJobTitleSelect.isin([\"Data Scientist\"])]\n",
"display(df_demog_ds.shape)"
]
},
{
"cell_type": "markdown",
"metadata": {
"_cell_guid": "3e161447-2816-45ec-872f-3a20da79c042",
"_uuid": "d6bdc03f0c63a08754efc13378661dc986d2bcb8",
"colab_type": "text",
"id": "iuhutBLOot5O"
},
"source": [
"### 1.1. Education\n",
"\n",
"***\n",
"In data scientists job, education is important. Is it reasonable to ask data scientists to have a Master's or Doctoral degree? Let's find out. \n"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "yHyeeZvDot5Q"
},
"source": [
"
\n",
"\n",
"**Code**: \n",
" Plot and display as text output the number and percentage of data scientist with each type of formal education. \n",
"\n",
"
\n",
" \n",
"**Report**: \n",
" **1.1.A** Please include your running result of this coding task into your report, with proper section title '1.1.A'.\n",
"
\n",
"\n",
"
"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 233
},
"colab_type": "code",
"id": "lRXfdfvgot5S",
"outputId": "cccbd37f-6b78-4fcf-eb0e-8534705dbb53"
},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"
countpercentage
Master's degree63550.277118
Doctoral degree32625.811560
Bachelor's degree25219.952494
Professional degree251.979414
Some college/university study without earning a bachelor's degree191.504355
I did not complete any formal education past high school60.475059
\n",
"
"
],
"text/plain": [
" count percentage\n",
"Master's degree 635 50.277118\n",
"Doctoral degree 326 25.811560\n",
"Bachelor's degree 252 19.952494\n",
"Professional degree 25 1.979414\n",
"Some college/university study without earning a... 19 1.504355\n",
"I did not complete any formal education past hi... 6 0.475059"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Your code\n",
"display(pd.merge(df_demog_ds.FormalEducation.value_counts(),\n",
" df_demog_ds.FormalEducation.value_counts(normalize=True)*100,\n",
" left_index=True,\n",
" right_index=True).rename(columns={\n",
" \"FormalEducation_x\": \"count\",\n",
" \"FormalEducation_y\": \"percentage\"\n",
" }))"
]
},
{
"cell_type": "markdown",
"metadata": {
"_cell_guid": "551f7dba-71d3-4f77-8852-fce4f789d644",
"_uuid": "31449fb18bfea68bb723b010b78dcab6c8fe5439",
"colab_type": "text",
"id": "K-yMEEFLot7P"
},
"source": [
"### 1.2. Salary\n",
"\n",
"\n",
"Data science is considered a very well paying role, let's find out the salary information. Since all of the respondents did not come from one country, we can assume that they gave their salaries in their countries currency. We have filtered the data for you and provided exchange rates in a file called *ConversionRates.csv* which should already be imported. \n",
"\n",
"First of all, you need to merge the multiple choice data with the *ConversionRates.csv* by using the compensation currency and originCountry respectively. And then you will need to multiply the compensation amount with exchangeRateAUS to have the Australian dollors."
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 141
},
"colab_type": "code",
"id": "BZaQ7vykot7U",
"outputId": "28731e36-d93b-4f88-d4df-9686e098f3a7"
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"C:\\Users\\Kanish\\anaconda3\\lib\\site-packages\\pandas\\core\\generic.py:5303: SettingWithCopyWarning: \n",
"A value is trying to be set on a copy of a slice from a DataFrame.\n",
"Try using .loc[row_indexer,col_indexer] = value instead\n",
"\n",
"See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
" self[name] = value\n"
]
}
],
"source": [
"# Your code\n",
"conversionRates = pd.read_csv('ConversionRates.csv')\n",
"\n",
"df_demog_ds.CompensationAmount = pd.merge(\n",
" df_demog_ds,\n",
" conversionRates,\n",
" left_on='CompensationCurrency',\n",
" right_on='originCountry',\n",
" how='left'\n",
").exchangeRate.multiply(\n",
" df_demog_ds.CompensationAmount.to_list(),\n",
" axis='index'\n",
")"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "6MYDXU6dot7T"
},
"source": [
"
\n",
"\n",
"**Code**: \n",
"Use the codes for each country to merge the files so that you can convert the salary data to Australian Dollars (AUD). Print out the maximum and median salary in AUD. Hint: think about what data type you have.\n",
" \n",
"
\n",
" \n",
"**Report**: \n",
" **1.2.A** In your report's section '1.2.A', answer what is the maximum and median salary in AUD.\n",
"
\n",
"\n",
"\n",
"
\n"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"colab": {},
"colab_type": "code",
"id": "tyMNN-r3Jyjc"
},
"outputs": [
{
"data": {
"text/plain": [
"'Maximum salary: 400000.000000'"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Your Code\n",
"display(\"Maximum salary: %f\" % df_demog_ds.CompensationAmount.max())"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"colab": {},
"colab_type": "code",
"id": "nA9JygJ2ot7v"
},
"outputs": [
{
"data": {
"text/plain": [
"'Median salary: 65770.430000'"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Your code\n",
"display(\"Median salary: %f\" % df_demog_ds.CompensationAmount.median())"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "kAtIFQgxMcR9"
},
"source": [
"
\n",
"\n",
"**Code**: \n",
"Plot a boxplot of the Australian respondents salary distribution. Print out the maximum and median salaries for Australian repsondnts.\n",
"\n",
" \n",
"
\n",
" \n",
"**Report**: \n",
" **1.2.B** In your report's section '1.2.B', answer what is the maximum and median salary in AUD for Australian respondents, and also include your plotted boxplot of this coding task into your report. \n",
"
\n",
"\n",
"\n",
"
\n"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"colab": {},
"colab_type": "code",
"id": "44a4HBqvMb_N"
},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAWAAAAEXCAYAAACTRp41AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAfx0lEQVR4nO3deVhVdf4H8DebMoiFjEKNJQ9WSFm5hYWCiRuLIAIupKBGg+bomPBLhRJTMbecUrJGK8fHpREVNGbcZlDUQMx9AUfTwlgSkUCRRVnu/fz+8OE8IuCSF76g79fz9MS995zz/Xy+h+d9D+feczQSEQERETU6Y9UFEBE9rhjARESKMICJiBRhABMRKcIAJiJShAFMRKQIA7gJyMnJwYsvvghfX1/4+vrCx8cHw4cPx7FjxxpkvE6dOqGwsPCuy+zbtw/Lli17oO3qdDpMnDgR7u7uWL9+/cOUCOD+6lRt3bp16NSpE06ePPnQ21q+fDl27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wcnLSjrrrcuDAARQUFGD37t1ISkpCUlISkpOT0a5dO2zcuPG+58PZ2RkpKSnIzs4GABw8eBC5ubno0qUL2rRpgzNnzkBEUFJScs83kmomJiY13kDo0cMj4EfQRx99hC+//BKBgYEwMTFBRUUFBgwYgL/+9a8oLS3FvHnz4OPjg8rKSri6uuLdd9994DGOHz+OTZs2Qa/X47PPPsOTTz4JFxcXhIaGIiQkBEZGRrC0tMTy5cvrvZE1cOsUhqenJwICAmBhYQFzc3PMnDkT9vb2iIuLg4eHB4yMjNCzZ09YW1sjMzMTdnZ2ePXVVzF48GB8++232raGDRuG3NxcDB8+HHq9HnZ2dliyZMld+9iwYQNGjBiB1q1ba8+ZmppiwoQJiImJgYeHx33Nx/PPP4+PPvoIkydPhk6ng7m5OVasWIHWrVtjyJAhSE5OxqBBg2Bra4uePXve11HuwIEDMW3aNMyePRsuLi73VQc1L/wWBD2wTp06ad86IKLfj6cgiIgU4REwEZEiPAImIlKEAUxEpAgDmIhIEQYwEZEiDGAiIkUYwEREivw/fbbXd9Hjl44AAAAASUVORK5CYII=\n",
"text/plain": [
"
"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.title(\"Boxplot of salary on Australia\")\n",
"\n",
"# Your code\n",
"sns.boxplot(df_demog_ds[\n",
" df_demog_ds.Country.isin([\"Australia\"])\n",
"].CompensationAmount)\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"colab": {},
"colab_type": "code",
"id": "RZDQMRRfMbSl"
},
"outputs": [
{
"data": {
"text/plain": [
"'Maximum salary: 160000.000000'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Median salary: 53106.921000'"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Your code\n",
"display(\"Maximum salary: %f\" % df_demog_ds[\n",
" df_demog_ds.Country.isin([\"Australia\"])\n",
"].CompensationAmount.max())\n",
"display(\"Median salary: %f\" % df_demog_ds[\n",
" df_demog_ds.Country.isin([\"Australia\"])\n",
"].CompensationAmount.median())"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "b5TQQt_1LSG2"
},
"source": [
"
\n",
"\n",
"**Code**: \n",
"There are some outliers in the Australian salary plot. You are required to filter the salary of Australian respondents by removing any below 40,000 or above 250,000. \n",
"\n",
" \n",
"
\n",
" \n",
"**Report**: \n",
" **1.2.C** In your report's section '1.2.C', answer what is the new maximum and median salary in AUD for Australian respondents after filtering, and also include your plotted boxplot of this coding task into your report. \n",
"
\n",
"\n",
"\n",
"
\n"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"colab": {},
"colab_type": "code",
"id": "iDkjx7H1NhAj"
},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAWAAAAEXCAYAAACTRp41AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAgAElEQVR4nO3deXRN5/oH8G9GuRJFamhrWkpjrLFoJEFiiExCYggSSouWUvSHpIQSmnK1amgvt7VUcUUJTWseIlcIEWPEUCoaSWXQhMick3Oe3x9W9hISUxIv7vezVledc/Z+9/O8m2+295yzGYmIgIiInjlj1QUQEf2vYgATESnCACYiUoQBTESkCAOYiEgRBjARkSIM4KeQlJSEFi1awNPTE56envDw8MCgQYNw8uTJSjles2bNkJGR8dBtIiIisHTp0icaV6/X46OPPoKzszPWr19f4rXk5GS4u7vD09MTJ06cwKRJkwAA/v7+WL16NQBgxYoV2L9//xMd80mcO3cOTk5OFTLW8uXLMW/evAoZq7LodDrY29vjgw8+KPdYiYmJmDhx4hPvd+88jRkzBn/88Ue5a6Gymaou4EVlYWGBsLAw7fHOnTsREBCAvXv3Kqnn3LlzyMzMfKJ9UlNTcfjwYZw5cwYmJiYlXouOjkatWrXw448/AgD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GRnBysoKK1asKPNG1sDdJQwXFxd4e3ujatWqsLCwwKxZs9C4cWNs2bIFffv2hZGRETp37gxra2skJCSgUaNGaNOmDdzc3LBhwwZtrIEDByI5ORmDBg2CwWBAo0aNsHjx4of2sXHjRgwePBjVqlXTnjM1NcW4ceOwbNky9O3b97Hmo2nTppgzZw4+/vhj6PV6WFhYYOXKlahWrRr69euHyMhI9OnTB3Xr1kXnzp0f6yq3d+/emDZtGj7//HPY29s/Vh30YuGnIOiJNWvWTPvUARE9PS5BEBEpwitgIiJFeAVMRKQIA5iISBEGMBGRIgxgIiJFGMBERIowgImIFPl/ez2Dxowsw7QAAAAASUVORK5CYII=\n",
"text/plain": [
"
"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.title(\"Boxplot of filtered salary on Australia\")\n",
"\n",
"# Your code\n",
"sns.boxplot(x=df_demog_ds.CompensationAmount[\n",
" df_demog_ds.Country.isin([\"Australia\"]) &\n",
" (df_demog_ds.CompensationAmount >= 40000) &\n",
" (df_demog_ds.CompensationAmount <= 250000) \n",
"])\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {
"_cell_guid": "06c9b38b-000e-4b8a-95f0-65a93bb332f2",
"_uuid": "2bfa8ca86a226c9900a67a02236a072274bc0d18",
"colab_type": "text",
"id": "WL_oOonnot2l"
},
"source": [
"### 1.3. Exploring the data scientist Demographics\n",
"\n",
"***\n",
"\n",
"#### 1.3.1 Age\n",
"\n",
"You will need to build a boxplot to explore the age of all data scientists. \n",
"Your plot must have a label for each axis, a tittle and also show the outliers."
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {
"colab": {},
"colab_type": "code",
"id": "3qi9JyJHot2o"
},
"outputs": [
{
"data": {
"image/png":...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here