Wolfram|Alpha Query Widget Builder
Wolfram|Alpha, the fact engine has released a neat new feature today. Wolfram|Alpha is allowing anyone to build query driven widgets that can be embedded on any web page. The purpose is to enable publishers, bloggers, professors, teachers and so on to easily build quick widgets to add to their content and materials. You can build […]
The purpose is to enable publishers, bloggers, professors, teachers and so on to easily build quick widgets to add to their content and materials. You can build widgets based off of Wolfram|Alpha’s large database of scientific information and data. Widget creation is all based off the initial query, which then can be made into a simple form that can be used by anyone. I’ll explain this in more detail below.
First, you can browse the widget gallery to get ideas on some of the powerful widgets you can create. For example, you can build widgets that show your heart disease risk level, compare company sizes or give you the Thermodynamic properties. You can browse through the gallery to come up with new ideas and even modify someone else’s widget in order to build a new one.
One of my favorite uses of Wolfram|Alpha is as simple as typing in a date and getting information about that date. Sometimes, I simply want to know how long ago that date occurred, while other times I want to know what time sunrise is on that date or who was born on that date. I decided to create a very basic widget that let’s people quickly plug in any date and get a quick data sheet on that date.
For now, all anyone can embed a widget but to create a widget yo need a widget developer account, which is free. Wolfram|Alpha will release a commercial version of this widget creation tool, which will not have the requirement of users sharing all widgets. Let’s say you wanted to create an internal widget for company use only.
Widget Creation Process:
(1) Start off by typing an example query, in my case, I simply wrote a date. But your query can be a lot more complex than just this:
You can then preview this query to make sure it looks right:
(2) The next step is to template your query. By template, I mean you need to create variables for the parts of your query that should be variable. In my case, I want the January, 25 and 1985 to be all variables that can change in my widget.
It really is as easy as clicking on and highlighting part of your query and selecting the variable text, options and so on.
(3) Now you can customize the colors, the position of the boxes, the default variables and if you want to define any specific variables to be selected in a drop down or radio box. You can add titles, change the alignment, add spacers and much more. This step is about the layout of your widget:
Clicking on a cell gives you the ability to set specific changes to that variable:
(4) The amount of information given for any particular query can be tremendous and sometimes you want to only show a small portion of that output. Wolfram|Alpha gives you the ability to control the output type on this next step:
(5) You can then select the method you want people to view the results of the widget. Do you want the “lightbox” affect, which overlays the results on the page? Do you want a pop up window for the results? Maybe you want to embed the results using an iFrame. You can even adjust the width and height of the output box and preview the look:
(6) Finally, you name your widget, give it information for the widget gallery and get your embed code:
(7) Published widgets show up under the “My Widgets” section and it gives you the ability to see some basic statistics on the widget. Here is a picture: