Text Mining in Practice with R
A hands-on path through NLP in R: gathering text, cleaning it, then sentiment, clustering, topic modeling, and prediction on real corpora.
Practical R by Ted Kwartler
Code-first books, free datasets, and real course material for text mining and sports analytics in R. The same practice-driven approach taught at Harvard and GSERM, open for everyone.
The books
Every chapter pairs clear explanation with reproducible R code, so you finish with a working skill, not just theory. Written by Ted Kwartler.
A hands-on path through NLP in R: gathering text, cleaning it, then sentiment, clustering, topic modeling, and prediction on real corpora.
Turn play, performance, and fan data into decisions with applied R workflows for the questions teams and analysts actually ask.
Contributed chapters on natural language processing and applied business analytics for the business of sport.
Four interactive courses on text mining and machine learning in R by Ted Kwartler, taken by learners worldwide.
Text Mining & NLP
Text Mining in Practice with R is built around doing the work: pull text from the web and files, structure it into a corpus, and move through frequency analysis, sentiment, clustering, topic modeling, and prediction, all in reproducible R.
It is the same material Ted Kwartler teaches at Harvard Extension School and internationally, distilled into a reference you keep on your desk.
Get the book →Follow along with install.packages("tm").
Sports Analytics
Sports Analytics in Practice with R applies data science to sport: performance, strategy, and the commercial side of the game, each concept shipped with R code and datasets you can reproduce and adapt to your own league or team.
Great for students, analysts, and anyone moving from spreadsheets to defensible, reproducible analysis.
Get the book →Examples run in base R plus a few common packages.
Data & code
Datasets, scripts, and full course material live on Ted Kwartler's GitHub. Clone a repo, open the scripts, and run every example yourself.
Companion data and scripts for Text Mining in Practice with R.
Student repo for Harvard CSCI E-96, Data Mining for Business.
A hub of datasets used across Ted Kwartler's courses and books.
Student repo for the GSERM Text Mining course at the University of St. Gallen.
Materials and data for Harvard's Natural Language Processing course.
Data used in the Sports Analytics in Practice with R book.
FAQ