Abstract
This chapter introduces the programming language Python and its relevance for computer science in sport. The need for programming languages in sports analytics is based on the variety of tasks from data import, pre-processing and visualization, to statistical modelling. Python is a dynamic, object-oriented, high-level programming language and especially popular among Data Scientists. Consequently, it also has made an impact in sports analytics. The variety of functionalities provided by Python’s libraries enables implementing the analysis process completely in Python. This process contains data import, pre-processing by means of filtering, grouping and aggregation, visualization as well as modelling by either “traditional” inferential statistics of Machine Learning and it is illustrated alongside the required libraries in this chapter.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
Anzer, G., & Bauer, P. (2021). A goal scoring probability model for shots based on synchronized positional and event data in football (soccer). Frontiers in Sports and Active Living, 3, 624475.
Barrett, P., Hunter, J., Miller, J. T., Hsu, J.-C., & Greenfield, P. (2005). matplotlib—A portable python plotting package. In Astronomical data analysis software and systems XIV.
Bassek, M., Raabe, D., Memmert, D., & Rein, R. (2022). Analysing motion characteristics and metabolic power in elite male handball players. Journal of Sports Science and Medicine, 22(2), 310–316.
Bourbousson, J., Sève, C., & McGarry, T. (2010). Space–time coordination dynamics in basketball: Part 2. The interaction between the two teams. Journal of Sports Sciences, 28(3), 349–358.
Decroos, T., Bransen, L., Van Haaren, J., & Davis, J. (2019). Actions speak louder than goals: Valuing player actions in soccer. In Proceedings of the 25th ACM SIGKDD international conference on knowledge discovery & data mining.
Di Prampero, P. E., & Osgnach, C. (2018). Metabolic power in team sports—Part 1: An update. International Journal of Sports Medicine, 39(08), 581–587.
Klemp, M., Wunderlich, F., & Memmert, D. (2021). In-play forecasting in football using event and positional data. Scientific Reports, 11(1), 1–10.
Lorenzo-Martínez, M., Rein, R., Garnica-Caparrós, M., Memmert, D., & Rey, E. (2022). The effect of substitutions on team tactical behavior in professional soccer. Research Quarterly for Exercise and Sport, 93(2), 301–309.
McKinney, W. (2010). Data structures for statistical computing in python. In Proceedings of the 9th python in science conference.
McKinney, W. (2011). pandas: A foundational python library for data analysis and statistics. Python for High Performance and Scientific Computing, 14(9), 1–9.
Memmert, D., & Raabe, D. (2018). Data analytics in football: Positional data collection, modelling and analysis. Routledge.
Memmert, D., Raabe, D., Schwab, S., & Rein, R. (2019). A tactical comparison of the 4-2-3-1 and 3-5-2 formation in soccer: A theory-oriented, experimental approach based on positional data in an 11 vs. 11 game set-up. PLoS One, 14(1), e0210191.
Oliphant, T. E. (2006). A guide to NumPy (Vol. Vol. 1). Trelgol Publishing USA.
Pappalardo, L., Cintia, P., Rossi, A., Massucco, E., Ferragina, P., Pedreschi, D., & Giannotti, F. (2019). A public data set of spatio-temporal match events in soccer competitions. Scientific Data, 6(1), 1–15.
Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., Blondel, M., Prettenhofer, P., Weiss, R., Dubourg, V., Vanderplas, J., Passos, A., Cournapeau, D., Brucher, M., Perrot, M., & Duchesnay, É. (2011). Scikit-learn: Machine learning in python. The Journal of Machine Learning Research, 12, 2825–2830.
Pincus, S. M. (1991). Approximate entropy as a measure of system complexity. Proceedings of the National Academy of Sciences, 88(6), 2297–2301.
Raabe, D., Biermann, H., Bassek, M., Wohlan, M., Komitova, R., Rein, R., Groot, T. K., & Memmert, D. (2022). floodlight—A high-level, data-driven sports analytics framework. Journal of Open Source Software, 7(76), 4588.
Seabold, S., & Perktold, J. (2010). Statsmodels: Econometric and statistical modeling with python. In Proceedings of the 9th python in science conference.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2024 The Author(s), under exclusive license to Springer-Verlag GmbH, DE, part of Springer Nature
About this chapter
Cite this chapter
Klemp, M. (2024). Python. In: Memmert, D. (eds) Computer Science in Sport. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-662-68313-2_15
Download citation
DOI: https://doi.org/10.1007/978-3-662-68313-2_15
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-662-68312-5
Online ISBN: 978-3-662-68313-2
eBook Packages: Biomedical and Life SciencesBiomedical and Life Sciences (R0)