Here’s a neat trick I played around with today. You can use a Workflow to create a word cloud from data in your app!
Follow these steps to see it in action:
- Copy the example app to your account and open it up
- Click an event to see the detail page
- Click “Create Word Cloud”
- Wait for the changes to sync. A new button will appear to open the word cloud. Click it!
- Assuming you’re using Chrome, your browser will download the file and put a shortcut at the bottom of your browser window. Click the arrow next to the shortcut and select “Always Open Files of This Type”
- Go back to the app and click the “Open Word Cloud” button. It should open the word cloud in another tab. Neat!
When you click the button to create the word cloud, a workflow is triggered. The html file uses a google doc template. Most of the template is the html required to render the page. There is one line where all the words are injected that are used for the cloud. It looks like this (the << >> tags are used instead of << >> because it is html. See this article)
I created a table called simulateSurvey that has a bunch of fake survey data in it. The words are random with a few intentional keywords to make the demo look good. You can update that line to pull whatever text data you want from your data source (e.g. using a select() statement, etc).
The template references scripts created by ZingChart. Since the scripts are hosted and publicly available, the html file is able to render directly in your browser.
Have fun word clouding!!