Application of clustering algorithms for online ridesharing and infrastructure placement in transportation networks