import numpy as np # NumPy is an array and math library import matplotlib.pyplot as plt # Matplotlib is a visualization (plotting) library import pandas as pd # Pandas lets us work with spreadsheet (.csv) data from datetime import datetime, timedelta # Datetime helps us work with dates and times filepath_0 = '/content/2023051001001_Carkeek.csv' filepath_1 = '/content/2023051101001_Carkeek.csv' data_0 = pd.read_csv(filepath_0,comment='#') data_1 = pd.read_csv(filepath_1,comment='#') display(data_0) # For example: data_0['density00'] # Temperature vs. depth profile plt.plot(data_0['t090C'],data_0['depSM'],label='R/V Carson cast #1 (5/10/23)') plt.plot(data_1['t090C'],data_1['depSM'],label='R/V Carson cast #2 (5/11/23)') plt.legend() plt.gca().invert_yaxis() # This reverses the y-axis plt.xlabel('Temperature (°C)') plt.ylabel('Depth (m)'); # Write your code here: filepath_2 = '/content/20230512_glider.csv' data_2 = pd.read_csv(filepath_2,parse_dates=['time']) display(data_2) plt.plot(data_0['longitude'],data_0['latitude'],label='R/V Rachel Carson cast #1') plt.plot(data_1['longitude'],data_1['latitude'],label='R/V Rachel Carson cast #2') plt.plot(data_2['longitude'],data_2['latitude'],label='Glider') plt.legend() plt.xlabel('Longitude (°E)') plt.ylabel('Latitude (°N)') plt.title('Ship and glider tracks'); plt.scatter(data_2['time'],data_2['depth'],c=data_2['buoyancy']) plt.colorbar(label='Buoyancy (g)') # This adds the color bar and color label on the right plt.gca().invert_yaxis() # This reverses the y-axis plt.xlabel('Time') plt.ylabel('Depth (m)'); # Write your code here: