Nowadays, data-sharing ecosystems are crucial for unlocking and realizing the maximum potential of data. Data spaces are an emergent concept that helps to overcome some of the challenges related to data sharing and supports the creation of innovative solutions in a trustful and mutually beneficial manner. This paper shows how competing companies in the mobility domain can collaborate toward optimizing the performance of a traffic prediction algorithm through implementing federated machine learning in a data space. The proposed method avoids sensitive data sharing by executing machine learning algorithms within the private environments of competing companies while only the trained model instances are shared. The approach has various applications beyond the one presented in the paper.