text: # encoding: utf-8
  
  ##################################################
  # This script summarises text variables by creating wordclouds. It uses a python library that needs to be installed
  # in the virtual environment beforehand through anaconda. This exercise aims to show the basic analysis tool
  # used for text as well as to test the work environment.
  # To install wordcloud see the documentation here https://pypi.org/project/wordcloud/
  ##################################################
  #
  ##################################################
  # Author: Diego Pajarito
  # Copyright: Copyright 2019, IAAC
  # Credits: [Institute for Advanced Architecture of Catalonia - IAAC, Advanced Architecture group]
  # License:  Apache License Version 2.0
  # Version: 1.0.0
  # Maintainer: Diego Pajarito
  # Email: diego.pajarito@iaac.net
  # Status: development
  ##################################################
  
  # Libraries
  from os import path
  from wordcloud import WordCloud
  import matplotlib.pyplot as plt
  
  # Create a list of word
  text = ("Python Python Python Matplotlib Matplotlib Seaborn Network Plot Violin Chart Pandas Datascience Wordcloud Spider Radar Parrallel Alpha Color Brewer Density Scatter Barplot Barplot Boxplot Violinplot Treemap Stacked Area Chart Chart Visualization Dataviz Donut Pie Time-Series Wordcloud Wordcloud Sankey Bubble")
  
  # Create the wordcloud object
  wordcloud = WordCloud(width=480, height=480, margin=0).generate(text)
  
  # Display the generated image:
  plt.imshow(wordcloud, interpolation='bilinear')
  plt.axis("off")
  plt.margins(x=0, y=0)
  plt.show()
  
  
  # Let's do it using a text file
  
  text = open('../data/text_article.txt').read()
  text = text.upper()
  
  # Create the wordcloud object
  wordcloud = WordCloud(width=480, height=480, margin=0).generate(text)
  
  # Display the generated image:
  plt.imshow(wordcloud, interpolation='bilinear')
  plt.axis("off")
  plt.margins(x=0, y=0)
  plt.show()
  