├── EVMarket.pdf ├── images ├── 1.png ├── 2.jpg ├── corr.png ├── ms-ev.png ├── pred.png ├── price.png ├── rapid.png ├── seats.png ├── density.png ├── fastest.png ├── kmeans.png ├── loadings.png ├── metrics.png ├── pie-top.png ├── plugtype.png ├── segment.png ├── top-max.png ├── topspeed.png ├── bodystyle.png ├── dendrogram.png ├── distortion.png ├── kmeansalgo.png ├── pie-range.png ├── screeplot.png ├── silhouette.png ├── Marketingmix.png ├── evsalescars.png ├── marketing-mix.png ├── calinski_harabasz.png ├── Behavioral-Segmentation.png ├── Demographic-Segmentation.png ├── Indian-Electric-Car-market.jpg ├── Psychographic-Segmentation.png └── EVMarket.org ├── requirements.txt ├── LICENSE ├── README.md ├── data.csv └── evmarket_india.py /EVMarket.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chaganti-Reddy/EVMarket-India/HEAD/EVMarket.pdf -------------------------------------------------------------------------------- /images/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chaganti-Reddy/EVMarket-India/HEAD/images/1.png -------------------------------------------------------------------------------- /images/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chaganti-Reddy/EVMarket-India/HEAD/images/2.jpg -------------------------------------------------------------------------------- /images/corr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chaganti-Reddy/EVMarket-India/HEAD/images/corr.png -------------------------------------------------------------------------------- /images/ms-ev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chaganti-Reddy/EVMarket-India/HEAD/images/ms-ev.png -------------------------------------------------------------------------------- /images/pred.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chaganti-Reddy/EVMarket-India/HEAD/images/pred.png -------------------------------------------------------------------------------- /images/price.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chaganti-Reddy/EVMarket-India/HEAD/images/price.png -------------------------------------------------------------------------------- /images/rapid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chaganti-Reddy/EVMarket-India/HEAD/images/rapid.png -------------------------------------------------------------------------------- /images/seats.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chaganti-Reddy/EVMarket-India/HEAD/images/seats.png -------------------------------------------------------------------------------- /images/density.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chaganti-Reddy/EVMarket-India/HEAD/images/density.png -------------------------------------------------------------------------------- /images/fastest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chaganti-Reddy/EVMarket-India/HEAD/images/fastest.png -------------------------------------------------------------------------------- /images/kmeans.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chaganti-Reddy/EVMarket-India/HEAD/images/kmeans.png -------------------------------------------------------------------------------- /images/loadings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chaganti-Reddy/EVMarket-India/HEAD/images/loadings.png -------------------------------------------------------------------------------- /images/metrics.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chaganti-Reddy/EVMarket-India/HEAD/images/metrics.png -------------------------------------------------------------------------------- /images/pie-top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chaganti-Reddy/EVMarket-India/HEAD/images/pie-top.png -------------------------------------------------------------------------------- /images/plugtype.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chaganti-Reddy/EVMarket-India/HEAD/images/plugtype.png -------------------------------------------------------------------------------- /images/segment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chaganti-Reddy/EVMarket-India/HEAD/images/segment.png -------------------------------------------------------------------------------- /images/top-max.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chaganti-Reddy/EVMarket-India/HEAD/images/top-max.png -------------------------------------------------------------------------------- /images/topspeed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chaganti-Reddy/EVMarket-India/HEAD/images/topspeed.png -------------------------------------------------------------------------------- /images/bodystyle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chaganti-Reddy/EVMarket-India/HEAD/images/bodystyle.png -------------------------------------------------------------------------------- /images/dendrogram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chaganti-Reddy/EVMarket-India/HEAD/images/dendrogram.png -------------------------------------------------------------------------------- /images/distortion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chaganti-Reddy/EVMarket-India/HEAD/images/distortion.png -------------------------------------------------------------------------------- /images/kmeansalgo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chaganti-Reddy/EVMarket-India/HEAD/images/kmeansalgo.png -------------------------------------------------------------------------------- /images/pie-range.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chaganti-Reddy/EVMarket-India/HEAD/images/pie-range.png -------------------------------------------------------------------------------- /images/screeplot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chaganti-Reddy/EVMarket-India/HEAD/images/screeplot.png -------------------------------------------------------------------------------- /images/silhouette.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chaganti-Reddy/EVMarket-India/HEAD/images/silhouette.png -------------------------------------------------------------------------------- /images/Marketingmix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chaganti-Reddy/EVMarket-India/HEAD/images/Marketingmix.png -------------------------------------------------------------------------------- /images/evsalescars.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chaganti-Reddy/EVMarket-India/HEAD/images/evsalescars.png -------------------------------------------------------------------------------- /images/marketing-mix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chaganti-Reddy/EVMarket-India/HEAD/images/marketing-mix.png -------------------------------------------------------------------------------- /images/calinski_harabasz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chaganti-Reddy/EVMarket-India/HEAD/images/calinski_harabasz.png -------------------------------------------------------------------------------- /images/Behavioral-Segmentation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chaganti-Reddy/EVMarket-India/HEAD/images/Behavioral-Segmentation.png -------------------------------------------------------------------------------- /images/Demographic-Segmentation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chaganti-Reddy/EVMarket-India/HEAD/images/Demographic-Segmentation.png -------------------------------------------------------------------------------- /images/Indian-Electric-Car-market.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chaganti-Reddy/EVMarket-India/HEAD/images/Indian-Electric-Car-market.jpg -------------------------------------------------------------------------------- /images/Psychographic-Segmentation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chaganti-Reddy/EVMarket-India/HEAD/images/Psychographic-Segmentation.png -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | sklearn 2 | scikit-learn 3 | numpy 4 | seaborn 5 | matplotlib 6 | plotly==5.8.0 7 | pandas 8 | tqdm 9 | kaleido 10 | yellowbrick 11 | cufflinks 12 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Chaganti Reddy 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
4 | requirements.txt [See here](requirements.txt)
69 |
70 | ## 🚀 Installation
71 |
72 | 1. Clone the repo
73 |
74 | ```
75 | $ git clone https://github.com/Chaganti-Reddy/EVMarket-India.git
76 | ```
77 |
78 | 2. Change your directory to the cloned repo
79 |
80 | ```
81 | $ cd EVMarket-India
82 | ```
83 |
84 | 3. Now, run the following command in your Terminal/Command Prompt to install the libraries required
85 |
86 | ```
87 | $ pip3 install -r requirements.txt
88 |
89 | ```
90 |
91 | ## :bulb: How to Run
92 |
93 | 1. Open terminal. Go into the cloned project directory and type the following command:
94 |
95 | ```
96 | $ python3 evmarket_india.py
97 | ```
98 |
99 | ## :key: Results
100 |
101 | **Correlation Matrix for the data set using Seaborn**
102 |
103 |
104 |
105 | **Dendrogram for our data:**
106 |
107 |
108 |
109 | **ScreePlot for our data:**
110 |
111 |
112 |
113 | **Cluster analysis using silhouette:**
114 |
115 |
116 |
117 | **Final Results:**
118 |
119 |
120 |
121 | **Check out the report [here](/EVMarket.pdf)**
122 |
123 | ## :clap: And it's done!
124 |
125 | Feel free to mail me for any doubts/query
126 | :email: chagantivenkataramireddy1@gmail.com
127 |
128 | ---
129 |
130 | ## :raising_hand: Citation
131 |
132 | You are allowed to cite any part of the code or our dataset. You can use it in your Research Work or Project. Remember to provide credit to the Maintainer Chaganti Reddy by mentioning a link to this repository and his GitHub Profile.
133 |
134 | Follow this format:
135 |
136 | - Author's name - Chaganti Reddy
137 | - Date of publication or update in parentheses.
138 | - Title or description of document.
139 | - URL.
140 |
141 | ## :beginner: Future Goals
142 |
143 | This study endeavoured to present EV taxonomy using an a-priori approach to categorize potential EV buyers into ub-segments of young and educated consumers and tested eticulously with a blended approach of multivariate and bivariate techniques
144 |
145 | ## :heart: Owner
146 |
147 | Made with :heart: by [Chaganti Reddy](https://github.com/Chaganti-Reddy/)
148 |
149 | ## :eyes: License
150 |
151 | MIT © [Chaganti Reddy](https://github.com/Chaganti-Reddy/EVMarket-India/blob/master/LICENSE)
152 |
153 |
--------------------------------------------------------------------------------
/data.csv:
--------------------------------------------------------------------------------
1 | ,Brand,Model,AccelSec,TopSpeed_KmH,Range_Km,Efficiency_WhKm,FastCharge_KmH,RapidCharge,PowerTrain,PlugType,BodyStyle,Segment,Seats,PriceEuro
2 | 0,Tesla ,Model 3 Long Range Dual Motor,4.6,233,450,161,940,Yes,AWD,Type 2 CCS,Sedan,D,5,55480
3 | 1,Volkswagen ,ID.3 Pure,10,160,270,167,250,No,RWD,Type 2 CCS,Hatchback,C,5,30000
4 | 2,Polestar ,2,4.7,210,400,181,620,Yes,AWD,Type 2 CCS,Liftback,D,5,56440
5 | 3,BMW ,iX3 ,6.8,180,360,206,560,Yes,RWD,Type 2 CCS,SUV,D,5,68040
6 | 4,Honda ,e ,9.5,145,170,168,190,Yes,RWD,Type 2 CCS,Hatchback,B,4,32997
7 | 5,Lucid ,Air ,2.8,250,610,180,620,Yes,AWD,Type 2 CCS,Sedan,F,5,105000
8 | 6,Volkswagen ,e-Golf ,9.6,150,190,168,220,No,FWD,Type 2 CCS,Hatchback,C,5,31900
9 | 7,Peugeot ,e-208 ,8.1,150,275,164,420,No,FWD,Type 2 CCS,Hatchback,B,5,29682
10 | 8,Tesla ,Model 3 Standard Range Plus,5.6,225,310,153,650,Yes,RWD,Type 2 CCS,Sedan,D,5,46380
11 | 9,Audi ,Q4 e-tron ,6.3,180,400,193,540,Yes,AWD,Type 2 CCS,SUV,D,5,55000
12 | 10,Mercedes ,EQC 400 4MATIC,5.1,180,370,216,440,Yes,AWD,Type 2 CCS,SUV,D,5,69484
13 | 11,Nissan ,Leaf ,7.9,144,220,164,230,Yes,FWD,Type 2 CHAdeMO,Hatchback,C,5,29234
14 | 12,Hyundai ,Kona Electric 64 kWh,7.9,167,400,160,380,Yes,FWD,Type 2 CCS,SUV,B,5,40795
15 | 13,BMW ,i4 ,4,200,450,178,650,Yes,RWD,Type 2 CCS,Sedan,D,5,65000
16 | 14,Hyundai ,IONIQ Electric,9.7,165,250,153,210,No,FWD,Type 2 CCS,Liftback,C,5,34459
17 | 15,Volkswagen ,ID.3 Pro S,7.9,160,440,175,590,Yes,RWD,Type 2 CCS,Hatchback,C,4,40936
18 | 16,Porsche ,Taycan Turbo S,2.8,260,375,223,780,Yes,AWD,Type 2 CCS,Sedan,F,4,180781
19 | 17,Volkswagen ,e-Up! ,11.9,130,195,166,170,Yes,FWD,Type 2 CCS,Hatchback,A,4,21421
20 | 18,MG ,ZS EV,8.2,140,220,193,260,No,FWD,Type 2 CCS,SUV,B,5,30000
21 | 19,Mini ,Cooper SE ,7.3,150,185,156,260,Yes,FWD,Type 2 CCS,Hatchback,B,4,31681
22 | 20,Opel ,Corsa-e ,8.1,150,275,164,420,Yes,FWD,Type 2 CCS,Hatchback,B,5,29146
23 | 21,Tesla ,Model Y Long Range Dual Motor,5.1,217,425,171,930,Yes,AWD,Type 2 CCS,SUV,D,7,58620
24 | 22,Skoda ,Enyaq iV 50,10,160,290,179,230,Yes,RWD,Type 2 CCS,SUV,C,5,35000
25 | 23,Audi ,e-tron GT ,3.5,240,425,197,850,Yes,AWD,Type 2 CCS,Sedan,F,4,125000
26 | 24,Tesla ,Model 3 Long Range Performance,3.4,261,435,167,910,Yes,AWD,Type 2 CCS,Sedan,D,5,61480
27 | 25,Volkswagen ,ID.4 ,7.5,160,420,183,560,Yes,RWD,Type 2 CCS,SUV,C,5,45000
28 | 26,Volkswagen ,ID.3 Pro,9,160,350,166,490,Yes,RWD,Type 2 CCS,Hatchback,C,5,33000
29 | 27,Volvo ,XC40 P8 AWD Recharge,4.9,180,375,200,470,Yes,AWD,Type 2 CCS,SUV,C,5,60437
30 | 28,BMW ,i3 120 Ah,7.3,150,235,161,270,No,RWD,Type 2 CCS,Hatchback,B,4,38017
31 | 29,Peugeot ,e-2008 SUV ,8.5,150,250,180,380,No,FWD,Type 2 CCS,SUV,B,5,34361
32 | 30,Audi ,e-tron 50 quattro,6.8,190,280,231,450,Yes,AWD,Type 2 CCS,SUV,E,5,67358
33 | 31,Kia ,e-Niro 64 kWh,7.8,167,370,173,350,Yes,FWD,Type 2 CCS,SUV,C,5,38105
34 | 32,Renault ,Zoe ZE50 R110,11.4,135,315,165,230,Yes,FWD,Type 2 CCS,Hatchback,B,5,31184
35 | 33,Tesla ,Cybertruck Tri Motor,3,210,750,267,710,Yes,AWD,Type 2 CCS,Pickup,N,6,75000
36 | 34,Mazda ,MX-30 ,9,150,180,178,240,Yes,FWD,Type 2 CCS,SUV,C,5,32646
37 | 35,Nissan ,Leaf e+,7.3,157,325,172,390,Yes,FWD,Type 2 CHAdeMO,Hatchback,C,5,37237
38 | 36,Lexus ,UX 300e,7.5,160,270,193,190,Yes,FWD,Type 2 CHAdeMO,SUV,C,5,50000
39 | 37,CUPRA ,el-Born ,6.5,160,425,181,570,No,RWD,Type 2 CCS,Hatchback,C,4,45000
40 | 38,Renault ,Zoe ZE50 R135,9.5,140,310,168,230,No,FWD,Type 2 CCS,Hatchback,B,5,33133
41 | 39,Mercedes ,EQA ,5,200,350,171,440,No,AWD,Type 2 CCS,SUV,C,5,45000
42 | 40,Tesla ,Model S Long Range,3.8,250,515,184,560,Yes,AWD,Type 2,Liftback,F,5,79990
43 | 41,Hyundai ,Kona Electric 39 kWh,9.9,155,255,154,210,Yes,FWD,Type 2 CCS,SUV,B,5,33971
44 | 42,Audi ,e-tron Sportback 55 quattro,5.7,200,380,228,610,Yes,AWD,Type 2 CCS,SUV,E,5,81639
45 | 43,Skoda ,CITIGOe iV ,12.3,130,195,166,170,Yes,FWD,Type 2 CCS,Hatchback,A,4,24534
46 | 44,SEAT ,Mii Electric ,12.3,130,195,166,170,Yes,FWD,Type 2 CCS,Hatchback,A,4,20129
47 | 45,Kia ,e-Soul 64 kWh,7.9,167,365,175,340,Yes,FWD,Type 2 CCS,SUV,B,5,36837
48 | 46,Opel ,Ampera-e ,7.3,150,335,173,210,Yes,FWD,Type 2 CCS,MPV,B,5,41906
49 | 47,Porsche ,Taycan 4S,4,250,365,195,730,Yes,AWD,Type 2 CCS,Sedan,F,4,102945
50 | 48,Lightyear ,One ,10,150,575,104,540,Yes,AWD,Type 2 CCS,Liftback,F,5,149000
51 | 49,Aiways ,U5 ,9,150,335,188,350,No,FWD,Type 2 CCS,SUV,C,5,36057
52 | 50,Audi ,e-tron 55 quattro,5.7,200,365,237,590,No,AWD,Type 2 CCS,SUV,E,5,79445
53 | 51,Tesla ,Roadster ,2.1,410,970,206,920,Yes,AWD,Type 2 CCS,Cabrio,S,4,215000
54 | 52,Opel ,Mokka-e ,8.5,150,255,176,390,Yes,FWD,Type 2 CCS,SUV,B,5,35000
55 | 53,Skoda ,Enyaq iV 80,8.8,160,420,183,560,Yes,RWD,Type 2 CCS,SUV,C,5,40000
56 | 54,Tesla ,Model X Long Range,4.6,250,450,211,490,Yes,AWD,Type 2,SUV,F,7,85990
57 | 55,Honda ,e Advance,8.3,145,170,168,190,Yes,RWD,Type 2 CCS,Hatchback,B,4,35921
58 | 56,DS ,3 Crossback E-Tense,8.7,150,250,180,380,Yes,FWD,Type 2 CCS,SUV,B,5,37422
59 | 57,Renault ,Twingo ZE,12.6,135,130,164,200,No,RWD,Type 2,Hatchback,A,4,24790
60 | 58,Citroen ,e-C4 ,9.7,150,250,180,380,Yes,FWD,Type 2 CCS,SUV,C,5,40000
61 | 59,Tesla ,Model S Performance,2.5,261,505,188,550,Yes,AWD,Type 2,Liftback,F,5,96990
62 | 60,Renault ,Zoe ZE40 R110,11.4,135,255,161,230,No,FWD,Type 2 CCS,Hatchback,B,5,29234
63 | 61,Tesla ,Model Y Long Range Performance,3.7,241,410,177,900,Yes,AWD,Type 2 CCS,SUV,D,7,65620
64 | 62,Nissan ,Ariya 87kWh,7.6,160,440,198,520,Yes,FWD,Type 2 CCS,Hatchback,C,5,50000
65 | 63,Jaguar ,I-Pace ,4.8,200,365,232,340,No,AWD,Type 2 CCS,SUV,E,5,75351
66 | 64,Ford ,Mustang Mach-E ER RWD,7,180,450,200,430,No,RWD,Type 2 CCS,SUV,D,5,54475
67 | 65,Porsche ,Taycan 4S Plus,4,250,425,197,890,Yes,AWD,Type 2 CCS,Sedan,F,4,109302
68 | 66,Nissan ,e-NV200 Evalia ,14,123,190,200,190,Yes,FWD,Type 1 CHAdeMO,SPV,N,7,33246
69 | 67,Tesla ,Cybertruck Dual Motor,5,190,460,261,710,Yes,AWD,Type 2 CCS,Pickup,N,6,55000
70 | 68,Renault ,Kangoo Maxi ZE 33,22.4,130,160,194,200,No,FWD,Type 2,SPV,N,5,38000
71 | 69,Ford ,Mustang Mach-E ER AWD,6,180,430,209,410,Yes,AWD,Type 2 CCS,SUV,D,5,62900
72 | 70,BMW ,i3s 120 Ah,6.9,160,230,165,260,Yes,RWD,Type 2 CCS,Hatchback,B,4,41526
73 | 71,Skoda ,Enyaq iV 80X,7,160,400,193,540,No,AWD,Type 2 CCS,SUV,C,5,45000
74 | 72,Porsche ,Taycan Cross Turismo ,3.5,250,385,217,770,Yes,AWD,Type 2 CCS,Station,F,4,150000
75 | 73,Byton ,M-Byte 95 kWh 4WD,5.5,190,390,244,460,Yes,AWD,Type 2 CCS,SUV,E,5,64000
76 | 74,Sono ,Sion ,9,140,225,156,270,Yes,FWD,Type 2 CCS,Hatchback,C,5,25500
77 | 75,Kia ,e-Niro 39 kWh,9.8,155,235,167,230,Yes,FWD,Type 2 CCS,SUV,C,5,34400
78 | 76,Audi ,Q4 Sportback e-tron ,6.3,180,410,188,550,Yes,AWD,Type 2 CCS,SUV,D,5,57500
79 | 77,Smart ,EQ forfour ,12.7,130,95,176,200,No,RWD,Type 2,Hatchback,A,4,22030
80 | 78,Ford ,Mustang Mach-E SR AWD,6,180,340,206,360,Yes,AWD,Type 2 CCS,SUV,D,5,54000
81 | 79,Porsche ,Taycan Turbo,3.2,260,390,215,810,No,AWD,Type 2 CCS,Sedan,F,4,148301
82 | 80,Volkswagen ,ID.3 1st,7.3,160,340,171,470,Yes,RWD,Type 2 CCS,Hatchback,C,5,38987
83 | 81,Tesla ,Model X Performance,2.8,250,440,216,480,Yes,AWD,Type 2,SUV,F,7,102990
84 | 82,Smart ,EQ fortwo coupe,11.6,130,100,167,200,No,RWD,Type 2,Hatchback,A,2,21387
85 | 83,Ford ,Mustang Mach-E SR RWD,6.6,180,360,194,380,Yes,RWD,Type 2 CCS,SUV,D,5,46900
86 | 84,Mercedes ,EQV 300 Long,10,140,330,273,290,Yes,FWD,Type 2 CCS,SPV,N,7,70631
87 | 85,Fiat ,500e Hatchback,9,150,250,168,330,Yes,FWD,Type 2 CCS,Hatchback,B,4,34900
88 | 86,Tesla ,Cybertruck Single Motor,7,180,390,256,740,No,RWD,Type 2 CCS,Pickup,N,6,45000
89 | 87,Audi ,e-tron Sportback 50 quattro,6.8,190,295,219,470,Yes,AWD,Type 2 CCS,SUV,E,5,69551
90 | 88,Skoda ,Enyaq iV vRS,6.2,180,400,193,540,Yes,AWD,Type 2 CCS,SUV,C,5,47500
91 | 89,Skoda ,Enyaq iV 60,9,160,320,181,440,Yes,RWD,Type 2 CCS,SUV,C,5,37500
92 | 90,Audi ,e-tron S 55 quattro,4.5,210,320,270,510,Yes,AWD,Type 2 CCS,SUV,E,5,93800
93 | 91,Smart ,EQ fortwo cabrio,11.9,130,95,176,200,No,RWD,Type 2,Cabrio,A,2,24565
94 | 92,Kia ,e-Soul 64 kWh,7.9,167,365,175,320,No,FWD,Type 2 CCS,SUV,B,5,36837
95 | 93,Nissan ,Ariya e-4ORCE 87kWh,5.7,200,420,207,500,Yes,AWD,Type 2 CCS,Hatchback,C,5,57500
96 | 94,Fiat ,500e Convertible,9,150,250,168,330,Yes,FWD,Type 2 CCS,Cabrio,B,4,37900
97 | 95,Volkswagen ,ID.3 Pro Performance,7.3,160,340,171,470,Yes,RWD,Type 2 CCS,Hatchback,C,5,35575
98 | 96,Kia ,e-Soul 39 kWh,9.9,157,230,170,220,Yes,FWD,Type 2 CCS,SUV,B,5,33133
99 | 97,Byton ,M-Byte 72 kWh 2WD,7.5,190,325,222,420,No,RWD,Type 2 CCS,SUV,E,5,53500
100 | 98,Nissan ,Ariya 63kWh,7.5,160,330,191,440,Yes,FWD,Type 2 CCS,Hatchback,C,5,45000
101 | 99,Audi ,e-tron S Sportback 55 quattro,4.5,210,335,258,540,Yes,AWD,Type 2 CCS,SUV,E,5,96050
102 | 100,Nissan ,Ariya e-4ORCE 63kWh,5.9,200,325,194,440,Yes,AWD,Type 2 CCS,Hatchback,C,5,50000
103 | 101,Nissan ,Ariya e-4ORCE 87kWh Performance,5.1,200,375,232,450,Yes,AWD,Type 2 CCS,Hatchback,C,5,65000
104 | 102,Byton ,M-Byte 95 kWh 2WD,7.5,190,400,238,480,No,AWD,Type 2 CCS,SUV,E,5,62000
105 |
--------------------------------------------------------------------------------
/evmarket_india.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | """EVMarket-India.ipynb
3 |
4 | Automatically generated by Colaboratory.
5 |
6 | Original file is located at
7 | https://colab.research.google.com/drive/1K9U0GOHAuYsxRiBtMmmQ_SINQhy4XDyH
8 | """
9 |
10 | # Commented out IPython magic to ensure Python compatibility.
11 | import numpy as np
12 | # %pip install plotly==5.8.0
13 | import pandas as pd
14 | import matplotlib.pyplot as plt
15 | # %matplotlib inline
16 | from tqdm import tqdm
17 | import seaborn as sb
18 | import statsmodels.api as sm
19 | import plotly.express as px
20 | from google.colab import files
21 | # %pip install kaleido
22 | import kaleido
23 | from sklearn.preprocessing import StandardScaler,PowerTransformer
24 | from sklearn.decomposition import PCA
25 | from scipy.cluster.hierarchy import dendrogram, linkage
26 | from sklearn.cluster import KMeans, MeanShift, estimate_bandwidth
27 | from sklearn.datasets import make_blobs
28 | from yellowbrick.cluster import KElbowVisualizer, SilhouetteVisualizer, InterclusterDistance
29 | from collections import Counter
30 | from sklearn.model_selection import cross_validate,train_test_split
31 | from sklearn.linear_model import LinearRegression,LogisticRegression
32 | from sklearn import metrics
33 | from sklearn.metrics import r2_score,silhouette_score,confusion_matrix,accuracy_score
34 | pd.set_option("display.precision",3)
35 | np.set_printoptions(precision=5, suppress=True)
36 | pd.options.display.float_format = '{:.4f}'.format
37 | import plotly.io as pio
38 |
39 | pio.renderers.default = "svg"
40 |
41 | """## Read the data"""
42 |
43 | df = pd.read_csv('data.csv')
44 | df.drop('Unnamed: 0', axis=1, inplace=True)
45 | df['inr(10e3)'] = df['PriceEuro']*0.08320
46 | df['RapidCharge'].replace(to_replace=['No','Yes'],value=[0, 1],inplace=True)
47 | df.head()
48 |
49 | df[(df['Brand'] == 'Tesla ') | (df['Brand'] == 'BMW ')]
50 |
51 | """## Information of the type of data in seach column"""
52 |
53 | df.info()
54 |
55 | """## Finding out the number of null values"""
56 |
57 | df.isnull().sum()
58 |
59 | """## Descriptive Statistics of the dataset"""
60 |
61 | df.describe()
62 |
63 | fig = px.bar(df,x='Brand',y = 'TopSpeed_KmH',color = 'Brand',title = 'Which Car Has a Top speed?',labels = {'x':'Car Brands','y':'Top Speed Km/H'})
64 | pio.show(fig)
65 |
66 | fig = px.bar(df,x='AccelSec',y = 'Brand',color = 'Brand',title = 'Which car has fastest accelaration?',labels = {'x':'Accelaration','y':'Car Brands'})
67 | pio.show(fig)
68 |
69 | df['inr(10e3)'].plot(figsize = (12,8),title='Car Price',xlabel = 'No. of Samples',ylabel = 'Car Price',color = 'red')
70 |
71 | fig = px.bar(df,x = 'Range_Km',y = 'PowerTrain',color = 'PowerTrain',text='PowerTrain')
72 | pio.show(fig)
73 |
74 | fig = px.pie(df,names = 'Brand',values = 'inr(10e3)')
75 | pio.show(fig)
76 |
77 | fig = px.scatter_3d(df,x = 'Brand',y = 'Seats',z = 'Segment',color='Brand')
78 |
79 | fig = px.scatter_3d(df,x = 'Brand',y = 'AccelSec',z = 'inr(10e3)',color = 'Brand')
80 |
81 | fig = px.box(df,x='RapidCharge',y = 'inr(10e3)',color = 'RapidCharge',points='all')
82 | pio.show(fig)
83 |
84 | fig = px.scatter(df,x = 'Brand',y = 'Range_Km',size='Seats',color = 'Brand',hover_data=['RapidCharge','inr(10e3)'])
85 | pio.show(fig)
86 |
87 | """## Pairplot of all the columns based on Rapid Charger presence"""
88 |
89 | sb.pairplot(df,hue='RapidCharge')
90 |
91 | """## Heatmap to show the correlation of the data"""
92 |
93 | ax= plt.figure(figsize=(15,8))
94 | sb.heatmap(df.corr(),linewidths=1,linecolor='white',annot=True)
95 |
96 | a=np.arange(1,104)
97 |
98 | """# Making Some Comparisions for our dataset
99 |
100 |
101 | ## Frequency of the Brands in the dataset
102 | """
103 |
104 | ax= plt.figure(figsize=(20,5))
105 | sb.barplot(x='Brand',y=a,data=df)
106 | plt.grid(axis='y')
107 | plt.title('Brands in the datset')
108 | plt.xlabel('Brand')
109 | plt.ylabel('Frequency')
110 | plt.xticks(rotation=45)
111 |
112 | """Byton , Fiat and smart are the prominent brands and Polestar being the least
113 |
114 |
115 | ## Top speeds achieved by the cars of a brand
116 | """
117 |
118 | ax= plt.figure(figsize=(20,5))
119 | sb.barplot(x='Brand',y='TopSpeed_KmH',data=df,palette='Paired')
120 | plt.grid(axis='y')
121 | plt.title('Top Speed achieved by a brand')
122 | plt.xlabel('Brand')
123 | plt.ylabel('Top Speed')
124 | plt.xticks(rotation=45)
125 |
126 | """Porsche, Lucid and Tesla produce the fastest cars and Smart the lowest
127 |
128 |
129 | ## Range a car can achieve
130 | """
131 |
132 | ax= plt.figure(figsize=(20,5))
133 | sb.barplot(x='Brand',y='Range_Km',data=df,palette='tab10')
134 | plt.grid(axis='y')
135 | plt.title('Maximum Range achieved by a brand')
136 | plt.xlabel('Brand')
137 | plt.ylabel('Range')
138 | plt.xticks(rotation=45)
139 |
140 | """Lucid, Lightyear and Tesla have the highest range and Smart the lowest
141 |
142 | ## Car efficiency
143 | """
144 |
145 | ax= plt.figure(figsize=(20,5))
146 | sb.barplot(x='Brand',y='Efficiency_WhKm',data=df,palette='hls')
147 | plt.grid(axis='y')
148 | plt.title('Efficiency achieved by a brand')
149 | plt.xlabel('Brand')
150 | plt.ylabel('Efficiency')
151 | plt.xticks(rotation=45)
152 |
153 | """Byton , Jaguar and Audi are the most efficient and Lightyear the least
154 |
155 | ## Number of seats in each car
156 | """
157 |
158 | ax= plt.figure(figsize=(20,5))
159 | sb.barplot(x='Brand',y='Seats',data=df,palette='husl')
160 | plt.grid(axis='y')
161 | plt.title('Seats in a car')
162 | plt.xlabel('Brand')
163 | plt.ylabel('Seats')
164 | plt.xticks(rotation=45)
165 |
166 | """Mercedes, Tesla and Nissan have the highest number of seats and Smart the lowest
167 |
168 | ## Price of cars (in INR)
169 | """
170 |
171 | ax= plt.figure(figsize=(20,5))
172 | sb.barplot(x='Brand',y='inr(10e3)',data=df,palette='Set2')
173 | plt.title('Price of a Car')
174 | plt.xlabel('Price in INR')
175 | plt.grid(axis='y')
176 | plt.ylabel('Frequency')
177 | plt.xticks(rotation=45)
178 |
179 | """Lightyear, Porsche and Lucid are the most expensive and SEAT and Smart the least
180 |
181 | ## Type of Plug used for charging
182 | """
183 |
184 | df['PlugType'].value_counts().plot.pie(figsize=(8,15),autopct='%.0f%%',explode=(.1,.1,.1,.1))
185 | plt.title('Plug Type')
186 |
187 | """Most companies use Type 2 CCS and Type 1 CHAdeMo the least
188 |
189 | ## Cars and their body style
190 | """
191 |
192 | df['BodyStyle'].value_counts().plot.pie(figsize=(8,15),autopct='%.0f%%',explode=(0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1))
193 | plt.title('Body Style')
194 |
195 | """Most cars are eiher SUV or Hatchback
196 |
197 | ## Segment in which the cars fall under
198 | """
199 |
200 | df['Segment'].value_counts().plot.pie(figsize=(8,15),autopct='%.0f%%',explode=(0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1))
201 | plt.title('Segment')
202 |
203 | """Most cars are either C or B type
204 |
205 | ## Number of Seats
206 | """
207 |
208 | df['Seats'].value_counts().plot.pie(figsize=(8,15),autopct='%.0f%%',explode=(0.1,0.1,0.1,0.1,0.1))
209 | plt.title('Seats')
210 |
211 | """Majority of cars have 5 seats"""
212 |
213 | df3= df[["TopSpeed_KmH", "inr(10e3)"]].groupby("TopSpeed_KmH").count()
214 | df4= df[["Range_Km", "inr(10e3)"]].groupby("Range_Km").count()
215 | df5= df[["Range_Km", "TopSpeed_KmH"]].groupby("Range_Km").count()
216 | df5.head()
217 |
218 | df3=df3.sort_values("TopSpeed_KmH",ascending = False).head(10)
219 | df4=df4.sort_values("Range_Km",ascending = False).head(10)
220 | df5=df5.sort_values("Range_Km",ascending = False).head(10)
221 |
222 | plt.figure(figsize=(10,7))
223 | plt.title('Cost based on top speed')
224 | plt.pie(x=df3["inr(10e3)"],labels=df3.index,autopct='%1.0f%%')
225 | plt.show()
226 |
227 | plt.figure(figsize=(10,7))
228 | plt.title('Cost based on Maximum Range')
229 | plt.pie(x=df4["inr(10e3)"],labels=df4.index,autopct='%1.0f%%')
230 | plt.show()
231 |
232 | plt.figure(figsize=(10,7))
233 | plt.title('Top Speeds based on Maximum Range')
234 | plt.pie(x=df5["TopSpeed_KmH"],labels=df5.index,autopct='%1.0f%%')
235 | plt.show()
236 |
237 | """# Regression
238 |
239 | ## Putting independent variables as x and dependent variable as y
240 | """
241 |
242 | df['PowerTrain'].replace(to_replace=['RWD','AWD','FWD'],value=[0, 2,1],inplace=True)
243 | x=df[['AccelSec','Range_Km','TopSpeed_KmH','Efficiency_WhKm', 'RapidCharge','PowerTrain']]
244 | y=df['PriceEuro']
245 |
246 | """## Finding out the linear regression using OLS method"""
247 |
248 | x= sm.add_constant(x)
249 | results = sm.OLS(y,x)
250 |
251 | """## Fitting the model and summarizing"""
252 |
253 | model=results.fit()
254 | model.summary()
255 |
256 | """Notes:
257 |
258 | 1. Standard Errors assume that the covariance matrix of the errors is correctly specified.
259 | 2. The condition number is large, 5.53e+03. This might indicate that there are
260 | strong multicollinearity or other numerical problems.
261 |
262 | Only Top Speed and Efficieny are the two variables related to price
263 | """
264 |
265 | X_train, X_test, y_train, y_test = train_test_split(x, y, test_size=0.3,random_state=365)
266 |
267 | lr= LinearRegression()
268 | lr.fit(X_train, y_train)
269 | pred = lr.predict(X_test)
270 |
271 | """## Finding out the R-squared value"""
272 |
273 | r2=(r2_score(y_test,pred))
274 | print(r2*100)
275 |
276 | """Around 78% of the dependant variable has been explained by the independant variables"""
277 |
278 | y1=df[['RapidCharge']]
279 | x1=df[['PriceEuro']]
280 |
281 | X1_train, X1_test, y1_train, y1_test = train_test_split(x1, y1, test_size=0.2,random_state=365)
282 |
283 | log= LogisticRegression()
284 | log.fit(X1_train, y1_train)
285 | pred1 = log.predict(X1_test)
286 | pred1
287 |
288 | """## Confusion Matrix of the regression"""
289 |
290 | cm = confusion_matrix(y1_test, pred1)
291 | cm
292 |
293 | """## Clustering"""
294 |
295 | ax=plt.subplots(figsize=(15,8))
296 | sb.stripplot(x='TopSpeed_KmH', y='FastCharge_KmH', data=df, jitter=True)
297 |
298 | ax=plt.subplots(figsize=(15,8))
299 | sb.stripplot(x='TopSpeed_KmH', y='Efficiency_WhKm', data=df, jitter=True)
300 |
301 | features = ['AccelSec','TopSpeed_KmH','Efficiency_WhKm','FastCharge_KmH', 'RapidCharge','Range_Km', 'Seats', 'inr(10e3)','PowerTrain']
302 | # Separating out the features
303 | x = df.loc[:, features].values
304 | x = StandardScaler().fit_transform(x)
305 |
306 | pca = PCA(n_components=9)
307 | t = pca.fit_transform(x)
308 | data2 = pd.DataFrame(t, columns=['PC1', 'PC2','PC3','PC4','Pc5','PC6', 'PC7', 'PC8','PC9'])
309 | data2
310 |
311 | df_9=data2.iloc[:,:9]
312 | df_9.head(3)
313 |
314 | # correlation coefficient between original variables and the component
315 | loadings = pca.components_
316 | num_pc = pca.n_features_
317 | pc_list = ["PC"+str(i) for i in list(range(1, num_pc+1))]
318 | loadings_df = pd.DataFrame.from_dict(dict(zip(pc_list, loadings)))
319 | loadings_df['variable'] = df_9.columns.values
320 | loadings_df = loadings_df.set_index('variable')
321 | loadings_df
322 |
323 | #Correlation matrix plot for loadings
324 | plt.rcParams['figure.figsize'] = (20,15)
325 | ax = sb.heatmap(loadings_df, annot=True, cmap='Spectral')
326 | plt.show()
327 |
328 | linked = linkage(data2, 'complete')
329 | plt.figure(figsize=(13, 9))
330 | dendrogram(linked, orientation='top')
331 | plt.show()
332 |
333 | PC_values = np.arange(pca.n_components_) + 1
334 | plt.plot(PC_values, pca.explained_variance_ratio_, 'o-', linewidth=2, color='blue')
335 | plt.title('Scree Plot')
336 | plt.xlabel('Principal Component')
337 | plt.ylabel('Variance Explained')
338 | plt.show()
339 |
340 | model = KMeans(random_state=40)
341 | visualizer = KElbowVisualizer(model, k=(2,9), metric='distortion', timings=True)
342 | visualizer.fit(t) # Fit the data to the visualizer
343 | visualizer.show() # Finalize and render the figure
344 |
345 | model = KMeans(random_state=40)
346 | visualizer = KElbowVisualizer(model, k=(2,9), metric='silhouette', timings=True)
347 | visualizer.fit(t) # Fit the data to the visualizer
348 | visualizer.show() # Finalize and render the figure
349 |
350 | model = KMeans(random_state=40)
351 | visualizer = KElbowVisualizer(model, k=(2,9), metric='calinski_harabasz', timings=True)
352 | visualizer.fit(t) # Fit the data to the visualizer
353 | visualizer.show() # Finalize and render the figure
354 |
355 | #K-means clustering
356 |
357 | kmeans = KMeans(n_clusters=4, init='k-means++', random_state=0).fit(t)
358 | df['cluster_num'] = kmeans.labels_ #adding to df
359 | print (kmeans.labels_) #Label assigned for each data point
360 | print (kmeans.inertia_) #gives within-cluster sum of squares.
361 | print(kmeans.n_iter_) #number of iterations that k-means algorithm runs to get a minimum within-cluster sum of squares
362 | print(kmeans.cluster_centers_) #Location of the centroids on each cluster.
363 |
364 | #To see each cluster size
365 |
366 | Counter(kmeans.labels_)
367 |
368 | #Visulazing clusters
369 | sb.scatterplot(data=data2, x="PC1", y="PC9", hue=kmeans.labels_)
370 | plt.scatter(kmeans.cluster_centers_[:,0], kmeans.cluster_centers_[:,1],
371 | marker="X", c="r", s=80, label="centroids")
372 | plt.legend()
373 | plt.show()
374 |
375 | """## Regression for data2"""
376 |
377 | X=data2[['PC1', 'PC2','PC3','PC4','Pc5','PC6', 'PC7','PC8','PC9']]
378 | y=df['inr(10e3)']
379 |
380 | X_train, X_test, y_train, y_test = train_test_split(X, y,test_size=0.4, random_state=101)
381 | lm=LinearRegression().fit(X_train,y_train)
382 |
383 | print(lm.intercept_)
384 |
385 | lm.coef_
386 |
387 | X_train.columns
388 |
389 | cdf=pd.DataFrame(lm.coef_, X.columns, columns=['Coeff'])
390 | cdf
391 |
392 | predictions=lm.predict(X_test)
393 | predictions
394 |
395 | y_test
396 |
397 | plt.scatter(y_test, predictions)
398 |
399 | #Residual histogram plot
400 | sb.distplot((y_test-predictions))
401 |
402 | print('MAE:',metrics.mean_absolute_error(y_test,predictions))
403 | print('MSE:',metrics.mean_squared_error(y_test,predictions))
404 | print('RMSE:',np.sqrt(metrics.mean_squared_error(y_test,predictions)))
405 |
406 | metrics.mean_absolute_error(y_test,predictions)
407 |
408 | metrics.mean_squared_error(y_test,predictions)
409 |
410 | np.sqrt(metrics.mean_squared_error(y_test,predictions))
411 |
412 |
--------------------------------------------------------------------------------
/images/EVMarket.org:
--------------------------------------------------------------------------------
1 | #+title: *Electric Vehicle Market in India*
2 | #+SUBTITLE: *Market Segmentation*
3 | #+AUTHOR: /Chaganti Venkatarami Reddy, Subesha Sasmal, Parth Shukla/
4 | #+OPTIONS: date:nil toc:nil num:nil
5 | #+LATEX_HEADER: \usepackage{draftwatermark}
6 | #+SETUPFILE: /home/reddy/Documents/GitHub/dotfiles/org/latex-standard-reddy.org
7 | #+LATEX_CLASS_OPTIONS: [a4paper, 11pt]
8 |
9 | #+BEGIN_EXPORT latex
10 | \SetWatermarkLightness{ 0.94 }
11 | \SetWatermarkText{\textsc{Feynn Labs}}
12 | % \SetWatermarkColor[gray]{0.5}
13 | % \SetWatermarkColor[rgb]{1,0,0}
14 | \SetWatermarkScale{ 0.67 }
15 | % \SetWatermarkFontSize{2cm}
16 |
17 | \let\oldquote\quote
18 | \let\endoldquote\endquote
19 | \renewenvironment{quote}[2][]
20 | {\if\relax\detokenize{#1}\relax
21 | \def\quoteauthor{#2}%
22 | \else
23 | \def\quoteauthor{#2~---~#1}%
24 | \fi
25 | \oldquote}
26 | {\par\nobreak\smallskip\hfill(\quoteauthor)%
27 | \endoldquote\addvspace{\bigskipamount}}
28 |
29 | #+END_EXPORT
30 |
31 | #+BEGIN_EXPORT latex
32 | \vspace{3cm}
33 | \begin{center}
34 | \begin{figure}[h!]
35 | \includegraphics[scale=0.6]{./images/Indian-Electric-Car-market.jpg}
36 | \vspace{2mm}
37 | \caption*{\hspace{12mm} Electric Vehicle Market analysis in India}
38 | \end{figure}
39 | \end{center}
40 | \vspace{10mm}
41 | \hline
42 | \vspace{10mm}
43 | \begin{quote}{Carlos Ghosn}
44 | Electric cars are not going to take the market by storm, but it's going to be a gradual improvement.
45 | \end{quote}
46 |
47 | \clearpage
48 | #+END_EXPORT
49 |
50 | @@latex:\clearpage@@
51 |
52 | * *Abstract*
53 |
54 | Market segmentation becomes a crucial tool for evolving transportation technology such as electric vehicles (EVs) in emerging markets to explore and implement for extensive adoption. EVs adoption is expected to grow phenomenally in near future as low emission and low operating cost vehicle, and thus, it drives a considerable amount of forthcoming academic research curiosity. The main aim of this study is to explore and identify distinct sets of potential buyer segments for EVs based on /psychographic, behavioral, and socio-economic/ characterization by employing an integrated research framework of /‘perceived benefits-attitude-intention’/. The study applied robust analytical procedures including cluster analysis, multiple discriminant analysis and Chi-square test to operationalize and validate segments from the data collected of 563 respondents using a cross-sectional online survey. The findings posit that the three distinct sets of young consumer groups have been identified and labelled as /‘Conservatives’, ‘Indifferents’, and ‘Enthusiasts’/ which are deemed to be buddying EV buyers The implications are recommended, which may offer some pertinent guidance for scholars and policymakers to encourage EVs adoption in the backdrop of emerging sustainable transport market.
55 |
56 | In this report we are going to analyse the data and solve the problem using *Fermi Estimation* by breaking down the problem.
57 |
58 | @@latex:\vspace{5mm}@@
59 |
60 | *KeyWords* : /Electric vehicles, Market segmentation, Cluster analysis, Attitude towards electric vehicles, Subjective norms, Adoption intention, Sustainable transportation./
61 |
62 | @@latex:\vspace{8mm}@@
63 |
64 | * *Data Collection*
65 |
66 | The data has been collected manually, and the sources used for this process are listed below :
67 |
68 | + https://www.kaggle.com/datasets
69 | + https://data.gov.in/
70 | + https://www.data.gov/
71 | + https://data.worldbank.org/
72 | + https://datasetsearch.research.google.com/
73 |
74 | @@latex:\clearpage@@
75 |
76 | * Market Segmentation
77 |
78 | ** Target Market:
79 |
80 | The target market of Electric Vehicle Market Segmentation can be categorized into Geographic, SocioDemographic, Behavioral, and Psychographic Segmentation.
81 |
82 | *Behavioral Segmentation:* searches directly for similarities in behavior or reported behavior. \\
83 | Example: prior experience with the product, amount spent on the purchase, etc.
84 |
85 | @@latex:\vspace{10mm}@@
86 |
87 | #+ATTR_LATEX: :scale 0.6
88 | #+NAME: fig-1
89 | #+CAPTION: /Behavioral Segmentation/
90 | [[./images/Behavioral-Segmentation.png]]
91 |
92 | *Advantage:* uses the very behavior of interest is used as the basis of segment extraction.
93 |
94 | *Disadvantage:* not always readily available.
95 |
96 | @@latex:\vspace{7mm}@@
97 |
98 | *Psychographic Segmentation:* grouped based on beliefs, interests, preferences, aspirations, or benefits sought when purchasing a product. Suitable for lifestyle segmentation. Involves many segmentation variables.
99 |
100 | *Advantage:* generally more reflective of the underlying reasons for
101 | differences in consumer behavior.
102 |
103 | *Disadvantage:* increased complexity of determining segment
104 | memberships for consumers.
105 |
106 | @@latex:\clearpage@@
107 |
108 | #+ATTR_LATEX: :scale 0.6
109 | #+NAME: fig-2
110 | #+CAPTION: /Psychographic Segmentation/
111 | [[./images/Psychographic-Segmentation.png]]
112 |
113 | @@latex:\vspace{4mm}@@
114 |
115 | *Socio-Demographic Segmentation:* includes age, gender, income and education. Useful in industries.
116 |
117 | @@latex:\vspace{10mm}@@
118 |
119 | #+ATTR_LATEX: :scale 0.6
120 | #+NAME: fig-3
121 | #+CAPTION: /Behavioral Segmentation/
122 | [[./images/Demographic-Segmentation.png]]
123 |
124 | *Advantage:* segment membership can easily be determined for every customer.
125 |
126 | *Disadvantage:* if this criteria is not the cause for customers product preferences then it does not provide sufficient market insight for optimal segmentation decisions.
127 |
128 | @@latex:\clearpage@@
129 |
130 | *Segmenting for Electric Vehicle Market*
131 |
132 | The market segmentation approach aims at defining actionable, manageable, homogenous subgroups of individual customers to whom the marketers can target with a similar set of marketing strategies. In practice, there are two ways of segmenting the market-a-priori and post-hoc. An a-priori approach utilizes predefined characteristics such as age, gender, income, education, etc. to predefine the segments followed by profiling based on a host of measured variables /(behavioral, psychographic or benefit)/. In the post-hoc approach to segmentation on other hand, the segments are identified based on the relationship among the multiple measured variables. The commonality between both approaches lies in the fact that the measured variables determine the /‘segmentation theme’/. The present study utilizes an a-priori approach to segmentation so as to divide the potential EV customers into sub-groups.
133 |
134 | @@latex:\vspace{3mm}@@
135 |
136 | #+ATTR_LATEX: :scale 0.60
137 | #+NAME: fig-4
138 | #+CAPTION: /Market Segmentation Electric Vehicles/
139 | [[./images/ms-ev.png]]
140 |
141 | It is argued that the blended approach of /psychographic/ and /socioeconomic attributes/ for market segmentation enables the formulation of sub-market strategies which in turn satisfy the specific tastes and preferences of the consumer groups. Straughan and Roberts presented a comparison between the usefulness of /psychographic, demographic, and economic/ characteristics based on consumer evaluation for eco-friendly products. They pinpointed the perceived superiority of the psychographic characteristics over the socio-demographic and economic ones in explaining the environmentally-conscious consumer behavior and thus, the study recommended the use of psychographic characteristics in profiling the consumer segments in the market for eco-friendly products. The present study adds perceived-benefit characteristics guided by blended psychographic and socio-economic aspects for segmenting the consumer market.
142 |
143 | * Implementation
144 |
145 | ** Packages/Tools used:
146 |
147 | 1. *Numpy:* To calculate various calculations related to arrays.
148 | 2. *Pandas:* To read or load the datasets.
149 | 3. *SKLearn:* We have used LabelEncoder() to encode our values.
150 |
151 |
152 | ** Data-Preprocessing
153 |
154 | *Data Cleaning*
155 |
156 | The data collected is compact and is partly used for visualization purposes and partly for clustering. Python libraries such as NumPy, Pandas, Scikit-Learn, and SciPy are used for the workflow, and the results obtained are ensured to be reproducible.
157 |
158 | #+ATTR_LATEX: :width 470px :height 270px
159 | [[./images/1.png]]
160 |
161 | ** EDA
162 |
163 | We start the Exploratory Data Analysis with some data Analysis drawn from the data without Principal Component Analysis and with some Principal Component Analysis in the dataset obtained from the combination of all the data we have. PCA is a statistical process that converts the observations of correlated features into a set of linearly uncorrelated features with the help of orthogonal transformation. These new transformed features are called the Principal Components. The process helps in reducing dimensions of the data to make the process of classification/regression or any form of machine learning, cost-effective.
164 |
165 | @@latex:\vspace{15mm}@@
166 |
167 | */Comparision of cars in our data/*
168 |
169 | #+ATTR_LATEX: :scale 0.6
170 | [[./images/fastest.png]]
171 |
172 | #+ATTR_LATEX: :scale 0.6
173 | [[./images/topspeed.png]]
174 |
175 | #+ATTR_LATEX: :scale 0.6
176 | [[./images/price.png]]
177 |
178 | @@latex:\clearpage@@
179 |
180 | *For Electric Vehicle Market one of the most important key is Charging:*
181 |
182 | #+ATTR_LATEX: :width 450px :height 450px
183 | [[./images/rapid.png]]
184 |
185 | @@latex:\vspace{10mm}@@
186 |
187 | *Correlation Matrix:* A correlation matrix is simply a table that displays the correlation. It is best used in variables that demonstrate a linear relationship between each other. Coefficients for different variables. The matrix depicts the correlation between all the possible pairs of values through the heatmap in the below figure. The relationship between two variables is usually considered strong when their correlation coefficient value is larger than 0.7.
188 |
189 | @@latex:\clearpage@@
190 |
191 | #+ATTR_LATEX: :width 470px :height 380px
192 | #+NAME: fig-5
193 | #+CAPTION: /Correlation Matrix for the dataset/
194 | [[./images/corr.png]]
195 |
196 | #+BEGIN_center
197 | #+ATTR_LaTeX: :height 230px :width 210px :center
198 | [[./images/plugtype.png]]
199 | #+ATTR_LaTeX: :height 200px :width 200px :center
200 | [[./images/segment.png]]
201 | #+END_center
202 |
203 | #+BEGIN_center
204 | #+ATTR_LaTeX: :height 200px :width 200px :center
205 | [[./images/seats.png]]
206 | #+ATTR_LaTeX: :height 200px :width 200px :center
207 | [[./images/bodystyle.png]]
208 | #+END_center
209 |
210 | Now we can see that the requirements of what type of cars are most needed for customers and from the past 10 years there is a rapid growth of Electric vehicles usage in India
211 |
212 | @@latex:\vspace{10mm}@@
213 |
214 | #+ATTR_LATEX: :height 300px :width 500px
215 | #+CAPTION: /Electric Cars sales in India/
216 | #+NAME: fig-6
217 | [[./images/evsalescars.png]]
218 |
219 | @@latex:\clearpage@@
220 |
221 | #+ATTR_LATEX: :height 350px :width 450px
222 | #+CAPTION: /Correlation matrix plot for loadings/
223 | #+NAME: fig-7
224 | [[./images/loadings.png]]
225 |
226 |
227 | @@latex:\vspace{10mm}@@
228 |
229 | *Scree Plot:* is a common method for determining the number of PCs to be retained via graphical representation. It is a simple line segment plot that shows the eigenvalues for each individual PC. It shows the eigenvalues on the y-axis and the number of factors on the x-axis. It always displays a downward curve. Most scree plots look broadly similar in shape, starting high on the left, falling rather quickly, and then flattening out at some point. This is because the first component usually explains much of the variability, the next few components explain a moderate amount, and the latter components only explain a small fraction of the overall variability. The scree plot criterion looks for the “elbow” in the curve and selects all components just before the line flattens out. The proportion of variance plot: The selected PCs should be able to describe at least 80% of the variance.
230 |
231 | @@latex:\clearpage@@
232 |
233 | #+ATTR_LATEX: :height 300px :width 450px
234 | #+CAPTION: /Scree Plot for our Dataset/
235 | #+NAME: fig-8
236 | [[./images/screeplot.png]]
237 |
238 | @@latex:\vspace{15mm}@@
239 |
240 | ** Extracting Segments
241 |
242 | *Dendrogram*
243 |
244 | This technique is specific to the agglomerative hierarchical method of clustering. The agglomerative hierarchical method of clustering starts by considering each point as a separate cluster and starts joining points to clusters in a hierarchical fashion based on their distances. To get the optimal number of clusters for hierarchical clustering, we make use of a dendrogram which is a tree-like chart that shows the sequences of merges or splits of clusters. If two clusters are merged, the dendrogram will join them in a graph and the height of the join will be the distance between those clusters. As shown in Figure, we can chose the optimal number of clusters based on hierarchical structure of the dendrogram. As highlighted by other cluster validation metrics, four to five clusters can be considered for the agglomerative hierarchical as well.
245 |
246 | @@latex:\clearpage@@
247 |
248 | #+ATTR_LATEX: :height 300px :width 450px
249 | #+CAPTION: /Dendrogram Plot for our Dataset/
250 | #+NAME: fig-9
251 | [[./images/dendrogram.png]]
252 |
253 | @@latex:\vspace{15mm}@@
254 |
255 | *Elbow Method*
256 |
257 | The Elbow method is a popular method for determining the optimal number of clusters. The method is based on calculating the Within-Cluster-Sum of Squared Errors (WSS) for a different number of clusters (k) and selecting the k for which change in WSS first starts to diminish. The idea behind the elbow method is that the explained variation changes rapidly for a small number of clusters and then it slows down leading to an elbow formation in the curve. The elbow point is the number of clusters we can use for our clustering algorithm.
258 |
259 | The KElbowVisualizer function fits the KMeans model for a range of clusters values between 2 to 8. As shown in Figure, the elbow point is achieved which is highlighted by the function itself. The function also informs us about how much time was needed to plot models for various numbers of clusters through the green line.
260 |
261 | @@latex:\clearpage@@
262 |
263 | #+ATTR_LATEX: :height 230px :width 450px
264 | #+CAPTION: /Evaluating the cluters using Distortion/
265 | #+NAME: fig-10
266 | [[./images/distortion.png]]
267 |
268 | @@latex:\vspace{28mm}@@
269 |
270 | #+ATTR_LATEX: :height 225px :width 450px
271 | #+CAPTION: /Evaluating the cluters using silhouette/
272 | #+NAME: fig-11
273 | [[./images/silhouette.png]]
274 |
275 | @@latex:\clearpage@@
276 |
277 | #+ATTR_LATEX: :height 230px :width 450px
278 | #+CAPTION: /Evaluating the cluters using calinski_harabasz/
279 | #+NAME: fig-12
280 | [[./images/calinski_harabasz.png]]
281 |
282 |
283 | * Analysis and Approaches used for Segmentation
284 |
285 | ** Clustering
286 |
287 | *Clustering* is one of the most common exploratory data analysis techniques used to get an intuition about the structure of the data. It can be defined as the task of identifying subgroups in the data such that data points in the same subgroup (cluster) are very similar while data points in different clusters are very different. In other words, we try to find homogeneous subgroups within the data such that data points in each cluster are as similar as possible according to a similarity measure such as euclidean-based distance or correlation-based distance. \\
288 | The decision of which similarity measure to use is application-specific. Clustering analysis can be done on the basis of features where we try to find subgroups of samples based on features or on the basis of samples where we try to find subgroups of features based on samples.
289 |
290 | ** K-Means Algorithm
291 |
292 | *K Means algorithm* is an iterative algorithm that tries to partition the dataset into pre-defined distinct non-overlapping subgroups (clusters) where each data point belongs to *only one group*. It tries to make the intra-cluster data points as similar as possible while also keeping the clusters as different (far) as possible. It assigns data points to a cluster such that the sum of the squared distance between the data points and the cluster’s centroid (arithmetic mean of all the data points that belong to that cluster) is at the minimum. The less variation we have within clusters, the more homogeneous (similar) the data points are within the same cluster.
293 |
294 | The way k means algorithm works is as follows:
295 |
296 | + Specify number of clusters K.
297 | + Initialize centroids by first shuffling the dataset and then randomly selecting K data points for the centroids without replacement.
298 | + Keep iterating until there is no change to the centroids. i.e assignment of data points to clusters isn’t changing.
299 |
300 | The approach k-means follows to solve the problem is *expectation maximization*
301 | The E-step is assigning the data points to the closest cluster. The M-step is computing the centroid of each cluster. Below is a break down of how we can solve it mathematically,
302 |
303 | The objective function is:
304 |
305 | #+begin_export latex
306 | \begin{equation}
307 | {\Large{\boxed{$$J = \sum_{i=1} ^{m}\sum_{k=1} ^{K}w_{ik}||x^i - \mu_{k}||$$}}}
308 | \end{equation}
309 |
310 | And M-step is :
311 |
312 | {\Large{$\frac{\partial J}{\partial \mu_{k}} = 2 \sum_{i=1} ^{m}w_{ik}(x^i - \mu_{k}) = 0$}
313 |
314 | $$\Rightarrow \mu_{k}= \frac{\sum_{i=1} ^{m} w_{ik} x^i}{\sum_{i=1} ^{m} w_{ik}}$$}}
315 |
316 | #+end_export
317 |
318 |
319 | *Applications*
320 |
321 | K means algorithm is very popular and used in a variety of applications such as market segmentation, document clustering, image segmentation and image compression, etc. The goal usually when we undergo a cluster analysis is either:
322 |
323 | 1. Get a meaningful intuition of the structure of the data we’re dealing with.
324 | 2. Cluster-then-predict where different models will be built for different subgroups if we believe there is a wide variation in the behaviors of different subgroups.
325 |
326 | @@latex:\clearpage@@
327 |
328 | The *k-means clustering algorithm* performs the following tasks:
329 |
330 | + Specify number of clusters K
331 | + Initialize centroids by first shuffling the dataset and then randomly selecting K data points for the centroids without replacement.
332 | + Compute the sum of the squared distance between data points and all centroids.
333 | + Assign each data point to the closest cluster (centroid).
334 | + Compute the centroids for the clusters by taking the average of the all data points that belong to each cluster.
335 | + Keep iterating until there is no change to the centroids. i.e assignment of data points to clusters isn’t changing.
336 |
337 | According to the Elbow method, here we take K=4 clusters to train KMeans model. The derived clusters are shown in the following figure
338 |
339 | #+ATTR_LATEX: :height 80px :width 400px
340 | [[./images/kmeans.png]]
341 |
342 | #+ATTR_LATEX: :height 310px :width 470px
343 | [[./images/kmeansalgo.png]]
344 |
345 | @@latex:\clearpage@@
346 |
347 | *Prediction of Prices most used cars*
348 |
349 | Linear regression is a machine learning algorithm based on supervised learning. It performs a regression task. Regression models targets prediction value based on independent variables. It is mostly used for finding out the relationship between variables and forecasting. Here we use a linear regression model to predict the prices of different Electric cars in different companies. X contains the independent variables and y is the dependent Prices that is to be predicted. We train our model with a splitting of data into a 4:6 ratio, i.e. 40% of the data is used to train the model.
350 |
351 | *LinearRegression().fit(X_train,y_train)* command is used to fit the data set into model. The values of intercept, coefficient, and cumulative distribution function (CDF) are described in the figure.
352 |
353 | #+ATTR_LATEX: :height 400px :width 440px
354 | [[./images/pred.png]]
355 |
356 | @@latex:\clearpage@@
357 |
358 | After completion of training the model process, we test the remaining 60% of data on the model. The obtained results are checked using a scatter plot between predicted values and the original test data set for the dependent variable and acquired similar to a straight line as shown in the figure and the density function is also normally distributed.
359 |
360 | #+ATTR_LATEX: :height 400px :width 440px
361 | [[./images/density.png]]
362 |
363 | The metrics of the algorithm, Mean absolute error, Mean squared error and mean square root error are described in the below figure:
364 |
365 | #+ATTR_LATEX: :height 240px :width 440px
366 | [[./images/metrics.png]]
367 |
368 | ** Profiling and Describing the Segments
369 |
370 | Sorting the Top Speeds and Maximum Range in accordance to the Price with head () we can view the Pie Chart.
371 |
372 | *Pie Chart:*
373 |
374 | #+ATTR_LATEX: :width 300px :height 300px
375 | [[./images/pie-top.png]]
376 |
377 | @@latex:\clearpage@@
378 |
379 | #+ATTR_LATEX: :width 300px :height 300px
380 | [[./images/pie-range.png]]
381 |
382 | #+ATTR_LATEX: :width 300px :height 300px
383 | [[./images/top-max.png]]
384 |
385 |
386 | ** Target Segments:
387 |
388 | So from the analysis we can see that the optimum targeted segment should be belonging to the following categories:
389 |
390 | *Behavioral:* Mostly from our analysis there are cars with 5 seats.
391 |
392 | *Demographic:*
393 | + /Top Speed & Range/ : With a large area of market the cost is dependent on Top speeds and Maximum range of cars.
394 | + /Efficiency/ : Mostly the segments are with most efficiency.
395 |
396 | *Psychographic:*
397 | + /Price/ : From the above analysis, the price range is between 16,00,000 to 1,80,00,000.
398 |
399 | Finally, our target segment should contain cars with most *Efficiency*, contains *Top Speed* and price between *16 to 180 lakhs* with mostly with *5 seats*.
400 |
401 | @@latex:\vspace{5mm}@@
402 |
403 | ** Customizing the Marketing Mix
404 |
405 | @@latex:\vspace{5mm}@@
406 |
407 | [[./images/marketing-mix.png]]
408 |
409 | @@latex:\vspace{10mm}@@
410 |
411 | The marketing mix refers to the set of actions, or tactics, that a company uses to promote its brand or product in the market. The 4Ps make up a typical marketing mix -Price, Product, Promotion and Place.
412 |
413 | + *Price:* refers to the value that is put for a product. It depends on segment targeted, ability of the companies to pay, ability of customers to pay supply - demand and a host of other direct and indirect factors.
414 | + *Product:* refers to the product actually being sold – In this case, the service. The product must deliver a minimum level of performance; otherwise even the best work on the other elements of the marketing mix won't do any good.
415 | + *Place:* refers to the point of sale. In every industry, catching the eye of the consumer and making it easy for her to buy it is the main aim of a good distribution or 'place' strategy. Retailers pay a premium for the right location. In fact, the mantra of a successful retail business is /'location, location, location’/.
416 | + *Promotion:* this refers to all the activities undertaken to make the product or service known to the user and trade. This can include advertising, word of mouth, press reports, incentives, commissions and awards to the trade. It can also include /consumer schemes, direct marketing, contests and prizes/.
417 |
418 | All the elements of the marketing mix influence each other. They make up the business plan for a company and handle it right, and can give it great success. The marketing mix needs a lot of understanding, market research and consultation with several people, from users to trade to manufacturing and several others.
419 |
420 | #+begin_export latex
421 | \begin{thebibliography}{9}
422 | \bibitem{texbook}
423 | Deepak Jaiswal,Arun Kumar Deshmukh(2022) \emph{Who will adopt electric vehicles? Segmenting and exemplifying potential buyer heterogeneity and forthcoming research}, Journal of Retailing and Consumer Services .
424 |
425 | \bibitem{MSA}
426 | Dolnicar, S., Grün Bettina, & Leisch, F. (2019). \emph{Market segmentation analysis understanding it, doing it and making it useful}. Springer Nature.
427 |
428 | \bibitem{MS}
429 | McDonald, M., & Dunbar, I. (2003). /emph{Market segmentation}. Butterworth-Heinemann.
430 | \end{thebibliography}
431 |
432 | \vspace{40mm}
433 | {\hspace{2.5mm} \huge{ Github : \href{https://github.com/Chaganti-Reddy/EVMarket-India}{Chaganti Reddy/ EVMarket-India}}}
434 |
435 | #+end_export
436 |
--------------------------------------------------------------------------------