Next Article in Journal
Adaptive IoT-Based Platform for CO2 Forecasting Using Generative Adversarial Networks: Enhancing Indoor Air Quality Management with Minimal Data
Previous Article in Journal
Comparative Study of MRI Modality Embeddings for Glioma Survival Prediction
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Proceeding Paper

Urban Traffic in Casablanca: A Novel Dataset and Its Application to Congestion Analysis via Fuzzy Clustering †

1
Artificial Intelligence Research and Applications Laboratory, Faculty of Science and Technology, Hassan First University, Settat 26000, Morocco
2
Euromed Polytechnic School, Euromed University of Fes, UEMF, Fez 30030, Morocco
*
Author to whom correspondence should be addressed.
Presented at the 7th edition of the International Conference on Advanced Technologies for Humanity (ICATH 2025), Kenitra, Morocco, 9–11 July 2025.
Eng. Proc. 2025, 112(1), 56; https://doi.org/10.3390/engproc2025112056
Published: 30 October 2025

Abstract

Understanding traffic congestion in urban areas is crucial for ensuring mobility, especially in metropolitan cities of developing countries. This study presents new spatial and temporal data to analyze congestion in Casablanca. Spatial data, collected using QGIS, covers 22 ZIP code areas and includes built environment factors such as land use, road types, and public transport stations. Temporal data consists of 440 randomly generated trajectories per commune, with real-time travel data collected hourly over one week using the Waze Route Calculator. A Python script was used to compute the Travel Time Index (TTI) for each zone. To classify zones based on congestion patterns, we applied fuzzy c-means clustering, allowing for nuanced grouping and interpretation of overlapping characteristics. This dataset supports traffic modeling, simulation, and congestion analysis in developing urban contexts.

1. Introduction

In the face of rapid urbanization and the continuous rise in mobility demands, modern cities are confronting major challenges related to traffic circulation, urban logistics, and environmental sustainability [1]. Population growth, combined with urban sprawl, is placing increasing pressure on existing infrastructures, which are often unable to meet the growing demand effectively. In many developing countries, these issues are further exacerbated by aging transportation networks, inadequate urban planning, and a lack of integration between different modes of transport [2,3]. Morocco exemplifies this complex dynamic. In Casablanca, the country’s leading economic metropolis, traffic congestion has been steadily worsening year after year, producing negative impacts on multiple fronts: longer travel times, increased energy consumption, rising logistical costs for businesses, and deteriorating air quality [4]. These challenges not only hinder the fluidity of economic exchanges but also undermine national objectives related to energy transition and sustainable development. In this context, the development of intelligent, connected, and intermodal mobility solutions emerges as a strategic necessity [5,6].
As part of the research project “Mobility Online Market for Optimized Trips”, this study presents a dataset that integrates both spatial and temporal data to analyze congestion patterns across the city. Spatial data were collected using QGIS software, and a new API-based protocol was proposed to gather real-time traffic information. Traffic data acquisition was conducted using the Waze Calculator, offering a cost-effective and easily deployable alternative to traditional methods, which are often expensive and difficult to implement, particularly in emerging countries. Furthermore, a Fuzzy c-means clustering algorithm was developed and applied to evaluate and classify congestion levels across Casablanca’s urban communes, providing a dynamic and adaptive approach to understanding traffic distribution and identifying critical congestion hotspots.

2. Literature Review

