Sports Analytics in Practice with R
Ted Kwartler Harvard Extension School Adjunct, Faculty of Arts & Sciences Maynard, MA
This edition first published 2022
© 2022 John Wiley and Sons Ltd
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, except as permitted by law. Advice on how to obtain permission to reuse material from this title is available at http://www.wiley.com/go/permissions.
The right of Ted Kwartler to be identified as the authors of this work has been asserted in accordance with law.
Registered Offices
John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, USA
John Wiley & Sons Ltd, The Atrium, Southern Gate, Chichester, West Sussex, PO19 8SQ, UK
Editorial Office
9600 Garsington Road, Oxford, OX4 2DQ, UK
For details of our global editorial offices, customer services, and more information about Wiley products visit us at www.wiley.com.
Wiley also publishes its books in a variety of electronic formats and by print-on-demand. Some content that appears in standard print versions of this book may not be available in other formats.
Limit of Liability/Disclaimer of Warranty
The contents of this work are intended to further general scientific research, understanding, and discussion only and are not intended and should not be relied upon as recommending or promoting scientific method, diagnosis, or treatment by physicians for any particular patient. In view of ongoing research, equipment modifications, changes in governmental regulations, and the constant flow of information relating to the use of medicines, equipment, and devices, the reader is urged to review and evaluate the information provided in the package insert or instructions for each medicine, equipment, or device for, among other things, any changes in the instructions or indication of usage and for added warnings and precautions. While the publisher and authors have used their best efforts in preparing this work, they make no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties, including without limitation any implied warranties of merchantability or fitness for a particular purpose. No warranty may be created or extended by sales representatives, written sales materials or promotional statements for this work. The fact that an organization, website, or product is referred to in this work as a citation and/or potential source of further information does not mean that the publisher and authors endorse the information or services the organization, website, or product may provide or recommendations it may make. This work is sold with the understanding that the publisher is not engaged in rendering professional services. The advice and strategies contained herein may not be suitable for your situation. You should consult with a specialist where appropriate. Further, readers should be aware that websites listed in this work may have changed or disappeared between when this work was written and when it is read. Neither the publisher nor authors shall be liable for any loss of profit or any other commercial damages, including but not limited to special, incidental, consequential, or other damages.
Library of Congress Cataloging-in-Publication Data
Names: Kwartler, Ted, 1978- author.
Title: Sports analytics in practice with R / Ted Kwartler, Maynard, MA.
Description: First Edition. | Hoboken, NJ : John Wiley & Sons, Inc., 2022. | Includes bibliographical references and index. | Contents: Introduction to R -- Data Vizualization & Dashboards: Best practices -- Geospatial Data: Understanding changing baseball player behavior -- Machine Learning Basics: Modeling football draft patterns, pick number & clusters among athletes -- Logistic Regression: Explaining basketball wins & losses with coefficients -- Natual Language Processing: Understanding cricket fan topics & sentiment -- Linear Optimization: Programmatically seleting an optimal fantasy football lineup.
Identifiers: LCCN 2021042430 (print) | LCCN 2021042431 (ebook) | ISBN 9781119598077 (Hardback) | ISBN 9781119598060 (PDF) | ISBN 9781119598091 (ePub) | ISBN 9781119598084 (eBook)
Subjects: LCSH: Sports--Statistics. | Mathematical statistics--Computer programs. | R (Computer program language)
Classification: LCC GV706.8 .K85 2022 (print) | LCC GV706.8 (ebook) | DDC 796.02/1--dc23/eng/20211020
LC record available at https://lccn.loc.gov/2021042430 LC ebook record available at https://lccn.loc.gov/2021042431
Cover image: © Lorado/Getty Images
Cover design by Wiley
Set in 9.5/12.5pt STIXTwoText by Integra Software Services Pvt. Ltd, Pondicherry, India
Contents
1 Cover
4 Preface
6 Foreword
8 2 Data Visualization: Best Practices
9 3 Geospatial Data: Understanding Changing Baseball Player Behavior
10 4 Evaluating Players for the Football Draft
11 5 Logistic Regression: Explaining Basketball Wins and Losses with Coefficients
12 6 Gauging Fan Sentiment in Cricket
14 8