## 4 Methodology
### Data Processing and Analysis
Then, these vector data were converted into raster data with the command \"Polygon to Raster\". Lastly, the command \"Raster Calculator\" was used to build and execute the following map algebra expression:  
\[\{[\sum_{k=1}^{9}(zk\times k)]\times x_{1}\}+\{[\sum_{k=10}^{14}(zk\times yk)] \times x_{2}\}+\{[\sum_{k=15}^{18}(zk\times yk)]\times x_{3}\}\]  
where  
\(x=\textit{average score of POI category}\)  
\(y=\textit{average score of POI subcategory}\)  
\(z=\textit{number of POI per subcategory}\)  
The output consisted of two different suitability maps, one related to the needs of electric infrastructures for private EVs and one for e-bikes. For the analysis of localization of charging points concerning _public buses_, a dedicated Python (3.10) [47] code has been developed; the repository is publicly available [48]. The code was developed and tested in a Linux environment. The Digital Terrain Model (DTM) was combined with the transportation road network to characterize the bus line slope and elevation; this task was performed using GRASS GIS (8.0) [49]. Since there are several infrastructures (such as tunnels, bridges, etc.) that might falsify the actual elevation of each element, the authors applied a 10 m buffer around specific infrastructures, and the elevation on these areas have been linearly interpolated to assess the road elevation. Furthermore, the roads have been recursively interpolated, removing all the points with a slope greater than a 20%. The output of this task was a clean 3D vector map of the regional roads. The road network and the bus time schedule were not always consistent; thus, the spatial position available in the GTFS file has been moved to the closest point of the road network. The authors built a simulation model that creates a physical energy balance. The model considers the road distance and the elevation difference performed by the bus within a specific bus line:  
\[\mathrm{E_{tot}}=\mathrm{E_{dist}}+\mathrm{E_{up}}-\mathrm{E_{down}}\]  
where \begin{table}
\begin{tabular}{c c c} \hline \hline
**POI Category/Subcategory** & **Average Score for EVs** & **Average Score for E-Bikes** \\ \hline Public facilities & 3.9 & 3.5 \\
10. Stations & 4 & 4 \\
11. Public parking lots & 3.5 & 4.5 \\
12. Park \& Ride lots & 4 & 3 \\
13. Piers & 3 & 4 \\
14. Service stations & 5 & 2 \\ \hline Local infrastructures & 3.8 & 2.9 \\
15. Hospitals & 3.5 & 1.5 \\
16. Exhibition areas & 4.5 & 3 \\
17. Public offices & 3.5 & 3.5 \\
18. Institutional venues & 3.5 & 3.5 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: _Cont._\[ \begin{split}&\text{E}_{\text{dist}}=\text{bus consumption}\times\text{distance}/\text{n}_{\text{clima}}\\ &\text{E}_{\text{up}}=9.81\times\left(\text{W}_{\text{bus}}+ \text{W}_{\text{people}}\right)\times\Delta_{\text{up}}/\left(\text{$\eta$}_{ \text{up}}\times\text{$\eta$}_{\text{clima}}\right)\\ &\text{E}_{\text{down}}=9.81\times\text{W}_{\text{bus}}\times \Delta_{\text{down}}\times\text{$\eta$}_{\text{down}}\times\text{$\eta$}_{ \text{clima}}\end{split} \]  
With \(\Delta_{\text{up}}\) and \(\Delta_{\text{down}}\) as positive and negative elevation differences, \(\text{$\eta$}_{\text{up}}=0.85\) (1) is the motor-to-wheel efficiency, \(\text{$\eta$}_{\text{down}}=0.40\) (2) is wheel-to-motor efficiency, \(\text{$\eta$}_{\text{clima}}=0.75\) (3\(A\)) is the reduction in bus autonomy to maintain the comfort conditions within the bus during winter/summertime. \(\text{W}_{\text{bus}}\) and \(\text{W}_{\text{people}}\) are, respectively, the weight of the bus and the maximum weight of people that might use the bus. The analysis was performed by selecting a specific day for the simulation (i.e., 29 January 2020), which was considered a representative winter day by the bus fleet owner. The simulated electric fleet consists exclusively of electric buses, with a battery capacity of 660 kWh. When the bus starts, the battery has a state of charge (SoC) of 90%, and the line is assigned to the bus only if the bus has enough energy to complete the bus trip.