Road congestion has long drawn the attention of researchers, particularly due to increasing urbanization and the growing number of vehicles worldwide [7]. In recent years, several studies have explored the use of sensors and IoT data to anticipate traffic jams. Chawla et al. [8] developed a deep learning model that combines sensor data streams with accident risk estimation to improve traffic flow and reduce environmental impact. Wu et al. [9] use a Transformer-based model to predict traffic speed on Taiwanese highways. Similarly, Li et al. [10] rely on fixed sensors and a model combining shockwave theory and Bayesian regression to track congestion progression.
Other studies focus on computer vision, particularly in smart cities equipped with surveillance cameras. Duong et al. [11] designed a congestion detection system using images captured by multiple cameras at intersections. Their method is based on YOLOv4-CSP for vehicle detection, OC-SORT for tracking, and an analysis system that uses vehicle density and speed to assess traffic conditions. Such a solution can be integrated into real-time urban monitoring systems. At a broader scale, Wei et al. [12] analyzed congestion patterns in 77 Chinese cities using data from the AutoNavi platform. They identified several types of temporal and spatial dynamics, which can guide traffic management policies.
Several studies utilize floating vehicle GPS data. Kan et al. [13] analyze taxi trips in Wuhan along with the distribution of points of interest, proposing two indicators to measure congestion based on trip purposes. Shi et al. [14] show, using GPS data, that trip purposes have a stronger influence on congestion in city centers, while trip characteristics play a greater role in peripheral areas. In Shenzhen, Shang et al. [15] link traffic data to pollution levels using clustering techniques. In Jakarta, Hasabi et al. [16] compare congestion models from Google Maps with the distribution of gas stations, used here as indirect indicators of vehicle-related emissions.
In South American countries, Andara et al. [17] studied the evolution of travel habits in eight major Latin American cities during the COVID-19 pandemic. They observed that the use of private cars resumed more quickly than public transport. In Buenos Aires, Fulponi [18] estimated the economic cost of congestion at 1.1% of GDP, based on data from TomTom and Waze, and emphasized the need for integrated policies such as congestion pricing, public transport improvements, and traffic management measures.
On the African continent, studies remain limited. In Ghana, Owusu-Ansah et al. [19] identified illegal parking, faulty traffic lights, and a lack of infrastructure as major causes of congestion in Atwima Nwabiagya. This situation leads to economic losses and health issues. Obiri-Yeboah et al. [20] advocate for the adoption of intelligent transport systems (ITSs) and centralized road data platforms. In Tanzania, Njuu et al. [21] propose a technological solution combining radar sensors, cloud computing, and blockchain, designed for resource-constrained environments.
The literature shows a shift toward AI-based methods. Significant progress has been made in Asia and Latin America, particularly with the integration of real-time data. In contrast, studies on congestion in Africa remain scarce. This is the context in which our study is positioned. It introduces an innovative protocol based on an API connected to Waze to collect real-time traffic data in an easy and cost-effective way. This solution is well-suited to the technical and budgetary constraints of emerging countries.

3. Data Description

This dataset is a valuable resource for enhancing the understanding of traffic congestion in urban areas. It is particularly beneficial for researchers interested in comparing traffic congestion patterns between Casablanca and other metropolitan cities in developing countries. Instead of relying on traditional techniques, which are often expensive and time-consuming, we leverage the efficiency of the Waze Route Calculator for data collection. This section provides a detailed description of the data. The dataset comprises eleven tables, consolidated into a single Excel file. The names and contents of these tables are described in the subsections below. We made the dataset available in a public Mendeley repository: https://data.mendeley.com/datasets/8hj76bpzpv/1 (accessed on 1 July 2025).

3.1. Data Collection Method

This study integrates both spatial and temporal data to analyze congestion patterns (Figure 1). For spatial data we utilized the open-source software QGIS to gather various characteristics of the built environment and create segments within Casablanca. The shapefile of these segments contains the coordinates of origins and destinations for 440 trajectories, which are essential for calculating real-time travel time and distance. To accomplish this, a Python 3.12.0 script communicates with the Waze Calculator to retrieve real-time travel information and vehicle distances every hour throughout the day. This process is repeated for one week, 24 h per day, covering Monday through Sunday. Consequently, we create daily tables containing 440 trajectories as rows, with 24 columns describing the hour when the data is collected. The travel time and distance between each pair of points within the same zone are queried a combined total of 336 times, accounting for both the outbound and return journeys (e.g., 2 × 7 × 24 = 336).

