Text Mining in Practice with R
A hands-on path through natural language processing in R: gathering text, cleaning it, and running sentiment, clustering, topic, and predictive analyses on real corpora.
Practical R books · by Ted Kwartler
Code-first books that teach text mining and sports analytics in R, with real datasets, working code, and results you can reproduce. No fluff, just practice.
The books
Each title pairs clear explanation with reproducible R code, so you finish a chapter with a working skill, not just theory.
A hands-on path through natural language processing in R: gathering text, cleaning it, and running sentiment, clustering, topic, and predictive analyses on real corpora.
Turn play, performance, and fan data into decisions. Applied R workflows for the questions teams, leagues, and analysts actually ask.
Contributed chapters on natural language processing and applied business analytics for the business of sport.
Prefer to learn hands-on in the browser? Four interactive courses on text mining and machine learning in R, taken by learners worldwide.
Text Mining & NLP
Text Mining in Practice with R is built around doing the work: you 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 teaches at Harvard Extension School and internationally, distilled into a practical reference you can keep on your desk.
Get the book →Tip: install with install.packages("tm") to follow along.
Sports Analytics
Sports Analytics in Practice with R applies data science to sport: performance, strategy, and the commercial side of the game. Every concept comes with R code and datasets so you can reproduce the analysis and adapt it to your own league or team.
Great for students, analysts, and anyone who wants to move from spreadsheets to reproducible, defensible analysis.
Get the book →All examples run in base R plus a few common packages.
Data & resources
Datasets and companion code for the books live on GitHub, free and open. Clone a repo, open the scripts, and run every example yourself.
Scripts, datasets, and teaching materials for the books and courses.
Guided, hands-on courses on text mining and machine learning in R.
About the author
Ted Kwartler is Managing Director of Responsible AI at Accenture, an instructor at Harvard Extension School, and a former field CTO for generative AI at DataRobot. He has led data teams at Amazon and Liberty Mutual and contributes to the World Economic Forum on responsible AI.
He wrote these books for the same reason he teaches: analytics is best learned by doing. Expect real datasets, working R code, and a bias toward getting results, not memorizing theory.
Explore his full work, talks, and writing at tedkwartler.com.