For this task, you are to graph the physical characteristics of Gentoo penguins using Pandas and...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
For this task, you are to graph the physical characteristics of Gentoo penguins using Pandas and Matplotlib. Instructions This task uses a dataset containing some physical measurements of three penguin species: Adelie, Chinstrap and Gentoo. You can view the dataset online by clicking here. Run the following code cell to load the dataset into a Pandas DataFrame and look at the first few rows. Read through the code before executing it. [] # DO NOT EDIT THIS CODE # Import the modules that we need for this task. import pandas as pd import matplotlib. pyplot as plt # This is the location of the penguin data file on the internet. PENGUINS_URL = 'https://gist.githubusercontent.com/anibali/c2abc8cab4a2f7b0a6518d11a67c693c/raw/3b1bb5264736bb762584104c9e7a828bef0f6ec8/penguins.csv' Bill length (mm) # Download the penguin data and turn it into a Pandas DataFrame object. df = pd.read_csv (PENGUINS_URL) # Display the first few rows of the DataFrame object. display(df.head()) As you can see, the dataset consists of 7 columns. The species of penguin can be Gentoo, Adelie, or Chinstrap. The sex can be MALE or FEMALE. Your task is to produce a scatter plot which relates bill depth and bill length for MALE penguins only where the weight must be above 4kg, with data points separated by the species of penguin. A successful solution produces a plot similar to the example below, which clearly shows how these physical measurements are a good indicator of species for male penguins. You can use whichever three colours for the points you like, provided that the three colours are not the same as each other. Everything else must be identical. 60 55 50 40 35 T 14 T 15 Penguin Measurements by Species T 16 T 17 Bill depth (mm) T 18 19 ● Adelie ● Chinstrap ● Gentoo 20 T 21 PASAKATHAIGIALIUTAMAMANAHOVA MERKATOR ai h h I e C il D il MENER Criteria During marking we will check that your program: • Creates three different DataFrames for the different species of male penguins by filtering the data appropriately. (6 marks) • You may create an intermediate DataFrame containing all male penguins with at least 4kg in weight to help achieve this. (3 marks) • Creates and shows a figure using Matplotlib. (2 marks) • Uses the three DataFrames to create 3 scatter plots on the same graph. (6 marks) • Uses correct labels for the axes and title. (3 marks) • Displays a legend. (2 marks) • Produces a graph which closely matches the example. Using any three different colours for the points is allowed. (3 marks) Your Solution # Write your solution here (don't forget to execute the code cell in the # Instructions section first) For this task, you are to graph the physical characteristics of Gentoo penguins using Pandas and Matplotlib. Instructions This task uses a dataset containing some physical measurements of three penguin species: Adelie, Chinstrap and Gentoo. You can view the dataset online by clicking here. Run the following code cell to load the dataset into a Pandas DataFrame and look at the first few rows. Read through the code before executing it. [] # DO NOT EDIT THIS CODE # Import the modules that we need for this task. import pandas as pd import matplotlib. pyplot as plt # This is the location of the penguin data file on the internet. PENGUINS_URL = 'https://gist.githubusercontent.com/anibali/c2abc8cab4a2f7b0a6518d11a67c693c/raw/3b1bb5264736bb762584104c9e7a828bef0f6ec8/penguins.csv' Bill length (mm) # Download the penguin data and turn it into a Pandas DataFrame object. df = pd.read_csv (PENGUINS_URL) # Display the first few rows of the DataFrame object. display(df.head()) As you can see, the dataset consists of 7 columns. The species of penguin can be Gentoo, Adelie, or Chinstrap. The sex can be MALE or FEMALE. Your task is to produce a scatter plot which relates bill depth and bill length for MALE penguins only where the weight must be above 4kg, with data points separated by the species of penguin. A successful solution produces a plot similar to the example below, which clearly shows how these physical measurements are a good indicator of species for male penguins. You can use whichever three colours for the points you like, provided that the three colours are not the same as each other. Everything else must be identical. 60 55 50 40 35 T 14 T 15 Penguin Measurements by Species T 16 T 17 Bill depth (mm) T 18 19 ● Adelie ● Chinstrap ● Gentoo 20 T 21 PASAKATHAIGIALIUTAMAMANAHOVA MERKATOR ai h h I e C il D il MENER Criteria During marking we will check that your program: • Creates three different DataFrames for the different species of male penguins by filtering the data appropriately. (6 marks) • You may create an intermediate DataFrame containing all male penguins with at least 4kg in weight to help achieve this. (3 marks) • Creates and shows a figure using Matplotlib. (2 marks) • Uses the three DataFrames to create 3 scatter plots on the same graph. (6 marks) • Uses correct labels for the axes and title. (3 marks) • Displays a legend. (2 marks) • Produces a graph which closely matches the example. Using any three different colours for the points is allowed. (3 marks) Your Solution # Write your solution here (don't forget to execute the code cell in the # Instructions section first)
Expert Answer:
Answer rating: 100% (QA)
The answer provided below has been developed in a clear step by step mannerStep 1 PLEASE REFER TO TH... View the full answer
Related Book For
Business Analytics Methods Models and Decisions
ISBN: 978-0321997821
2nd edition
Authors: James R. Evans
Posted Date:
Students also viewed these programming questions
-
Ella, a portfolio manager, considered several ways to invest USD15 million for one year. The data are as follows: USD interest: 7% per annum (p.a.) GBP interest: 10% p.a. Spot exchange rate:...
-
water is moving through the combination of elbow and nozzle. The water is discharged to the atmosphere. The combination is in horizontal plane. Determine the magnitude and direction of the x and y...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
This is similar to Section 2.2 Problem 28: Use algebraic simplifications to find the limit. Use a fraction. 2x-6 lim x+3x-9 =
-
The equivalent-circuit parameters of an 8-kW, 230-V, 60-Hz, four-pole, two-phase, squirrel-cage induction motor in ohms per phase are R l = 0.253 X l = 1.14 X m = 32.7 R 2 = 0.446 X 2 = 1.30. This...
-
Consider the case of a coffee mug being produced by rapid prototyping. Describe how the top of the handle can be manufactured, since there is no material directly beneath the arch of the handle?
-
Until recently, Seth worked for the Seaside Cruise Ship Line Corporation (Seaside) as an engineer. Seaside is a U.S. company based in Florida. For the past two years, Seth has been assigned to one of...
-
Riot Company issued $500,000, 15-year, 7% bonds at 96. Instructions (a) Prepare the journal entry to record the sale of these bonds on January 1, 2014. (b) Suppose the remaining Discount on Bonds...
-
The DD-AA model predicts that a permanent increase in foreign money demand will lead to an improvement in the domestic current account. True/False/Uncertain, explain and support your answer with ONE...
-
Sally deposits $4,000 in a certificate of deposit that pays 2.12% simple interest. What is her balance after 1 year?
-
Comparing the performance of Microsoft Hyper-V and VM VirtualBox by benchmarks and tests. Some of these tests include : network performance, CPU and memory usage, user experience, and disk I/O scans?...
-
Download the following articles from your librarys electronic database (e.g. ProQuest or ABI-Inform) and analyze them: (a) Beckman, J.K., 1995. The Economic Unit Approach to Consolidated Financial...
-
Pillow Private Bank has the following market value balance sheet: (a) What is the duration of the assets? (b) What is the duration of the liabilities? (c) Is the bank immune from interest rate risk?...
-
This morning you agreed to buy a 1-year Treasury bond in 6 months. The bond has a face value of 100,000. Use the spot interest rates listed here to answer the following questions: (a) What is the...
-
Marshall plcs purchases from suppliers in a quarter are equal to 75 per cent of the next quarters forecast sales. The payables period is 60 days. Wages, taxes and other expenses are 20 per cent of...
-
Here are some important figures from the budget of Sagmo AB for the first quarter of 2015: The company predicts that 5 per cent of its credit sales will never be collected, 35 per cent of its sales...
-
QUESTION 16 Find anand a6 for the following arithmetic sequence. 4, 12, 20, 28, 36, ... an = 8n - 2; a6 = 46 an = 4(8)n-1; a6 = 32 an = 4n - 8; a6 = 16 an = 2(4n - 2); a6 = 44
-
State whether each of the following will increase or decrease the power of a one-way between-subjects ANOVA. (a) The effect size increases. (b) Mean square error decreases. (c) Mean square between...
-
Construct a scatter plot matrix for Median Income, Median Home Value, Median Household Wealth, and Average Bank Balance in the Excel file Banking Data. What conclusions can you reach?
-
Bangs Leisure Chairs produces three types of handcrafted outdoor chairs that are popular for beach, pool, and patios: sling chairs, Adirondack chairs, and hammocks. The unit profit for these products...
-
The time required to play a game of Battleship is uniformly distributed between 15 and 60 minutes. a. Find the expected value and variance of the time to complete the game. b. What is the...
-
Which of Yellows statements regarding the factors affecting the selection of a trading strategy is correct? A. Statement 1 B. Statement 2 C. Statement 3 Robert Harding is a portfolio manager at...
-
To fill the remaining portion of the ABC order, Yellow is using: A. an arrival price trading strategy. B. a TWAP participation strategy. C. a VWAP participation strategy. Robert Harding is a...
-
Given the parameters for the benchmark given by Harding, Yellow should recommend a benchmark that is based on the: A. arrival price. B. time-weighted average price. C. volume-weighted average price....
Study smarter with the SolutionInn App