3.2. Extracting Built Environment Data

Population size, household counts, and density data were collected using the open-source software QGIS. To improve the accuracy of commune boundaries across Casablanca’s prefectures and provinces, we adopted the updated administrative division (Ajbal et al. [8]). Land use information, road classifications, and the locations of tram and bus stations were extracted using QGIS 3.16, and the resulting datasets were exported as shapefiles for further analysis.

3.2.1. (a) Population size, households, and density

Casablanca covers an area of approximately 384 km2 and houses a population of approximately 3.71 million within its urban boundaries, as reported by the High Commission for Planning (HCP). Table 1 provides details regarding the population size, households, and density for each commune. Access to Morocco’s administrative region’s shapefile is available through VGI Open Africa. This dataset was initially based on Morocco’s former administrative division. However, in October 2016, the administration introduced a new regional division. As per the 2015 General Monograph of Greater Casablanca, this new division included additional provinces, necessitating an update to the shapefile. In alignment with the updated administrative division of Greater Casablanca, we incorporated the most recent modifications from the Ministry of Interior. We sourced two files from the dataset by Ajbal et al. [8]. One is a shapefile named "GC_Commune",” containing information about communes, their ZIP codes, and geometrical polygons. The other file, a CSV named "District_Com", includes attributes such as population density, households, and the classification of the area as urban or rural. Upon data preparation, we chose twenty-two communes out of a total of thirty-five for our study on traffic congestion in Casablanca. By combining the aforementioned tables and organizing them based on district ZIP codes, we computed the variables outlined in Table 1.

3.2.2. (b) Tram and Bus Stations

The tramway system in Casablanca commenced operations in 2012 and was further expanded in 2019, is expected to consist of four lines. Additionally, two more lines are planned for opening, resulting in a comprehensive network covering approximately 73 km, with 71 stations distributed across 12 communes (Figure 2). Buses constitute another integral component of the public transportation system in Casablanca, comprising 60 lines that span a network route of 970 km, serviced by 732 stations scattered throughout the city (depicted as yellow points in Figure 2). These two-point shapefiles were exported using the OpenStreetMap (OSM) extension within QGIS. We conducted a targeted search in the OSM database for data with attributes specifying ’highway’ as either ’bus station’ or ’tram station’. Each point shapefile is categorized by type according to the legend, including location coordinates for each station. Table 2 provides an overview of the number of tram and bus stations in each commune.

3.2.3. (c) Type of Roads

In cities, the roads network comprises various types. Primary roads serve as essential conduits for significant transportation flow between residential areas and economic activities. Secondary roads, another category, provide access to properties through routes within residential neighborhoods. Finally, highways represent the third type, known for facilitating major and traffic movement between centers. To gather data, we conducted a specific search in the OpenStreetMap (OSM) database using attributes such as ’highway = primary, secondary, highway’. We utilized three Geographic Information System (GIS) shapefiles, each one named according to its type as specified in the legend (Figure 3). These shapefiles include vectors of roads within the studied area, along with attributes like maximum speed limits and the number of lanes. Table 3 presents the number of segments for each road type.

3.2.4. (d) Land Use

Within each commune in Casablanca, we can categorize different areas based on their land use. These areas encompass various types, including residential, industrial, agricultural, and transportation. We employed seven Geographic Information System (GIS) shapefiles to facilitate our analysis. Each polygon shapefile is named according to its land use type and contains zone-specific information. All shapefiles also include attributes such as ’landuse’ and area (Figure 4). To collect data, we conducted a targeted search in the OpenStreetMap (OSM) database using specific attributes like ’landuse = residential, university, industrial, parks’, ’building = ’commercial”, and ’amenity = ’parking”. Table 4 provides details on the land areas and their various uses within the communes, which include parking areas, industrial zones, residential areas, parks, and university/institution locations. Additionally, the table includes the number of commercial buildings within each commune.

3.3. Calculating Travel Time

