# Data-Driven Safe Deliveries: The Synergy of IoT and Machine Learning in Shared Mobility
## 1 Introduction  
Population growth around the globe introduced new transportation challenges. Shared mobility involves the convergence of novel digital platforms and innovative solutions, marking a departure from traditional individual ownership toward communal resource utilization. This transition is particularly evident in the transportation industry, where the quick uptake of shared mobility platforms has led to significant economic growth. As highlighted in [1], the sharing economy's prevalence within the mobility sector is projected to experience a compounded annual growth rate of 23% from 2013 to 2025. These platforms leverage technology to streamline the sharing of transportation resources. The Internet of Things (IoT) plays a significant role in generating large amounts of data through sensors and allowing things such as shared mobility to be connected. Furthermore, cloud computing platforms support IoT in data collection and creating software services for data analysis. In shared mobility systems, individuals or companies can offer their vehicles for others to use. The shared mobility activities include dynamic systems in which drivers and riders are matched through automated processes facilitated by shared mobility services. This work implements an on-demand smart shared transportation system. The smart aspect of the proposed system lies in the shared mobility vehicle's capacity to share its knowledge and make automated decisions, specifically during emergencies. This is becoming more feasible due to the advancements in the field of IoT and communication protocols. This paper aims to propose an adequate reference model that enables mobility sharing,monitors the riders' behavior, and provides the necessary assistance when needed. Moreover, shared mobility systems require real-time decision making in response to situations such as accident detection, safety hazards, and theft. A case study is implemented focusing on delivery services that use motorbikes as a shared mobility. The implemented system's objective is to track and monitor the motorcycle's condition and the driver's behavior throughout the delivery trip. This was accomplished by considering the analyzed risk level, which was obtained from analyzing the collected data: the bike's acceleration, rotation, distance from nearby obstacles, impact level, and location coordinates. Therefore, the system ensures precise monitoring of driving patterns, a safe journey supported by safety procedures, and accurate accident documentation before and after the incident. The implemented case study contains a frontend interface that shows the statistics related to drivers' behavior, tendencies for rash driving, and accidents. This allows administrators to take early preventive action toward that driver. This shall reduce the number of accidents occurring and enhance the delivery service and customer satisfaction. To the best of the authors' knowledge, current systems in the literature do not present a holistic view of shared mobility systems but rather look into specific challenges in the decision component with the integration of technology. Hence, this paper extends the proposed approaches in the literature with the following main contributions:  
* Design and develop a shared mobility framework. * Design and develop the hardware and software components that can be added to a shared mobility vehicle. * Design and implement a practical solution for shared mobility for delivery service case study that continuously records the riding behavior and detects accidents. * Implement a machine learning model that detects the dangerous behavior of the rider. * Evaluate the accuracy of the detected dangerous behavior of the riders. The rest of the paper is organized as follows: a literature survey is presented in Section 2, the proposed shared mobility framework is presented in Section 3, a case study prototype implementation and validation are discussed in Section 4, the proposed architecture is evaluated and discussed in Section 5, and a conclusion is presented in Section 6.