Giter Site home page Giter Site logo

diannejardinez / matplotlib-challenge- Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 109 KB

DataFrames and figures(bar, box, line, and scatter plots) for a pharmaceutical study

License: MIT License

Jupyter Notebook 100.00%
data-analysis jupyter-notebook matplotlib numpy dataframe

matplotlib-challenge-'s Introduction

The Power of Plots Analysis

Pymaceuticals Inc., a burgeoning pharmaceutical company based out of San Diego, specializes in anti-cancer pharmaceuticals. In its most recent efforts, it began screening for potential treatments for squamous cell carcinoma (SCC), a commonly occurring form of skin cancer.

We have access to the complete data from their most recent animal study. In this study, 250 mice identified with SCC tumor growth were treated through a variety of drug regimens. Over the course of 45 days, tumor development was observed and measured. The purpose of this study was to compare the performance of Pymaceuticals' drug of interest, Capomulin, versus the other treatment regimens.

Given the task by the executive team to generate all of the tables and figures needed for the technical report of the study and for a top-level summary of the study results.

The final report will include the following below:

  • A summary statistics table consisting of the mean, median, variance, standard deviation, and SEM of the tumor volume for each drug regimen

  • Bar plots that show the number of data points for each treatment regimen using Pandas's DataFrame.plot() and Matplotlib's pyplot

  • A box plot of the final tumor volume for the most promising treatment regimens: Capomulin, Ramicane, Infubinol, and Ceftamin; and highlighting any potential outliers in the plot. Additionally, display the calculation of the quartiles and IQR and quantitatively determine if there are any potential outliers across all four treatment regimens.

  • A line plot of time point versus tumor volume for a single mouse treated with Capomulin

  • A scatter plot of mouse weight versus average tumor volume for the Capomulin treatment regimen. Additionally, show the calculation of the correlation coefficient and linear regression model and plot this linear regression model on top of the scatter plot.

Observations and Insights: 250 mice identified with squamous cell carcinoma (SCC) tumor growth were treated through a variety of drug regimens. Over the course of 45 days, tumor development was observed and measured.

  • Of the drug regimens used, Capomulin and Ramicane were the treatments seen in mice with the lowest average tumor volume whereas Ketapril and Naftisol regimens had the highest average of tumor volume.

  • The distribution of data of the four treatment regmines of Capomulin, Ramicane, Infubinol, and Ceftamin show that Ramicane had the lowest tumor volume data distribution compared to Capomulin, whereas Infubinol had the highest tumor volume data distribution. It should be noted that there was an outlier in the Infubinol treatment where tumor volume was low for one subject.

  • The correlation coefficient between both mouse weight and tumor volume is 0.84 indicating that the strength of this correlation is strong. This would mean that mouse weight has an influence on tumor volume.

  • Treatment Regimens Capomulin and Ramicane had more opportunities to be used compared to Propovia, this may mean that Capomulin and Ramicane subjects lived longer than Propovia subjects.

Overall, Ramicane is the treatment regimen comparable to Capomulin in reducing the tumor volume of squamous cell carcinoma (SCC) in mice.


The Power of Plots Instructions

Background

What good is data without a good plot to tell the story?

So, let's take what you've learned about Python Matplotlib and apply it to a real-world situation and dataset:

While your data companions rushed off to jobs in finance and government, you remained adamant that science was the way for you. Staying true to your mission, you've joined Pymaceuticals Inc., a burgeoning pharmaceutical company based out of San Diego. Pymaceuticals specializes in anti-cancer pharmaceuticals. In its most recent efforts, it began screening for potential treatments for squamous cell carcinoma (SCC), a commonly occurring form of skin cancer.

As a senior data analyst at the company, you've been given access to the complete data from their most recent animal study. In this study, 250 mice identified with SCC tumor growth were treated through a variety of drug regimens. Over the course of 45 days, tumor development was observed and measured. The purpose of this study was to compare the performance of Pymaceuticals' drug of interest, Capomulin, versus the other treatment regimens. You have been tasked by the executive team to generate all of the tables and figures needed for the technical report of the study. The executive team also has asked for a top-level summary of the study results.

Instructions

Your tasks are to do the following:

  • Generate a summary statistics table consisting of the mean, median, variance, standard deviation, and SEM of the tumor volume for each drug regimen.

  • Generate a bar plot using both Pandas's DataFrame.plot() and Matplotlib's pyplot that shows the number of data points for each treatment regimen.

    • NOTE: These plots should look identical.
  • Generate a pie plot using both Pandas's DataFrame.plot() and Matplotlib's pyplot that shows the distribution of female or male mice in the study.

    • NOTE: These plots should look identical.
  • Calculate the final tumor volume of each mouse across four of the most promising treatment regimens: Capomulin, Ramicane, Infubinol, and Ceftamin. Calculate the quartiles and IQR and quantitatively determine if there are any potential outliers across all four treatment regimens.

  • Using Matplotlib, generate a box and whisker plot of the final tumor volume for all four treatment regimens and highlight any potential outliers in the plot by changing their color and style.

    Hint: All four box plots should be within the same figure.

  • Generate a line plot of time point versus tumor volume for a single mouse treated with Capomulin.

  • Generate a scatter plot of mouse weight versus average tumor volume for the Capomulin treatment regimen.

  • Calculate the correlation coefficient and linear regression model between mouse weight and average tumor volume for the Capomulin treatment. Plot the linear regression model on top of the previous scatter plot.

  • Look across all previously generated figures and tables and write at least three observations or inferences that can be made from the data. Include these observations at the top of notebook.

Here are some final considerations:

  • You must use proper labeling of your plots, to include properties such as: plot titles, axis labels, legend labels, x-axis and y-axis limits, etc.

Copyright

Trilogy Education Services © 2019. All Rights Reserved.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.