We generated the origins and destinations of trajectories within each commune. These coordinates were used as inputs for a Python script that communicates with the Waze Calculator to calculate real-time travel times and distances. A python script code was used to calculate real route time and distance with Waze Route Calculator.

3.3.1. (a) Real-Time Travel

We utilized the Waze Route Calculator to collect distance and travel time data for each trajectory throughout 24 h every day for a week. The travel times for trajectories within each commune are provided in Table 5, corresponding to the days of the week from Monday to Sunday, respectively.

3.3.2. (b) Travel Time Index

After we calculate real travel time and distance of each trajectory at each hour per day for one week, the Travel Time Index (TTI) (Table 6) was measured at each hour, which tells us how much, on average, travel time is during congestion compared to flow traffic [11]:
T T I = Free flow travel speed Peak period travel speed

4. Use Case: Congestion Analysis in Casablanca Communes Using Fuzzy c-Means

To illustrate the utility of our proposed dataset, we conducted a congestion analysis using fuzzy clustering across various communes of Casablanca. This section outlines the methodology and key insights derived from this case study. We aim to categorize communes based on their temporal congestion patterns using the average Travel Time Index (TTI) computed over 24 h and one week.

4.1. Fuzzy c-Means Clustering

To capture temporal congestion patterns across Casablanca’s communes, we analyzed the 24 h Travel Time Index (TTI) profile of each commune using fuzzy clustering. Each commune was represented as a 24-dimensional vector y i = [ S 1 , S 2 , , S 24 ] , where S t denotes the average TTI at hour t. This time series encodes the daily congestion dynamics experienced in each geographic unit.
Clustering was applied to these temporal profiles to uncover similarities and latent structure among communes. Rather than using traditional hard clustering methods like K-Means, which assign each object to a single cluster, we employed the Fuzzy C-Means (FCM) algorithm [22]. This method allows each commune to partially belong to multiple clusters through a degree of membership, reflecting the nuanced and transitional nature of urban congestion patterns.
The FCM algorithm minimizes the following objective function:
J ( U , C ) = i = 1 N j = 1 C ( u i j ) m x i V j 2
subject to the following:
j = 1 C u i j = 1 , 0 u i j 1
Here, x i is the feature vector of commune i, V j is the centroid of cluster j, and u i j represents the degree of membership of commune i in cluster j. The fuzziness coefficient m > 1 controls the degree of cluster overlap; we set m = 2 following common practice for congestion-related applications, where soft boundaries better reflect ambiguous urban behavior.
The algorithm iteratively updates centroids and memberships as follows:
V j = i = 1 N ( u i j ) m x i i = 1 N ( u i j ) m
u i j = 1 k = 1 C x i V j x i V k 2 m 1
Iterations stop when the change in the membership matrix falls below a convergence threshold ε , fixed here at 10 5 .

4.2. Cluster Validity and Selection of Optimal Number of Clusters

As in most clustering methods, the number of clusters in fuzzy c-means must be predefined. However, identifying an optimal number of clusters is critical to ensure both interpretability and meaningful results. An appropriate value of C should strike a balance between intra-cluster compactness and inter-cluster separation. To determine the optimal number of clusters C, we evaluated the clustering results using several validation indices tailored for fuzzy clustering. These indices assess various aspects of compactness and separation. Four key indices were considered:
1.
Partition Index (PI): This index reflects the compactness of clusters by evaluating the sum of squared membership degrees. A higher PI value indicates stronger cluster cohesion and better membership concentration.
2.
Separation Index (SI): This index measures how well the clusters are separated from each other. Higher SI values indicate greater distances between cluster centers and hence better-defined cluster boundaries.
3.
Xie-Beni Index (XB): The XB index evaluates the ratio between the total intra-cluster variance and the minimum squared distance between cluster centers. It is defined as follows:
X B ( C ) = i = 1 N j = 1 C u i j m x i V j 2 N · min i j V i V j 2
Lower values of X B indicate more compact and well-separated clusters.
4.
Dunn Index (DI): The Dunn Index is the ratio of the minimum inter-cluster distance to the maximum intra-cluster distance. A higher Dunn Index implies better clustering quality:
D I ( C ) = min i j d ( V i , V j ) max 1 k C δ k
where d ( V i , V j ) is the distance between cluster centers and δ k is the diameter of cluster k.

