Smart city projects have the potential to improve the management of environmental and public infrastructure. However, the operational and capital expenditures of smart cities can prevent cities from becoming smarter. A notable factor that influences the cost is providing cellular Internet connectivity to IoT devices. 5G has been proposed as a possible solution, but projections show that 5G will not be able to support the load of billions of IoT devices coming online. To mitigate this, people, vehicles, and other nodes in transportation networks can be exploited to transmit non-urgent data by leveraging device-to-device communication in order to reduce cellular connectivity costs associated with smart city sensors. Hence, this paper addresses cost-effective edge node placement in smart cities that opportunistically leverage public transit networks. We introduce an algorithm that selects a set of edge nodes that provide minimal delivery delay within a budget. The algorithm is evaluated for two public transit network data-sets: Chapel Hill, North Carolina and Louisville, Kentucky and results show that our algorithm outperforms betweeness and in-degree centrality metrics with a reduction in latency of over 20 minutes.