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 =
-
Bond portfolio managers closely monitor the trade deficit figures, because the trade deficit can affect exchange rates, which can affect inflationary expectations and therefore interest rates. a....
-
Express the bivariate linear regression model in terms of the original parameters n = (n 0 , n 1 ) T and the matrix A 0 and use the general linear model to find the posterior distribution of n.
-
The population densities in people per square mile in the 50 U.S. states have a mean of 199.6 and a standard deviation of 265.4. Random samples of size 35 are drawn from this population, and the mean...
-
The following are misstatements that have occurred in Fresh Foods Grocery Store, a retail and wholesale grocery company: 1. The incorrect price was used on sales invoices for billing shipments to...
-
please explain. a) What are some of the differences between floatation, secondary share issue and private placement? b) BetaVac is considering a rights issue to raise $70 million to finance a new...
-
Find the risk-neutral probabilities and zero cost date 0 forward prices (for settlement at date 1) for the stock in exercise 7.2. As in that exercise, assume a risk-free rate of 15% per period. 7.2....
-
solve pls Flounder Limited reported profit of \( \$ 448,650 \) for its November 30, 2024, year end. Cash dividends of \( \$ 78,300 \) on the common shares and \( \$ 67,800 \) on the noncumulative...
-
How many shims are too many under any one foot?
-
True or False: Thermal alignment numbers are always available from the manufacturer.
-
What is the major drawback of analog-frequency analyzers?
-
True or False: Faulty poured aluminum bars are easily found during static testing.
-
Two sine waves that are out of phase could still have the same two parameters. What are they?
-
Coolibah Holdings is expected to pay dividends of $ 1 . 2 0 every six months for the next three years. If the current price of Coolibah stock is $ 2 2 . 6 0 , and Coolibah's equity cost of capital is...
-
A researcher reports a significant two-way between-subjects ANOVA, F(3, 40) = 2.96. State the decision to retain or reject the null hypothesis for this test.
-
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...
-
3. Under Delaware law, a corporation cannot appear in court without a lawyer, but a partnership can. Fox Hollow Ventures, Ltd., was a limited liability company. One of its employees, who was not a...
-
4. Glenleigh Falls Development Co. was a limited liability company that hired architects John and Marion Zaugg to design a residential golf course. The Zauggs were to receive partial payment for...
-
6. CPA QUESTION A joint venture is a(n): (a) Association limited to no more than two persons in business for profit (b) Enterprise of numerous co-owners in a nonprofit undertaking (c) Corporate...
Study smarter with the SolutionInn App