Wolfram Alpha Widgets

Try to say that 5 times really fast. Go ahead, try it. Well, at least it is not as difficult as Fox in Socks - man that book is a killer.

This WAW is basically a means to embed Wolfram Alpha queries into a webpage. Pretty cool idea, but I am not sure how well it does the job. In fact, I have tried to embed calculations in my posts before. So, how about I just give a quick review of some different ways to do this. For all these methods, I will put in a calculator to determine the density of something given its mass and volume.

Javascript version

Density calculator

Enter the mass:
kg

Enter the volume:
m3


Density =

What is good about this? First, it is all contained in this page. There are no popups or anything like that. It doesn't depend on the user having to log into anything else. It is fully customizable by me - if I wanted, I could even add pull down menus for different units and stuff.

What is not to like? Well, I don't like writing javascript code. Maybe if I do this often enough, it wouldn't be so bad. Also, for simple stuff, it is pretty straight forward - but what about crazy complicated stuff? Note: I am not a javascript expert by any means.

Embedded Spreadsheet

I have used this one before. The basic idea is to put the calculation into either a google doc or in a Zoho spreadsheet. I will use both below.

Google Docs


I really thought one could embed an editable google docs spreadsheet. Why can't you? WHY? Oh well, here is the webpage version that you can edit - but that kind of ruins the whole point.


Zoho

I wish the zoho doc could be set to edit on load instead of having to click that edit button. Also, my brother claims that this doesn't work in Safari if you have cookies disabled or something like that. Other than that, the embeddable spreadsheet thing seems like a good idea. Too bad it doesn't work just the way I like it.

Wolfram Alpha Widget

Here is the applet I made from Wolfram Alpha.

Yes, this is pretty simple - but it returns lots of cool info. I am not sure if this form is still the best. However, maybe this is better than the other two. I haven't made up my mind yet. What about a more difficult test? Here is a calculation from my flying R2-D2 post. I found an expression for the mass of R2 as:

i-c49b6e6cbc2fe32f5b583e6f7ee50232-2010-08-02_r_2_mass.jpg

Can I use Wolfram Alpha to make a widget for this?

That seems to work. Also, in this version I included the units in the input box. Why not - right? Wolfram Alpha interprets that stuff anyway. No need for me to go through the trouble of making in a pop-up menu.

But, what do you think? Are there any other good alternatives for embedding calculations?

More like this

Thanks to all who participated in the Dot Physics Census. Let me share some of the things that I learned: The survey was flawed. How dumb was I? Almost everyone would fit into more than one of those categories. Oh well. Google Docs makes pretty good surveys. I made a form in google docs and…
First: Car Talk is awesome. I wish I could come up with some class activities that help students become as good at trouble shooting and critical thinking as Tom and Ray are. Anyway, they are quite entertaining. So, my Dad called and told me he heard a discussion on Car Talk about the effect DC to…
This one has been on my mind for quite some time. What kind of power source would you need to run a lightsaber? I was actually worried recently about this post when I saw the Discovery Channel show "Sci Fi Science". In that particular episode Michio Kaku talks about how you would actually build…
You know I can't help but like Star Wars. Even with the new stuff, I watch it. Recently, I was watching the Clone Wars cartoon and noticed something odd about the way R2-D2 flies. I know what you are saying...."the odd thing is that he flies at all. Why didn't he fly in episodes 4-6?" Who…

There's a slight flaw in your Javascript version. It seems to be multiplying mass by volume to get density which isn't how I learned it.

@Claran,

I did that on purpose just to see if anyone was paying attention - obviously you are.

Just kidding - thanks for pointing that out (I fixed it).

The WA widget is not using the correct units for me. I put in 10 kg and 1 m^3 and got (hand translated to ASCII):
___________________BEGIN_____________________

Input interpretation:

10 grams
-------------------------
1 cm^3 (centimeter cubed)

Result:

10 g/cm^3 (grams per cubic centimeter)

Unit conversions:

.....

[third in the list] 10 000 kg/m^3 (kilograms per cubic
....
_____________________END_____________________

Changing the units to kg and mL and trying different numbers (0.002 kg and 3 mL) yields:

___________________BEGIN_____________________

Input interpretation:

0.00200 g (grams)
-------------------
3 L (liters

Result:

6.67 x 10^-4 g/L (grams per liter)

Unit conversions:

[kg/mL not given]
_____________________END_____________________

By Grep Agni (not verified) on 03 Aug 2010 #permalink

@Grep Agni

Ok - I think I fixed it - but you were right. I don't know why wolfram alpha was doing that. You can see my simple fix was to switch from putting the units in a pull down menu to just putting them in the entry box. That is easier and more sensible anyway.

Thanks for pointing out the error.