4.3. Clustering Results

The clustering process was first conducted with a number of clusters ranging from 2 to 6, and the performance of each configuration was evaluated using four internal validation indices: the Partition Index (PI), Separation Index (SI), Xie-Beni Index (XB), and Dunn Index (DI). As no single index is completely reliable on its own, the optimal number of clusters was selected through a comparative analysis of all indices (Figure 5). Most indices suggested that four clusters strike a balance between compactness and separation. Specifically, the PI and SI start to decline beyond four clusters, the XB reaches a local minimum at four, and the Dunn Index peaks at the same point. This indicates that using more than four clusters may lead to overfitting or reduced interpretability, while fewer clusters may oversimplify the underlying congestion dynamics. Based on this analysis, four clusters were chosen as representative of the different congestion patterns across Casablanca, and each commune was then assigned to its dominant cluster.
The fuzzy C-means clustering applied to weekday TTI profiles identified four distinct congestion categories across Casablanca’s communes: low, moderate, high, and very high congestion. Figure 6 illustrates the congestion characteristics of Casablanca’s communes during weekdays. Figure 6a presents the Cumulative Distribution Functions (CDFs) of the Travel Time Index for each cluster. The CDFs offer insights into the distribution and variability of TTI values within each cluster. Figure 6b displays each commune’s degree of membership across the four congestion levels.
The low congestion cluster (Avg TTI = 1.57) is composed of Echchallaâlate, Anfa, and Moulay Youssef. The CDFs for this group are steep and narrowly aligned between TTI values of 1.4 and 1.8, indicating very low variability and consistently smooth traffic throughout the day. Figure 6b supports this with strong fuzzy memberships to the low congestion cluster for all three communes, confirming stable, low-delay conditions typical of peripheral or less trafficked zones. Only anfa shows slightly more spread in its CDF and minor membership overlap with moderate and high congestion clusters, likely due to occasional traffic peaks linked to its role as a local attraction zone.
The moderate congestion cluster (Avg TTI = 2.21) includes nine communes, such as Sidi Moumen, Aïn Sebaâ, and Bou Chentouf. the CDFs are slightly more spread, starting around TTI 2.0 and climbing to near 3.0, wich reflect a higher variability and more dynamic traffic patterns. Figure 6b reveals that these communes have strong memberships in the moderate cluster, though some show partial affiliation with high congestion, indicating transitional behaviors and traffic fluctuations across the day. The high congestion cluster (Avg TTI = 2.67) comprises eight communes. Figure 6a shows that their CDFs are concentrated between TTI values of 2.4 and 3.0, with a moderately steep rise, suggesting sustained congestion with moderate variability. This is confirmed by the fact that these communes show high degrees of membership in the high congestion cluster, though a few also show small overlaps with either moderate or very high level, indicating proximity to highly congested zones and variable traffic patterns. Lastly, the very high congestion cluster (Avg TTI = 3.32) consists of Sidi Belyout and Mers Sultan. The CDFs in Figure 6a begin above TTI 3.0 and rise almost vertically, reflecting uniformly high congestion levels and extremely low variability characteristic of central and commercial areas with constant traffic saturation. In Figure 6b, these two communes show nearly exclusive membership in the very high congestion cluster, reinforcing their role as persistent traffic hotspots likely affected by high density, commercial activity, and limited infrastructure flexibility.

5. Conclusions

