Lab 9
Scripting (pt. 2): visualization
Part 1: Visualization in Python
Complete the third and fourth chapters in the DataCamp course Introduction to Data Science in Python:
- Plotting data with matplotlib
- Different types of plots
Be sure to use your UWEC email using the link I emailed last week.
Upload a screenshot showing your completion of the “Plotting data with matplotlib” lesson (1 pts.).
Upload a screenshot showing your completion of the “Different types of plots” lesson (1 pts.).
Part 2: Additional questions
Read in the following dataset using pandas using its commonly accepted alias.
Store it in a variable called torn:
Create a new data frame from the original where values for
F_SCALEare greater than 2. Select only the columnsYEAR,F_SCALE,x, andy(2 pts.).Create a scatter plot of the dataset created in question 3. using its coordinates as the x and y values. Add transparency and change the color (2 pts.).
Create a histogram of the dataset created in question 3. by the column
YEAR. Change the number of bins and the color. Label the x and y axes appropriately (2 pts.).Create a hexbin jointplot with
seabornusing the dataset created in Question 3. Use the link provided as a guide, but substitute in the new data (2 pts.).Read this liked meuse dataset as a pandas dataframe. Select only the variables
cadmium,copper,leadzinc,elev, anddist. Create a pairplot of these variables usingseaborn(2 pts.).