Introduction to Text Analysis in R
Analyze text data in R using the tidy framework.
Start Course for Free4 Hours15 Videos46 Exercises
Create Your Free Account
or
By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.Loved by learners at thousands of companies
Course Description
From social media to product reviews, text is an increasingly important type of data across applications, including marketing analytics. In many instances, text is replacing other forms of unstructured data due to how inexpensive and current it is. However, to take advantage of everything that text has to offer, you need to know how to think about, clean, summarize, and model text. In this course, you will use the latest tidy tools to quickly and easily get started with text. You will learn how to wrangle and visualize text, perform sentiment analysis, and run and interpret topic models.
- 1
Wrangling Text
FreeSince text is unstructured data, a certain amount of wrangling is required to get it into a form where you can analyze it. In this chapter, you will learn how to add structure to text by tokenizing, cleaning, and treating text as categorical data.
- 2
Visualizing Text
While counts are nice, visualizations are better. In this chapter, you will learn how to apply what you know from ggplot2 to tidy text data.
Plotting word counts50 xpVisualizing complaints100 xpVisualizing non-complaints100 xpImproving word count plots50 xpAdding custom stop words100 xpVisualizing word counts using factors100 xpFaceting word count plots50 xpCounting by product and reordering100 xpVisualizing word counts with facets100 xpPlotting word clouds50 xpCreating a word cloud100 xpAdding a splash of color100 xp - 3
Sentiment Analysis
While word counts and visualizations suggest something about the content, we can do more. In this chapter, we move beyond word counts alone to analyze the sentiment or emotional valence of text.
Sentiment dictionaries50 xpCounting the NRC sentiments100 xpVisualizing the NRC sentiments100 xpAppending dictionaries50 xpCounting sentiment100 xpVisualizing sentiment100 xpImproving sentiment analysis50 xpPracticing reshaping data100 xpPracticing with grouped summaries100 xpVisualizing sentiment by complaint type100 xp - 4
Topic Modeling
In this final chapter, we move beyond word counts to uncover the underlying topics in a collection of documents. We will use a standard topic model known as latent Dirichlet allocation.
Latent Dirichlet allocation50 xpTopics as word probabilities100 xpSummarizing topics100 xpVisualizing topics100 xpDocument term matrices50 xpCreating a DTM100 xpEvaluating a DTM as a matrix100 xpRunning topic models50 xpFitting an LDA100 xpTidying LDA output100 xpComparing LDA output100 xpInterpreting topics50 xpNaming three topics100 xpNaming four topics100 xpWrap-up50 xp
Collaborators


Prerequisites
Introduction to the TidyverseMaham Khan
See MoreSenior Data Science Content Developer at DataCamp
Hi, I am a Data Scientist and Senior Content Developer at DataCamp, on a mission to make data skills accessible for everyone. Most recently, I've worked on creating toolkits and exploring experimental applications of data science for urban analytics, disaster risk management and climate change mitigation, at the World Bank. I have a background in Experimental Psychology and Philosophy from the University of Oxford, and Urban Data Science from NYU.
Don’t just take our word for it
*4.5
69%
23%
0%
8%
0%
Sort by
- Nicolas F.13 days
I really benefited from this class, it set me up for some great job skills that I'm currently using that are helping me tremendously.
- Seyi A.3 months
It was really helpful to understand text mining. Great content too!
- Youngkee J.4 months
Thank you.
- Jonathan L.5 months
Learned a lot from this course. My only complaint is in difficulties when leaving and returning, as some elements (e.g. pre-inserted objects) rely on you either remembering their names from prior lessons or knowing how to use the R console to find out. While this isn't an issue for me, it could be for beginners.
- Dimitris L.9 months
excellent instructor, good notes
Join over 12 million learners and start Introduction to Text Analysis in R today!
Create Your Free Account
or
By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.