<jupyter_start><jupyter_text>COVIS_Project 3D data modeling & vizualization  Step one: Edit your data   Step two: Use Pandas to read the edited file into Pandas DataFrame  Step three: Use Pandas to make a scatter plott that plost the positions on an xy plane and add color using elevations  Step four: Plot the same dtaa using 3D vizualization. Use Matplotlib after taking the data into lists.<jupyter_code>import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
%matplotlib inline
from mpl_toolkits import mplot3d<jupyter_output><empty_output><jupyter_text>In order to understand our data we need to stablish the values for each of our arrays, now here is an example of previous work of how to do that:<jupyter_code>xvalues=np.array([0, 1, 2, 3, 4])
yvalues=np.array([0, 1, 2, 3, 4])
xx, yy = np.meshgrid(xvalues, yvalues)
print(xx)
def f(xvalues, yvalues):
    return np.sin(xvalues) ** 10 + np.cos(10 + yvalues * xvalues) * np.cos(xvalues)
zz = f(xx, yy)
X = xx.flatten()
Y = yy.flatten()
Z = zz.flatten()
print(X)
print(Y)
print(Z)
df = pd.DataFrame.from_dict(np.array([X,Y,Z]).T)
df.columns = ['x_value','y_value','z_value']
df['z_value'] = pd.to_numeric(df['z_value'])
df.head()
df.describe()
df.plot.scatter(x='x_value', y='y_value', c='z_value', colormap='viridis');<jupyter_output><empty_output><jupyter_text>Next we are gonna set the size of our resolution<jupyter_code>dx, dy = 0.05, 0.05<jupyter_output><empty_output><jupyter_text>Next we are going to generate values for three dimentional lines<jupyter_code>zline = np.linspace(0, 15, 1000)
xline = np.sin(zline)
yline = np.cos(zline)
ax.plot3D(xline, yline, zline, 'gray')
!head ../skills_building/practice_data/actualbathy.csv
y2=yy.flatten()
print(y2)
data = {'x':x2,
       'y':y2,
       'z':z2}
df=pd.DataFrame(data)
df
df.plot(kind ='scatter',x='x',y='y',color='orange')
plt.savefig('Q4plot.png')
df.plot.scatter(x='x',y='y',c='z', colormap='viridis')
plt.savefig('q5plot.png')
!head -5 actualbathy.csv<jupyter_output><empty_output><jupyter_text>The next step is to open our data in the DataFreame<jupyter_code>df_bathy = pd.read_csv('actualbathy.csv')
df_bathy
df.info()
df_bathy.plot.scatter(x='EAST', y='NORTH', c='ELEVATION', colormap='viridis');
plt.savefig('Q9plot.png')
eastlist = list(df_bathy['EAST']),
northlist = list(df_bathy['NORTH']),
elevationlist = list(df_bathy['ELEVATION'])
df = pd.DataFrame.from_dict(np.array([X,Y,Z]).T)
df.columns = ['x_value','y_value','z_value']
df['z_value'] = pd.to_numeric(df['z_value'])
df.head()
ax = plt.axes(projection='3d')

xdata= eastlist
ydata= northlist
zdata= elevationlist
ax.scatter3D(xdata, ydata, zdata, c=zdata, cmap='viridis');
plt.savefig('A10plot.png')
df_covis_location_bar= pd.read_csv('actualbathy.csv')
df_bathy<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15365329512893983, 'fraction_numerical': 0.015759312320916905, 'mean_word_length': 6.528301886792453, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '26000', 'license': 'MIT', 'n_tokens_mistral': 1162, 'n_tokens_neox': 1106, 'n_words': 256, 'path': 'gonzalez/COVIS_project/gonzalez_project.ipynb', 'repo_name': 'daxsoule/covis', 'size': '2792'}