kchou6 commited on
Commit
1f47442
·
verified ·
1 Parent(s): f4abaa7

Upload 2 files

Browse files
Files changed (3) hide show
  1. .gitattributes +1 -0
  2. Electric_Vehicle_Population_Data.csv +3 -0
  3. app.py +70 -0
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ Electric_Vehicle_Population_Data.csv filter=lfs diff=lfs merge=lfs -text
Electric_Vehicle_Population_Data.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:18ee71403c210c570bbe6786e88436bc21ad7748ab1f5683d94b5bffb711072d
3
+ size 51381679
app.py ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import pandas as pd
2
+ import streamlit as st
3
+ import altair as alt
4
+
5
+ data = pd.read_csv('/Users/kinza/Desktop/PreviousWork/Electric_Vehicle_Population_Data.csv')
6
+ print(data)
7
+
8
+ st.title("Electric Vehicle Population")
9
+ st.markdown("By: Kinza Chouhdry & Esbeida Garcia")
10
+
11
+ st.markdown("""
12
+
13
+ This dataset shows the Battery Electric Vehicles (BEVs) and Plug-in Hybrid Electric Vehicles (PHEVs) that are currently registered through Washington State Department of Licensing (DOL). You can explore the dataset on [data.gov](https://catalog.data.gov/dataset/electric-vehicle-population-data).
14
+ """)
15
+
16
+ st.sidebar.header("Filters")
17
+ selected_make = st.sidebar.selectbox("Select Make", options=data['Make'].unique())
18
+
19
+ # Additional Filters
20
+ selected_county = st.sidebar.selectbox("Select County", options=["All"] + list(data['County'].unique()))
21
+ selected_vehicle_type = st.sidebar.selectbox("Select Vehicle Type", options=["All"] + list(data['Electric Vehicle Type'].unique()))
22
+
23
+ # Apply Filters
24
+ filtered_data = data[
25
+ (data['Make'] == selected_make) &
26
+ ((data['County'] == selected_county) | (selected_county == "All")) &
27
+ ((data['Electric Vehicle Type'] == selected_vehicle_type) | (selected_vehicle_type == "All"))
28
+ ]
29
+
30
+ # Driver plot: Vehicle count by make
31
+ st.subheader("Vehicle Count by Model")
32
+ driver_plot = alt.Chart(filtered_data).mark_bar().encode(
33
+ x='Model',
34
+ y='count()',
35
+ tooltip=['Model', 'count()'],
36
+ color=alt.Color('Model:N', scale=alt.Scale(scheme='viridis'))
37
+ ).interactive()
38
+ st.altair_chart(driver_plot, use_container_width=True)
39
+
40
+ # Secondary plot: EV distribution by year
41
+ st.subheader("Electric Vehicle Distribution by Year")
42
+ year_plot = alt.Chart(filtered_data).mark_line().encode(
43
+ x=alt.X('Model Year:N', title='Model Year'),
44
+ y=alt.Y('count()', title='Count'),
45
+ color='Make'
46
+ ).interactive()
47
+ st.altair_chart(year_plot, use_container_width=True)
48
+
49
+ st.markdown("""
50
+ ### Dashboard Write-Up
51
+ The dashboard provides interactive visualizations to explore the electric vehicle population in Washington State, specifically focusing on Battery Electric Vehicles (BEVs) and Plug-in Hybrid Electric Vehicles (PHEVs). Users can filter the data by vehicle make, county, and type of electric vehicle to customize the visualizations. The first visualization shows the vehicle count by model, with a bar chart that displays the number of vehicles per model. The second visualization depicts the distribution of electric vehicles over time, showing how the number of vehicles has changed by model year. Both visualizations are interactive, allowing users to hover over data points for more detailed information and adjust filters to gain insights into the trends and patterns of electric vehicle registration in Washington State.
52
+ """)
53
+
54
+ st.markdown("""
55
+ ### Contextual Datasets
56
+
57
+ - [WA Tax Exemptions Potential Eligibility by Make & Model](https://catalog.data.gov/dataset/wa-tax-exemptions-potential-eligibility-by-make-model-excluding-vehicle-price-criteria)
58
+ - [Open Charge Map](https://openchargemap.org/site)
59
+ """)
60
+
61
+ st.markdown("""
62
+ The dataset provides information on vehicles that could be eligible for tax exemptions, specifically focusing on Battery Electric Vehicles (BEVs) and Plug-in Hybrid Electric Vehicles (PHEVs). However, eligibility for these exemptions depends on specific factors, such as clean energy requirements and vehicle price, which are not directly covered by the dataset. To fully determine if a vehicle qualifies for the tax exemption, it would be beneficial to use this dataset in conjunction with additional information, like the vehicle price and other relevant criteria. Additionally, the Open Charge Map can be a good resource to locate charging ports in the state of Washington.  
63
+ """)
64
+
65
+ st.markdown("""
66
+ ### Dataset Size
67
+ For this project, the dataset is large, and in order to upload it to GitHub, we had to zip the CSV file to meet the upload size limitations. Initially, we encountered performance issues when running the dataset in the workspace due to its size. As a result, we decided to use Streamlit for the visualization. Streamlit offers a more efficient environment for handling large datasets, ensuring that the visualization runs smoothly without the performance issues we faced in the workspace.
68
+ """)
69
+
70
+