Automate the creation of Wordle word clouds (Thank you, IBM!)
Somehow this hasn’t received the attention it deserves: IBM has released a tool that lets you generate “Wordle” word could images offline on your PC – completely disconnected from the Wordle web site.
Here’s what you have to do, step-by-step
DOWNLOAD AND INSTALL THE JAVA RUNTIME ENVIRONMENT
Go to this page: http://java.sun.com/javase/downloads/index.jsp
You’ll be looking for Java SE Runtime Environment (JRE 6 Update 14 is the latest version). Click download and install it.
DOWNLOAD AND INSTALL THE IBM WORD CLOUD GENERATOR
Go to this site
http://www.alphaworks.ibm.com/tech/wordcloud
And click on the Download tab
Click on the Download Now link
Once you click you’ll have to register (free) with IBM to download the tool.
Once you have the zip file … just right click to expand
Inside the folder it creates you’ll see a folder called “IBM Word Cloud”
You’ll need to run the tool from the command-line so the easiest way to do this is to hold down the SHIFT key and right click on the “IBM World Cloud” folder and select Open command window here
Which will launch the command line
If you look in the folder you’ll see several files
The easiest way to get started is just to launch the “run-eample.bat” file from the command line …
As you can tell from the output – all the script does is specify the …
- a configuration file
- the width and height of the image in pixels
- the input text (“hamlet.txt”)
- the output filename (“example.png”)
You can see now that example.png is in the “IBM Word Cloud” folder. Just right click on the image and select preview…
And it will open in the photo viewer
At this point it should be clear how to generate different sizes of bitmaps. But of course we don’t want pixels, we want the sweet, sweet vector-based goodness.
The way to do this is to specify the –p option in the command line instead of sending the output to a bitmap.
And easy way to make this happen is just to modify the run-example.bat
From this:
To this…
And this time when you launch the run-example.bat file
You’ll see a print dialog instead and you can select a print driver that lets you save to a file. In this case I’ll pick Microsoft XPS Document Writer
And click OK, and then select the output filename for the XPS file
Converting from XPS to a vector format is my next challenge. But if you have adobe acrobat you should be to get the PDF and take the vectors into Illustrator.
PARTING THOUGHTS
- Looking for recommendations for any free print drivers to create vector output (EMF, PDF, SVG, etc.)
- I’m going to hook this up to my Twitter search code so that I can get a daily word clouds on my favorite topics