Word clouds give only limited insight but they are popular. In python the package 'wordcloud' is popular. Below is an example of how to generate a word cloud. Once again I'm using Trump's twitter account as a source of text data.
from wordcloud import WordCloud
import matplotlib.pyplot as plt
text = '''Just leaving Florida. Big crowds of enthusiastic supporters lining the
road that the FAKE NEWS media refuses to mention. Very dishonest!
Congratulations Stephen Miller- on representing me this morning on the
various Sunday morning shows. Great job!
I know Mark Cuban well. He backed me big-time but I wasn't interested
in taking all of his calls.He's not smart
enough to run for president!
Bernie Sanders was cut off for using the term fake news to describe
the network. They said technical difficulties!
72% of refugees admitted into U.S. (2/3 -2/11) during COURT BREAKDOWN
are from 7 countries: SYRIA, IRAQ, SOMALIA, IRAN, SUDAN, LIBYA & YEMEN
The crackdown on illegal criminals is merely the keeping of my campaign
promise. Gang members, drug dealers & others are being removed!
A working dinner tonight with Prime Minister Abe of Japan, and his
representatives, at the Winter White House (Mar-a-Lago). Very good talks!
I am so proud of my daughter Ivanka. To be abused and treated so badly by
the media, and to still hold her head so high, is truly wonderful!
'Majority in Leading EU Nations Support Trump-Style Travel Ban'
Poll of more than 10,000 people in 10 countries
My daughter Ivanka has been treated so unfairly by Nordstrom. She is a great
person -- always pushing me to do the right thing! Terrible!
If the U.S. does not win this case as it so obviously should,
we can never have the security and safety to which we are entitled. Politics!
It is a disgrace that my full Cabinet is still not in place, the longest such
delay in the history of our country. Obstruction by Democrats!
The threat from radical Islamic terrorism is very real, just look at what
is happening in Europe and the Middle-East. Courts must act fast!
I call my own shots, largely based on an accumulation of data, and
everyone knows it. Some FAKE NEWS media, in order to marginalize, lies!'''
word_cloud = WordCloud().generate(text)
word_cloud = WordCloud(max_font_size=40).generate(text)
The above generates this word cloud:
This blog includes:
Scripts mainly in Python with a few in R covering NLP, Pandas, Matplotlib and others. See the home page for links to some of the scripts. Also includes some explanations of basic data science terminology.