<jupyter_start><jupyter_text>Michael EDA<jupyter_code>import sys, os
sys.path.insert(0, os.path.abspath('..'))

from scripts import project_functions
csv = "Electric_Vehicle_Population_Data.csv"
df = project_functions.load_and_process(csv)
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
df.head()<jupyter_output><empty_output><jupyter_text>Basic Analysis<jupyter_code>df.nunique(axis=0)
corr = df.corr()# plot the heatmap
sns.heatmap(corr, xticklabels=corr.columns, yticklabels=corr.columns, annot=True, cmap=sns.diverging_palette(220, 20, as_cmap=True))
df.plot(kind='scatter', x='Longitude', y='Latitude')
ax = sns.countplot(y = df["EV_Type"], data = df).set_title("Number of Electric Vehicles in Washington by Electric Vehicle Types")
fig, ax1 = plt.subplots()
fig.set_size_inches(10, 9)
ax1 = sns.countplot(y = df["Make"], data = df).set_title("Number of Electric Vehicles in Washington by EV Make")
df1 = df[(df['Latitude'] > 47.2) & (df['Longitude'] < -120)]
sns.jointplot(x="Latitude", y="Longitude", kind="hex", data=df1, color="#4571c5")
df1.plot(kind='scatter', x='Longitude', y='Latitude')
hist = df.hist(bins=10,figsize =(10,10))
boxplot = sns.boxplot(x = df1['Longitude'])
boxplot1 = sns.boxplot(x = df1['Latitude'])<jupyter_output><empty_output><jupyter_text>Research Question Analysis  Research Question 1**What are the top 10 most used vehicles used in Washington in the most densely populated area (North-west)?**<jupyter_code>df2 = df.drop(df[(df['North_South']=='South')].index)
df2 = df2.drop(df2[(df2['North_South']=='North')&(df2['West_East']=='East')].index)

fig, ax2 = plt.subplots()
fig.set_size_inches(8, 7)
ax2 = sns.countplot(y = 'Make',data = df2,order = df2['Make'].value_counts().index)<jupyter_output><empty_output><jupyter_text>From the above graph the top 10 most used vehicles used in Washington in the most densely populated area are:1. Tesla2. Nissan3. Chevrolet4. Ford5. BMW6. Toyota7. Kia8. Audi9. Volkswagen10. Hyundai  Research Question 2**What are the top 10 most used vehicles used in Washington in the least densely populated areas (North-east, South-east, South-west)?**<jupyter_code>df3 = df.drop(df[(df['North_South']=='North')&(df['West_East']=='West')].index)
fig, ax3 = plt.subplots()
fig.set_size_inches(8, 7)
ax3 = sns.countplot(y = 'Make',data = df3,order = df3['Make'].value_counts().index)<jupyter_output><empty_output><jupyter_text>From the above graph the top 10 most used vehicles used in Washington in the most densely populated area are:1. Tesla2. Chevrolet3. Nissan4. Ford5. Toyota6. BMW7. Kia8. Hyundai9. Mitsubishi10. Honda  Research Question 3**How do the top 5 cars in the most densely populated places in Washington compare in MSRP?**<jupyter_code>df4 = df.drop(df[(df['Make']!='TESLA')&(df['Make']!='NISSAN')&(df['Make']!='CHEVROLET')&(df['Make']!='FORD')&(df['Make']!='BMW')].index)
df4 = df4.groupby(['Make'])['MSRP'].mean().reset_index()
df4 = df4.sort_values(by='MSRP', ascending=False)
df4 = df4.reset_index(drop=True)
df4 = df4.join(df.set_index('Make'), on='Make', lsuffix='_1', rsuffix='_2')
df4 = df4.sort_values(by='MSRP_1', ascending=False)
fig1, ax2 = plt.subplots()
fig1.set_size_inches(8, 14)
ax3 = sns.boxplot(x="MSRP_2", y="Make", data=df4)
ax3 = sns.stripplot(x="MSRP_2", y="Make", data=df4, color="0.3")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.17028231797919763, 'fraction_numerical': 0.03447251114413076, 'mean_word_length': 7.27027027027027, 'pattern_counts': {'":': 0, '<': 22, '<?xml version=': 0, '>': 22, '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': '403464', 'license': 'MIT', 'n_tokens_mistral': 1352, 'n_tokens_neox': 1254, 'n_words': 276, 'path': 'Analysis/Submitted/Michael_EDA.ipynb', 'repo_name': 'data301-2020-winter1/course-project-group_6016', 'size': '3365'}