This study presents a novel dataset and a fuzzy clustering-based methodology to analyze urban traffic congestion in Casablanca, Morocco. By integrating spatial and temporal data collected through open-source GIS tools and the Waze Route Calculator, the paper offers a cost-effective and replicable approach for monitoring and understanding congestion patterns in developing urban contexts. The analysis demonstrates the relevance of fuzzy c-means clustering to capture the nuanced and overlapping nature of congestion dynamics across communes. Our findings reveal four distinct congestion profiles, ranging from low to very high congestion. The results allow for a detailed spatial–temporal diagnosis of traffic behavior. These insights can guide urban planners and policymakers in prioritizing infrastructure interventions, improving public transport accessibility, and designing targeted traffic mitigation strategies.

Author Contributions

Conceptualization, Methodology, Data collection, Visualization, Software, Investigation, Data curation and Writing—original draft, N.R. and A.B.; Visualization, Writing—review and editing, M.A.E.A.; Validation, Supervision, Project administration O.B., M.F., and N.R. All authors have read and agreed to the published version of the manuscript.

Funding

This work has received funding under the Al-Khawarizmi program in artificial intelligence and its application, under the subsidy of the Digital Development Agency (ADD), the Ministry of Higher Education Scientific Research and Innovation, and the National Center for Scientific and Technical Research (CNRST).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The data presented in this study are available on https://data.mendeley.com/datasets/8hj76bpzpv/1 (accessed on 1 July 2025).

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Bousouf, A.; Rouky, N.; Benmoussa, O.; Fri, M. Behavioral modeling and prediction in urban multimodal transport: Current techniques and future trends. In Proceedings of the 7th IEEE Congress on Information Science and Technology (CiSt), Agadir, Morocco, 16–22 December 2023; pp. 355–360. [Google Scholar]
  2. Rizzi, L.; De La Maza, C. The external costs of private versus public road transport in the Metropolitan Area of Santiago, Chile. Transp. Res. Part A Policy Pract. 2017, 98, 123–140. [Google Scholar] [CrossRef]
  3. El Amrani, A.; Fri, M.; Benmoussa, O.; Rouky, N. The integration of urban freight in public transportation: A systematic literature review. Sustainability 2024, 16, 5286. [Google Scholar] [CrossRef]
  4. Rouky, N.; Bousouf, A.; Benmoussa, O.; Fri, M. A spatiotemporal analysis of traffic congestion patterns using clustering algorithms: A case study of Casablanca. Decis. Anal. J. 2024, 10, 100404. [Google Scholar] [CrossRef]
  5. Benjdiya, O.; Rouky, N.; Benmoussa, O.; Fri, M. On the use of machine learning techniques and discrete choice models in mode choice analysis. LogForum 2023, 19, 331–345. [Google Scholar] [CrossRef]
  6. El Amrani, A.; Fri, M.; Benmoussa, O.; Rouky, N. A deep reinforcement learning framework for last-mile delivery with public transport and traffic-aware integration: A case study in Casablanca. Infrastructures 2025, 10, 112. [Google Scholar] [CrossRef]
  7. Akhtar, M.; Moridpour, S. A review of traffic congestion prediction using artificial intelligence. J. Adv. Transp. 2021, 2021, 8878011. [Google Scholar] [CrossRef]
  8. Chawla, P.; Goel, P.; Verma, P.; Jain, S. Real-time traffic congestion prediction using big data and machine learning techniques. World J. Eng. 2024, 21, 140–155. [Google Scholar] [CrossRef]
  9. Wu, K.T.; Ting, C.C.; Lin, S. Long-term traffic forecasting in smart traffic management: A Taiwan case study based on the informer architecture for highway traffic analysis. In Proceedings of the IET Conference Proceedings CP907, Stevenage, Da Nang, Vietnam, 6–10 November 2024; Volume 2024, pp. 1–6. [Google Scholar]
  10. Li, Y.; Chen, J.; Wang, T.; Zhao, Y. Estimation and prediction of freeway traffic congestion propagation using tagged vehicle positioning data. Transp. Transp. Dyn. 2024, 12, 2297143. [Google Scholar] [CrossRef]
  11. Duong, M.T.; Tran, T.; Nguyen, H.; Le, Q. Identifying traffic congestion through vehicle counting and motion estimation. In Proceedings of the International Conference on Green Technology and Sustainable Development, Cham, Switzerland, 14–15 December 2024. [Google Scholar]
  12. Wei, X.; Zhang, Y.; Li, M.; Huang, R. Exploring the spatiotemporal pattern of traffic congestion performance of large cities in China: A real-time data based investigation. Environ. Impact Assess. Rev. 2022, 95, 106808. [Google Scholar] [CrossRef]
  13. Kan, Z.; Chen, X.; Chen, Z.; Zhang, X. Measuring exposure and contribution of different types of activity travels to traffic congestion using GPS trajectory data. J. Transp. Geogr. 2024, 117, 103896. [Google Scholar] [CrossRef]
  14. Shi, Y.; Liu, B.; Chen, D.; Zhou, W. Exploring the nonlinear relationships between human travel and road traffic congestions using taxi trajectory data. Transportation 2024, in press. [Google Scholar] [CrossRef]
  15. Shang, W.L.; Zhang, Z.; Wang, X.; Li, C. Congestion and pollutant emission analysis of urban road networks based on floating vehicle data. Urban Clim. 2024, 53, 101794. [Google Scholar] [CrossRef]
  16. Hasabi, R.; Kusuma, G.; Sugiarto, M.; Saputra, D. Urban traffic congestion and its association with gas station density: Insights from Google Maps data. Indones. J. Electr. Eng. Comput. Sci. 2024, 35, 1618–1626. [Google Scholar] [CrossRef]
  17. Andara, R.; Rivas, J.; González, D. Behavior of traffic congestion and public transport in eight large cities in Latin America during the COVID-19 pandemic. Appl. Sci. 2021, 11, 4703. [Google Scholar] [CrossRef]
  18. Fulponi, J. Traffic congestion in Buenos Aires: Diagnosis and public policy recommendations for a more sustainable city. Transp. Res. Procedia 2023, 69, 21–28. [Google Scholar] [CrossRef]
  19. Owusu-Ansah, P.; Boakye, J.; Akoto, S.; Nketiah, E. Effect of traffic congestion on productivity in Ghana: Evidence from Atwima Nwabiagya municipality, Ashanti Region-Ghana. Int. J. Traffic Transp. Eng. 2022, 11, 11–20. [Google Scholar]
  20. Obiri-Yeboah, A.; Gbeckor-Kove, M.; Oliver-Commey, Y. Overview and recommendations for road traffic data collection methods and applications in Ghana. Int. J. Eng. Res. Appl. 2024, 11, 1–9. [Google Scholar]
  21. Njuu, K.; Runyoro, A.A.; Dida, M. Towards a smart and transparent road-based vehicle speed detection system in Tanzanian highways: A review of methods, technologies, and systems. Future Transp. 2025, 5, 45. [Google Scholar] [CrossRef]
  22. Ghosh, S.; Dubey, S. Comparative analysis of k-means and fuzzy c-means algorithms. Int. J. Adv. Comput. Sci. Appl. 2013, 4. [Google Scholar] [CrossRef]
