Real-Time Accident Detection Using KNN Algorithm to Support IoT-based Smart City

Abstract
Surabaya is a city with an area of 326.81 km2 and is the center of land transportation in the eastern part of Java Island. The construction of digital infrastructure in the Surabaya area will make it easier for the City Government to make efficient services. Traffic accidents that occurred in Surabaya until 2017 recorded 1,365 incidents. EVAN (Emergency Vehicle Automatic Notification) is a research topic that focuses on the field of transportation, especially in real-time traffic accidents which can be integrated with city information centers and hospitals for primary assistance in accidents. The purpose of this research is to make it easier for the Surabaya city government to provide first aid in the event of an accident. The design of the device on the user side is made using the Arduino, the accelerometer sensor and the gyroscope in the form of the MPU6050 sensor and the u-blox gps module. Crash detection on the system using the k-Nearest neighbors algorithm (KNN). On the operator side, the design is done on a web basis by utilizing the ReactJs framework which is integrated with the Google Maps APIs. The results of the accuracy of the accident detection system reached 97% and the detection of accident locations and the nearest hospital from the location reached 100%. Thus, real-time accident detection can be implemented in Surabaya city to support the smart city.