Saturday, March 27, 2010

Old Tableau blog post on building a word cloud with Tableau

http://www.tableausoftware.com/blog/text-analysis-election08-stump-speeches
http://www.tableausoftware.com/files/major-candidates-speech-comparisons.twbx


Text Analysis on Election '08 stump speeches
by Raif Majeed on February 4, 2008 - 2 comments
If you've seen the news, you'll know that there are lots of words flying around nowadays -- political speeches, debates, ads, etc. If you're trying to understand the words and decide how to vote, it can be overwhelming. However, if you look at the words as data, you can suddenly get interesting new insights.

Here's an interesting packaged workbook that shows a text analysis of recent stump speeches by the four major remaining presidential candidates (Hillary Clinton, John McCain, Barack Obama, and Mitt Romney). To give you a flavor of the kind of analysis I've done here, I've developed a packaged workbook showing the most common 2-word phrases uttered in each candidate's speech:

You can adjust the quick filter under the dashboard to limit yourself to phrases of a certain length of characters (the space between the words counts as one character). I want to keep this post politically neutral, so I'll let you dig in with Tableau (or the free Tableau Reader) and make your own discoveries. I'm sure you'll be surprised by some of the results, as I was.

The speeches were pulled from candidate websites; each was in a different forum -- for instance, Hillary Clinton was speaking in a church and Mitt Romney was speaking to auto workers in Michigan, which accounts for some of the unusual phrases you see.

To get the texts into a form that Tableau could understand, I used a quick Perl script to eliminate non-word characters (except whitespace, apostrophes, and hyphens), then split the text on whitespace and output the result as a CSV. To get 2-word analysis, I left-joined the resulting CSV against itself, with a one-off ON condition ("[current].[Position]+1=[next].[Position]", where [current] and [next] are table aliases). I used context filters and dashboards liberally to generate what you see.

I encourage you to play around with the workbook in Tableau and see what patterns you can find. Enjoy!

11 comments:

  1. This is the great information, RCP Technologies is offering best Tableau Online Training

    ReplyDelete
  2. Thank you for sharing this useful story. I think you shared the information is helpful to us..........................Please Click Here for more information about Oracle Fusion Financials Courses.

    ReplyDelete
  3. Your given most of the usefull information, i read your post is very nice thank you................................Just click here and learn more regarding Oracle Fusion Technical Training.

    ReplyDelete
  4. You’re doing great work. In this blog we can get useful information. Thanks for posting this blog

    SAP MM WM Training in Dallas

    SAP MM WM Training in Dallas

    ReplyDelete
  5. GOOD
    http://spunksoft.com/course/sap-s4-hana-simple-finance-training-in-hyderabad/

    ReplyDelete
  6. thanks for sharing keep posting like this nice blog if like read more visit it https://snowflakemasters.in/

    ReplyDelete

  7. Very Nice Blog…Thanks for sharing this information with us. Here am sharing some information about training institute.
    devops training in hyderabad

    ReplyDelete