Figure 1. Data collection procedure.
Figure 1. Data collection procedure.
Engproc 112 00056 g001
Figure 2. Locations of tram and bus stations in Casablanca.
Figure 2. Locations of tram and bus stations in Casablanca.
Engproc 112 00056 g002
Figure 3. Thedistribution of different roads in Casablanca.
Figure 3. Thedistribution of different roads in Casablanca.
Engproc 112 00056 g003
Figure 4. Distribution of the land use zones in Casablanca.
Figure 4. Distribution of the land use zones in Casablanca.
Engproc 112 00056 g004
Figure 5. Identification of optimal number of clusters.
Figure 5. Identification of optimal number of clusters.
Engproc 112 00056 g005
Figure 6. Congestion characteristics of Casablanca’s communes during weekdays. The color represents the most likely cluster for each commune; (a) the Cumulative Distribution Function (CDF) of the Travel Time Index for each cluster; (b) commune’s degree of membership across congestion levels.
Figure 6. Congestion characteristics of Casablanca’s communes during weekdays. The color represents the most likely cluster for each commune; (a) the Cumulative Distribution Function (CDF) of the Travel Time Index for each cluster; (b) commune’s degree of membership across congestion levels.
Engproc 112 00056 g006
Table 1. Population size, households, and density in each commune.
Table 1. Population size, households, and density in each commune.
CommunesZIP CodePopulation SizeHouseholdDensity
Echchalalate28822153,11827,43310,641.16
Anfa20040118,05722,5289013.13
Moulay Youssef2006088,75817,08012,660.21
Table 2. Number of tram and bus stations in each commune.
Table 2. Number of tram and bus stations in each commune.
CommunesZIP CodeNumber of Tram StationsNumber of Bus Stations
Echchalalate2882200
Sidi Maarouf2019206
Anfa20040884
Sidi Bernoussi20600653
Moulay Youssef20060019
Table 3. Number of primary roads, secondary roads, and highways in each commune.
Table 3. Number of primary roads, secondary roads, and highways in each commune.
CommunesZIP CodeNumber of Primary RoadsNumber of Secondary RoadsNumber of Highways
Echchalalate288226222
Anfa2004014315442
Moulay Youssef20060593820
Table 4. Land use variables.
Table 4. Land use variables.
ZIP Code Region Area (km2)Parking Area (ha)Industrial Area (ha)Parks Area Area (ha)Residential Area (ha)Education Area (ha)Number of Commercial Buildings
2882268.4463.948112.36813.13578.5980.001
2004018.1343.0090.009.2621471.8125.75642
200603.5992.34916.8013.402282.3840.004
Table 5. Example of real-time travel of 440 trajectories on Monday.
Table 5. Example of real-time travel of 440 trajectories on Monday.
OriginDestinationDistance (km)Real-Time Travel at Each Hour (min)
00010223
019.95412.58312.58312.58310.200
029.09813.26713.26713.26713.133
1141134.8457.1006.1505.3676.683
Table 6. Travel Time Index (TTI) of 440 trajectories on Sunday.
Table 6. Travel Time Index (TTI) of 440 trajectories on Sunday.
OriginDestination00010223
011.0831.0831.0831.222
021.4121.4121.4121.473
1141131.5411.5621.3581.347
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Rouky, N.; Bousouf, A.; Fri, M.; Benmoussa, O.; El Amrani, M.A. Urban Traffic in Casablanca: A Novel Dataset and Its Application to Congestion Analysis via Fuzzy Clustering. Eng. Proc. 2025, 112, 56. https://doi.org/10.3390/engproc2025112056

AMA Style

Rouky N, Bousouf A, Fri M, Benmoussa O, El Amrani MA. Urban Traffic in Casablanca: A Novel Dataset and Its Application to Congestion Analysis via Fuzzy Clustering. Engineering Proceedings. 2025; 112(1):56. https://doi.org/10.3390/engproc2025112056

Chicago/Turabian Style

Rouky, Naoufal, Abdellah Bousouf, Mouhsene Fri, Othmane Benmoussa, and Mohamed Amine El Amrani. 2025. "Urban Traffic in Casablanca: A Novel Dataset and Its Application to Congestion Analysis via Fuzzy Clustering" Engineering Proceedings 112, no. 1: 56. https://doi.org/10.3390/engproc2025112056

APA Style

Rouky, N., Bousouf, A., Fri, M., Benmoussa, O., & El Amrani, M. A. (2025). Urban Traffic in Casablanca: A Novel Dataset and Its Application to Congestion Analysis via Fuzzy Clustering. Engineering Proceedings, 112(1), 56. https://doi.org/10.3390/engproc2025112056

Article Metrics

Back to TopTop