Accessibility to public facilities is a crucial factor in regional development, includingat the village level as the smallest administrative unit. The Central Bureau of Statistics (BPS)currently collects data on public facilities and their distances to village offices throughinterviews, making the results dependent on respondents’ perceptions. This research aims tomeasure the nearest distance from village offices to public schools by utilizing the BallTreealgorithm and the Google Maps API. The dataset consists of 128 village offices and a list ofpublic schools classified into four categories. BallTree was used to filter the nearest schoolcandidates within a given radius, after which the route distance of the ten nearest candidates wascalculated using the Google Maps Distance Matrix API to identify the school with the nearestroute distance based on the road network. The findings show that straight-line distance oftenaligns with route distance, although not at all, highlighting the importance of Google Maps routecalculation. This research concludes that combining BallTree and the Google Maps APIimproves computational efficiency while providing objective and reliable information.
Copyrights © 2025