JMP facilitates free text analysis, and makes it easy to use open source code through its integration with Python. Easy, just the way I like it.

Since I also like Mexican food and the YouTube show De mi Rancho a Tu Cocina , I decided to combine my love for JMP and Mexican food in this blog. For people who don't know Doña Angela and her program “De Mi Rancho a Tu Cocina”, watching her cook her tasty dishes is relaxing and comforting, as if you had traveled back in time to your grandmother's house.
I will try to show, in a simple way, how you could use the analytical abilities of JMP together with the Python integration to analyze free text data. This example is about using the version of Python that comes installed with JMP 18 to scrape (or extract) text from YouTube videos, and using the text explorer in JMP to analyze the data. Of course, in the context of solving problems with data, a similar process could be used for consumer research as part of a marketing study, or competitive research.
Easiest thing first: JMP already comes with a version of Python installed, and with just one click of a button you can open a window to enter Python code:

As someone who doesn't like writing code, I imagined this would be somewhat complex. However, I found several sites with Python code to scrape text from videos on YouTube, and I only had to make minimal changes. With the code shown below that I “borrowed”, I only had to change the video ID and language.

The Python script is run just like a JMP script, by clicking the green button on the toolbar. This causes Python to search for the text transcription of the Spanish videos. In JMP, the results can be seen in the command log, under View > History .

Although there are other more elegant (and efficient) ways to save the results, the text can also be copied from the Record window and pasted into a text file, for example. Once I saved the extracted text from multiple videos to text files, I used the JMP option that allows you to import multiple files at once in File > Import Multiple Files to import them into JMP. After some fiddling, I arranged the data so that the episode is indicated in the first column, and the corresponding text is in the second column.

Now, for the fun part, I specified the options in Analysis > Text Explorer, including the display language. Several years ago, I took a course using Python for text analysis and it is truly amazing to me how easy it is to perform such tedious tasks so simply in JMP.

With just a few clicks, it is possible to convert words from videos on YouTube into compelling visualizations, which help us extract meaning from the words used. Of course, there are other analysis options in the red triangle, such as Latent Class Analysis, Discriminant Analysis, and much more.
With these basic results, I can see the most used words in the videos. The words in the word cloud are sized according to the count. It seems that chili and onion are some of Doña Angela's secret ingredients. In the list of phrases, I can also see the other secret ingredient; Doña Angela's sweet words, which make many of us return to her YouTube channel again and again.

If you would like to see more about the preparation and analysis of text data, we invite you to watch this detailed video that includes an example that you can follow.