<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Andreu Rodríguez Donaire on Medium]]></title>
        <description><![CDATA[Stories by Andreu Rodríguez Donaire on Medium]]></description>
        <link>https://medium.com/@anrodon?source=rss-e1b35b15fa33------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*jxf6rDKsH3-BApzMoxkZAw.png</url>
            <title>Stories by Andreu Rodríguez Donaire on Medium</title>
            <link>https://medium.com/@anrodon?source=rss-e1b35b15fa33------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 07:44:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@anrodon/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Predicting road accidents in Spain using Open Data]]></title>
            <link>https://medium.com/@anrodon/predicting-road-accidents-in-spain-using-open-data-8d3ae7c4d4c2?source=rss-e1b35b15fa33------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d3ae7c4d4c2</guid>
            <category><![CDATA[data]]></category>
            <category><![CDATA[cars]]></category>
            <category><![CDATA[spain]]></category>
            <dc:creator><![CDATA[Andreu Rodríguez Donaire]]></dc:creator>
            <pubDate>Mon, 19 May 2025 14:54:20 GMT</pubDate>
            <atom:updated>2025-05-20T07:06:25.981Z</atom:updated>
            <content:encoded><![CDATA[<p>In Spain, road accidents remain a significant public safety concern, leading to loss of lives (<strong>1.154 people lost their live on inter-urban roads in 2024</strong>)(font: <a href="https://elpais.com/espana/2025-01-10/1154-personas-murieron-en-las-carreteras-en-2024-14-mas-que-el-ano-anterior.html">El País</a>), injuries (<strong>4.634 hospital admissions in 2024</strong>)(font: <a href="https://elpais.com/espana/2025-01-10/1154-personas-murieron-en-las-carreteras-en-2024-14-mas-que-el-ano-anterior.html">El País</a>), and economic burdens. <strong>Despite various measures, predicting and preventing these incidents remains a challenge.</strong></p><p>This article summarizes a small project I made which aims to leverage the power of <strong>machine learning to identify high-risk scenarios and suggest preventive measures</strong>.</p><p>The aim of the project was to build a model that can <strong>predict if a road accident will have mortal victims or not</strong>, to be able to find which are the <strong>most relevant factors that lead to fatalities on the road</strong>.</p><p>The metrics that I used to evolve the model have been accuracy and recall on the positive values for fatal accidents. I made this because it was crucial for me in this analysis to clearly detect the fatal accidents and was not that important if we had some false positives. <strong>At the end of the day, any recommendation we can give to avoid any accident will work on the right direction to safer roads.</strong></p><p>With the identification of these factors I obtained conclusions that may help to provide measures that can prevent losses of lives.</p><p>The data used for this project is the <a href="https://www.dgt.es/menusecundario/dgt-en-cifras/dgt-en-cifras-resultados/dgt-en-cifras-detalle/Ficheros-microdatos-de-accidentes-con-victimas-2023/">Ficheros microdatos de accidentes con víctimas 2023 dataset</a> by the Spanish General Traffic Administration (DGT — Dirección General de Tráfico). In the dataset webpage there is an excel file with the data and another one with the diccionary of the category identifiers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/474/0*BltpNtV9R5gQgi8n" /></figure><p>At the start of the project I took a look into the data and draw some plots that would help me understand better the dataset and obtain some draft hypothesis to work on.</p><p>The first thing I saw is that the datset was clearly imbalanced. This was due to the fact that (luckily) most of the accidents don’t have fatal victims. <strong>In our dataset, more than 98% of the accidents didn’t have fatal victims. </strong>This fact would be a problem in order to create our model, so I created a new balanced version of the dataset selecting randomly non-fatal accidents until I had 50% of fatal and non-fatal accidents.</p><p>With the plots previously drawn I was able to see some other interesting facts:</p><ul><li>Spain has a <strong>much higher fatality rate in the weekends and in holiday seasons</strong> (summer months + november and december).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/584/1*5-Iqr3rr495uXl93auB1WA.png" /><figcaption>Proportion of Fatal and Non-Fatal accidents per day of the week</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/576/1*SyCXU6wbMmRzNbiaZdJshg.png" /><figcaption>Proportion of Fatal and Non-Fatal accidents per month</figcaption></figure><ul><li><strong>Fatal accidents use to happen in interurban roads</strong>. We can see it not only in the ZONA_AGRUPADA category (the one that indicates 1 if the road where the accident happen is inter-urban and 2 if it is urban) but also in the ZONA (showing a big proportion of fatal accidents in inter-urban roads and an inverse proportion in streets) or the COD_PROVINCIA (shows a bigger proportion of non-fatal accidents in provinces like Madrid or Barcelona which most of its population lives in big cities).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/567/1*sATyTg9hfbuC9bl9Z4XwiQ.png" /><figcaption>1 means inter-urban roads and 2 urban roads</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/567/1*SVm2nxgD4UJP6Me_s_LjAw.png" /><figcaption>1 means inter-urban road, 2 means inter-urban road inside town, 3 means street, 4 urban motorway</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/812/1*sqOzCZqPeuq6y7bGEC8DBA.png" /><figcaption>Most populated areas show less percentage of fatal accidents</figcaption></figure><ul><li><strong>Almost half of the mortal accidents happen in single-lane conventional roads</strong>. The other half is mostly happening in urban roads and expressways.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/567/1*mCquFecdlxlXTNG0OwbLGw.png" /><figcaption>1 and 2 mean toll and toll-free highways, 3 means motorway, 6 means single-lane conventional road, 9 means street</figcaption></figure><ul><li><strong>Most fatal accidents are frontal collisions followed by run-off-road collisions and pedestrian hits.</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/576/1*czXcw1V4LMaJjlKo7C2zDA.png" /><figcaption>1=frontal, 2=fronto-lateral, 3=lateral, 4=rear-end, 7=pedestrian hits, 10=falls, 12&amp;16=run-off-road with collision</figcaption></figure><ul><li><strong>Most fatal accident victims are car &amp; motorbike drivers/passengers &amp; pedestrians. </strong>This demonstrates the obvious fact that public transportation is a safer alternative of transportation</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/571/1*gxmC11-wjCpaXOGdwybmEw.png" /></figure><ul><li><strong>There are more fatal accidents happening in the night, specially at 3AM.</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/989/1*0HrmL2KipmAx1CJj55JdEw.png" /></figure><p>These first facts already give hints about where to look deeper to increase security on the spanish roads.</p><p>After this analysis, I started investigating which models would work better to classify if one accident will have or not fatal victims.</p><p>After reading <a href="https://www.google.com/url?q=https%3A%2F%2Fwww.sciencedirect.com%2Fscience%2Farticle%2Fabs%2Fpii%2FS0926580519305151">Machine learning predictive model based on national data for fatal accidents of construction workers</a> by Jongko Choi, Bonsung Gu, Sangyoon Chin, Jong-Seok Lee, I decided to proceed with a model based on a <strong>Random Forest Classifier as it was predictive model that performed the best when classifying workers who might face a fatality risk.</strong></p><p>In addition to this, the <strong>Pandas Random Forest Classifier provides built-in feature importance scores</strong>. These <strong>scores indicate how much each feature contributes to the model’s predictions</strong>. This helped to identify which are the factors that contribute the most to fatality in road accidents.</p><p>Before starting with the model, I eliminated from the dataset all columns that indicated number of fatalities as they would clearly influence my analisis to much.</p><p>After that, to be able to use the Random Forest Classifier I needed all the variables in my dataset to be numerical, so I converted all the non-numerical columns to numerical and imputed the NaNs. I created a pipeline for that and then created train and test inputs to fit the model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/462/1*dBqt0U5Hzk5DKbnZq_A6xw.png" /></figure><p>This first version of the model showed to perform really good, with an accuracy of 86%.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/926/1*Bh4k7t_iVEgNGhCVxnZGQQ.png" /></figure><p>I decided to see which were the features that had more importance in order to find useful conclusions and I saw that the most important features were the number of injured people in the accident.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2fRgL8BVIuzdNs2iS1zNjw.png" /></figure><p><strong>Surprisingly, the 2 features indicating the number of minor injured victims showed much higher importance than the major injured.</strong></p><p>As this conclusions were not enough for me, I decided to eliminate from the original dataset the columns that had information about the injured victims and fit the model again.</p><p>As expected the accuracy of the model was much lower (75%), so I decided to improve the model by trying a couple of things:</p><ol><li>Add engineered features</li><li>Doing RandomSearch to look for better parameters that should help obtain better accuracy</li></ol><p>I tried to add the following engineered features:</p><ol><li>Weekend: 1 if weekend else 0</li><li>Night: 1 if hour between 0 and 8 and between 21 and 24 else 0</li><li>inStreet: 1 if accident happened in a street else 0</li></ol><p>After doing so, I<strong> fitted the model again without satisfactory results so I decided to remove the new features</strong>.</p><p>Then, proceeded to do the <strong>RandomSearch which provided great improvements in our target metric</strong> (recall) (<strong>up to 87% for predicting actual fatal accidents</strong>). The number of <strong>false positives also incremented</strong> but is nothing to worry about as the <strong>worst that could happen is that we recommend measures to reduce mortality in accidents that are already not mortal</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*X5BIincd9CtF-Lt-E0fvcA.png" /></figure><p>Being happy with the model, I started analysing the importance of the features in predicting fatal accidents.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tq83J5fK3_OAWChRqJJ_6Q.png" /></figure><p>As is clearly shown in the graphic, by far the most relevant feature was SENTIDO_1F when the value was 4. When SENTIDO_1F is equal to 1 it means that the vehicle was going in the direction that augments the kilometric point of the road, 2 when its in the opposite direction, 3 when both and 4 when unknown.</p><p>When SENTIDO_1Fis unknown is most probably because <strong>the road itself doesn&#39;t have kilometric points</strong>. In Spain, those roads are <strong>basically urban roads and the highways, which we know for the statistical analysis that are the ones with lower fatality rates</strong>.</p><p>This makes much sense as basically this feature indicates that the <strong>road where the accident happened should be a safe road</strong>.</p><p>In this regard we also see in the top20 features like inStreet or TIPO_VIA_9 which clearly indicate <strong>streets</strong>.</p><p>On the other hand we also see features like the number of vehicles taking part in the accident (TOTAL_VEHICULOS). We can explore this later.</p><p>Other interesting findings are CONDICION_ILUMINACION_6 which means that there was <strong>no artificial or natural light in the accident (may lead to think about nightime)</strong> or ACERA_998 which means that the information about the <strong>sidewalk does not apply (may lead to think about interurban roads)</strong>.</p><p>Another repeated column in the features with most importance seems to be the accident type. Because of that, I wanted to see the feature importance of the type of accidents and type of roads.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w8U3OKBaNoY8gUktN3krbw.png" /></figure><p>We basically see 5 types of accidents with the highest feature importance.</p><ul><li><strong>Type 1:</strong> Frontal crash</li><li><strong>Type 10:</strong> Fall</li><li><strong>Type 4:</strong> Read-end</li><li><strong>Type 16:</strong> Run-off-road with crash to the right side</li><li><strong>Type 8: </strong>Animal runover</li></ul><p>It’s interesting to see that type pedestrian runover doesn’t have importance in predicting the fatality of an accident when there are so many pedestrian deads due to these type of accidents.</p><p>Looking at our descriptive statistics from before, we can tell that probably a <strong>frontal crash or a run-off-road with crash to the right side will predict a fatal accident</strong> and that a <strong>fall, a rear-end or an animal runover may predict a non fatal accident</strong>.</p><p>I also wanted to look again at the importance of the features related with the type of the road, which showed me again that if accidents happen in streets is the only type of road that is important in order to predict (non-)fatal accidents.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fUorXzFgvdIvqqf_4RQHRA.png" /></figure><p>To finish, I wanted to look deeper at the TOTAL_VEHICULOS feature.</p><p>Let’s see in a plot how the fatality rate evolves in relationship with the total amount of vehicles involved in an accident.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/649/1*Xm_ngS9TSRRvHSRNOXJ2EQ.png" /></figure><p>The graphic shows us that for most fatal accidents, surprisingly the more frequent feature is only one vehicle involved.</p><p>Let’s see fatal accidents with just one vehicle involved by accident type.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/1*dtxNDQUFHYQq31Hy0AdQpg.png" /></figure><p>We see that they are mostly pedestrian hits and run-off-road accidents.</p><p>To conclude with this small experiment, we can say:</p><ul><li><strong>Weekends and holiday seasons are more likely to have fatal accidents, specially in the night. </strong>We see a correlation of this with the deployment of special controls by police officers for example.</li><li><strong>Fatal accidents use to happen in inter-urban roads, specially in single-lane roads. </strong>The administration has already a track record of measures working to reduce the fatality rate in inter-urban roads with the installation of speed cameras, speed-enforcement zones, reduction of speed limits in inter-urban roads, etc.</li><li><strong>Most fatal accidents are frontal collisions followed by run-off-road collisions and pedestrian hits. </strong>The homologation of vehicles is very strict in Europe regarding pedestrian hit security. Also, we see certifications like EuroNCAP evaluating the security of vehicles against many different accidents.</li><li><strong>Pedestrians, cyclists and motorbike riders/passengers are more likely to die in an accident than other groups on the road. </strong>There is still room to improve in working towards the security of most vulnerable road users, but we have seen already some changes in the laws to improve it.</li></ul><p>Luckily we can say that our administrations have in their hands already useful data to make our roads more secure, and measures are already being implement. Besides that is always good to remind that it is a collective work to try to avoid any loss of lives in the road.</p><p>As conclusions of the project, I can say that <strong>Open Data can clearly help to improve the security of the roads</strong>. Accessible data like the one in the dataset used may help other data science enthusiasts and professionals in different industries help solve this and other problems that sadly still exist.</p><p>Personally this project has been a great experience to learn more about classification models and its optimisation, and also to learn more about the road accidents that sadly still kill too many people in Spain.</p><p>All the code can be found in my <a href="https://github.com/anrodon/predicting-road-accidents-in-spain">Github</a> profile.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d3ae7c4d4c2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Spain’s bumpy road towards electrification]]></title>
            <link>https://medium.com/@anrodon/spains-bumpy-road-towards-electrification-86d4b5b7e838?source=rss-e1b35b15fa33------2</link>
            <guid isPermaLink="false">https://medium.com/p/86d4b5b7e838</guid>
            <category><![CDATA[cars]]></category>
            <category><![CDATA[spain]]></category>
            <category><![CDATA[data]]></category>
            <dc:creator><![CDATA[Andreu Rodríguez Donaire]]></dc:creator>
            <pubDate>Mon, 07 Apr 2025 09:22:15 GMT</pubDate>
            <atom:updated>2025-09-03T16:29:15.760Z</atom:updated>
            <content:encoded><![CDATA[<h4>What the last 12 months of car registrations in Spain tell us about its path to a zero-emissions car park</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kqmhNQmBDYg-bUsQwl1LWw.jpeg" /></figure><p>The automotive industry is undergoing one of the most significant transformation periods in its history. New propulsion systems, regulations, consumer demands, and other factors are challenging the status quo of this century-old industry.</p><p>According to the European Commission, <strong>passenger cars are responsible for around 16% of the total CO2 emissions in Europe</strong>, and because of that, the European administration has set <a href="https://climate.ec.europa.eu/eu-action/transport/road-transport-reducing-co2-emissions-vehicles/co2-emission-performance-standards-cars-and-vans_en">fleet-wide CO2 emission targets</a> to contribute to reaching at least 55% net greenhouse gas emission reductions by 2030 compared to 1990 as well as achieving climate neutrality by 2050, in line with the <a href="https://climate.ec.europa.eu/eu-action/european-climate-law_en">European Climate Law</a>.</p><p><strong>Spain is the second largest passenger car producer in Europe </strong>(behind Germany) and the automotive industry generates approximately the 7% of the Spanish GDP. But Spain is not only a major automobile producer; it is also a significant consumer market for cars, with <strong>yearly registration figures close to 1 million vehicles</strong>.</p><p>The Spanish General Traffic Administration (<a href="https://www.dgt.es/">DGT — Dirección General de Tráfico</a>) has an Open Data portal called <a href="https://www.dgt.es/menusecundario/dgt-en-cifras/">DGT en Cifras</a>, which allow everyone to download various data related to car registrations, drivers, fines, and other interesting topics related to the spanish car park.</p><p>I was curious about analyzing one of its datasets storing microdata of the registered cars for each month (<a href="https://www.dgt.es/menusecundario/dgt-en-cifras/dgt-en-cifras-resultados/dgt-en-cifras-detalle/Microdatos-de-parque-de-vehiculos-anual/">Microdatos de Matriculaciones de Vehículos (mensual)</a>) and the results of this analysis show a really sad reality: <strong>the spanish market is not choosing to purchase zero-emissions vehicles</strong>.</p><p>Before starting to work with the data, I wrote four questions to guide my analysis:</p><ol><li><strong>Are the Spanish costumers purchasing electrified vehicles?</strong></li><li><strong>Which Spanish provinces have the biggest and smallest number of electrified vehicles registrations?</strong></li><li><strong>Which Spanish provinces are registering more and fewer polluting vehicles?</strong></li><li><strong>Which car brands are selling more and fewer ecological cars in Spain?</strong></li></ol><p>These questions were written with the aim of assessing if the spanish car consumers are taking or not into account the CO2 emissions when purchasing a new car. Because of that, we only took into account new passenger cars from the dataset (we did not include commercial vehicles, vans, industrial machinery, etc and neither used cars being registered again).</p><p><strong>The data used has been from March 2024 to February 2025 (last 12 available months of data).</strong></p><p>In regards of the first question the situation is the following:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/436/1*xClqZEZfCTbykCgLfNbRpw.png" /></figure><p>Even though <strong>HEV cars</strong> (Hybrid Electric Vehicles — gas cars with electric motor support) <strong>are the ones being registered the most</strong>, <strong>PHEV </strong>(Plug-in Hybrid Electric Vehicles) <strong>and BEV</strong> (Battery Electric Vehicles) <strong>together account for only 11.3% of the registrations, with only 6.1% being fully electric</strong>. This indicates that Spain still has a long way to go to reach zero-emission registrations.</p><p>With the second question, <strong>“Which Spanish provinces have the highest and lowest number of electrified vehicle registrations?”</strong>, I tried to delve deeper into the dataset.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/868/1*RW6hoQZ7Ltru0C8WuXKAoQ.png" /></figure><p>With the graphic above, I saw that the capital <strong>Madrid is the clear winner in terms of zero-emissions vehicle registrations</strong>, followed by big cities like Barcelona or Valencia. The top 10 bar graph states the same:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/868/1*6D4V7YVQRawVkr_QeOOCpw.png" /></figure><p>The capital of the country being so different from the other regions was a bit suspicious to me, so I started to think that the large numbers might be related to fleets (rental cars, leasing, etc.) of companies registered there.</p><p>Luckily, our dataset differentiated vehicles registered by natural and legal persons, so we could find the answer to confirm or reject my hypothesis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/868/1*U1YiODustEYW92GhXGN2Qg.png" /></figure><p>Looking at the graphic, <strong>Madrid and Barcelona had a large proportion of cars registered by legal entities</strong>, but I still wanted to know which of those cars were actually destined to be driven by customers who chose that kind of car (I didn’t want to take into account company fleets, for example).</p><p>Another interesting field in the dataset indicates whether the car is a renting car or not, so I could use it to separate the cars actually being driven by actual end customers from the other company cars.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/868/1*CxmkdAfwGug5zvK-P9xgYw.png" /></figure><p>This last graphic made me see that our second question was not going to be answered with the data that we had. We see that <strong>most of the PHEV and BEV cars registered by companies in Madrid are for Renting</strong> (probably because most of the banks and renting companies in Spain are registered in Madrid), so <strong>close to half of the PHEV and BEV cars registered in Madrid are probably to be driven by renting customers in other areas of Spain</strong>.</p><p>So, we have an answer for our second question as we know that <strong>Madrid is the province registering more electrified cars, but the customer behind the wheel may not be driving it in the capital</strong>.</p><p>To complement this half answered question, I made a ratio of cars per habitant of each of the top 5 provinces registering more PHEV and BEV only by natural persons.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/452/1*UARWHSVsb6U88rUh4vIfrg.png" /><figcaption>Top 5 provinces with more PHEV + BEV car registrations by natural persons</figcaption></figure><p>We can see that <strong>Madrid and Valencia are the leaders in terms of electrified vehicles per capita</strong> and Barcelona, Alicante and Malaga have similar numbers but are a slightly behind. Would be interesting to analize what is driving this behaviour in Madrid and Valencia to be able to implement measures to improve the rates in the other provinces.</p><p>To answer the third question, “<strong>Which spanish provinces are registering more and less polluting vehicles?”</strong>, I used the field in the dataset that indicates the g Co2/km of each car to have an average for each province.</p><p>Doing a quick average between all the cars registered, I found that <strong>the average of CO2 emissions for cars registered in Spain for the last 12 months have been 123,09 g Co2/km</strong>.</p><p><strong>This number is really alarming as the EU Commission target was 95 g Co2/km for 2024 and is 93,6 g Co2/km for 2025 to 2029.</strong></p><p>To get a bit of feeling of how bad the situation is, I wanted to see the average CO2 emissions of the top 15 sold models.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/434/1*SL1KYBTK4YwRXVuEGFZJHA.png" /><figcaption>Top 15 car models by volume (BASTIDOR_ITV) with its average CO2 emmissions</figcaption></figure><p>We see that <strong>for the 15 models with more registrations in the last 12 months, only the TOYOTA C-HR has an average g CO2 /km value inside the EU Comission Targets.</strong></p><p>Now focusing on the provinces, I took the company registered vehicles apart from the analysis to not contaminate the big picture, and printed the average emissions by province.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*vkP7t6hIPhoWGXRyMuHR-Q.png" /></figure><p>Bad news again. <strong>Not even one of the provinces in Spain is achieving the average emission targets of the EU Commission for the new cars registered</strong>, but the accumulated fleet-wide average will be worse!</p><p>Let’s see it even more graphically:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/803/1*v5yuDQRpE6e1spewWpbxPQ.png" /></figure><p>In the map above, <strong>the scale is set so all the provinces below the EU Commission targets should be shown in white, and more red as they pass the 95 g CO2/km figure</strong>. All the map is dark red!</p><p>The map also gives us another sad fact. Before unveiling it, let’s see another bar graphic that may help identify it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*e38CGrW87Lp1qJgCzI-gUw.png" /></figure><p><strong>The top 10 provinces which registered bigger average CO2 emissions are in the southern part of Spain</strong> (besides the 3 forming Aragón), <strong>which is really sad taking in account the amount of sun hours they get every year which should lead to competitive 100% renewable electricity prices.</strong></p><p><strong>Again, we see a clear open task for both the central and regional administrations to boost electromobility.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/863/1*whzd9jy1LNHUgD3bMU14AA.png" /></figure><p>We see that Madrid is the city with less CO2 emissions per registered vehicle, but still has a long way to reach the targets of the EU Comission.</p><p>With this, our third question was answered. Only the fourth question is left: <strong>Which car brands are selling more and less ecological cars in Spain?</strong></p><p>It is kind of obvious that the companies selling 100% BEVs are the ones selling the more ecological cars, but let’s see them ordered by volumes:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/868/1*3THNa898CYMrC1LQKJ3RKw.png" /></figure><p>What we see basically is that <strong>TESLA and BYD are the two brands leading the pack of companies with 100% electrified sales</strong>.</p><p>But as we have seen, PHEV and BEV car registrations amount for a bit more than 10% of the market. Let’s see what happens with all the other cars. For my last graphic, I wanted to focus just on those brands who register more than 1.000 cars in the last 12 months in Spain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/891/1*3amok46-j8w8D2QcCLQn8A.png" /></figure><p><strong>From all the brands selling more than 1.000 cars in the last 12 months, only TESLA, BYD and MINI are registering an average of g CO2/km below the EU Comission Targets.</strong></p><p>In my opinion, this is not something that the other brands are happy about. Most of them share proudly the vision of a future for the automotive industry with only zero-emissions vehicles, have invested lots of money into developing this kind of cars and spend a lot into advertising of their electric models.</p><p><strong>What this analysis shows is that the market in Spain is not choosing the electromobility options that the brands offer, and this is something that the spanish administrations should be really worried about.</strong></p><h4><strong>It is urgent that the spanish market has the right incentives to buy zero-emission cars, not only to save the spanish automotive sector which is one of the most importants in the country, but to ensure that the future generations have a planet where to drive their cars too.</strong></h4><p><em>The full analysis and the code used can be found in this </em><a href="https://github.com/anrodon/spanish-vehicle-registrations-analysis/tree/main"><em>Github Repo</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=86d4b5b7e838" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>