{"id":14584,"date":"2023-11-22T02:34:37","date_gmt":"2023-11-22T02:34:37","guid":{"rendered":"https:\/\/towardsdatascience.com\/data-storytelling-with-animated-word-clouds-1889fdeb97b8\/"},"modified":"2024-11-26T20:21:07","modified_gmt":"2024-11-26T20:21:07","slug":"data-storytelling-with-animated-word-clouds-1889fdeb97b8","status":"publish","type":"post","link":"https:\/\/towardsdatascience.com\/data-storytelling-with-animated-word-clouds-1889fdeb97b8\/","title":{"rendered":"Data Storytelling with Animated Word Clouds"},"content":{"rendered":"<iframe loading=\"lazy\" class=\"wp-block-html\" src=\"https:\/\/cdn.embedly.com\/widgets\/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F3xrdNGZsnztb4eNQIg%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExem41dzgxb3dwems1dTFhd215NGp1ZWV2YjB0dG4wdXlodGdxdThyOCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2F3xrdNGZsnztb4eNQIg%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2F3xrdNGZsnztb4eNQIg%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy\" height=\"217\" width=\"435\"><\/iframe>\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n<p class=\"wp-block-paragraph\">An animated word cloud displays absolute frequencies of n-grams (contiguous sequences of text sample items) <strong>over time as a sequence of images in a video file.<\/strong> It **** gives greater importance to words that appear more frequently in a source text. The bigger and bolder the n-gram displays, the more frequently it appears in the text. It builds on the intuitive logic of classic word clouds and adds a time perspective to the visualization.<\/p>\n<p class=\"wp-block-paragraph\">As many text datasets are collected these days as text observations over multiple periods, there is a particular challenge to visualize the changes in the data over time. Instead of making summary tables or graphs for many different periods, let&#8217;s prepare an MP4 video that tells the story, attracts the audience, and gives a &quot;wow&quot; effect to the presentation.<\/p>\n<p class=\"wp-block-paragraph\">This article will describe the generation of animated word clouds from text data in Python. Here are some unique features of the <a href=\"https:\/\/pypi.org\/project\/AnimatedWordCloud\/\">AnimatedWordCloud library<\/a>:<\/p>\n<ul class=\"wp-block-list\">\n<li><em>Provides n-gram frequency visualization of all Latin-alphabet languages<\/em><\/li>\n<li><em>Cleans text dataset from punctuation, numbers, and stopwords included in the <a href=\"https:\/\/pythonspot.com\/nltk-stop-words\/\">NLTK lists of stopwords<\/a><\/em><\/li>\n<li><em>Generates yearly or monthly n-gram frequencies.<\/em><\/li>\n<\/ul>\n<iframe loading=\"lazy\" class=\"wp-block-html\" src=\"https:\/\/cdn.embedly.com\/widgets\/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F-2gH7Xfn0AI%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D-2gH7Xfn0AI&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F-2gH7Xfn0AI%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube\" height=\"480\" width=\"854\"><\/iframe>\n<h2 class=\"wp-block-heading\">How to use it<\/h2>\n<p class=\"wp-block-paragraph\">To use the library, follow these steps:<\/p>\n<h3 class=\"wp-block-heading\">1. Installation<\/h3>\n<p class=\"wp-block-paragraph\">Create a new Python 3.8 virtual environment for the project to avoid any dependence conflicts. <em>AnimatedWordCloud<\/em> relies on Python 3.8 because of its visualization <a href=\"https:\/\/github.com\/PetrKorab\/Animated-Word-Cloud\/blob\/main\/requirements.txt\">requirements<\/a>. To install using pip, use:<\/p>\n<pre class=\"wp-block-code\"><code>pip install AnimatedWordCloud<\/code><\/pre>\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>It was tested with Pycharm community ed. It&#8217;s recommended to use this IDE and run the code in a .py file instead of a jupyter notebook.<\/p><\/blockquote>\n<h3 class=\"wp-block-heading\">2. Generate frames<\/h3>\n<p class=\"wp-block-paragraph\">We will focus on the European Central Bank (ECB) communication and figure out the concepts the Bank Board members discussed over 1997\u20132023. The dataset is from the <a href=\"https:\/\/www.ecb.europa.eu\/press\/key\/html\/downloads.en.html\">ECB website<\/a>, released with a flexible <a href=\"https:\/\/www.ecb.europa.eu\/services\/using-our-site\/disclaimer\/html\/index.en.html#c\">license<\/a>.<\/p>\n<p class=\"wp-block-paragraph\">The data contains 2846 rows and has NaN values that <em>AnimatedWordCloud<\/em> can effectively process. It looks like this:<\/p>\n<p class=\"wp-block-paragraph\"><\/p>\n<p class=\"wp-block-paragraph\">Let&#8217;s import the data.<\/p>\n<pre class=\"wp-block-code\"><code>import pandas as pd\n\ndata = pd.read_csv(&#039;dataset.csv&#039;)<\/code><\/pre>\n<p class=\"wp-block-paragraph\">And then import the _animated_word<em>cloud<\/em> method.<\/p>\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><strong>EDIT Dec 2023<\/strong>: AnimatedWordCloud has been constantly updated with new parameters. Check <a href=\"https:\/\/pypi.org\/project\/AnimatedWordCloud\/\">PiPy <\/a>for the current release.<\/p><\/blockquote>\n<p class=\"wp-block-paragraph\">It offers reading data in US (<em>MM\/DD\/YYYY)<\/em> or European-style (<em>DD\/MM\/YYYY)<\/em> date and datetime formats. It automatically cleans data from punctuation and numbers on input. It can also remove the standard list(s) of stopwords for languages in the <a href=\"https:\/\/www.nltk.org\/\">NLTK<\/a> corpus of stopwords.<\/p>\n<pre class=\"wp-block-code\"><code>from AnimatedWordCloud import animated_word_cloud\n\nanimated_word_cloud(text=data[&#039;contents&#039;],  # Read text column\n          time=data[&#039;date&#039;],                # Read date column\n          date_format = &#039;us&#039;,               # Read dates in US date format\n          ngram=1,                          # Show individual word frequencies\n          freq=&#039;Y&#039;,                         # Calculate yearly frequencies\n          stopwords=[&#039;english&#039;, &#039;french&#039;,   # Clean from English, French,\n                     &#039;german&#039;, &#039;spanish&#039;])  # German and Spanish stop words<\/code><\/pre>\n<p class=\"wp-block-paragraph\">The code generates 90 PNG frames per period and creates a <em>.postprocessing\/frames<\/em> folder in the working directory to store the images.<\/p>\n<h3 class=\"wp-block-heading\">3. Create a video from images<\/h3>\n<p class=\"wp-block-paragraph\">The last step is to make a video file from individual frames. This step will be automated in future releases, but for now:<\/p>\n<p class=\"wp-block-paragraph\">Download the <em>ffmpeg<\/em> folder and the <em>frames2video.bat<\/em> file from <a href=\"https:\/\/github.com\/thisIsMikeKane\/WordSwarm\/tree\/master\/3-Postprocessing\">here<\/a> and place them into the <em>postprocessing<\/em> folder. Next, run <em>frames2video.bat<\/em>, which will generate a <em>wordSwarmOut.mp4<\/em> file, which is the desired output.<\/p>\n<iframe loading=\"lazy\" class=\"wp-block-html\" src=\"https:\/\/cdn.embedly.com\/widgets\/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FoOgEpGtsJaI%3Fstart%3D10%26feature%3Doembed%26start%3D10&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DoOgEpGtsJaI&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FoOgEpGtsJaI%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube\" height=\"480\" width=\"854\"><\/iframe>\n<p class=\"wp-block-paragraph\">Let&#8217;s tell a story of the Eurozone through the lenses of central bankers:<\/p>\n<ul class=\"wp-block-list\">\n<li>in <strong>1999 &#8211; 2002<\/strong>, the key topic was the EURO introduction <em>(&quot;accession&quot;, &quot;euro&quot;<\/em>)<\/li>\n<li>the bankers in <strong>2003 &#8211; 2006<\/strong> discussed mainly standard monetary policy implementation issues (<em>&quot;monetary&quot;, &quot;financial&quot;, &quot;market&quot;, &quot;policy&quot;)<\/em><\/li>\n<li>with the upcoming financial crisis, the key topics in <strong>2008 &#8211; 2012<\/strong> were <em>&quot;liquidity&quot;, &quot;crisis&quot; , and &quot;banks&quot;<\/em><\/li>\n<li>important periods came in <strong>2021<\/strong> with the COVID-19 economic impacts (<em>&quot;pandemic&quot;<\/em>) and the war in Ukraine when inflation was the major topic.<\/li>\n<\/ul>\n<p class=\"wp-block-paragraph\">These developments are obvious to anyone interested in the history of the Euro. But to present them is a challenging task. We can use, for example, (1) n-gram frequency analysis of keywords and produce many frequency tables of keywords, or (2) display a heatmap (or a <a href=\"https:\/\/www.betterevaluation.org\/methods-approaches\/methods\/matrix-chart#:~:text=A%20matrix%20chart%20shows%20relationships%20between%20two%20or,a%20crosstabulation%20that%20divides%20data%20between%20the%20variables.\">matrix graph<\/a>) with a period on the <em>x-axis<\/em>, word on the <em>y-axis<\/em>, and the word frequency the item in the matrix. Another option (3) is to produce many word clouds for each period. None of these is perfect for larger datasets, and the animated word cloud gives you another option for delivering the message.<\/p>\n<h2 class=\"wp-block-heading\">Practical applications<\/h2>\n<p class=\"wp-block-paragraph\">The library has a primary use in <strong>presentations<\/strong> and <strong>teaching<\/strong>. Text mining is now blending other disciplines like Economics, Politology, or Business, and teachers, analysts, and students can now use a different, more appealing way to present the facts.<\/p>\n<ul class=\"wp-block-list\">\n<li>Are you a historian interested in the history of science? Then, try downloading text datasets such as article headlines or journal abstracts from platforms like <a href=\"https:\/\/www.constellate.org\">Constellate<\/a>, prepare a video file, and tell your students about the history of AI in the published research since its very beginnings. Some inspiration might be a research trends analysis project with economics data spanning 1900\u20132018, which we have described in <a href=\"https:\/\/python.plainenglish.io\/animated-word-cloud-a-novel-way-for-the-visualization-of-word-frequencies-6505418acbb3\">this article<\/a>.<\/li>\n<li>Do you want to show your marketing team what the customers think about your product? Then, use the product reviews from external platforms (e.g., Amazon) and explain which words customers mention. Is it <em>&quot;fast&quot;<\/em> and <em>&quot;delivery&quot;<\/em>, with <em>&quot;good&quot;<\/em>, and <em>&quot;great&quot;<\/em> ? Or the frequent words are <em>&quot;poor&quot;<\/em>, <em>&quot;bad&quot;<\/em>, and <em>&quot;quality&quot;<\/em> ? Tell a story to deliver the message and see how it changes through time.<\/li>\n<\/ul>\n<p class=\"wp-block-paragraph\">Our <a href=\"https:\/\/towardsdatascience.com\/guide-to-using-word-clouds-for-applied-research-design-2e07a6a1a513\">earlier TDS article<\/a> with Jarko Fidrmuc and David \u0160trba outlined how word clouds are useful for <strong>summarization<\/strong> and <strong>exploratory<\/strong> text <strong>data analysis.<\/strong> In a dynamic form, it is possible to present the structure of text datasets collected as time series in a better, easily understandable way.<\/p>\n<p class=\"wp-block-paragraph\">Other interesting use cases, like modeling <strong>COVID-19-related discussions<\/strong> or <strong>US presidential debate<\/strong> analysis with X-tweets, might also be interesting to check in a bachelor or seminar thesis.<\/p>\n<h2 class=\"wp-block-heading\">On a technical note<\/h2>\n<p class=\"wp-block-paragraph\">In the <strong>WordsSwarm<\/strong> project, <a href=\"https:\/\/github.com\/thisIsMikeKane\">Michael Kane<\/a> developed the core framework for the animation of word frequencies for the library. <em>AnimatedWordCloud,<\/em> which I have created with an <a href=\"https:\/\/github.com\/PetrKorab\/Animated-Word-Cloud\">Apache-2.0 license<\/a>, makes the codes efficiently work on various text datasets of the Latin alphabet languages.<\/p>\n<p class=\"wp-block-paragraph\">It uses one of my earlier projects, the <a href=\"https:\/\/pypi.org\/project\/arabica\/\">\ud835\udc00\ud835\udc2b\ud835\udc1a\ud835\udc1b\ud835\udc22\ud835\udc1c\ud835\udc1a library<\/a>, to make the processing (text cleaning and word frequency aggregation. It relies on rather archaic visualization requirements that suit this project very well. PyBox2D <strong>is used<\/strong> for physics and clash detection of words in the swarm. Pyglet, <strong>cross<\/strong>-platform windowing and multimedia library, and PyGame <strong><a href=\"https:\/\/pypi.org\/project\/pygame\/\">are use<\/a><\/strong>d to create animations.<\/p>\n<p class=\"wp-block-paragraph\">It shows absolute word frequencies but scales the data to display word clouds on datasets of different sizes. In this way, datasets with large frequencies are scaled by a constant so that the word clouds can still be displayed in a video. It handles missing values and also treats mojibake errors with <em><strong><a href=\"https:\/\/pypi.org\/project\/ftfy\">ftfy<\/a><\/strong>.<\/em><\/p>\n<p class=\"wp-block-paragraph\">On the other hand, <em>AnimatedWordCloud<\/em> might have difficulties running in a Jupyter notebook and other IDEs than Pycharm. I will have a look at these shortcomings in the next releases. In future releases, <em>AnimatedWordCloud<\/em> will also provide <strong>bigram frequencies<\/strong> that will give a more detailed look at the narratives and topics people discussed in the texts. Also, I will extend the library&#8217;s documentation.<\/p>\n<p class=\"wp-block-paragraph\"><em>PS: Let me know how it worked on your projects! \ud83d\ude42<\/em><\/p>\n<p class=\"wp-block-paragraph\"><em>If you enjoy my work, you can invite me <a href=\"https:\/\/www.buymeacoffee.com\/petrkorab\">for coffee<\/a> and support my writing. You can also subscribe to my <a href=\"https:\/\/medium.com\/subscribe\/@petrkorab\">email list<\/a> to get notified about my new articles. Thanks!<\/em><\/p>","protected":false},"excerpt":{"rendered":"<p>Introduction An animated word cloud displays absolute frequencies of n-grams (contiguous sequences of text sample items) over time as a sequence of images in a video file. It **** gives greater importance to words that appear more frequently in a source text. The bigger and bolder the n-gram displays, the more frequently it appears in [&hellip;]<\/p>\n","protected":false},"author":18,"featured_media":14585,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"is_member_only":true,"sub_heading":"Animated word clouds turn classic word clouds into a dynamic visualization. Learn more about telling data stories in Python.","footnotes":""},"categories":[47],"tags":[808,508,467,1604,1580],"sponsor":[],"coauthors":[30697],"class_list":["post-14584","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-data-visualization","tag-data-storytelling","tag-data-visualization","tag-python","tag-text-mining","tag-word-cloud"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Data Storytelling with Animated Word Clouds | Towards Data Science<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/towardsdatascience.com\/data-storytelling-with-animated-word-clouds-1889fdeb97b8\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Data Storytelling with Animated Word Clouds | Towards Data Science\" \/>\n<meta property=\"og:description\" content=\"Introduction An animated word cloud displays absolute frequencies of n-grams (contiguous sequences of text sample items) over time as a sequence of images in a video file. It **** gives greater importance to words that appear more frequently in a source text. The bigger and bolder the n-gram displays, the more frequently it appears in [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/towardsdatascience.com\/data-storytelling-with-animated-word-clouds-1889fdeb97b8\/\" \/>\n<meta property=\"og:site_name\" content=\"Towards Data Science\" \/>\n<meta property=\"article:published_time\" content=\"2023-11-22T02:34:37+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-26T20:21:07+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/towardsdatascience.com\/wp-content\/uploads\/2023\/11\/1dq7JEuYZ9lpIhFS0qP_3lw.png\" \/>\n\t<meta property=\"og:image:width\" content=\"710\" \/>\n\t<meta property=\"og:image:height\" content=\"587\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Petr Kor\u00e1b\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@TDataScience\" \/>\n<meta name=\"twitter:site\" content=\"@TDataScience\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Petr Kor\u00e1b\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/towardsdatascience.com\/data-storytelling-with-animated-word-clouds-1889fdeb97b8\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/towardsdatascience.com\/data-storytelling-with-animated-word-clouds-1889fdeb97b8\/\"},\"author\":{\"name\":\"TDS Editors\",\"@id\":\"https:\/\/towardsdatascience.com\/#\/schema\/person\/f9925d336b6fe962b03ad8281d90b8ee\"},\"headline\":\"Data Storytelling with Animated Word Clouds\",\"datePublished\":\"2023-11-22T02:34:37+00:00\",\"dateModified\":\"2024-11-26T20:21:07+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/towardsdatascience.com\/data-storytelling-with-animated-word-clouds-1889fdeb97b8\/\"},\"wordCount\":1191,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/towardsdatascience.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/towardsdatascience.com\/data-storytelling-with-animated-word-clouds-1889fdeb97b8\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/towardsdatascience.com\/wp-content\/uploads\/2023\/11\/1dq7JEuYZ9lpIhFS0qP_3lw.png\",\"keywords\":[\"Data Storytelling\",\"Data Visualization\",\"Python\",\"Text Mining\",\"Word Cloud\"],\"articleSection\":[\"Data Visualization\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/towardsdatascience.com\/data-storytelling-with-animated-word-clouds-1889fdeb97b8\/\",\"url\":\"https:\/\/towardsdatascience.com\/data-storytelling-with-animated-word-clouds-1889fdeb97b8\/\",\"name\":\"Data Storytelling with Animated Word Clouds | Towards Data Science\",\"isPartOf\":{\"@id\":\"https:\/\/towardsdatascience.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/towardsdatascience.com\/data-storytelling-with-animated-word-clouds-1889fdeb97b8\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/towardsdatascience.com\/data-storytelling-with-animated-word-clouds-1889fdeb97b8\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/towardsdatascience.com\/wp-content\/uploads\/2023\/11\/1dq7JEuYZ9lpIhFS0qP_3lw.png\",\"datePublished\":\"2023-11-22T02:34:37+00:00\",\"dateModified\":\"2024-11-26T20:21:07+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/towardsdatascience.com\/data-storytelling-with-animated-word-clouds-1889fdeb97b8\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/towardsdatascience.com\/data-storytelling-with-animated-word-clouds-1889fdeb97b8\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/towardsdatascience.com\/data-storytelling-with-animated-word-clouds-1889fdeb97b8\/#primaryimage\",\"url\":\"https:\/\/towardsdatascience.com\/wp-content\/uploads\/2023\/11\/1dq7JEuYZ9lpIhFS0qP_3lw.png\",\"contentUrl\":\"https:\/\/towardsdatascience.com\/wp-content\/uploads\/2023\/11\/1dq7JEuYZ9lpIhFS0qP_3lw.png\",\"width\":710,\"height\":587},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/towardsdatascience.com\/data-storytelling-with-animated-word-clouds-1889fdeb97b8\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/towardsdatascience.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Data Storytelling with Animated Word Clouds\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/towardsdatascience.com\/#website\",\"url\":\"https:\/\/towardsdatascience.com\/\",\"name\":\"Towards Data Science\",\"description\":\"Publish AI, ML &amp; data-science insights to a global community of data professionals.\",\"publisher\":{\"@id\":\"https:\/\/towardsdatascience.com\/#organization\"},\"alternateName\":\"TDS\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/towardsdatascience.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/towardsdatascience.com\/#organization\",\"name\":\"Towards Data Science\",\"alternateName\":\"TDS\",\"url\":\"https:\/\/towardsdatascience.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/towardsdatascience.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/towardsdatascience.com\/wp-content\/uploads\/2025\/02\/tds-logo.jpg\",\"contentUrl\":\"https:\/\/towardsdatascience.com\/wp-content\/uploads\/2025\/02\/tds-logo.jpg\",\"width\":696,\"height\":696,\"caption\":\"Towards Data Science\"},\"image\":{\"@id\":\"https:\/\/towardsdatascience.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/TDataScience\",\"https:\/\/www.youtube.com\/c\/TowardsDataScience\",\"https:\/\/www.linkedin.com\/company\/towards-data-science\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/towardsdatascience.com\/#\/schema\/person\/f9925d336b6fe962b03ad8281d90b8ee\",\"name\":\"TDS Editors\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/towardsdatascience.com\/#\/schema\/person\/image\/23494c9101089ad44ae88ce9d2f56aac\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g\",\"caption\":\"TDS Editors\"},\"description\":\"Building a vibrant data science and machine learning community. Share your insights and projects with our global audience: bit.ly\/write-for-tds\",\"url\":\"https:\/\/towardsdatascience.com\/author\/towardsdatascience\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Data Storytelling with Animated Word Clouds | Towards Data Science","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/towardsdatascience.com\/data-storytelling-with-animated-word-clouds-1889fdeb97b8\/","og_locale":"en_US","og_type":"article","og_title":"Data Storytelling with Animated Word Clouds | Towards Data Science","og_description":"Introduction An animated word cloud displays absolute frequencies of n-grams (contiguous sequences of text sample items) over time as a sequence of images in a video file. It **** gives greater importance to words that appear more frequently in a source text. The bigger and bolder the n-gram displays, the more frequently it appears in [&hellip;]","og_url":"https:\/\/towardsdatascience.com\/data-storytelling-with-animated-word-clouds-1889fdeb97b8\/","og_site_name":"Towards Data Science","article_published_time":"2023-11-22T02:34:37+00:00","article_modified_time":"2024-11-26T20:21:07+00:00","og_image":[{"width":710,"height":587,"url":"https:\/\/towardsdatascience.com\/wp-content\/uploads\/2023\/11\/1dq7JEuYZ9lpIhFS0qP_3lw.png","type":"image\/png"}],"author":"Petr Kor\u00e1b","twitter_card":"summary_large_image","twitter_creator":"@TDataScience","twitter_site":"@TDataScience","twitter_misc":{"Written by":"Petr Kor\u00e1b","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/towardsdatascience.com\/data-storytelling-with-animated-word-clouds-1889fdeb97b8\/#article","isPartOf":{"@id":"https:\/\/towardsdatascience.com\/data-storytelling-with-animated-word-clouds-1889fdeb97b8\/"},"author":{"name":"TDS Editors","@id":"https:\/\/towardsdatascience.com\/#\/schema\/person\/f9925d336b6fe962b03ad8281d90b8ee"},"headline":"Data Storytelling with Animated Word Clouds","datePublished":"2023-11-22T02:34:37+00:00","dateModified":"2024-11-26T20:21:07+00:00","mainEntityOfPage":{"@id":"https:\/\/towardsdatascience.com\/data-storytelling-with-animated-word-clouds-1889fdeb97b8\/"},"wordCount":1191,"commentCount":0,"publisher":{"@id":"https:\/\/towardsdatascience.com\/#organization"},"image":{"@id":"https:\/\/towardsdatascience.com\/data-storytelling-with-animated-word-clouds-1889fdeb97b8\/#primaryimage"},"thumbnailUrl":"https:\/\/towardsdatascience.com\/wp-content\/uploads\/2023\/11\/1dq7JEuYZ9lpIhFS0qP_3lw.png","keywords":["Data Storytelling","Data Visualization","Python","Text Mining","Word Cloud"],"articleSection":["Data Visualization"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/towardsdatascience.com\/data-storytelling-with-animated-word-clouds-1889fdeb97b8\/","url":"https:\/\/towardsdatascience.com\/data-storytelling-with-animated-word-clouds-1889fdeb97b8\/","name":"Data Storytelling with Animated Word Clouds | Towards Data Science","isPartOf":{"@id":"https:\/\/towardsdatascience.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/towardsdatascience.com\/data-storytelling-with-animated-word-clouds-1889fdeb97b8\/#primaryimage"},"image":{"@id":"https:\/\/towardsdatascience.com\/data-storytelling-with-animated-word-clouds-1889fdeb97b8\/#primaryimage"},"thumbnailUrl":"https:\/\/towardsdatascience.com\/wp-content\/uploads\/2023\/11\/1dq7JEuYZ9lpIhFS0qP_3lw.png","datePublished":"2023-11-22T02:34:37+00:00","dateModified":"2024-11-26T20:21:07+00:00","breadcrumb":{"@id":"https:\/\/towardsdatascience.com\/data-storytelling-with-animated-word-clouds-1889fdeb97b8\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/towardsdatascience.com\/data-storytelling-with-animated-word-clouds-1889fdeb97b8\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/towardsdatascience.com\/data-storytelling-with-animated-word-clouds-1889fdeb97b8\/#primaryimage","url":"https:\/\/towardsdatascience.com\/wp-content\/uploads\/2023\/11\/1dq7JEuYZ9lpIhFS0qP_3lw.png","contentUrl":"https:\/\/towardsdatascience.com\/wp-content\/uploads\/2023\/11\/1dq7JEuYZ9lpIhFS0qP_3lw.png","width":710,"height":587},{"@type":"BreadcrumbList","@id":"https:\/\/towardsdatascience.com\/data-storytelling-with-animated-word-clouds-1889fdeb97b8\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/towardsdatascience.com\/"},{"@type":"ListItem","position":2,"name":"Data Storytelling with Animated Word Clouds"}]},{"@type":"WebSite","@id":"https:\/\/towardsdatascience.com\/#website","url":"https:\/\/towardsdatascience.com\/","name":"Towards Data Science","description":"Publish AI, ML &amp; data-science insights to a global community of data professionals.","publisher":{"@id":"https:\/\/towardsdatascience.com\/#organization"},"alternateName":"TDS","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/towardsdatascience.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/towardsdatascience.com\/#organization","name":"Towards Data Science","alternateName":"TDS","url":"https:\/\/towardsdatascience.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/towardsdatascience.com\/#\/schema\/logo\/image\/","url":"https:\/\/towardsdatascience.com\/wp-content\/uploads\/2025\/02\/tds-logo.jpg","contentUrl":"https:\/\/towardsdatascience.com\/wp-content\/uploads\/2025\/02\/tds-logo.jpg","width":696,"height":696,"caption":"Towards Data Science"},"image":{"@id":"https:\/\/towardsdatascience.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/TDataScience","https:\/\/www.youtube.com\/c\/TowardsDataScience","https:\/\/www.linkedin.com\/company\/towards-data-science\/"]},{"@type":"Person","@id":"https:\/\/towardsdatascience.com\/#\/schema\/person\/f9925d336b6fe962b03ad8281d90b8ee","name":"TDS Editors","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/towardsdatascience.com\/#\/schema\/person\/image\/23494c9101089ad44ae88ce9d2f56aac","url":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","caption":"TDS Editors"},"description":"Building a vibrant data science and machine learning community. Share your insights and projects with our global audience: bit.ly\/write-for-tds","url":"https:\/\/towardsdatascience.com\/author\/towardsdatascience\/"}]}},"distributor_meta":false,"distributor_terms":false,"distributor_media":false,"distributor_original_site_name":"Towards Data Science","distributor_original_site_url":"https:\/\/towardsdatascience.com","push-errors":false,"_links":{"self":[{"href":"https:\/\/towardsdatascience.com\/wp-json\/wp\/v2\/posts\/14584","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/towardsdatascience.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/towardsdatascience.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/towardsdatascience.com\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/towardsdatascience.com\/wp-json\/wp\/v2\/comments?post=14584"}],"version-history":[{"count":0,"href":"https:\/\/towardsdatascience.com\/wp-json\/wp\/v2\/posts\/14584\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/towardsdatascience.com\/wp-json\/wp\/v2\/media\/14585"}],"wp:attachment":[{"href":"https:\/\/towardsdatascience.com\/wp-json\/wp\/v2\/media?parent=14584"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/towardsdatascience.com\/wp-json\/wp\/v2\/categories?post=14584"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/towardsdatascience.com\/wp-json\/wp\/v2\/tags?post=14584"},{"taxonomy":"sponsor","embeddable":true,"href":"https:\/\/towardsdatascience.com\/wp-json\/wp\/v2\/sponsor?post=14584"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/towardsdatascience.com\/wp-json\/wp\/v2\/coauthors?post=14584"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}